ls1012ardb ethernat interfaces mac not set

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ls1012ardb ethernat interfaces mac not set

1,715 Views
angelikileonida
Contributor II

Hi, 

I am booting ls1012ardb with dflexbuild and ubuntu userland with Layerscape SDK usign a prebuild uboot image firmware_ls1012ardb_uboot_qspiboot.img

The problems is that eth0 and eth1 are set with MAC address 00:00:00:00:00:00 and do not take any ip. I set the ethaddr env variable at u-boot promt for eth0 and now eth0 is functional.

 

My question what is the proper way to automatically  set MAC address for pfe interfaces eth0 and eth1.  

During boot there is a pfe warning e.g.

Warning: pfe_eth1 (eth1) using random MAC address - 6e:75:fe:c4:4c:1c

and network manager cannot assign any ip 

Oct 11 10:26:11 localhost systemd-networkd[2561]: eth1: Could not bring up interface: Cannot assign requested address

ifconfig -a

eth1: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 00:00:00:00:00:00 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

BR , Angeliki

Labels (1)
0 Kudos
Reply
2 Replies

1,441 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Angeliki Leonida,

If you set MAC addresses for pfe_eth0 and pfe_eth1 in u-boot environment and save them under u-boot prompt, these MAC addresses will be specified in Linux Kernel too.

For example,

eth0addr=00:04:9f:04:68:b0

eth1addr=00:04:9f:04:68:b1

ethact=pfe_eth0

ethaddr=00:04:9f:04:68:b3

root@TinyDistro:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:04:9f:04:68:b3
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr 00:04:9f:04:68:b1
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

You also could set u-boot environment in the source code, please configure "CONFIG_EXTRA_ENV_SETTINGS" in include/configs/ls1012ardb.h in u-boot source.


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,441 Views
christophe_schm
Contributor IV

Hi,

Great seems I found a post describing very closely issue I've here too.

I've similar issue with a LS1012ARDB board ... but a bit different.

Using latest LSDK 19.09 and also able to build  firmware_ls1012ardb_uboot_qspiboot.img  I can flash and use.

During build I did not brought any changes to code or used some special build options.

A performed a simple "flex-builder -m ls1012ardb -b qspi" and then flashed the resulting "image firmware_ls1012ardb_uboot_qspiboot.img" as described in "LS1012ARDBGSG Getting Started Guide Rev. 5, 09/2018", §14.4 Step 2: Flashing LSDK composite firmware image. All went well so far.

NOTE: I flash it on bank 2 and not bank 1 of embedded QSPI flash device - maybe this is my problem and I shall put it on bank 1?

I also set the variables in u-boot prompt exactly as described above, but this does not help in my case.

Problem I've is I simply don't see and cannot mount the eth0 device despite in u-boot phase it seems to be up and running already. So I can boot and log into tiny Linux as root and there, in order to flash boot partition and userland I need first to bring up eth0 by doing " ifconfig eth0 hw ether <MyMAC address>". Doing that simply tells me there is no such device, I only can see "lo" and "sit0@NONE" devices, ping localhost works making me believe stack is up and alive. Looking into /etc/network/interfaces indeed shows eth0 is absent - what went wrong?

Any idea? Thx Christophe

0 Kudos
Reply