January 5, 2025

Antminer S9 U-boot install - SD boot shortcut, part 2

I decided to start working with a different Antminer board, namely my board "E". I put the network boot disk I have been using for months with board "C" into board "E" and it does not work! It does fire up U-Boot just fine, but the boot fails and my env variable customization to network boot Kyu is nowhere to be found.

After some head scratching, I decide that what is going on is as follows. When I fire up U-boot on the SD card, get to the U-boot prompt and then customize the env variables, that customization is getting stored on NAND, not on the SD card! This is of course a nasty bug in the build of whoever set up this U-boot, but knowing this, we can just repeat the customization on board "E" and move right along.

Also note that as far as I know, doing this customization will also "brick" the board as far as booting from NAND. When the U-boot env gets saved it gets placed somewhere that it should not be and this is a problem I have yet to fully sort out. Someday I will do two things:

For now, let's just try my trusty SD card again and see if we can customize the U-boot env, knowing that it will make a mess on NAND that I will need to clean up someday.

The process

We connect a USB to serial device to the console port along with a network cable. We insert the SD card and set the jumpers to boot from SD. (This requires only moving the JP4 jumper towards the SD card slot.) Then we apply power. Since U-boot falls on it head, we don't need to do anything but wait to get to the U-boot prompt. Ordinarily we would need to be on our toes and start typing some character.

Here is what I want to add:

setenv bootaddr 0x20000000
setenv boot_kyu echo Booting Kyu via dhcp/tftp\; dhcp\; go \${bootaddr}
setenv boot_tftp echo Booting Kyu via tftp \; tftpboot \${bootaddr} bitcoin.bin \; go \${bootaddr}
setenv bootcmd run boot_tftp
setenv ipaddr 192.168.0.144
setenv serverip 192.168.0.5
saveenv
We do this and get:
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xe0000 -- 100% complete.
Writing to NAND... OK
We pull the power cord, replug it, and voila! We network boot Kyu.
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org