Hi, I’m attempting to integrate Mender client into our Yocto Zeus build for a custom iMX6ULL board. Our source for u-boot is set up for EXTERNAL_SRC, so I have to do the manual patching via
The resulting patchfile (pasted below) seems to be missing the Mender env variables (mender_setup
, mender_saveenv_canary
, etc.) that are mentioned in this post:
https://hub.mender.io/t/beaglebone-missing-default-u-boot-environment-in-mmc/1505/6
Should these variables still be added to u-boot env?
Thanks,
Stu
diff -r -u /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r2/old-src/configs/hermes_uboot_emmc_defconfig /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r2/git/configs/hermes_uboot_emmc_defconfig
--- a/configs/hermes_uboot_emmc_defconfig 2021-02-08 22:20:09.582784106 +0000
+++ b/configs/hermes_uboot_emmc_defconfig 2021-02-08 22:20:54.975950846 +0000
@@ -1,8 +1,6 @@
CONFIG_ARM=y
CONFIG_ARCH_MX6=y
CONFIG_TARGET_HERMES=y
-CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_OFFSET=0xE0000
CONFIG_DM_GPIO=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/orro/hermes/imximage.cfg"
@@ -33,7 +31,6 @@
CONFIG_CMD_FS_GENERIC=y
CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="hermes"
-CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_DM_74X164=y
@@ -84,3 +81,32 @@
CONFIG_FASTBOOT_BUF_SIZE=0x40000000
CONFIG_FASTBOOT_FLASH=y
CONFIG_EFI_PARTITION=y
+CONFIG_ENV_SIZE=0x20000
+CONFIG_ENV_OFFSET=0x100000
+CONFIG_ENV_OFFSET_REDUND=0x200000
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+# CONFIG_ENV_IS_NOWHERE is not set
+# CONFIG_ENV_IS_IN_EEPROM is not set
+# CONFIG_ENV_IS_IN_FAT is not set
+# CONFIG_ENV_IS_IN_EXT4 is not set
+# CONFIG_ENV_IS_IN_FLASH is not set
+# CONFIG_ENV_IS_IN_NAND is not set
+# CONFIG_ENV_IS_IN_NVRAM is not set
+# CONFIG_ENV_IS_IN_ONENAND is not set
+# CONFIG_ENV_IS_IN_REMOTE is not set
+# CONFIG_ENV_IS_IN_SATA is not set
+# CONFIG_ENV_IS_IN_SPI_FLASH is not set
+# CONFIG_ENV_IS_IN_UBI is not set
+CONFIG_MMC=y
+CONFIG_ENV_IS_IN_MMC=y
+# CONFIG_BOOTCOUNT_BOOTLIMIT is not set
+# CONFIG_BOOTCOUNT_GENERIC is not set
+# CONFIG_BOOTCOUNT_EXT is not set
+# CONFIG_BOOTCOUNT_AM33XX is not set
+# CONFIG_BOOTCOUNT_RAM is not set
+# CONFIG_BOOTCOUNT_I2C is not set
+# CONFIG_BOOTCOUNT_AT91 is not set
+# CONFIG_BOOTCOUNT_ALEN is not set
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
+# CONFIG_BOOTCOMMAND is not set
Binary files /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r2/old-src/.git/index and /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r2/git/.git/index differ
diff -r -u /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r2/old-src/include/config_defaults.h /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r2/git/include/config_defaults.h
--- a/include/config_defaults.h 2021-02-08 22:20:09.866791406 +0000
+++ b/include/config_defaults.h 2021-02-08 22:20:54.631942004 +0000
@@ -10,3 +10,5 @@
#define _CONFIG_DEFAULTS_H_
#endif
+#define CONFIG_SYS_MMC_ENV_DEV 1
+#define CONFIG_SYS_MMC_ENV_PART 0
diff -r -u /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r2/old-src/include/configs/hermes.h /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r2/git/include/configs/hermes.h
--- a/include/configs/hermes.h 2021-02-08 22:20:09.882791817 +0000
+++ b/include/configs/hermes.h 2021-02-08 22:20:54.635942107 +0000
@@ -80,23 +80,16 @@
CONFIG_MFG_ENV_SETTINGS \
TEE_ENV \
"splashimage=0x8c000000\0" \
- "fdt_addr=0x83000000\0" \
+ "fdt_addr_r=0x83000000\0" \
"fdt_high=0xffffffff\0" \
"tee_addr=0x84000000\0" \
"console=ttymxc0\0" \
"bootargs=console=ttymxc0,115200 ubi.mtd=nandrootfs " \
- "root=ubi0:rootfs rootfstype=ubifs " \
+ "rootfstype=ubifs " \
BOOTARGS_CMA_SIZE \
MFG_NAND_PARTITION \
"\0" \
- "bootcmd=nand read ${loadaddr} 0x4000000 0xc00000;"\
- "nand read ${fdt_addr} 0x5000000 0x100000;"\
- "if test ${tee} = yes; then " \
- "nand read ${tee_addr} 0x6000000 0x400000;"\
- "bootm ${tee_addr} - ${fdt_addr};" \
- "else " \
- "bootz ${loadaddr} - ${fdt_addr};" \
- "fi\0"
+
#else
#define CONFIG_EXTRA_ENV_SETTINGS \
@@ -108,7 +101,7 @@
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
"fdt_file=undefined\0" \
- "fdt_addr=0x83000000\0" \
+ "fdt_addr_r=0x83000000\0" \
"tee_addr=0x84000000\0" \
"tee_file=undefined\0" \
"boot_fdt=try\0" \
@@ -120,7 +113,7 @@
"mmcautodetect=yes\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
BOOTARGS_CMA_SIZE \
- "root=${mmcroot}\0" \
+ "\0" \
"loadbootscript=" \
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
@@ -149,7 +142,7 @@
"fi;\0" \
"netargs=setenv bootargs console=${console},${baudrate} " \
BOOTARGS_CMA_SIZE \
- "root=/dev/nfs " \
+ "" \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"${usb_net_cmd}; " \
@@ -204,20 +197,6 @@
"fi; " \
"fi;\0" \
-#define CONFIG_BOOTCOMMAND \
- "run findfdt;" \
- "run findtee;" \
- "mmc dev ${mmcdev};" \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadimage; then " \
- "run mmcboot; " \
- "else run netboot; " \
- "fi; " \
- "fi; " \
- "else run netboot; fi"
#endif
/* Miscellaneous configurable options */
@@ -240,8 +219,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* environment organization */
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
-#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
#define CONFIG_IOMUX_LPSR
Hi @sjuengst ,
You seem to be missing this patch . If our docs are missing a step please let me know.
Drew
I see 4 Mender-provided patches in build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r4
sjuengst@ernie:~/hermes-mender/yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r4$ ls
0001-Add-missing-header-which-fails-on-recent-GCC.patch deploy-u-boot-imx pkgdata sysroot-destdir
0002-Generic-boot-code-for-Mender.patch fw_env.config.default pkgdata-pdata-input temp
0003-Integration-of-Mender-boot-code-into-U-Boot.patch hermes pkgdata-sysroot uboot_auto_configure.sh
0004-Disable-CONFIG_BOOTCOMMAND-and-enable-CONFIG_MENDER_.patch image pseudo uboot_auto_patch.sh
add_kconfig_option_with_depends.py license-destdir recipe-sysroot uboot.env
boolean.py package recipe-sysroot-native u-boot-imx-2020.04
deploy-rpms packages-split src-tar u-boot-imx.spec
I assumed that bitbake -c save_mender_auto_configured_patch u-boot
would consolidate them into mender_auto_configured.patch
. Do I have to apply them manually myself and then do save_auto_configured_patch
?
Thanks,
Stu
I had MENDER_UBOOT_AUTO_CONFIGURE set to “0” when I first ran save_mender_auto_configured_patch
. It occurred to me that maybe it should be ‘1’ for generating the patch and then turned off afterwards (the docs don’t say which setting to use). I tried regenerating the patch with MENDER_UBOOT_AUTO_CONFIGURE = “1” and ran into another problem. It seems that the do_configure_append() in my u-boot-imx_2020.04.bbappend is not being executed when I run save_mender_auto_configured_patch
(none of my board-specific files, _defconfig, etc. are being installed) so the build fails.
ERROR: u-boot-imx-1_2020.04-r6 do_mender_uboot_auto_configure: Execution of '/yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r6/temp/run.do_mender_uboot_auto_configure.2808' failed with exit code 2:
If at any point you get an unexpanded variable, there is probably an argument
you haven't given.
+ SUB_X=-x
+ set -u
+ rm -rf /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r6/tmp-src
++ dirname /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r6/tmp-src
+ mkdir -p /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r6
+ cp -r /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r6/git /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r6/tmp-src
+ cd /yocto-src/build/tmp/work/hermes-poky-linux-gnueabi/u-boot-imx/1_2020.04-r6/tmp-src
+ make 'HOSTCC=gcc -DMENDER_AUTO_PROBING' 'CC=arm-poky-linux-gnueabi-gcc -DMENDER_AUTO_PROBING' hermes_uboot_emmc_config
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
***
*** Can't find default configuration "arch/../configs/hermes_uboot_emmc_defconfig"!
***
scripts/kconfig/Makefile:128: recipe for target 'hermes_uboot_emmc_defconfig' failed
make[1]: *** [hermes_uboot_emmc_defconfig] Error 1
Makefile:539: recipe for target 'hermes_uboot_emmc_config' failed
make: *** [hermes_uboot_emmc_config] Error 2
WARNING: exit code 2 from a shell command.
I had worked around this the first time around by changing MACHINE
to imx6ull14x14evk
(which doesn’t require a do_configure_append), but this was unsatisfactory because the evk and hermes defconfigs are different enough to cause the patch to fail. I had to manually clean it up.
Thanks,
Stu
@kacf can you help here?
Drew
I fixed the build failure by changing my .bbappend to install my hermes board-specific files in do_mender_uboot_auto_configure_prepend() instead of do_configure_append(), but I’m still missing the 0001- through 0004- Mender-supplied patches even when MENDER_UBOOT_AUTO_CONFIGURE=“1”. So I’m back to the question of whether I’m supposed to apply them manually myself or should they be included in mender_auto_configured.patch
?
Thanks,
Stu
kacf
February 12, 2021, 8:56am
7
They should not be included in mender_auto_configured.patch
. Aren’t they listed in your SRC_URI
? It can be checked with bitbake -e u-boot-imx
and then grepping for it.
Getting back to this after some time away. I’ve added
SRC_URI += "file://0001-Add-missing-header-which-fails-on-recent-GCC.patch"
SRC_URI += "file://0002-Generic-boot-code-for-Mender.patch"
SRC_URI += "file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch"
to my u-boot-imx_2020.04.bbappend but I don’t see bitbake running the do_patch() task for u-boot-imx and the patches are not being applied. What am I missing?
Hi @sjuengst what file did you add those settings in? Can you share the output from bitbake -e virtual/bootloader
?
Drew
I’m adding the patches to the u-boot-imx_2020.04.bbappend in our board’s new layer. The output of bitbake -e virtual/bootloader is too long to post here. Is there a particular section of interest?
I’d like to see the details on how SRC_URI is computed if you can snip that section out.
Drew
It actually looks like those patches are included 3 times (and does it matter that there are no newlines between them at the end?).
# [doc] "The list of source files - local or remote. This variable tells the OpenEmbedded build system what bits to pull in for the build and how to pull them in."
# set /yocto-src/sources/meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-common.inc:13
# "git://git.denx.de/u-boot.git"
# set /yocto-src/sources/meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2020.04.bb:20
# "${UBOOT_SRC};branch=${SRCBRANCH} "
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:19
# " file://0001-Add-missing-header-which-fails-on-recent-GCC.patch"
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:20
# " file://0002-Generic-boot-code-for-Mender.patch"
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:21
# " file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch"
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:27
# "${@bb.utils.contains('MENDER_UBOOT_AUTO_CONFIGURE', '1', ' file://0004-Disable-CONFIG_BOOTCOMMAND-and-enable-CONFIG_MENDER_.patch', '', d)}"
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:300
# "${@bb.utils.contains('MENDER_UBOOT_AUTO_CONFIGURE', '1', ' file://uboot_auto_configure.sh file://uboot_auto_patch.sh file://add_kconfig_option_with_depends.py file://boolean.py', '', d)}"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:12
# "file://${MACHINE}/arch.arm.Kconfig"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:13
# "file://${MACHINE}/arch.arm.dts.Makefile"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:14
# "file://${MACHINE}/hermes.h"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:15
# "file://${MACHINE}/orro/hermes/hermes.c"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:16
# "file://${MACHINE}/orro/hermes/mmc.c"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:17
# "file://${MACHINE}/orro/hermes/imximage.cfg"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:18
# "file://${MACHINE}/orro/hermes/Kconfig"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:19
# "file://${MACHINE}/orro/hermes/Makefile"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:20
# "file://${MACHINE}/orro/hermes/plugin.S"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:21
# "file://${MACHINE}/hermes_uboot_defconfig"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:22
# "file://${MACHINE}/hermes_uboot_emmc_defconfig"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:23
# "file://${MACHINE}/hermes.dts"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:24
# "file://${MACHINE}/config_defaults.h"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:25
# "file://${MACHINE}/env_default.h"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:26
# "file://${MACHINE}/Makefile.autoconf"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:27
# "file://${MACHINE}/fw_env.c"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:28
# "file://${MACHINE}/config_mender.h"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:29
# "file://${MACHINE}/config_mender_defines.h"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:30
# "file://${MACHINE}/env_mender.h"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:31
# "file://${MACHINE}/mender_auto_configured.patch"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:32
# "file://0001-Add-missing-header-which-fails-on-recent-GCC.patch"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:33
# "file://0002-Generic-boot-code-for-Mender.patch"
# append /yocto-dev/layers/meta-orro/appends/u-boot-imx/u-boot-imx_2020.04.bbappend:34
# "file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch"
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:19
# " file://0001-Add-missing-header-which-fails-on-recent-GCC.patch"
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:20
# " file://0002-Generic-boot-code-for-Mender.patch"
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:21
# " file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch"
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:27
# "${@bb.utils.contains('MENDER_UBOOT_AUTO_CONFIGURE', '1', ' file://0004-Disable-CONFIG_BOOTCOMMAND-and-enable-CONFIG_MENDER_.patch', '', d)}"
# _append[mender-uboot] /yocto-src/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc:300
# "${@bb.utils.contains('MENDER_UBOOT_AUTO_CONFIGURE', '1', ' file://uboot_auto_configure.sh file://uboot_auto_patch.sh file://add_kconfig_option_with_depends.py file://boolean.py', '', d)}"
# set externalsrc.bbclass:74 [__anon_135__yocto_src_sources_poky_meta_classes_externalsrc_bbclass]
# "file://hermes/arch.arm.Kconfig file://hermes/arch.arm.dts.Makefile file://hermes/hermes.h file://hermes/orro/hermes/hermes.c file://hermes/orro/hermes/mmc.c file://hermes/orro/hermes/imximage.cfg file://hermes/orro/hermes/Kconfig file://hermes/orro/hermes/Makefile file://hermes/orro/hermes/plugin.S file://hermes/hermes_uboot_defconfig file://hermes/hermes_uboot_emmc_defconfig file://hermes/hermes.dts file://hermes/config_defaults.h file://hermes/env_default.h file://hermes/Makefile.autoconf file://hermes/fw_env.c file://hermes/config_mender.h file://hermes/config_mender_defines.h file://hermes/env_mender.h file://hermes/mender_auto_configured.patch file://0001-Add-missing-header-which-fails-on-recent-GCC.patch file://0002-Generic-boot-code-for-Mender.patch file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch file://0001-Add-missing-header-which-fails-on-recent-GCC.patch file://0002-Generic-boot-code-for-Mender.patch file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch file://0001-Add-missing-header-which-fails-on-recent-GCC.patch file://0002-Generic-boot-code-for-Mender.patch file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch"
# pre-expansion value:
# "file://hermes/arch.arm.Kconfig file://hermes/arch.arm.dts.Makefile file://hermes/hermes.h file://hermes/orro/hermes/hermes.c file://hermes/orro/hermes/mmc.c file://hermes/orro/hermes/imximage.cfg file://hermes/orro/hermes/Kconfig file://hermes/orro/hermes/Makefile file://hermes/orro/hermes/plugin.S file://hermes/hermes_uboot_defconfig file://hermes/hermes_uboot_emmc_defconfig file://hermes/hermes.dts file://hermes/config_defaults.h file://hermes/env_default.h file://hermes/Makefile.autoconf file://hermes/fw_env.c file://hermes/config_mender.h file://hermes/config_mender_defines.h file://hermes/env_mender.h file://hermes/mender_auto_configured.patch file://0001-Add-missing-header-which-fails-on-recent-GCC.patch file://0002-Generic-boot-code-for-Mender.patch file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch file://0001-Add-missing-header-which-fails-on-recent-GCC.patch file://0002-Generic-boot-code-for-Mender.patch file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch file://0001-Add-missing-header-which-fails-on-recent-GCC.patch file://0002-Generic-boot-code-for-Mender.patch file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch"
SRC_URI="file://hermes/arch.arm.Kconfig file://hermes/arch.arm.dts.Makefile file://hermes/hermes.h file://hermes/orro/hermes/hermes.c file://hermes/orro/hermes/mmc.c file://hermes/orro/hermes/imximage.cfg file://hermes/orro/hermes/Kconfig file://hermes/orro/hermes/Makefile file://hermes/orro/hermes/plugin.S file://hermes/hermes_uboot_defconfig file://hermes/hermes_uboot_emmc_defconfig file://hermes/hermes.dts file://hermes/config_defaults.h file://hermes/env_default.h file://hermes/Makefile.autoconf file://hermes/fw_env.c file://hermes/config_mender.h file://hermes/config_mender_defines.h file://hermes/env_mender.h file://hermes/mender_auto_configured.patch file://0001-Add-missing-header-which-fails-on-recent-GCC.patch file://0002-Generic-boot-code-for-Mender.patch file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch file://0001-Add-missing-header-which-fails-on-recent-GCC.patch file://0002-Generic-boot-code-for-Mender.patch file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch file://0001-Add-missing-header-which-fails-on-recent-GCC.patch file://0002-Generic-boot-code-for-Mender.patch file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch"
You don’t seem to have a git repo in the SRC_URI definition. My best guess is you have something that is overwriting SRC_URI rather than appending to it.
Specifically I’d look at these bits:
# set /yocto-src/sources/meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-common.inc:13
# "git://git.denx.de/u-boot.git"
# set /yocto-src/sources/meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2020.04.bb:20
# "${UBOOT_SRC};branch=${SRCBRANCH} "
Drew
Our u-boot-imx repo is EXTERNALSRC. I wonder if that is causing the denx and NXP additions to SRC_URI to be removed. Other than that, I can’t find any place where SRC_URI is set rather than appended.
Honestly I have never tried EXTERNALSRC and I don’t know if patches will be automatically applied in that case. Can you add them manually to your external source checkout?
Yes, I had actually done this earlier but then decided it would be better to patch it live. I can revert to a pre-patched repo.
Please let us know if that works. I’m definitely curious to know if patch files in SRC_URI work with EXTERNALSRC setups.
Drew
Yes, applying the patches manually to external source successfully worked around the issue. Thanks!