Tool/software: Linux
I am trying to add custom dts files to the sdk for my custom hardware. It seems to be working but failing in uboot. I am pretty sure the issue is that the compiled dtb file is not being added to the fit image. Trying to figure out why.
I noticed that in the file u-boot.cfg the following line:
#define CONFIG_EXTRA_ENV_SETTINGS DEFAULT_LINUX_BOOT_ENV DEFAULT_MMC_TI_ARGS DEFAULT_FIT_TI_ARGS "fdtfile=undefined\0" "bootpart=0:2\0" "bootdir=/boot\0" "bootfile=zImage\0" "console=ttyO0,115200n8\0" "partitions=" "uuid_disk=${uuid_gpt_disk};" "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" "optargs=\0" "usbroot=/dev/sda2 rw\0" "usbrootfstype=ext4 rootwait\0" "usbdev=0\0" "ramroot=/dev/ram0 rw\0" "ramrootfstype=ext2\0" "usbargs=setenv bootargs console=${console} " "${optargs} " "root=${usbroot} " "rootfstype=${usbrootfstype}\0" "ramargs=setenv bootargs console=${console} " "${optargs} " "root=${ramroot} " "rootfstype=${ramrootfstype}\0" "loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz\0" "usbboot=" "setenv devnum ${usbdev}; " "setenv devtype usb; " "usb start ${usbdev}; " "if usb dev ${usbdev}; then " "if run loadbootenv; then " "echo Loaded environment from ${bootenv};" "run importbootenv;" "fi;" "if test -n $uenvcmd; then " "echo Running uenvcmd ...;" "run uenvcmd;" "fi;" "if run loadimage; then " "run loadfdt; " "echo Booting from usb ${usbdev}...; " "run usbargs;" "bootz ${loadaddr} - ${fdtaddr}; " "fi;" "fi\0" "fi;" "usb stop ${usbdev};\0" "findfdt=" "if test $board_name = AM43EPOS; then " "setenv fdtfile am43x-epos-evm.dtb; fi; " "if test $board_name = AM43__GP; then " "setenv fdtfile am437x-gp-evm.dtb; fi; " "if test $board_name = AM43XXHS; then " "setenv fdtfile am437x-gp-evm.dtb; fi; " "if test $board_name = AM43__SK; then " "setenv fdtfile lx-hmi-000.dtb; fi; " "if test $board_name = AM43_IDK; then " "setenv fdtfile am437x-idk-evm.dtb; fi; " "if test $fdtfile = undefined; then " "echo WARNING: Could not determine device tree; fi; \0" NANDARGS NETARGS DFUARGS
The following line is wrong:
"if test $board_name = AM43__SK; then " "setenv fdtfile lx-hmi-000.dtb;
should be board name = LX__HMI0; then " "setenv fdtfile lx-hmi-000.dtb;
where does this come from? I also noticed:
No matching DT out of these options:
am437x-gp-evm
am437x-sk-evm
am43x-epos-evm
am437x-idk-evm
The dtb file is being created but it looks like not added to fit?
I also noticed a file named .u-boot-dtb.img.cmd with contents:
cmd_u-boot-dtb.img := ./tools/mkimage -f auto -A arm -T firmware -C none -O u-boot -a 0x80800000 -e 0 -n "U-Boot 2017.01-00458-gccd1c34-dirty for am43xx board" -E -b arch/arm/dts/am437x-gp-evm.dtb -b arch/arm/dts/am437x-sk-evm.dtb -b arch/arm/dts/am43x-epos-evm.dtb -b arch/arm/dts/am437x-idk-evm.dtb -d u-boot-nodtb.bin u-boot-dtb.img >/dev/null
also without my custom file, how is this script created?