January 16, 2023

Kyu networking -- H3 network PHY, Build U-boot from mainstream source

A repeat performance, but this time doing a checkout of 2022.10.

Getting U-boot source is all handled by git on github. They tell you to clone the repository, then checkout the branch you want.

cd /u1/Projects/U-boot
git clone https://github.com/u-boot/u-boot
mv u-boot u-boot.Git
cd u-boot.Git
git checkout v2022.10
The checkout gives me a big warning that I am in "detached HEAD" state, but I don't think this much matters since this is a read-only situation for me.

I look in the "configs" directory and find orangepi_pc_plus_defconfig. This is good. Ultimately I will do "make orangepi_pc_plus_defconfig".

The cross compiler needs to be specified, what you could do is:

CROSS_COMPILE=arm-linux-gnu-
export CROSS_COMPILE
What I actually do is to edit this setting right into the start of the Makefile since I will get annoyed at having to type it every time I run make for U-boot.
Here we go:
make distclean
make orangepi_pc_plus_defconfig
make all
This gets a few compiler warnings, but less than for my stupid "2020.10" build. Here is the log of what I see: The final product is:
-rw-r--r--   1 tom tom  532416 Jan 16 21:33 u-boot-sunxi-with-spl.bin
I write this to my SD card via:
su
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdg bs=1k seek=8 conv=sync
519+1 records in
520+0 records out
532480 bytes (532 kB, 520 KiB) copied, 0.0877825 s, 6.1 MB/s
sync
And it works! I get messages as follows:
U-Boot 2022.10-dirty (Jan 16 2023 - 21:31:52 -0700) Allwinner Technology
CPU:   Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi PC Plus
DRAM:  1 GiB
Core:  73 devices, 20 uclasses, devicetree: separate
WDT:   Not starting watchdog@1c20ca0
MMC:   mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment
Net:   eth0: ethernet@1c30000
I still don't know what "dirty" is all about. Perhaps it indicates that it was built by someone like myself and could have been modified.

I can use "saveenv" with success!!

It even boots NetBSD. Not that it does much good, it gets a UVM fault in short order.


Have any comments? Questions? Drop me a line!

Kyu / tom@mmto.org