Skip to contentSkip to conversation

regression: setting the rpi mac address stopped working

U-Boot Gerd Hoffmann 4 participants 5 messages Mar 27, 2017 – Apr 26, 2017

lore
Share & tools
lore

Gerd Hoffmann

author Reviewed-by Bin Meng
#0 lore raw

Hi,

u-boot 2016.11 & newer doesn't set the mac address on my raspberry pi any more, so the linux kernel picks a random mac address. Bisected to this commit:

commit b91c6a1209e7da1a7f989d9ac35d0d8be0b7b710

Author: Simon Glass <[email protected]>
Date:   Wed Oct 5 20:42:11 2016 -0600

Fix return value in trailing_strtoln()

This function should return -1 if there is no trailing integer in the string. Instead it returns 0. Fix it by checking for this condition at the start.

Appearently this change broke fdt_fixup_ethernet().

cheers,
Gerd

#1 lore raw

Hi,

Quoted 12 lines · Gerd Hoffmann

Hi,

u-boot 2016.11 & newer doesn't set the mac address on my raspberry pi any more, so the linux kernel picks a random mac address. Bisected to this commit:

commit b91c6a1209e7da1a7f989d9ac35d0d8be0b7b710

Author: Simon Glass <[email protected]>
Date:   Wed Oct 5 20:42:11 2016 -0600

Fix return value in trailing_strtoln()

Quoted 8 lines

This function should return -1 if there is no trailing integer in the string. Instead it returns 0. Fix it by checking for this condition at the start.

Appearently this change broke fdt_fixup_ethernet().

I'm sorry to hear that. Any change you have a patch? It looks like the latter code was relying on the bad behaviour?

Regards,
Simon

#2 lore raw

Hi Simon, Gerd

Quoted 19 lines · On Fri, 31 Mar 2017 22:22:52 -0600 Simon Glass <[email protected]> wrote:

Hi,

Quoted 16 lines · Gerd Hoffmann

Hi,

u-boot 2016.11 & newer doesn't set the mac address on my raspberry pi any more, so the linux kernel picks a random mac address. Bisected to this commit:

commit b91c6a1209e7da1a7f989d9ac35d0d8be0b7b710

Author: Simon Glass <[email protected]>
Date:   Wed Oct 5 20:42:11 2016 -0600

Fix return value in trailing_strtoln()

This function should return -1 if there is no trailing integer in the string. Instead it returns 0. Fix it by checking for this condition at the start.

Quoted 8 lines
Quoted 4 lines

Appearently this change broke fdt_fixup_ethernet().

I'm sorry to hear that. Any change you have a patch? It looks like the latter code was relying on the bad behaviour?

https://www.mail-archive.com/u-boot at lists.denx.de/msg241949.html fixes this problem.

#3 lore raw

Hi,

Quoted 2 lines

https://www.mail-archive.com/u-boot at lists.denx.de/msg241949.html fixes this problem.

Tested things today, only to figure it doesn't work :(

Reverting commit "3f66149 Remove extra fdt_fixup_ethernet() call" brings things into working state. So the fix above actually works, and apparently the fdt_fixup_ethernet() call in image_setup_libfdt() isn't as redundant as it seems ...

cheers,
Gerd

PS: I'm not on the list, if you want me test any patches please cc me.

#4 lore raw
Quoted 12 lines · Gerd Hoffmann

Hi,

Quoted 2 lines

https://www.mail-archive.com/u-boot at lists.denx.de/msg241949.html fixes this problem.

Tested things today, only to figure it doesn't work :(

Reverting commit "3f66149 Remove extra fdt_fixup_ethernet() call" brings things into working state. So the fix above actually works, and apparently the fdt_fixup_ethernet() call in image_setup_libfdt() isn't as redundant as it seems ...

Quoted 4 lines

cheers,
Gerd

PS: I'm not on the list, if you want me test any patches please cc me.

Ug. Thanks for the report!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170426/dab436de/attachment.sig>