U-boot not booting on H64 model B
#1
I am trying to get mainline U-Boot to run on the H64 B.

I'm able to boot Armbian successfully, but the U-Boot I compile never works.

Any help would be appreciated.

I've tried these two scenarios:
- Flash Armbian to an SD card, it boots successfully, then overwrite my U-Boot onto that card, and it fails to boot. Filesystem and partitioning unmodified from what Armbian had, just overwrite U-Boot with dd.
- create an Arch Linux SD card using my U-Boot and rootfs. It fails to boot on the H64. I'm using a very similar method to what I do for an Odroid C4, and it works on the C4 - the C4 has a different uboot, but the process I use to make the SD card is the same.

In both cases, the UART shows:
Code:
U-Boot SPL 2022.01-rc4-00030-gb3f84a939f (Jan 01 2022 - 00:28:05 -0700)
DRAM: 4096 MiB
Trying to boot from MMC1

And it hangs at that last line.
Using the reset button just results in that message being printed again:
Code:
U-Boot SPL 2022.01-rc4-00030-gb3f84a939f (Jan 01 2022 - 00:28:05 -0700)
DRAM: 4096 MiB
Trying to boot from MMC1

U-Boot SPL 2022.01-rc4-00030-gb3f84a939f (Jan 01 2022 - 00:28:05 -0700)
DRAM: 4096 MiB
Trying to boot from MMC1

U-Boot SPL 2022.01-rc4-00030-gb3f84a939f (Jan 01 2022 - 00:28:05 -0700)
DRAM: 4096 MiB
Trying to boot from MMC1

I've also tried doing a power cycle instead of using the reset button, that leads to the same result.

I think I'm creating U-Boot in the right way. Here's what I'm doing (based off of https://github.com/qemu/u-boot/blob/mast...ME.sunxi64, and seems to match what as365n4 is doing in his post @ https://forum.pine64.org/showthread.php?tid=11703):
Code:
# compile ATF

git clone https://github.com/ARM-software/arm-trusted-firmware.git
cd arm-trusted-firmware
CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_h6 make bl31
=> Built build/fvp/release/bl31.bin successfully

# configure and compile U-Boot

git clone https://gitlab.denx.de/u-boot/u-boot.git
cd u-boot

cp ../arm-trusted-firmware/build/fvp/release/bl31.bin .

make pine_h64_defconfig
CROSS_COMPILE=aarch64-linux-gnu- SCP=/dev/null make -j16 all

I've tried master ATF & U-Boot both with and without SCP, compiled as such:
Code:
git clone https://github.com/crust-firmware/crust
cd crust
CROSS_COMPILE=or1k-elf- make pine_h64_defconfig
CROSS_COMPILE=or1k-elf- make scp
And then I copy the scp.bin file to u-boot folder and remove SCP=/dev/null from the make command.
The or1k-elf toolchain is a bit different from the or1k-linux-musl that the sunxi readme suggests, but SCP shouldn't be required anyway in the first place.

I've also tried ATF v2.3 with U-Boot 2020.10, since as365n4 reported that working for him on post 24 of his thread... but same result, hangs at "Trying to boot from MMC1".

Flashing U-Boot to the SD with:
Code:
dd if=u-boot-sunxi-with-spl.bin of=/dev/sda bs=8k seek=1

I've spent a few hours banging my head against this but haven't been able to get any result other than "Trying to boot from MMC1"...
  Reply
#2
Solution: when compiling ATF, the PLAT must come after make.



Instead of:
CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_h6 make bl31

Use:
CROSS_COMPILE=aarch64-linux-gnu- make PLAT=sun50i_h6 bl31



And then this step:
cp ../arm-trusted-firmware/build/fvp/release/bl31.bin .

Will change to:
cp ../arm-trusted-firmware/build/sun50i_h6/release/bl31.bin .
  Reply
#3
Compiling u-boot for the H64B caused me some sleepless nights too, but here is my solution --> Compiling u-boot on H64B board (Debian)
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Correct setup for u-boot and fstab ? Device not booting as365n4 30 13,435 03-22-2021, 05:56 PM
Last Post: kuleszdl
  Unable to boot any armbian linux vicsanca 6 4,793 10-17-2019, 12:08 PM
Last Post: JGwinner
  Some test PINE H64 “Model B”-3GB, please! stslit 1 2,453 08-25-2019, 12:41 PM
Last Post: stslit

Forum Jump:


Users browsing this thread: 1 Guest(s)