I have a copy of the U-boot sources (v2025.10) handy in /Projects/ARM-sources/u-boot. Look at the Makefile to check the version of U-boot you might have.
I used these sources to build U-boot for the H5 (Orange Pi PC2) but now want to build for my Antminer S9. I don't really want to use the result for anything, but I want the object file breadcrumbs.
Somewhat to my surprise, I find the file:
bitmain_antminer_s9_defconfigI had not expected that. I expected to have to build for the Zybo or Zedboard.
make distclean make bitmain_antminer_s9_defconfig makeWe hit an error running make:
cc1: error: bad value ‘generic-armv7-a’ for ‘-mtune=’ switchGoogle tells me this is my stupid mistake. I need to set an environment variable to specify the cross compiler. It is trying to use the host cc (x86) to compile for ARM.
export ARCH=arm export CROSS_COMPILE=arm-none-eabi- makeWhat I actually do is to put these lines into the Makefile:
ARCH=arm #CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE=arm-none-eabi-The make runs cleanly now. I could use a "-j" switch to speed up the make process, but I don't.
I see only these 3 files scroll by. And inspection of the source tree shows no other network or phy drivers that were compiled.
CC drivers/net/phy/phy.o CC drivers/net/phy/ethernet_id.o CC drivers/net/zynq_gem.oThe file drivers/net/phy/phy.c has all the generic "genphy" driver code, so apparently this is all that is needed. This is good news.
Tom's software pages / tom@mmto.org