Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

installboot(8) changes for installing u-boot directly to SPI flash (or other raw flash devices)



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.

-- thorpej



Home | Main Index | Thread Index | Old Index