openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* (Aspeed2600) Booting with a SPL loading U-boot fitImage
@ 2021-03-01 19:25 Klaus Heinrich Kiwi
  2021-03-02 13:17 ` Klaus Heinrich Kiwi
  0 siblings, 1 reply; 5+ messages in thread
From: Klaus Heinrich Kiwi @ 2021-03-01 19:25 UTC (permalink / raw)
  To: openbmc, Joel Stanley, Andrew Jeffery, Ryan Chen

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@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@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@100: 0
Loading Environment from MMC... OK
In:    serial@1e784000
Out:   serial@1e784000
Err:   serial@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@linux.vnet.ibm.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-02 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1404.1614626722.7079.openbmc@lists.ozlabs.org>
2021-03-02  7:54 ` (Aspeed2600) Booting with a SPL loading U-boot fitImage Dan Zhang
2021-03-02 13:21   ` Klaus Heinrich Kiwi
2021-03-02 17:12     ` Dan Zhang
2021-03-01 19:25 Klaus Heinrich Kiwi
2021-03-02 13:17 ` Klaus Heinrich Kiwi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).