This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

mac address gone after kexec

Hello,

I finally got my AM335x custom board to successfully kexec. I am using the 3.14 yocto kernel.

I have one remaining problem after kexec:

The mac address comes up with a totally random value.

Normally u-boot sets the mac address for the kernel, but kexec bypasses u-boot, so that bit of setup is not done, hence the random mac address.

However, in the pre-device-tree kernel there was a way to retrieve the mac address from the eeprom. I am not finding the corresponding code in the newer 3.14 kernel. 

I can hard-code the mac address in the dts file, but I really don't want to compile a special device-tree file for every single board.

How should I address this problem?

Can someone point me in a helpful direction?

Thanks,

Brian

  • Hi Brian,

    I think, you can use "--command-line"  for loading the previous u-boot command line args to latest kernel which is going to run through "kexec"

    Ex:

    "kexec -l /boot/uImage --initrd=/boot/initrd.img --command-line="$( cat /proc/cmdline )"

  • I could be mistaken, but unfortunately at this point it does not look like there is a 
    mechanism to override the MAC address with the kernel command line.

    Please correct me if I'm wrong.

    U-boot does not use this mechanism to set the MAC address.

    However...

    The latest is that I have found a patch that addresses this problem, although it does not apply without errors.

    https://patchwork.kernel.org/patch/1966481/

    So now I have a series of follow up questions:

    Since the patch does not show up, even in the latest kernel version, how do I check out its status, etc? Why has it not been applied upstream?  How does one find this out?

    Can someone respond?

    Thanks, Brian