Hi all,
I have a bit non standard situation but maybe somebody can help me.
I’m trying to boot my HiFive Premier p550 from network.
Right now I’ve faced with eth connection problem on initrd stage.
I can up eth link but busybox udhcpc can’t get data from DHCP server.
If I boot from sd card it works well.
And on uboot stage it can copy files from this DHCP server without any problems.
Will start at the beginning.
I’ve already made the same for other devices, so i want to say that my approach work well on other riscv devices.
In generaly i try to unpack initrd, add my code to /init and repack it back.
The first issue.
The latest HiFive Premier release Ubuntu 24.04.03 at 07.2025 provide initrd only with:
‘’’
/usr/lib/firmware
/usr/lib/modules
‘’’
Without /init /bin /sbin and other folders.
As understand its a new UKI format of initrd.
Unfortunately I couldn’t build a traditional initrd and i’ve just added files
/usr/klibc…
/ld-linux-riscv64-lp64d.so.1
/bin/ and /sbin/ with main files and busybox.
So, it seems I’ve made some workaround for this but if somebody advises the right way how to build a traditional initrd i would be really appreciated.
The second issue.
I’m booting the kernel by such way
‘’’
…
tftpboot ${kernel_addr_r} ${tpath}/vmlinuz-6.6.77-2-premier;
tftpboot ${fdt_addr_r} ${tpath}/efi_eic7700-hifive-premier-p550.dtb;
tftpboot ${ramdisk_addr_r} ${tpath}/initrd.img-6.6.77-2-premier;
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
‘’’
I’ve had success only with efi version of dtb efi_eic7700-hifive-premier-p550.dtb
Is it expected?
The last and the main issue with DHCP.
‘’’
// Bring up an ethernet device
modprobe gpio_dwapb stmmac pcs_xpcs phylink dwmac_eic7700
‘’’
Link becomes up but DHCP, that works in uboot stage, now doesn’t work.
‘’’
$ udhcpc -n --now --quit -i eth0 -t 5 -T 1 -A 1 -s /sbin/dhcp-script
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: broadcasting discover
[ 4436.278884] eic7700-eth-dwmac 50400000.ethernet eth0: NETDEV WATCHDOG: CPU: 1: transmit queue 0 timed out 5748 ms
[ 4436.289280] eic7700-eth-dwmac 50400000.ethernet eth0: Reset adapter.
udhcpc: read error: Network is down, reopening socket
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, failing
[ 4445.390836] eic7700-eth-dwmac 50400000.ethernet eth0: NETDEV WATCHDOG: CPU: 3: transmit queue 0 timed out 5004 ms
[ 4445.401220] eic7700-eth-dwmac 50400000.ethernet eth0: Reset adapter.
[ 148.408518] dwmac4: Master AXI performs any burst length
[ 148.408527] eic7700-eth-dwmac 50400000.ethernet eth0: No Safety Features support found
[ 148.408534] eic7700-eth-dwmac 50400000.ethernet eth0: No MAC Management Counters available
[ 148.408539] eic7700-eth-dwmac 50400000.ethernet eth0: PTP not supported by HW
[ 148.408549] eic7700-eth-dwmac 50400000.ethernet eth0: configuring for phy/rgmii link mode
[ 152.504015] eic7700-eth-dwmac 50400000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 157.518150] eic7700-eth-dwmac 50400000.ethernet eth0: NETDEV WATCHDOG: CPU: 0: transmit queue 0 timed out 5004 ms
[ 157.518193] eic7700-eth-dwmac 50400000.ethernet eth0: Reset adapter.
[ 157.518986] eic7700-eth-dwmac 50400000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 157.520499] eic7700-eth-dwmac 50400000.ethernet eth0: PHY [stmmac-0:00] driver [Generic PHY] (irq=POLL)
[ 157.520510] dwmac4: Master AXI performs any burst length
‘’’
I can configure eth0 statically but it either can’t ping server.
How to fix such eth connection?
Sorry for many words but I couldn’t make it shorter.