u-boot and patch 0002-NFM-Production-eeprom-assume-device-is-BeagleBone-Bl.patch

Hi,

Can someone explain me why when I want to apply this patch on the U-boot I got :

git clone git://git.denx.de/u-boot

cd u-boot/

git checkout v2015.10 -b tmp

wget -c https://raw.githubusercontent.com/RobertCNelson/Bootloader-Builder/master/patches/v2015.10/0002-NFM-Production-eeprom-assume-device-is-BeagleBone-Bl.patch

patch -p1 < 0002-NFM-Production-eeprom-assume-device-is-BeagleBone-Bl.patch

==>

patching file board/ti/am335x/board.c
Hunk #6 succeeded at 619 (offset -23 lines).
patching file board/ti/am335x/mux.c
Hunk #1 succeeded at 367 (offset 2 lines).
patching file include/configs/am335x_evm.h
Hunk #1 FAILED at 182.
1 out of 1 hunk FAILED ā€“ saving rejects to file include/configs/am335x_evm.h.rej

the content of the file rej is :

ā€” include/configs/am335x_evm.h
+++ include/configs/am335x_evm.h
@@ -182,6 +182,8 @@
#define CONFIG_BOOTCOMMAND
"gpio set 53; "
"run findfdt; " \

  • "setenv fdtfile am335x-boneblack.dtb; "\
  • "setenv fdtbase am335x-boneblack; "
    "setenv interface mmc; "
    "setenv mmcdev 0; "
    "setenv bootpart 0:1; " \

Micka,

That happens when you don't apply "0001-*" first. :wink:

Regards,

Thanks ! It work better !

I forget this link :
https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Bootloader:U-Boot

sorry ^^

About the Mac address;

I read this documentation :
http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.enetaddr;hb=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d

If Iā€™m not wrong, at the first boot on a custom board with this u-boot , the board will not have any mac address on the eeprom or in the setenv and because the flag CONFIG_NET_RANDOM_ETHADDR is not set, My board will not have a mac address. Am I wrong ?

I will have to go on the U-boot :

setenv ethaddr XX:XX:XX:XX:XX:XX
saveenv
Am I wrong ? 
Also I'm trying to find out where in the U-boot, It try to get the Mac address ? In the eeprom ?

Micka,

The am335x has two mac address stored in eeprom on die..

Once booted you can find them stored at:

/proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address
/proc/device-tree/ocp/ethernet@4a100000/slave@4a100300/mac-address

Regards,