PXE Boot roc-cc-3328 Renegade

Hey all,

I had some problems with my cluster of roc-cc-rk3328 with eMMC flash storage and decided to reimage the whole stack. I’m planning on using upstream u-boot to pxe boot the Debian netinstall efi file, but I’m getting the following output via serial console with a hang following the last line

U-Boot TPL 2025.01-rc4-00082-gd532df3a614c (Dec 25 2024 - 15:21:56)
DDR4, 333MHz
BW=32 Col=10 Bk=4 BG=2 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=4096MB
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2025.01-rc4-00082-gd532df3a614c (Dec 25 2024 - 15:21:56 -0800)
Trying to boot from MMC1
## Checking hash(es) for config conf-1 ... OK
## Checking hash(es) for Image firmware-1 ... crc32+ OK
## Checking hash(es) for Image fdt-1 ... crc32+ OK


U-Boot 2025.01-rc4-00082-gd532df3a614c (Dec 25 2024 - 15:21:56 -0800)

Model: Firefly roc-rk3328-cc
DRAM:  4 GiB
PMIC:  RK805 (on=0x40, off=0x00)
Core:  241 devices, 29 uclasses, devicetree: separate
MMC:   mmc@ff500000: 1, mmc@ff520000: 0
Loading Environment from MMC... Reading from MMC(0)... *** Warning - bad CRC, using default environment

failed to probe rk hdmi
failed to probe rk hdmi
failed to probe rk hdmi
failed to probe rk hdmi
In:    serial,usbkbd
Out:   serial,vidconsole
Err:   serial,vidconsole
Model: Firefly roc-rk3328-cc
Net:   eth0: ethernet@ff540000

Hit any key to stop autoboot:  0
Card did not respond to voltage select! : -110
Cannot persist EFI variables without system partition
failed to probe rk hdmi
** Booting bootflow '<NULL>' with efi_mgr
Loading Boot0000 'mmc 0' failed
EFI boot manager: Cannot load any image
Boot failed (err=-14)
Card did not respond to voltage select! : -110
Bus usb@ff580000: USB DWC2
Bus usb@ff5c0000: USB EHCI 1.00
Bus usb@ff5d0000: USB OHCI 1.0
Bus usb@ff600000: generic_phy_get_bulk : no phys property
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@ff580000 for devices... 1 USB Device(s) found
scanning bus usb@ff5c0000 for devices... 1 USB Device(s) found
scanning bus usb@ff5d0000 for devices... 1 USB Device(s) found
scanning bus usb@ff600000 for devices... 1 USB Device(s) found
ethernet@ff540000 Waiting for PHY auto negotiation to complete........ done
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
*** Unhandled DHCP Option in OFFER/ACK: 42
*** Unhandled DHCP Option in OFFER/ACK: 150
*** Unhandled DHCP Option in OFFER/ACK: 224
*** Unhandled DHCP Option in OFFER/ACK: 42
*** Unhandled DHCP Option in OFFER/ACK: 150
*** Unhandled DHCP Option in OFFER/ACK: 224
DHCP client bound to address 192.168.0.4 (4758 ms)
missing environment variable: pxeuuid
<... pxe search lines removed ...>
Using ethernet@ff540000 device
TFTP from server 192.168.0.2; our IP address is 192.168.0.4
Filename '/debian-installer/arm64/pxelinux.cfg/default'.
Load address: 0x600000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
Speed: 1000, full duplex
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 42
*** Unhandled DHCP Option in OFFER/ACK: 150
*** Unhandled DHCP Option in OFFER/ACK: 224
*** Unhandled DHCP Option in OFFER/ACK: 42
*** Unhandled DHCP Option in OFFER/ACK: 150
*** Unhandled DHCP Option in OFFER/ACK: 224
DHCP client bound to address 192.168.0.4 (4 ms)
Using ethernet@ff540000 device
TFTP from server 192.168.0.2; our IP address is 192.168.0.4
Filename '/debian-installer/arm64/bootnetaa64.efi'.
Load address: 0x2080000
Loading: #################################################################
         ###
         17.5 MiB/s
done
Bytes transferred = 990600 (f1d88 hex)
Speed: 1000, full duplex
Using ethernet@ff540000 device
TFTP from server 192.168.0.2; our IP address is 192.168.0.4
Filename '/dtb/rockchip/rk3328-roc-cc.dtb'.
Load address: 0x1e00000
Loading: ####
         10.4 MiB/s
done
Bytes transferred = 54744 (d5d8 hex)
** Booting bootflow 'ethernet@ff540000.bootdev.0' with efi
Booting /\debian-installer\arm64\bootnetaa64.efi

I’m compiling trusted-firmware-a using CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328 make and u-boot using CROSS_COMPILE=aarch64-linux-gnu- BL31=~/Repos/trusted-firmware-a/build/rk3328/release/bl31/bl31.elf make roc-cc-rk3328_defconfig all with no errors. I’m flashing using the below commands with the board in maskrom mode

Downloading bootloader succeeded.
➜  rkstuff rkdeveloptool wl 0x40 ~/Repos/u-boot/idbloader.img
Write LBA from file (100%)
➜  rkstuff rkdeveloptool wl 0x4000 ~/Repos/u-boot/u-boot.img 
Write LBA from file (100%)
➜  rkstuff rkdeveloptool rd                                  
Reset Device OK.

I’m trying to use all upstream software and the docs say this should be possible, but I’m not having any success. Any pointers or debugging techniques I should try?