U-boot version selection
zweiss at equinix.com
Fri Jul 9 05:19:06 AEST 2021
On Wed, Jun 30, 2021 at 11:51:49PM CDT, Joel Stanley wrote:
>egacOn Thu, 1 Jul 2021 at 02:48, Zev Weiss <zweiss at equinix.com> wrote:
>> I recently found myself needing to make some tweaks to u-boot to
>> accommodate a new board I'm targeting with a larger flash part, but in
>> going to do so I remembered that I'm currently using u-boot v2016.7,
>> whereas new development is strongly encouraged to use v2019.04 .
>> As far as I know that happened entirely by default (i.e. I didn't go out
>> of my way to use the older version), so I hunted around a bit for how to
>> override that to use the newer one, but wasn't able to find anything
>> obvious. What's the recommended way to go about switching that for my
>You can see Lei's change to use the newer tree here:
>UBOOT_DEVICETREE = "ast2500-evb"
>UBOOT_MACHINE = "evb-ast2500_defconfig"
>PREFERRED_PROVIDER_u-boot = "u-boot-aspeed-sdk"
>PREFERRED_PROVIDER_u-boot-fw-utils = "u-boot-fw-utils-aspeed-sdk"
>PREFERRED_PROVIDER_virtual/bootloader = "u-boot-aspeed-sdk"
>The important change is to point it to a valid defconfig for the new
>tree, to specify the u-boot device tree to use, and to change some
>yocto PROVIDER variables to use the "u-boot-aspeed-sdk" variant.
Great, thanks for the pointers there -- that worked smoothly on the 64M
board I'm currently working on a port for. Unfortunately when I tried
it out on one of the 32M platforms I've got I realized that the u-boot
image with the new branch comes out to around 430K, which in addition to
being quite a bit larger than the old branch (~225K), is too big to fit
in the u-boot partition of the 32MB static flash layout (384K).
With a bit of haphazard experimentation, I found that disabling
CONFIG_EFI_LOADER got it down to 370K, and turning off
CONFIG_SYS_LONGHELP reduced that to 357K, leaving a bit of breathing
room, though perhaps still less than would be ideal. Since a quick poll
of FLASH_SIZE settings seems to indicate that most existing OpenBMC
platforms are 32M, would those be appropriate candidates to add to the
(I also encountered an ftgmac100 phy-related null pointer dereference
that leads to it spewing a bunch of garbage to the console, which I
band-aided temporarily with a dts patch to disable the second mac.)
More information about the openbmc