<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/sunxi-spl-image-builder.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>tools: sunxi-spl-image-builder: support H6/H616 NAND boot</title>
<updated>2026-02-03T20:45:27+00:00</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@bootlin.com</email>
</author>
<published>2026-01-23T11:45:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=800ebf7e94e3a7e375cf915ae21e14514fd81450'/>
<id>800ebf7e94e3a7e375cf915ae21e14514fd81450</id>
<content type='text'>
The H6/H616 boot ROM doesn't expect a SPL scrambled the same way as
older SoCs.
It doesn't use a specific seeds table, it expects a maximized ECC
(BCH-80), a specific BBM (FF000301) and doesn't work if empty pages are
skipped (it needs its specific BBM, even in the padding).

So, add a --soc=h6 option to support H6/616 with:
- more ECC strengths
- specific BBM
- default_scrambler_seeds[] with all values
- no empty pages skip

In Kconfig, select BCH-80 by default for SUNXI_SPL_ECC_STRENGTH to make
BROM happy.

And in scripts/Makefile.xpl, use --soc=h6 option when building for a
SUN50I_GEN_H6 SoC.

Tested on Whatsminer H616 board, booting from NAND.

Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Co-developed-by: James Hilliard &lt;james.hilliard1@gmail.com&gt;
Signed-off-by: James Hilliard &lt;james.hilliard1@gmail.com&gt;
Signed-off-by: Richard Genoud &lt;richard.genoud@bootlin.com&gt;
Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The H6/H616 boot ROM doesn't expect a SPL scrambled the same way as
older SoCs.
It doesn't use a specific seeds table, it expects a maximized ECC
(BCH-80), a specific BBM (FF000301) and doesn't work if empty pages are
skipped (it needs its specific BBM, even in the padding).

So, add a --soc=h6 option to support H6/616 with:
- more ECC strengths
- specific BBM
- default_scrambler_seeds[] with all values
- no empty pages skip

In Kconfig, select BCH-80 by default for SUNXI_SPL_ECC_STRENGTH to make
BROM happy.

And in scripts/Makefile.xpl, use --soc=h6 option when building for a
SUN50I_GEN_H6 SoC.

Tested on Whatsminer H616 board, booting from NAND.

Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Co-developed-by: James Hilliard &lt;james.hilliard1@gmail.com&gt;
Signed-off-by: James Hilliard &lt;james.hilliard1@gmail.com&gt;
Signed-off-by: Richard Genoud &lt;richard.genoud@bootlin.com&gt;
Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: sunxi: avoid read after end of string</title>
<updated>2017-05-05T20:45:57+00:00</updated>
<author>
<name>xypron.glpk@gmx.de</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2017-05-04T20:26:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f59a3b21f60190793dc3cee97338c2f6ee9f2336'/>
<id>f59a3b21f60190793dc3cee97338c2f6ee9f2336</id>
<content type='text'>
The evaluation of option -c is incorrect:

According to the C99 standard endptr in the first strtol is always
set as &amp;endptr is not NULL.
So the first part of the or condition is always true.
If all digits in optarg are valid endptr will point to the closing \0
and the second strtol will read beyond the end of the string optarg
points to.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The evaluation of option -c is incorrect:

According to the C99 standard endptr in the first strtol is always
set as &amp;endptr is not NULL.
So the first part of the or condition is always true.
If all digits in optarg are valid endptr will point to the closing \0
and the second strtol will read beyond the end of the string optarg
points to.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: sunxi: Add spl image builder</title>
<updated>2017-04-07T05:53:45+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2017-02-27T17:22:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=594b4cc732f8f45d855ff435ef68fa4afc153844'/>
<id>594b4cc732f8f45d855ff435ef68fa4afc153844</id>
<content type='text'>
This program generates raw SPL images that can be flashed on the NAND with
the ECC and randomizer properly set up.

This has been copied (and tweaked to find the right headers) from the
sunxi-tools (https://github.com/linux-sunxi/sunxi-tools) upstream
repository, commit 1c3a6ca5.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@openedev.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This program generates raw SPL images that can be flashed on the NAND with
the ECC and randomizer properly set up.

This has been copied (and tweaked to find the right headers) from the
sunxi-tools (https://github.com/linux-sunxi/sunxi-tools) upstream
repository, commit 1c3a6ca5.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@openedev.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
