I then put this freshly minted disk into the slot on my "board C" Antminer S9 and was surprised that it used my custom U-boot setup to network boot Kyu (or bare metal demos).
I figured that this config was somehow inside of boot.bin (which I obtained by copying it from the one bootable SD card I had at the time). But I tracked down the original boot.bin, used linux "cmp" to compare the files and was shocked that they compared OK.
Now I insert the 32G SD card I just did nothing but put boot.bin onto in the board, move jumper JP4 to the left so it will boot from SD and see what that does. It tries to boot from SD, but of course fails because there is no uImage file. No surprise there. It drops me into the U-boot "shell". I use printenv to examine the variables, and it lacks things like "bootkyu" that I added.
I am going to avoid "saveenv" which I know will brick the board. I type this:
setenv zapadillo xyzI used printenv to verify that it is now in the environment (and using a name beginning with "z" puts it at the end where I can easy check it. Now I cycle power. That variable does not persist. Remember that it would persist when I did this on my C board.
Also apparently it remembers that it is working with env info from NAND and when I do a "setenv", it makes the change to the saved info. (But for some weird reason, if you do a U-boot reset you don't get that info).
I try the same business with "zapadillo". I can set it, but if I do a U-boot reset, it goes away. If I set it, then type "boot" to boot to Kyu, then type R, it is also gone. The only way to get it to stick is to set it, then pull the power cord. Very strange, but handy. And now I can't even get that to work.
setenv zznew xyzThis new variable does not appear in the U-Boot environment, but when I type:
run sdbootIt does tell me:
reading uEnv.txt 17 bytes read in 8 ms (2 KiB/s) Loaded environment from uEnv.txt Importing environment from SD ...But after this, printenv does not show me zznew in the environment. I add some echo commands, but I see no output from them when I "run sdboot". My idea about this file may be all wrong. I see an example online and it just has value settings like:
zznew=xyz zznew2=xyzI don't see these settings on startup, but after I try "run sdboot" they do appear in printenv output -- well this is progress of a sort
But I don't want to do this just yet. That stomped on environment holds the setup to do network booting. What would be good to work on would be to build U-boot from source, then generate a boot.bin without the nasty bug that stomps on NAND. What would really be nice would be to save the environment in a file on vfat like uEnv.txt!
dd if=/dev/mtd0 of=/dev/null bs=1MI make a copy of the first:
dd if=/dev/mtd0 of=/nand.img bs=1M 32+0 records in 32+0 records out 33554432 bytes (32.0MB) copied, 3.876648 seconds, 8.3MB/sNow I am faced with a Fedora problem -- namely that with Fedora 41, the key exchange methods supported by this old Antminer board are no longer supported.
Tom's Computer Info / [email protected]