Jetson TX2 How to modify the MAC address of the target board?

Hi, I want to copy the Ubuntu system environment of a TX2 development board to other unconfigured development boards,I try to download the system image of the motherboard with the following command:
sudo ./flash.sh -r -k APP -G my_backup.img jetson-tx2 mmcblk0p1
And burn the system image of the motherboard to the target board with the following command:
sudo ./flash.sh -r jetson-xavier mmcblk0p1

However, when I test the target board, I find that the MAC address of the target board and the motherboard are the same and cannot be modified,I used a lot of methods that didn’t work

How to modify the MAC address of the target board?
And How to clone Ubuntu system environment to other development boards?

Hi,

Are there only one TX2 module or 2 TX2 modules?
Cloning the app partition will not cause mac address to be same, because MAC address is written to module eeprom.

Sometimes udev will rename an ethernet interface, e.g., renaming “eth0” to something like an “enp” format. When this is done there is a file in “/etc/udev/rules.d/” which uses MAC address, but the MAC address itself is not modified like this. I have no way to test, but as @WayneWWW said, the actual MAC is in the EEPROM, and this is on the module, not the carrier board.

What I have seen before is a router which knew which MAC was connected to a specific port, and that port had a stale cache. Rebooting the router would fix this if it is the case, although some high end switches may have a firewall type of setting which mandates using only a specific device (via MAC address) on a port. Can you reboot your router?

2 TX2 module,but i clone the overall system(use sudo ./flash.sh -r -k APP -G my_backup.img jetson-tx2 mmcblk0p1)

I read the whole TX2 motherboard(Including Linux kernel driver, file system, etc) and burned it into another TX2
So I suspect that the contents of eeprom have also been copied? @WayneWWW

how to modify MAC address in eeprom?

I couldn’t tell you how to deal with changing a MAC, but EEPROM is not part of the eMMC image, especially not part of rootfs. The image can use MAC, e.g., via udev, the image does not set the MAC.

Long ago, right when the Nano first came out, there were some duplicated MAC addresses and a script to find out if the Nano was one of those, but the TX2 has never had this issue. Routers do cache MAC sometimes and cause problems. How are you determining the MAC? Are you going by output of ifconfig?

You could use i2ctool to modify the eeprom. The layout of eeprom is on download center.

Please be very very very very careful that you must also edit the checksum field in the last field of eeprom after you update anything in the eeprom. If you forget to do so, your module will be not able to flash or boot.

When I run flash.sh ,The following printed information attracted my attention:

[ 1.3607 ] tegrarcm_v2 --isapplet
[ 1.3629 ] Applet version 01.00.0000
[ 1.7215 ]
[ 1.7238 ] Retrieving EEPROM data
[ 1.7240 ] tegrarcm_v2 --oem platformdetails eeprom cvm /home/wxp/nvidia/nvidia_sdk/JetPack_3.3.1_Linux_GA_P3310/Linux_for_Tegra/bootloader/cvm.bin
[ 1.7261 ] Applet version 01.00.0000
[ 2.0936 ] Saved platform info in /home/wxp/nvidia/nvidia_sdk/JetPack_3.3.1_Linux_GA_P3310/Linux_for_Tegra/bootloader/cvm.bin
[ 2.1674 ]
Board ID(3310) version(D00)

so ,eeprom had overwrite?

If I use ./flash.sh -B [Boardid] can modify mac address?

No, it is just “reading” but not writing.

When I use sdkmanager(JetPack 3.1) brush system,the mac address is not same,but I use flash.sh brush the my back up image the mac address is same, why

The mac addr is fused in eeprom, but if you have any trouble reading the eeprom, the system would give you a hard-coded value and cause every module uses same mac. That is the only case I could think about.

Also, Jetpack3.1 is too old. I don’t remember if this could work fine there. You better upgrading your system.

I am not sure if this is the issue you are dealing with, but I will mention it in case: Ubuntu’s Network Manager will save the Ethernet MAC for the network connection in the file system. So after you do a clone of the file system to another device the Network Manager will be configured based on the original board’s EEPROMs MAC address. Therefore, on each cloned system you will need to reconfigure the Network Manager Ethernet interface to get networking to work.

Are you sure you are looking/comparing the MAC of the Ethernet device and not the composite USB network virtual device or some other MAC?

Can you please run sudo i2cdump -y 7 0x50 and ifconfig on each device and provide the output?

2 Likes

but,I must use ubuntu16.04

You could at least use rel-28.3 which is also using ubuntu 16.04.

sudo i2cdump -y 7 0x50
[sudo] password for ubuntu:
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 01 00 0d 00 ee 0c e8 03 44 48 00 00 00 00 00 00 ?.?.???DH…
10: 00 00 00 00 36 39 39 2d 38 33 33 31 30 2d 31 30 …699-83310-10
20: 30 30 2d 44 30 30 20 48 2e 30 00 00 00 00 00 00 00-D00 H.0…
30: 00 00 5f 92 f6 4b 04 00 60 92 f6 4b 04 00 00 00 …_??K?.??K?... 40: 00 00 00 00 61 92 f6 4b 04 00 31 34 32 33 38 31 ....a??K?.142381 50: 39 30 32 33 33 35 31 00 00 00 00 00 00 00 00 00 9023351......... 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 90: 00 00 00 00 00 00 4e 56 43 42 1c 00 4d 31 00 00 ......NVCB?.M1.. a0: 5f 92 f6 4b 04 00 60 92 f6 4b 04 00 61 92 f6 4b _??K?.??K?.a??K
b0: 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?..
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cf …?

wlan0 Link encap:Ethernet HWaddr 00:04:4b:f6:92:5f
inet addr:192.168.1.161 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::c6da:5728:c38:33e8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4959 errors:0 dropped:4 overruns:0 frame:0
TX packets:3487 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6542925 (6.5 MB) TX bytes:310954 (310.9 KB)

30: 00 00 5f 92 f6 4b 04 00
a0: 5f 92 f6 4b 04 00

Highlight here for you to understand why you need to use i2cdump.

It looks like your Ethernet is not up. Can you do ifconfig -a so we can see the Ethernet MAC?

I just double checked your EEPROM data and the crc 0xcf is valid.
eeprom_test.py (2.0 KB)

1 Like