-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include the tiny fixMACaddress script in the S0 image to assign end0 MAC address from CPU serial # in case running U-Boot earlier than 2024.10
- Loading branch information
Showing
2 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
packages/bsp/rockpis/etc/udev/rules.d/05-fixMACaddress.rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
#If a network interface is being assigned a new, different address on each boot, | ||
#enable the corresponding line below to derive its MAC addr from UUID of rootfs | ||
#Beware that all the two digit hex code prefixes below must be unique! | ||
#If a network interface is being assigned a different MAC address on each boot, | ||
#or the MAC address is based on a disk image (rather than a hardware serial #), | ||
#enable the corresponding line below to derive that interface's MAC address from | ||
#the RK3308 SOC's unique serial number. | ||
|
||
#All the two digit hex code prefixes passed to fixEtherAddr should be unique | ||
#and chosen such that (n-2)%4 == 0 | ||
|
||
KERNEL=="wlan0", ACTION=="add" RUN+="fixEtherAddr %k 0a" | ||
KERNEL=="p2p0", ACTION=="add" RUN+="fixEtherAddr %k 0e" | ||
|
||
#U-Boot >=V2024.10 sets the built-in Ethernet MAC adr from the SOC serial number | ||
#KERNEL=="end0", ACTION=="add" RUN+="fixEtherAddr %k 06" |