June 14, 2017

U-Boot for the Nanopi Neo

I have been working with Orange Pi boards (which are also based on the Allwinner H3 chip) and I have U-Boot sources handy. I was happy to see that there is a U-Boot config file for the NanoPi Neo all set up and ready to go out of the box. It is "nanopi_neo_defconfig" in my v2016.11 U-Boot sources with the Armbian patches. So I can build this via:
export CROSS_COMPILE=arm-linux-gnu-
make distclearn
make nanopi_neo_defconfig
make all
The final result of this is "u-boot-sunxi-with-spl.bin". Here is the file for you to download and use: This I place on an SD card (using a USB card reader in my linux desktop), via:
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdx bs=1024 seek=8
435+1 records in
435+1 records out
445541 bytes (446 kB, 435 KiB) copied, 0.0927616 s, 4.8 MB/s
Be careful doing this to be sure you are using the correct device (here sdx) on your system so you don't overwrite some hard drive and cause yourself endless misery. One wrong letter and your linux system is gone, stay on your toes. On my system, my card reader automounts as "sdc".

This does run, talking to the serial console at 115200 baud. I interrupt the boot sequence (which goes noplace since I have nothing but U-Boot on the SD card and no network cable attached.) I type:

setenv bootaddr 0x40000000
boot_kyu=echo Booting Kyu via dhcp ; dhcp 0x40000000; go 0x40000000
setenv bootcmd run boot_kyu
To discover the MAC address used by U-Boot, type:
printenv ethaddr
After doing this and adding an entry in my DHCP server for this mac address, it works just fine to network boot an orangepi executable, which actually runs pretty well on the Nanopi.

Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org