Hey Alex,
Thanks for the pointers. Unfortunately, both methods described above cause me to run into a follow-up error. Perhaps you can help me one more step.
I found the config block at mtd2 (also the MAC address at mtd7), however, writing it causes the node to no longer boot. I cannot verify what the exact issue is because the test node is in a remote location. I have tried the following:
flash_eraseall /dev/mtd2
nandwrite -p /dev/mtd2 /home/root/configblock_256.bin
After a nanddump, I can see the write was successful. However, after rebooting, the node no longer comes online.
Next I tried to fix it with fw_setenv. I added u-boot-fw-utils to the bsp and I have the tools available on my device. I can run fw_printenv to check the environment. However, fw_setenv ethaddr 01:02:03:04:05:06 returns an error to me:
Warning: Bad CRC, using default environment
MTD erase error on /dev/mtd2: Invalid argument
Error: can't write fw_env to flash
The /etc/fw_env.config contains the following (minus comments):
# NOR example
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd1 0x0000 0x4000 0x4000
/dev/mtd2 0x0000 0x4000 0x4000
The fw_printenv returns the following (no ethaddr exists yet):
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
loadaddr=0x01000000
arch=arm
cpu=armv7
board=colibri_t20
board_name=colibri_t20
vendor=toradex
soc=tegra20
stdin=serial
stdout=serial,vidconsole
stderr=serial,vidconsole
scriptaddr=0x10000000
pxefile_addr_r=0x10100000
kernel_addr_r=0x01000000
fdt_addr_r=0x02000000
ramdisk_addr_r=0x02100000
fdt_high=ffffffff
initrd_high=ffffffff
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
boot_net_pci_enum=pci enum
boot_net_usb_start=usb start
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
ubifs_boot=if ubi part UBI && ubifsmount ubi${devnum}:boot; then setenv devtype ubi; setenv bootpart 0; run scan_dev_for_boot; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=mmc1 mmc0 usb0 pxe dhcp
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_usb0=setenv devnum 0; run usb_boot
bootcmd_pxe=run boot_net_usb_start; run boot_net_pci_enum; dhcp; if pxe get; then pxe boot; fi
bootcmd_dhcp=run boot_net_usb_start; run boot_net_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
mtdparts=mtdparts=tegra_nand:2m(u-boot)ro,1m(u-boot-env),1m(cfgblock)ro,-(ubi)
And for good measure, here is cat /proc/mtd:
dev: size erasesize name
mtd0: 0e000000 00040000 "MFS"
mtd1: 00300000 00040000 "BCT"
mtd2: 00040000 00040000 "PT"
mtd3: 00200000 00040000 "EBT"
mtd4: 00040000 00040000 "BMP"
mtd5: 00200000 00040000 "ENV"
mtd6: 00800000 00040000 "LNX"
mtd7: 00040000 00040000 "ARG"
mtd8: 08000000 00040000 "USR"
mtd9: 00040000 00040000 "MSE"
mtd10: 00040000 00040000 "MIP"
mtd11: 00040000 00040000 "MCS"
mtd12: 00040000 00040000 "MDF"
mtd13: 00040000 00040000 "MDU"
mtd14: 01000000 00040000 "MLX"
mtd15: 02000000 00040000 "MAP"
mtd16: 04000000 00040000 "MWW"
Do you have any idea why either methods won’t work? Unfortunately, I do not have a means to get a u-boot interface going, so I’m hoping one of either methods has a fix.
At this point, hardcoding the MAC address into the image might be a viable solution!
Kind regards,
Martin J.