radxa / u-boot

U-Boot tree for pending commits
39 stars 76 forks source link

RK3588 does not get presistent MAC address between image flashing #34

Open RadxaYuntian opened 9 months ago

RadxaYuntian commented 9 months ago

Symptoms

On our RK3588 platforms, the MAC address does not persist between image flashes. Additionally, when the image is booted once and then inserted to a different product, that product will have the same MAC address, making a master image undeployable for Ethernet connected devices.

Causes

Currently we have CONFIG_ROCKCHIP_SET_ETHADDR enabled, which will read vendor storage area, get an invalid MAC address (00:00:00:00:00:00), generate a random MAC address, and save it to the vendor storage area to be used later.

Proposed fixes

Update rockchip_set_ethaddr() so it generates a consistent MAC address from hardware ID instead of a random MAC.

Temporary workaround

Run the following command to clear the vendor storage area from eMMC/microSD, or existing master image:

# Replace /dev/sdX with your real block device, or dumped image file name
# MAKE SURE TO BACKUP FIRST!!!
sudo dd if=/dev/zero of=/dev/sdX bs=512 seek=7168 count=512 && sync
RadxaStephen commented 9 months ago

I think the issue will be fixed with these two commits.

I tested this on ROCK 5A.

Will provide patches for Radxa CM5 IO and Radxa NX5 IO.

RadxaYuntian commented 8 months ago

Right now "rock-5a" "rock-5b" "radxa-nx5-io" are not using nextdev branch for bsp.