January 8, 2021

EBAZ4205 Bitcoin miner board - bare metal programming

Three days passed since my first (failed) attempt to set up my board for some bare metal experiments.

We force the issue

Our first attempt failed because U-boot was not built with the enviroment variables set up to allow them to be changed and saved via savenv. So what I did was to examine the image on NAND, find the U-boot executable, find the environment list in the image and modify it in place once and for all. Not what a person would normally do, but it gets things done.

The result

Now when I boot up U-boot, I see this much reduced environment:
printenv
boot_kyu=echo Booting Kyu via dhcp ; dhcp ${bootaddr}; go ${bootaddr}
boot_tftp=echo Booting Kyu via tftp ; tftpboot ${bootaddr} bitcoin.bin; go ${bootaddr}
bootaddr=0x20000000
bootcmd=run boot_tftp
bootdelay=3
ethact=Gem.e000b000
ipaddr=192.168.0.80
modeboot=nandboot
serverip=192.168.0.5
stderr=serial
stdin=serial
stdout=serial
Environment size: 356/131068 bytes
And if I just set back and let the boot do its thing, I see:
Hit 'd' to stop autoboot(eric):  0
Booting Kyu via tftp
Gem.e000b000 Waiting for PHY auto negotiation to complete...... done
Gem.e000b000----100----4047----
Using Gem.e000b000 device
TFTP from server 192.168.0.5; our IP address is 192.168.0.80
Filename 'bitcoin.bin'.
Load address: 0x20000000
Loading: T #############
	 35.2 KiB/s
done
Bytes transferred = 185104 (2d310 hex)
## Starting application at 0x20000000 ...
And this is just what I want (for now, maybe forever).
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org