initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,49 @@
From ab8b54cfc9d3fddba297c343a2d8dea9dbe20017 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
Date: Tue, 4 Aug 2015 22:13:20 +0200
Subject: [PATCH] drop configh from tools
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We need to build u-boot tools without a board configuration for the target.
fw_env just uses config.h to define the default environment of the created
image, so it really isn't mandatory.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
[Jörg Krause: update for version 2015.07]
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
[Romain: update for version 2017.05
after commit 9d80b49a671c9922931adcd823aab0ed319a42d1]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
[Pierre-Jean: update for version 2019.04]
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
---
tools/env/fw_env_private.h | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/tools/env/fw_env_private.h b/tools/env/fw_env_private.h
index 86be16d..3c62ac4 100644
--- a/tools/env/fw_env_private.h
+++ b/tools/env/fw_env_private.h
@@ -4,17 +4,6 @@
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
-/* Pull in the current config to define the default environment */
-#include <linux/kconfig.h>
-
-#ifndef __ASSEMBLY__
-#define __ASSEMBLY__ /* get only #defines from config.h */
-#include <config.h>
-#undef __ASSEMBLY__
-#else
-#include <config.h>
-#endif
-
/*
* To build the utility with the static configuration
* comment out the next line.
--
2.9.4
@@ -0,0 +1,44 @@
From 460646b3c4c1718860915c38586ee8d2fbda38e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
Date: Sun, 1 Feb 2015 21:53:47 +0100
Subject: [PATCH] tools only in no dot config targets
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Revert upstream commit c7ad5cbb1ef2c33883f0fa7d0455095004fd306d:
Makefile: drop "tools-only" from no-dot-config-targets
This indirectly pulls in a build-dependency on libssl-dev used for FIT
image support, and possibly GPL/OpenSSL licensing incompatibility
issues.
Based on Debian patch from u-boot-tools:
http://ftp.de.debian.org/debian/pool/main/u/u-boot/u-boot_2014.10+dfsg1-2.1.debian.tar.xz
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
[fabio: adapt it to 2016.09]
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
[Fabrice: adapt it to 2021.04]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 6aa08964ff..fcec83d183 100644
--- a/Makefile
+++ b/Makefile
@@ -486,7 +486,7 @@ defaultenv_h := include/generated/defaultenv_autogenerated.h
no-dot-config-targets := clean clobber mrproper distclean \
help %docs check% coccicheck \
- ubootversion backup tests check qcheck tcheck
+ ubootversion backup tests tools-only check qcheck tcheck
config-targets := 0
mixed-targets := 0
--
2.20.1
@@ -0,0 +1,34 @@
From 3b89170333ef0fdfffee14751ce3e1d66d7dfa00 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 14 Sep 2021 19:08:02 +0200
Subject: [PATCH] tools/Makefile: fix {C,LD}FLAGS with CROSS_BUILD_TOOLS
When CROSS_BUILD_TOOLS is set, set KBUILD_HOST{CF,LD}FLAGS to
{C,LD}FLAGS otherwise CC will be used with HOST{C,LD}FLAGS which seems
wrong.
It should be noted that, for an unknown reason, overriding
HOST{C,LD}FLAGS don't work.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
tools/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/Makefile b/tools/Makefile
index 4a86321f64..98bb92990d 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -316,7 +316,8 @@ subdir- += env
ifneq ($(CROSS_BUILD_TOOLS),)
override HOSTCC = $(CC)
-override HOSTCFLAGS = $(CFLAGS)
+override KBUILD_HOSTCFLAGS = $(CFLAGS)
+override KBUILD_HOSTLDFLAGS = $(LDFLAGS)
quiet_cmd_crosstools_strip = STRIP $^
cmd_crosstools_strip = $(STRIP) $^; touch $@
--
2.33.0
+96
View File
@@ -0,0 +1,96 @@
config BR2_PACKAGE_UBOOT_TOOLS
bool "u-boot tools"
help
Companion tools for Das U-Boot bootloader.
http://www.denx.de/wiki/U-Boot/WebHome
if BR2_PACKAGE_UBOOT_TOOLS
config BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT
bool "Flattened Image Tree (FIT) support"
depends on !BR2_STATIC_LIBS
select BR2_PACKAGE_DTC
select BR2_PACKAGE_DTC_PROGRAMS
help
Enables support for Flattened Image Tree (FIT).
This option allows to boot the new uImage structure,
Flattened Image Tree. FIT is formally a FDT, which can include
images of various types (kernel, FDT blob, ramdisk, etc.)
in a single blob. To boot this new uImage structure,
pass the address of the blob to the "bootm" command.
comment "u-boot tools FIT support needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
if BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT
config BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT
bool "FIT signature verification support"
select BR2_PACKAGE_OPENSSL
help
Enables support for FIT Signature Verification.
Flat Image Trees (FIT) supports hashing of images so that
these hashes can be checked on loading. This protects
against corruption of the image. However it does not prevent
the substitution of one image for another.
The signature feature allows the hash to be signed with a
private key such that it can be verified using a public key
later. Provided that the private key is kept secret and the
public key is stored in a non-volatile place, any image can
be verified in this way.
Enabling this option pulls in a dependency on libssl and
libcrypto, and possibly GPL/OpenSSL licensing
incompatibility issues.
config BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN
bool "fit_check_sign"
depends on BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT
help
Install the fit_check_sign tool on the target system
The fit_check_sign tool from Das U-Boot bootloader, which
allows FIT image signature validation on target system.
endif
config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE
bool "mkimage"
help
Install the mkimage tool on the target system
The mkimage tool from Das U-Boot bootloader, which allows
generation of U-Boot images in various formats.
config BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE
bool "mkenvimage"
help
Install the mkenvimage tool on the target system
The mkenvimage tool from Das U-Boot bootloader, which allows
generation of a valid binary environment image from a text
file describing the key=value pairs of the environment.
config BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV
bool "fw_printenv"
default y
help
Install the fw_printenv / fw_setenv tools on the target system
The fw_printenv and fw_setenv tools from Das U-Boot
bootloader, which allows access to the U-Boot environment
from Linux.
config BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE
bool "dumpimage"
help
Install the dumpimage tool on the target system
The dumpimage tool from Das U-Boot bootloader, which allows
extraction of data from U-Boot images.
endif
+111
View File
@@ -0,0 +1,111 @@
config BR2_PACKAGE_HOST_UBOOT_TOOLS
bool "host u-boot tools"
help
Companion tools for Das U-Boot bootloader.
http://www.denx.de/wiki/U-Boot/WebHome
if BR2_PACKAGE_HOST_UBOOT_TOOLS
config BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT
bool "Flattened Image Tree (FIT) support"
select BR2_PACKAGE_HOST_DTC
help
Enables support for Flattened Image Tree (FIT).
This option allows to boot the new uImage structure,
Flattened Image Tree. FIT is formally a FDT, which can include
images of various types (kernel, FDT blob, ramdisk, etc.)
in a single blob. To boot this new uImage structure,
pass the address of the blob to the "bootm" command.
if BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT
config BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT
bool "FIT signature verification support"
help
Enables support for FIT Signature Verification.
Flat Image Trees (FIT) supports hashing of images so that
these hashes can be checked on loading. This protects
against corruption of the image. However it does not prevent
the substitution of one image for another.
The signature feature allows the hash to be signed with a
private key such that it can be verified using a public key
later. Provided that the private key is kept secret and the
public key is stored in a non-volatile place, any image can
be verified in this way.
endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT
config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE
bool "Environment image"
help
Generate a valid binary environment image from a text file
describing the key=value pairs of the environment.
This option can be useful to build enviornment configurations
as part of a Linux / rootfs only defconfig instead of using
post scripts. This supports a hardware use case of a single
bootloader only defconfig but multiple Linux / rootfs
defconfigs with different boot environments.
The environment image will be called uboot-env.bin.
if BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE
config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE
string "Source files for environment"
default BR2_TARGET_UBOOT_ENVIMAGE_SOURCE if BR2_TARGET_UBOOT_ENVIMAGE_SOURCE != "" # legacy
help
Text files describing the environment. Files should have
lines of the form var=value, one per line. Blank lines and
lines starting with a # are ignored.
Multiple source files are concatenated in the order listed.
Leave empty to generate image from compiled-in env if a U-boot
target build is configured (BR2_TARGET_UBOOT)
config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE
string "Size of environment"
default BR2_TARGET_UBOOT_ENVIMAGE_SIZE if BR2_TARGET_UBOOT_ENVIMAGE_SIZE != "" # legacy
help
Size of envronment, can be prefixed with 0x for hexadecimal
values.
config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_REDUNDANT
bool "Environment has two copies"
help
Some platforms define in their U-Boot configuration that the
U-Boot environment should be duplicated in two locations (for
extra safety). Check your U-Boot configuration for the
CONFIG_ENV_ADDR_REDUND and CONFIG_ENV_SIZE_REDUND settings to
see if this is the case for your platform.
If it is the case, then you should enable this option to
ensure that the U-Boot environment image generated by
Buildroot is compatible with the "redundant environment"
mechanism of U-Boot.
endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE
config BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT
bool "Generate a U-Boot boot script"
help
Generate a U-Boot boot script, given a file listing U-Boot
commands to be executed at boot time. The generated boot
script will be called 'boot.scr'.
if BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT
config BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE
string "U-Boot boot script source"
default BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE if BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE != "" # legacy
help
Source file to generate the U-Boot boot script.
endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT
endif # BR2_PACKAGE_HOST_UBOOT_TOOLS
+3
View File
@@ -0,0 +1,3 @@
# Locally computed:
sha256 312b7eeae44581d1362c3a3f02c28d806647756c82ba8c72241c7cdbe68ba77e u-boot-2021.07.tar.bz2
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Licenses/gpl-2.0.txt
+220
View File
@@ -0,0 +1,220 @@
################################################################################
#
# uboot-tools
#
################################################################################
UBOOT_TOOLS_VERSION = 2021.07
UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2
UBOOT_TOOLS_SITE = ftp://ftp.denx.de/pub/u-boot
UBOOT_TOOLS_LICENSE = GPL-2.0+
UBOOT_TOOLS_LICENSE_FILES = Licenses/gpl-2.0.txt
UBOOT_TOOLS_CPE_ID_VENDOR = denx
UBOOT_TOOLS_CPE_ID_PRODUCT = u-boot
UBOOT_TOOLS_INSTALL_STAGING = YES
# u-boot 2020.01+ needs make 4.0+
UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY)
HOST_UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY)
define UBOOT_TOOLS_CONFIGURE_CMDS
mkdir -p $(@D)/include/config
touch $(@D)/include/config/auto.conf
mkdir -p $(@D)/include/generated
touch $(@D)/include/generated/autoconf.h
endef
UBOOT_TOOLS_MAKE_OPTS = CROSS_COMPILE="$(TARGET_CROSS)" \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
HOSTCFLAGS="$(HOST_CFLAGS)" \
STRIP=$(TARGET_STRIP)
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT),y)
UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc
UBOOT_TOOLS_DEPENDENCIES += dtc
endif
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),y)
UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT_SIGNATURE=y CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
UBOOT_TOOLS_DEPENDENCIES += openssl host-pkgconf
endif
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y)
define UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN
$(INSTALL) -m 0755 -D $(@D)/tools/fit_check_sign $(TARGET_DIR)/usr/bin/fit_check_sign
endef
endif
define UBOOT_TOOLS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(BR2_MAKE) -C $(@D) $(UBOOT_TOOLS_MAKE_OPTS) \
CROSS_BUILD_TOOLS=y tools-only
$(TARGET_MAKE_ENV) $(BR2_MAKE) -C $(@D) $(UBOOT_TOOLS_MAKE_OPTS) \
envtools no-dot-config-targets=envtools
endef
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE),y)
define UBOOT_TOOLS_INSTALL_MKIMAGE
$(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(TARGET_DIR)/usr/bin/mkimage
endef
endif
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE),y)
define UBOOT_TOOLS_INSTALL_MKENVIMAGE
$(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(TARGET_DIR)/usr/bin/mkenvimage
endef
endif
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV),y)
define UBOOT_TOOLS_INSTALL_FWPRINTENV
$(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(TARGET_DIR)/usr/sbin/fw_printenv
ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
endef
endif
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE),y)
define UBOOT_TOOLS_INSTALL_DUMPIMAGE
$(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(TARGET_DIR)/usr/sbin/dumpimage
endef
endif
define UBOOT_TOOLS_INSTALL_STAGING_CMDS
$(INSTALL) -D -m 0755 $(@D)/tools/env/lib.a $(STAGING_DIR)/usr/lib/libubootenv.a
$(INSTALL) -D -m 0644 $(@D)/tools/env/fw_env.h $(STAGING_DIR)/usr/include/fw_env.h
endef
define UBOOT_TOOLS_INSTALL_TARGET_CMDS
$(UBOOT_TOOLS_INSTALL_MKIMAGE)
$(UBOOT_TOOLS_INSTALL_MKENVIMAGE)
$(UBOOT_TOOLS_INSTALL_FWPRINTENV)
$(UBOOT_TOOLS_INSTALL_DUMPIMAGE)
$(UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN)
endef
# host-uboot-tools
define HOST_UBOOT_TOOLS_CONFIGURE_CMDS
mkdir -p $(@D)/include/config
touch $(@D)/include/config/auto.conf
mkdir -p $(@D)/include/generated
touch $(@D)/include/generated/autoconf.h
endef
HOST_UBOOT_TOOLS_MAKE_OPTS = HOSTCC="$(HOSTCC)" \
HOSTCFLAGS="$(HOST_CFLAGS)" \
HOSTLDFLAGS="$(HOST_LDFLAGS)"
ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),y)
HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc
HOST_UBOOT_TOOLS_DEPENDENCIES += host-dtc
endif
ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),y)
HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT_SIGNATURE=y CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
HOST_UBOOT_TOOLS_DEPENDENCIES += host-openssl
endif
ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE),y)
UBOOT_TOOLS_GENERATE_ENV_FILE = $(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE))
# If BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE is left empty, we
# will use the default environment provided in the U-Boot build
# directory as boot-env-defaults.txt, which requires having uboot as a
# dependency.
# If BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE is not empty, is
# might be referring to a file within the U-Boot source tree, so we
# also need to have uboot as a dependency.
ifeq ($(BR2_TARGET_UBOOT),y)
HOST_UBOOT_TOOLS_DEPENDENCIES += uboot
# Handle the case where BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE
# is left empty, use the default U-Boot environment.
ifeq ($(UBOOT_TOOLS_GENERATE_ENV_FILE),)
UBOOT_TOOLS_GENERATE_ENV_FILE = $(@D)/boot-env-defaults.txt
define HOST_UBOOT_TOOLS_GENERATE_ENV_DEFAULTS
CROSS_COMPILE="$(TARGET_CROSS)" \
$(UBOOT_SRCDIR)/scripts/get_default_envs.sh \
$(UBOOT_SRCDIR) \
> $(UBOOT_TOOLS_GENERATE_ENV_FILE)
endef
endif # UBOOT_TOOLS_GENERATE_ENV_FILE
endif # BR2_TARGET_UBOOT
ifeq ($(BR_BUILDING),y)
ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE)),)
$(error Please provide U-Boot environment size (BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE setting))
endif
# If U-Boot is not available, ENVIMAGE_SOURCE must be provided by user,
# otherwise it is optional because the default can be taken from U-Boot
ifeq ($(BR2_TARGET_UBOOT),)
ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE)),)
$(error Please provide U-Boot environment file (BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE setting))
endif
endif #BR2_TARGET_UBOOT
endif #BR_BUILDING
define HOST_UBOOT_TOOLS_GENERATE_ENVIMAGE
$(HOST_UBOOT_TOOLS_GENERATE_ENV_DEFAULTS)
cat $(UBOOT_TOOLS_GENERATE_ENV_FILE) | \
$(@D)/tools/mkenvimage -s $(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE) \
$(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_REDUNDANT),-r) \
$(if $(filter "BIG",$(BR2_ENDIAN)),-b) \
-o $(@D)/tools/uboot-env.bin \
-
endef
define HOST_UBOOT_TOOLS_INSTALL_ENVIMAGE
$(INSTALL) -m 0755 -D $(@D)/tools/uboot-env.bin $(BINARIES_DIR)/uboot-env.bin
endef
endif #BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE
ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT),y)
ifeq ($(BR_BUILDING),y)
ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE)),)
$(error Please define a source file for U-Boot boot script (BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE setting))
endif
endif #BR_BUILDING
define HOST_UBOOT_TOOLS_GENERATE_BOOT_SCRIPT
$(@D)/tools/mkimage -C none -A $(MKIMAGE_ARCH) -T script \
-d $(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE)) \
$(@D)/tools/boot.scr
endef
define HOST_UBOOT_TOOLS_INSTALL_BOOT_SCRIPT
$(INSTALL) -m 0755 -D $(@D)/tools/boot.scr $(BINARIES_DIR)/boot.scr
endef
endif #BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT
define HOST_UBOOT_TOOLS_BUILD_CMDS
$(BR2_MAKE1) -C $(@D) $(HOST_UBOOT_TOOLS_MAKE_OPTS) tools-only
$(HOST_UBOOT_TOOLS_GENERATE_ENVIMAGE)
$(HOST_UBOOT_TOOLS_GENERATE_BOOT_SCRIPT)
endef
define HOST_UBOOT_TOOLS_INSTALL_CMDS
$(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/bin/mkimage
$(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/bin/mkenvimage
$(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/bin/dumpimage
$(HOST_UBOOT_TOOLS_INSTALL_ENVIMAGE)
$(HOST_UBOOT_TOOLS_INSTALL_BOOT_SCRIPT)
endef
$(eval $(generic-package))
$(eval $(host-generic-package))
# Convenience variables for other mk files that make use of mkimage
MKIMAGE = $(HOST_DIR)/bin/mkimage
# mkimage supports alpha arc arm arm64 blackfin ia64 invalid m68k microblaze mips mips64 nds32 nios2 or1k powerpc riscv s390 sandbox sh sparc sparc64 x86 x86_64 xtensa
# KERNEL_ARCH can be arm64 arc arm blackfin m68k microblaze mips nios2 powerpc sh sparc i386 x86_64 xtensa
# For i386, we need to convert
# For openrisc, we need to convert
# For others, we'll just keep KERNEL_ARCH
ifeq ($(KERNEL_ARCH),i386)
MKIMAGE_ARCH = x86
else ifeq ($(KERNEL_ARCH),openrisc)
MKIMAGE_ARCH = or1k
else
MKIMAGE_ARCH = $(KERNEL_ARCH)
endif