January 16, 2023

Kyu networking -- Cheat by using the U-boot 2022.10 emac initialization

The first thing to do is to figure out how to get this U-boot to do our diskless boot. Interrupting U-boot and doing printenv shows that the following is set:
bootcmd=run distro_bootcmd
boot_targets=fel mmc_auto usb0 pxe dhcp
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
ethaddr=02:81:b3:9c:e0:c9
Note that the 2016 version of U-boot worked up a MAC address of ethaddr=02:20:7f:9b:26:8c for this same board. So I need to add an entry to my dhcpd.conf file with this new MAC address.

What I need to do is this:

setenv boot_kyu "echo Booting Kyu via dhcp; dhcp 0x40000000; go 0x40000000;"
setenv bootcmd "run boot_kyu"
saveenv

To restore NetBSD booting, I will just need to do:

setenv bootcmd "run distro_bootcmd"
saveenv
I hit the reset button and, "voila" - I am running Kyu.

Let Kyu emac inherit the U-Boot phy setup

I comment out the call to emac_reset() and phy_init().


Have any comments? Questions? Drop me a line!

Kyu / tom@mmto.org