Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: installboot(8) changes for installing u-boot directly to SPI flash (or other raw flash devices)
On Fri, 13 Sep 2019 15:08:10 -0700
Jason Thorpe <thorpej%me.com@localhost> wrote:
> With bouyer@ and tnn@ having added SPI boot support to a couple of the u-boot packages, I decided to tweak installboot(8) to allow installing a SPI u-boot directly to the raw flash device so folks can avoid all of the nonsense with dd(1) for padding the binary and writing it out with the correct block size.
>
> Diffs:
>
> https://github.com/thorpej/netbsd-src/pull/30/files
>
> While I was at it, I added an alias capability for u-boot-install-* directives in the installboot.plist file. The rationale is that if a u-boot package's installboot.plist has a SPI directive, it will 99.9% probably also have an SDMMC directive, and since eMMC is 99.9% probably identical to the SDMMC install steps, an alias would be handy to avoid duplication of steps in the config file, and to make it more clear for the user. (Most installboot.plist files don't need this because they use the default u-boot-install directive because they *only* support SDMMC / eMMC).
>
> <key>u-boot-install-sdmmc</key>
> <array>
> <dict>
> <key>file-name</key>
> <string>u-boot-sunxi-with-spl.bin</string>
> <key>image-offset</key>
> <integer>8192</integer>
> </dict>
> </array>
> <key>u-boot-install-emmc</key>
> <string>u-boot-install-sdmmc</string>
> <key>u-boot-install-spi</key>
> <array>
> <dict>
> <key>file-name</key>
> <string>u-boot-sunxi-with-spl.bin</string>
> <key>output-size</key>
> <integer>2097152</integer>
> <key>output-block-size</key>
> <integer>65536</integer>
> </dict>
> </array>
>
> I've done some basic testing, but I don't have a device handy that needs this, so I'm waiting for feedback from bouyer@. In the mean time, feedback welcome.
>
> Since the changes are pretty small, I'll probably request these to be pulled into netbdsd-9 once they're committed to the trunk.
Hi,
It's a good addition. A feature that might be useful is ability to
have a different input and output block size with option to insert
padding. The Rockchip SPI stage 1 loader has to have input block size
of 2kB and output block size of 4kB, i.e. 2kB blocks are interleaved
with 2kB of NUL bytes. In the U-Boot package I created a special file
with the padding built in, but if we can handle the padding from the
tool we can use the same image for both SD-card and SPI.
Kind regards,
-Tobias
Home |
Main Index |
Thread Index |
Old Index