Re: Red Pitaya 122-16: kernel reaches init!
David Young <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.arm |
|---|---|
| Message-ID | <[email protected]> |
On Wed, May 01, 2024 at 05:52:29AM -0000, Michael van Elst wrote: > [email protected] (David Young) writes: > > >The ethernet MAC isn't correct. On the Red Pitaya boards, board > >parameters like the ethernet MAC are stored in an EEPROM. I think > >u-boot can fetch the information from the EEPROM and provide it in the > >bootargs. Shouldn't take long to figure that out. > > The Zynq driver attachment currently takes the mac address from > the dtb key 'local-mac-address'. Thanks, that got me over the hump. I got u-boot to add that key to the device tree with this u-boot script, i2c dev 0 eeprom read 0 0x50 0 0x1804 0x400 env import -b 0 0x400 hw_rev serial ethaddr setenv bootargs "root=ld0a" fatload mmc 0 0x01f00000 device~1.dtb fatload mmc 0 0x02000000 netbsd.ub fdt addr 0x01f00000 fdt set /axi/ethernet@e000b000 local-mac-address $ethaddr bootm 0x02000000 - 0x01f00000 I used `nbmkubootimage -A arm -a 0 -C none -n "u-boot script" -T script my-script $msdos_boot_partition/u-boot.scr` to write it in the format and location that u-boot expected. Now cemac0 has the right MAC address. I will commit my .dts and such in coming days. David -- David Young [email protected] Urbana, IL (217) 721-9981