From d8c63011e2b0c54e0a17171b668bfcb253954481 Mon Sep 17 00:00:00 2001 From: Neal Frager Date: Wed, 23 Nov 2022 07:31:26 -0700 Subject: [PATCH] boot/uboot/uboot.mk: allow installing u-boot.elf This patch adds an option that allows to install the u-boot.elf file produced when CONFIG_REMAKE_ELF=y in the U-Boot configuration. Signed-off-by: Neal Frager Signed-off-by: Thomas Petazzoni --- boot/uboot/Config.in | 12 ++++++++++++ boot/uboot/uboot.mk | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index 557472b58b..a729280060 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -277,7 +277,19 @@ config BR2_TARGET_UBOOT_FORMAT_NAND_BIN bool "u-boot-nand.bin" config BR2_TARGET_UBOOT_FORMAT_ELF + bool "u-boot" + help + Install the u-boot image, which is directly the ELF binary + for the main U-Boot, potentially with debugging symbols. + +config BR2_TARGET_UBOOT_FORMAT_REMAKE_ELF bool "u-boot.elf" + help + Install the u-boot.elf image, which is produced when + CONFIG_REMAKE_ELF=y. It is an ELF image (u-boot.elf) + produced from the raw U-Boot binary (u-boot.bin), which may + already have been statically relocated and may already have + a device-tree appended to it. config BR2_TARGET_UBOOT_FORMAT_IMG bool "u-boot.img" diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 0439ec5e4b..697adb4d8f 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -60,6 +60,10 @@ UBOOT_MAKE_TARGET += mdbtrick endif endif +ifeq ($(BR2_TARGET_UBOOT_FORMAT_REMAKE_ELF),y) +UBOOT_BINS += u-boot.elf +endif + # Call 'make all' unconditionally UBOOT_MAKE_TARGET += all