I’m trying to integrate Mender into Yocto zeus version for i.MX 8mm EVK. But during build I receive the following error: No rule to make target 'sandbox_defconfig’
The error log is appended for your reference. Any help would be much appreciated.
Thanks in advance.
ERROR: u-boot-tools-native-1_2020.01-r0 do_compile: oe_runmake failed
ERROR: u-boot-tools-native-1_2020.01-r0 do_compile: Execution of '/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/temp/run.do_compile.11196' failed with exit code 1:
make: *** No rule to make target 'sandbox_defconfig'. Stop.
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/temp/log.do_compile.11196
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 6 CC=gcc -isystem/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/usr/lib -L/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/lib -Wl,-O1 HOSTCC=gcc -isystem/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/usr/lib -L/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/recipe-sysroot-native/lib -Wl,-O1 STRIP=true V=1 sandbox_defconfig
| make: *** No rule to make target 'sandbox_defconfig'. Stop.
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/ux/imx8/yocto/zeusl/core-base-build/tmp/work/x86_64-linux/u-boot-tools-native/1_2020.01-r0/temp/run.do_compile.11196' failed with exit code 1:
| make: *** No rule to make target 'sandbox_defconfig'. Stop.
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (virtual:native:/home/ux/imx8/yocto/zeusl/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-tools_2020.01.bb:do_compile) failed with exit code '1'
It sounds like you don’t have a proper UBOOT_MACHINE or UBOOT_CONFIG configured for your BSP; it’s trying to build the sandbox configuration which is for testing.
Though this might have unwanted effects, as the bbappend in meta-imx for some reason tries to disable CONFIG_FIT_SIGNATURE. Not sure why, and was not important enough for me to dig any deeper
Not faulty, the issue is that meta-mender provides a never version of U-Boot which also changes how the recipe is build and the bbappend in meta-imx is not applicable anymore.
Creating another u-boot-tools_%.bbappend as following solves it (instead of using bbmask):
do_compile() {
oe_runmake -C ${S} sandbox_defconfig O=${B}
for config in ${SED_CONFIG_DISABLE}; do
sed -i -e "s/$config=.*/# $config is not set/" ${B}/.config
done
oe_runmake -C ${S} cross_tools NO_SDL=1 O=${B}
}
Thanks for your reply. This solved my problem, and I managed to build the image. But unfortunately I have another problem. The imx6ull evk board isn’t loading and no information, no line is displayed in the debug port. After writing another image to a SD card, without Mender, the board is loaded, and in the debug port I see the loading process.
Did you load a board with your image? Do you have any thoughts on my problem.
I used an iMX8 board for my work so not comparable.
Do you have any thoughts on my problem.
Hard to say without more details, e.g what image did you flash? Could be that you are missing bootloader components in the SD card image produced by Mender.
From the symptoms it sounds like the U-Boot that is loading may be incorrect. You should get at least some text on the UART before any of Mender’s changes are affecting anything.
U-Boot 2019.04-lf-5.4.y_v2019.04+g228843cdf5 (Oct 23 2020 - 13:37:33 +0000)
CPU: Freescale i.MX6ULL rev1.1 900 MHz (running at 396 MHz)
CPU: Commercial temperature grade (0C to 95C) at 45C
Reset cause: POR
Model: Freescale i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
Display: TFT43AB (480x272)
Video: 480x272x24
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net: eth1: ethernet@020b4000 [PRIME], eth0: ethernet@02188000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 3 2 1 0
MMC: no card present
MMC: no card present
MMC: no card present
MMC: no card present
Bad Linux ARM zImage magic!
=>
Looks like uboot is trying to work with MMC while I’m booting from sdcard.
The environment variables are as follows:
printenv
altbootcmd=run mender_altbootcmd; run bootcmd
baudrate=115200
board_name=EVK
board_rev=14X14
boot_fdt=try
bootargs=root=/dev/mmcblk0p2
bootcmd=run mender_setup; setenv bootargs root=${mender_kernel_root} ${bootargs}; if test "${fdt_addr_r}" != ""; then load ${mender_uboot_root} ${fdt_addr_r} /boot/${mender_dtb_name}; fi; load ${mender_uboot_root} ${kernel_addr_r} /boot/${mender_kernel_name}; ${mender_boot_kernel_type} ${kernel_addr_r} - ${fdt_addr_r}; run mender_try_to_recover
bootcmd_mfg=run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
bootcount=1
bootdelay=3
bootlimit=1
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
emmc_ack=1
emmc_dev=1
eth1addr=00:04:9f:05:ec:bc
ethact=ethernet@020b4000
ethaddr=00:04:9f:05:ec:bb
ethprime=eth1
fastboot_dev=mmc1
fdt_addr_r=0x83000000
fdt_file=undefined
fdt_high=0xffffffff
fdtcontroladdr=9ef21010
findfdt=if test $fdt_file = undefined; then if test $board_name = ULZ-EVK && test $board_rev = 14X14; then setenv fdt_file imx6ulz-14x14-evk.dtb; fi; if test $board_name = EVK && test $board_rev = 9X9; then setenv fdt_file imx6ull-9x9-evk.dtb; fi; if test $board_name = EVK && test $board_rev = 14X14; then setenv fdt_file imx6ull-14x14-evk.dtb; fi; if test $fdt_file = undefined; then echo WARNING: Could not determine dtb to use; fi; fi;
findtee=if test $tee_file = undefined; then if test $board_name = ULZ-EVK && test $board_rev = 14X14; then setenv tee_file uTee-6ulzevk; fi; if test $board_name = EVK && test $board_rev = 9X9; then setenv tee_file uTee-6ullevk; fi; if test $board_name = EVK && test $board_rev = 14X14; then setenv tee_file uTee-6ullevk; fi; if test $tee_file = undefined; then echo WARNING: Could not determine tee to use; fi; fi;
image=zImage
initrd_addr=0x86800000
initrd_high=0xffffffff
ip_dyn=yes
kboot=bootz
loadaddr=0x80800000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
loadtee=fatload mmc ${mmcdev}:${mmcpart} ${tee_addr} ${tee_file}
mender_altbootcmd=if test ${mender_boot_part} = 2; then setenv mender_boot_part 3; setenv mender_boot_part_hex 3; else setenv mender_boot_part 2; setenv mender_boot_part_hex 2; fi; setenv upgrade_available 0; saveenv; run mender_setup
mender_boot_kernel_type=bootz
mender_boot_part=2
mender_boot_part_hex=2
mender_boot_part_name=/dev/mmcblk0p2
mender_check_saveenv_canary=1
mender_dtb_name=imx6ull-14x14-evk-gpmi-weim.dtb
mender_kernel_name=zImage
mender_kernel_root=/dev/mmcblk0p2
mender_kernel_root_name=/dev/mmcblk0p2
mender_saveenv_canary=1
mender_setup=if test "${mender_saveenv_canary}" != "1"; then setenv mender_saveenv_canary 1; saveenv; fi; if test "${mender_pre_setup_commands}" != ""; then run mender_pre_setup_commands; fi; if test "${mender_systemd_machine_id}" != ""; then setenv bootargs "systemd.machine_id=${mender_systemd_machine_id} ${bootargs}"; fi; setenv mender_kernel_root /dev/mmcblk0p${mender_boot_part}; if test ${mender_boot_part} = 2; then setenv mender_boot_part_name /dev/mmcblk0p2; else setenv mender_boot_part_name /dev/mmcblk0p3; fi; setenv mender_kernel_root_name ${mender_boot_part_name}; setenv mender_uboot_root mmc 0:${mender_boot_part_hex}; setenv mender_uboot_root_name ${mender_boot_part_name}; setenv expand_bootargs "setenv bootargs \\"${bootargs}\\""; run expand_bootargs; setenv expand_bootargs; if test "${mender_post_setup_commands}" != ""; then run mender_post_setup_commands; fi
mender_try_to_recover=if test ${upgrade_available} = 1; then reset; fi
mender_uboot_boot=mmc 0:1
mender_uboot_dev=0
mender_uboot_if=mmc
mender_uboot_root=mmc 0:2
mender_uboot_root_name=/dev/mmcblk0p2
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk_ignore_unused
mmcargs=setenv bootargs console=${console},${baudrate}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${tee} = yes; then run loadfdt; run loadtee; bootm ${tee_addr} - ${fdt_addr}; else if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi; fi;
mmcdev=1
mmcpart=1
mmcroot=/dev/mmcblk1p2 rootwait rw
netargs=setenv bootargs console=${console},${baudrate} ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; ${usb_net_cmd}; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${image}; if test ${tee} = yes; then ${get_cmd} ${tee_addr} ${tee_file}; ${get_cmd} ${fdt_addr} ${fdt_file}; bootm ${tee_addr} - ${fdt_addr}; else if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi; fi;
panel=TFT43AB
script=boot.scr
sd_dev=1
serial#=334159d26044b748
tee=yes
tee_addr=0x84000000
tee_file=undefined
upgrade_available=0
Environment size: 5254/131067 bytes
=>
Those settings are critical to ensure that the U-Boot image is put into the right place into the output images. So before you had those settings the system was simply not even starting U-Boot since it could not find it.