(Aspeed2600) Booting with a SPL loading U-boot fitImage

Klaus Heinrich Kiwi klaus at linux.vnet.ibm.com
Tue Mar 2 06:25:03 AEDT 2021


Has anyone been able to successfully bring-up U-boot proper as a fitImage from the SPL, when using U-boot from the 2019.4 Aspeed SDK?

The current configuration for Rainier (ast2600_openbmc_spl_emmc_defconfig) has, among other things, CONFIG_SPL_LOAD_FIT=y which at the end of the build process should produce a spl/u-boot-spl.bin file (which is really the concatenation of u-boot-spl-nodtb.bin + u-boot-spl.dtb) and a u-boot.img file, which is a FIT image created with 'mkimage -f auto -A arm -T firmware -C none -O u-boot -a 0x10000 -e 0 -n "U-Boot 2019.04"" for evb_ast2600a1 board" -E  -d u-boot-nodtb.bin u-boot.img'

I tried loading this pair using qemu-system-arm (Aspeed 6.0 branch from Cedric Legoater), the SPL loads but fails to load the U-boot fit Image apparently:

----
$ dd of=mmc-image.img if=/dev/zero bs=1M count=128
$ dd of=mmc-image.img if=../uboot-build/spl/u-boot-spl.bin conv=notrunc
   54454 bytes (54 kB, 53 KiB) copied
$ dd of=mmc-image.img if=../uboot-build/u-boot.img conv=notrunc bs=1K seek=64
   429640 bytes (430 kB, 420 KiB) copied
$ xzdec tmp/deploy/images/rainier/obmc-phosphor-image-rainier.wic.xz | dd of=mmc-image.img conv=notrunc bs=1M seek=2
$ truncate --size 16G mmc-image.img
$ qemu-system-arm -M rainier-bmc -nographic -drive file=mmc-image.img,if=sd,format=raw,id=sd0,index=2 -nodefaults -serial mon:stdio
<..snip..>
aspeed_sdhci_probe: CLK 200000000
ofnode_read_u32: bus-width: x (4)
ofnode_read_u32: sdhci-drive-type: x (1)
clock is disabled (0Hz)
clock is enabled (400000Hz)
clock is enabled (25000000Hz)
blk_find_device: if_type=6, devnum=0: emmc_slot0 at 100.blk, 6, 0
Jumping to U-Boot
SPL malloc() used 0xf4 bytes (0 KB)
loaded - jumping to U-Boot...
image entry point: 0x81000000
-----

At this point it just sits there with no progress..

Another interesting point here is that if I use a legacy uboot image (the concatenation of u-boot-nodtb.bin + u-boot.dtb), I can bring-up u-boot proper and it will work just fine, even if the same defconfig has '# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set'

----
clock is enabled (25000000Hz)
blk_find_device: if_type=6, devnum=0: emmc_slot0 at 100.blk, 6, 0
Jumping to U-Boot
SPL malloc() used 0xf4 bytes (0 KB)
loaded - jumping to U-Boot...
image entry point: 0x81000000


U-Boot 2019.04 (Feb 27 2021 - 15:21:29 +0000)

SOC: AST2600-A1
eSPI Mode: SIO:Enable : SuperIO-2e
Eth: MAC0: RMII/NCSI, MAC1: RMII/NCSI, MAC2: RMII/NCSI, MAC3: RMII/NCSI
Model: Rainier
DRAM:  already initialized, 1008 MiB (capacity:1024 MiB, VGA:64 MiB), ECC off
MMC:   emmc_slot0 at 100: 0
Loading Environment from MMC... OK
In:    serial at 1e784000
Out:   serial at 1e784000
Err:   serial at 1e784000
Model: Rainier
Net:   No MDIO found.
ftgmac100_probe - NCSI detected
----

That probably explains why we have been able to boot the rainier OpenBMC image (even if u-boot is configured to use SPL + U-Boot FIT, the kernel-fitimage.bbclass creates a "new" u-boot image by concatenating the aforementioned binaries).

I tried a few different settings for the .config and also tried debugging the SPL, but it's a very constrained environment and at this point I'm a bit out of ideas.

So has anyone been able to make this work?




-- 
Klaus Heinrich Kiwi <klaus at linux.vnet.ibm.com>


More information about the openbmc mailing list