<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic imx8mp ddr4 get mac value in uboot in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx8mp-ddr4-get-mac-value-in-uboot/m-p/1713325#M211668</link>
    <description>&lt;P&gt;How do I automatically set the MAC value of the NIC in the uboot environment variables of the imx8mp ddr4 board, like the imx8mp-lpddr4-evk development board does, and do I need to add certain macro definitions in the imx8mp-ddr4-evk-defconfig file&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 14:12:09 GMT</pubDate>
    <dc:creator>xjy198903</dc:creator>
    <dc:date>2023-08-29T14:12:09Z</dc:date>
    <item>
      <title>imx8mp ddr4 get mac value in uboot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mp-ddr4-get-mac-value-in-uboot/m-p/1713325#M211668</link>
      <description>&lt;P&gt;How do I automatically set the MAC value of the NIC in the uboot environment variables of the imx8mp ddr4 board, like the imx8mp-lpddr4-evk development board does, and do I need to add certain macro definitions in the imx8mp-ddr4-evk-defconfig file&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 14:12:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mp-ddr4-get-mac-value-in-uboot/m-p/1713325#M211668</guid>
      <dc:creator>xjy198903</dc:creator>
      <dc:date>2023-08-29T14:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mp ddr4 get mac value in uboot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mp-ddr4-get-mac-value-in-uboot/m-p/1713434#M211682</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/217094"&gt;@xjy198903&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To properly set the MAC address variable, you will need to enter the Uboot Environment Variables by pressing any key on the first part of booting process. Then, you will need to change the Uboot variable "ethaddr" as follows:&lt;/P&gt;
&lt;P&gt;1. Print the actual MAC address&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Uboot &amp;gt; printenv ethaddr

Output example

00:04:9f:07:07:65&lt;/LI-CODE&gt;
&lt;P&gt;2. Set your new MAC address&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Uboot &amp;gt; setenv ethaddr &amp;lt;new-MAC-address&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;3. Save the environment&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Uboot &amp;gt; saveenv&lt;/LI-CODE&gt;
&lt;P&gt;After this process Uboot always will use the MAC address previously configured.&lt;/P&gt;
&lt;P&gt;If you will need another approach to read the MAC address from other devices such QSPI, you can refer to this useful post.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://tuxengineering.com/blog/2020/09/16/U-Boot-handling-MAC-address.html" target="_blank"&gt;Tux Engineering, Inc. - U-Boot handling MAC address&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Have a great day!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 18:23:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mp-ddr4-get-mac-value-in-uboot/m-p/1713434#M211682</guid>
      <dc:creator>brian14</dc:creator>
      <dc:date>2023-08-29T18:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mp ddr4 get mac value in uboot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mp-ddr4-get-mac-value-in-uboot/m-p/1713531#M211688</link>
      <description>&lt;P&gt;Hi,bibarra&lt;/P&gt;&lt;P&gt;I don't want to manually set the MAC address. I want to directly use the values from the fuse, just like the u-boot on the imx8mp-lpddr4-evk development board does. It automatically sets the MAC address environment variable, which I assume comes from the fuse. Now the question is, how can I make my imx8mp-ddr4 board automatically read the values from the fuse and set the environment variable?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 23:03:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mp-ddr4-get-mac-value-in-uboot/m-p/1713531#M211688</guid>
      <dc:creator>xjy198903</dc:creator>
      <dc:date>2023-08-29T23:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mp ddr4 get mac value in uboot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mp-ddr4-get-mac-value-in-uboot/m-p/1713540#M211690</link>
      <description>&lt;P&gt;If you read the uboot source, you can easily find the mac from fuse is set automatically.&lt;/P&gt;&lt;P&gt;It doesn't matter it is imx8mp-lpddr4-evk or imx8mp-ddr4 board, actually the code is for fec accrossing all i.MX using fec including such as i.MX6, i.MX8M family, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uboot-imx/drivers/net/fec_mxc.c&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (fec_get_hwaddr(fec-&amp;gt;dev_id, ethaddr) == 0) {&lt;BR /&gt;debug("got MAC%d address from fuse: %pM\n", fec-&amp;gt;dev_id, ethaddr);&lt;BR /&gt;memcpy(edev-&amp;gt;enetaddr, ethaddr, 6);&lt;BR /&gt;if (fec-&amp;gt;dev_id)&lt;BR /&gt;sprintf(mac, "eth%daddr", fec-&amp;gt;dev_id);&lt;BR /&gt;else&lt;BR /&gt;strcpy(mac, "ethaddr");&lt;BR /&gt;if (!env_get(mac))&lt;BR /&gt;eth_env_set_enetaddr(mac, ethaddr);&lt;BR /&gt;}&lt;BR /&gt;return ret;&lt;/P&gt;&lt;P&gt;static int fec_get_hwaddr(int dev_id, unsigned char *mac)&lt;BR /&gt;{&lt;BR /&gt;imx_get_mac_from_fuse(dev_id, mac);&lt;BR /&gt;return !is_valid_ethaddr(mac);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 00:18:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mp-ddr4-get-mac-value-in-uboot/m-p/1713540#M211690</guid>
      <dc:creator>Mestkim</dc:creator>
      <dc:date>2023-08-30T00:18:56Z</dc:date>
    </item>
  </channel>
</rss>

