Skip to content

Commit

Permalink
u-boot-tegra: enable FIT image support with mender
Browse files Browse the repository at this point in the history
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
  • Loading branch information
ichergui authored and madisongh committed May 20, 2021
1 parent 0fc43c3 commit ae3a1d7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
From fa73b07336d782652278e745ab484e2e5c679f3a Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ilies.chergui@gmail.com>
Date: Thu, 20 May 2021 00:58:19 +0100
Subject: [PATCH] env: enable fit image support with mender

Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
---
include/env_mender.h | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/include/env_mender.h b/include/env_mender.h
index fbed122807..e02ce3ac57 100644
--- a/include/env_mender.h
+++ b/include/env_mender.h
@@ -144,15 +144,29 @@
"load ${mender_uboot_root} ${kernel_addr_r} /boot/${mender_kernel_name}; "
#endif

-#define CONFIG_MENDER_BOOTCOMMAND \
+#define CONFIG_MENDER_BOOTCOMMAND_COMMON \
"run mender_setup; " \
- "setenv distro_bootpart ${mender_boot_part}; " \
- "setenv distro_bootpart_hex ${mender_boot_part_hex}; " \
- "setenv devnum " __stringify(MENDER_UBOOT_STORAGE_DEVICE) "; " \
+ "setenv distro_bootpart ${mender_boot_part}; " \
+ "setenv distro_bootpart_hex ${mender_boot_part_hex}; " \
+ "setenv devnum " __stringify(MENDER_UBOOT_STORAGE_DEVICE) "; " \
"setenv devtype " __stringify(MENDER_UBOOT_STORAGE_INTERFACE) "; " \
- "setenv prefix /boot/; " \
+ "setenv prefix /boot/; " \
+
+#ifndef CONFIG_FIT
+#define CONFIG_MENDER_BOOTCOMMAND \
+ CONFIG_MENDER_BOOTCOMMAND_COMMON \
"sysboot ${devtype} ${devnum}:${distro_bootpart_hex} any ${scriptaddr} ${prefix}extlinux/extlinux.conf; " \
"run mender_try_to_recover"
+#else
+#define CONFIG_MENDER_BOOTCOMMAND \
+ CONFIG_MENDER_BOOTCOMMAND_COMMON \
+ MENDER_BOOTARGS \
+ "setenv bootargs ${bootargs} ${cbootargs} ro rootwait; " \
+ "setenv load_fitimage load ${devtype} ${devnum}:${distro_bootpart_hex} ${fit_addr} ${prefix}${mmcfit_name}; " \
+ "run load_fitimage; " \
+ "bootm ${fit_addr} - ${fdt_addr}; " \
+ "run mender_try_to_recover"
+#endif /* CONFIG_FIT */

#endif /* !MENDER_AUTO_PROBING */

--
2.17.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SRC_URI_append_cot = " \
file://enable-fitimage-support.cfg \
${@'file://enable-fitimage-signing.cfg' if d.getVar('UBOOT_SIGN_ENABLE') == '1' else ''} \
"
SRC_URI_append_cot_mender-uboot = " file://0018-env-enable-fit-image-support-with-mender.patch"

RDEPENDS_${PN}_remove_cot = "${PN}-extlinux"

Expand Down

0 comments on commit ae3a1d7

Please sign in to comment.