Using netplan command cause kernel crashed

Hi
My board is imx6ull with dual ethernet ports. kernel version is 4.15.The kernel will crash when booting sometimes but not frequently.The log show something is wrong with initialization of ethernet ports.
Few days before, I try to use netplan to config ethernet,Kernel crashed when i use netplan apply.It report:

[ 119.696172] fec 20b4000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
root@localhost:~# [ 123.176964] Unable to handle kernel NULL pointer dereference at virtual address 00000191

but dual ports have mac addr and work well if not use netplan or console-config.
I have no ideas how to solve this problem. Can someone help me about this? Thanks!

This is more like an issue of your hardware enablement stack (kernel and bootloader), most likely it’s because you did not manage to have the mac address for the ethernet.

There are usually two implementations to store mac address, in flash/fuse or bootloaders. And the kernel driver needs to retrieve the mac address based on your hw design.

The best way is looking for BSP support from your board manufacturer or an O.S supplier like Canonical to solve your issue, since it’s hardware design depended.

1 Like

Maybe there is a possible way you can try by changing the mac address manually, e.g.

  1. use macchanger:

$ macchanger --mac=xx:xx:xx:xx:xx:xx ethX

  1. use ip command:

$ ip link set dev interface address xx:xx:xx:xx:xx:xx
$ ip link set dev interface up

Then reproduce “netplan apply” anew.