VAR-SOM-MX7 Eth MAC address: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|VAR-SOM-MX7 - Ethernet MAC addresses}} {{DocImage|category1=VAR-SOM-MX7|category2=Yocto}} __toc__ = The default MAC addresses = By default, Variscite provides its...")
 
(Add category Debian)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{PageHeader|VAR-SOM-MX7 - Ethernet MAC addresses}} {{DocImage|category1=VAR-SOM-MX7|category2=Yocto}} __toc__
{{PageHeader|VAR-SOM-MX7 - Ethernet MAC addresses}} {{DocImage|category1=Yocto|category2=Debian}} [[category:VAR-SOM-MX7]] __toc__
= The default MAC addresses =
= The default MAC addresses =
By default, Variscite provides its SOMs with unique MAC addresses (starting with its F8:DC:7A OUI) already written to the SOC's appropriate On-Chip One Time Programmable eFuses (OCOTP).<br>
By default, Variscite provides its SOMs with unique MAC addresses (starting with its F8:DC:7A OUI) already written to the SOC's appropriate On-Chip One Time Programmable eFuses (OCOTP).<br>
Line 10: Line 10:
To set the MAC addresses for the kernel, add the first MAC to the kernel command line in a form of ''fec.macaddr=0x01,0x23,0x45,0x67,0x89,0xab'' (the second Ethernet port will get the consecutive address).<br>
To set the MAC addresses for the kernel, add the first MAC to the kernel command line in a form of ''fec.macaddr=0x01,0x23,0x45,0x67,0x89,0xab'' (the second Ethernet port will get the consecutive address).<br>
<br>
<br>
Boot from the SOM's internal storage and:<br>
For example, boot from the SOM's internal storage and:<br>
Either set the U-Boot environment variables from the U-Boot command line (boot the board, and hit any key to stop autoboot to get to it):
Either set the U-Boot environment variables from the U-Boot command line (boot the board, and hit any key to stop autoboot to get to it):
<pre>
<pre>
Line 24: Line 24:
<br>
<br>
Notes:<br>
Notes:<br>
* The 01:23:45:67:89:ab & 01:23:45:67:89:ac MAC addresses are just for illustration, and are actually illegal addresses. You should use a real MAC address of your own.
* The 01:23:45:67:89:ab & 01:23:45:67:89:ac MAC addresses are actually illegal addresses, used here just for illustration. You should use a real MAC address of your own.
* In case you wipe the U-Boot environment, for any reason, make sure to rewrite the MAC address to it.
* In case you wipe the U-Boot environment, for any reason, make sure to rewrite the MAC address to it.
* To avoid having to rewrite the MAC address in case of wiping the environment, you can use an EEPROM on your carrier board to keep the MAC address and set the U-Boot environment automatically at U-Boot runtime, by reading the address from it.
* To avoid having to rewrite the MAC address in case of wiping the environment, you can use an EEPROM on your carrier board to keep the MAC address and set the U-Boot environment automatically at U-Boot runtime, by reading the address from it.

Latest revision as of 18:52, 6 June 2023

VAR-SOM-MX7 - Ethernet MAC addresses

The default MAC addresses

By default, Variscite provides its SOMs with unique MAC addresses (starting with its F8:DC:7A OUI) already written to the SOC's appropriate On-Chip One Time Programmable eFuses (OCOTP).
U-Boot and the kernel automatically reads them from the OCOTP.

Using your own MAC addresses

In case you want to ignore the default MAC addresses, and use your own (e.g. 01:23:45:67:89:ab & 01:23:45:67:89:ac), you can do so by setting the following U-Boot environment variables.
To set the MAC address for U-Boot itself, set the ethaddr env. variable to your desired address, 01:23:45:67:89:ab (there is only one active Ethernet port during U-Boot runtime).

To set the MAC addresses for the kernel, add the first MAC to the kernel command line in a form of fec.macaddr=0x01,0x23,0x45,0x67,0x89,0xab (the second Ethernet port will get the consecutive address).

For example, boot from the SOM's internal storage and:
Either set the U-Boot environment variables from the U-Boot command line (boot the board, and hit any key to stop autoboot to get to it):

=> setenv ethaddr 01:23:45:67:89:ab
=> setenv kernelargs fec.macaddr=0x01,0x23,0x45,0x67,0x89,0xab
=> saveenv

Or, you can do it from Linux, with u-boot-fw-utils (the set MAC address will be used starting from the following boot):

# fw_setenv ethaddr 01:23:45:67:89:ab
# fw_setenv kernelargs fec.macaddr=0x01,0x23,0x45,0x67,0x89,0xab


Notes:

  • The 01:23:45:67:89:ab & 01:23:45:67:89:ac MAC addresses are actually illegal addresses, used here just for illustration. You should use a real MAC address of your own.
  • In case you wipe the U-Boot environment, for any reason, make sure to rewrite the MAC address to it.
  • To avoid having to rewrite the MAC address in case of wiping the environment, you can use an EEPROM on your carrier board to keep the MAC address and set the U-Boot environment automatically at U-Boot runtime, by reading the address from it.