update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
From b742c7590ac6d9ac72dd227679ccff79433b3512 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>
|
||||
---
|
||||
tools/env/fw_env.h | 11 -----------
|
||||
1 file changed, 11 deletions(-)
|
||||
|
||||
diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
|
||||
index 57149e7..50049fe 100644
|
||||
--- a/tools/env/fw_env.h
|
||||
+++ b/tools/env/fw_env.h
|
||||
@@ -8,17 +8,6 @@
|
||||
#include <aes.h>
|
||||
#include <stdint.h>
|
||||
|
||||
-/* 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.7.4
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From b8110293d70c4f43035dfd6a0904d342be6a08e0 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>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1cf15ce..75e85eb 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -425,7 +425,7 @@ timestamp_h := include/generated/timestamp_autogenerated.h
|
||||
|
||||
no-dot-config-targets := clean clobber mrproper distclean \
|
||||
help %docs check% coccicheck \
|
||||
- ubootversion backup tests
|
||||
+ ubootversion backup tests tools-only
|
||||
|
||||
config-targets := 0
|
||||
mixed-targets := 0
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
From d9d7d7cf8b27516d45c66daa1bf0a18c878c4e33 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Santos <casantos@datacom.ind.br>
|
||||
Date: Sun, 8 May 2016 11:11:39 -0300
|
||||
Subject: [PATCH] Make FIT support really optional
|
||||
|
||||
Due to some mistakes in the source code, it was not possible to really
|
||||
turn FIT support off. This commit fixes the problem by means of the
|
||||
following changes:
|
||||
|
||||
- Enclose "bootm_host_load_image" and "bootm_host_load_images" between
|
||||
checks for CONFIG_FIT_SIGNATURE, in common/bootm.c.
|
||||
|
||||
- Enclose the declaration of "bootm_host_load_images" between checks for
|
||||
CONFIG_FIT_SIGNATURE, in common/bootm.h.
|
||||
|
||||
- Condition the compilation and linking of fit_common.o fit_image.o
|
||||
image-host.o common/image-fit.o to CONFIG_FIT=y, in tools/Makefile.
|
||||
|
||||
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
|
||||
[fabio: adapt for 2016.07]
|
||||
Signed-off-by: Fabio Estevam <festevam@gmail.com>
|
||||
[Ricardo: fix conditional compilation and linking of the files mentioned above
|
||||
for 2016.07]
|
||||
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
|
||||
---
|
||||
common/bootm.c | 2 ++
|
||||
include/bootm.h | 2 ++
|
||||
tools/Makefile | 6 ++----
|
||||
3 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/common/bootm.c b/common/bootm.c
|
||||
index 2431019..7e1adc8 100644
|
||||
--- a/common/bootm.c
|
||||
+++ b/common/bootm.c
|
||||
@@ -901,6 +901,7 @@ void memmove_wd(void *to, void *from, size_t len, ulong chunksz)
|
||||
memmove(to, from, len);
|
||||
}
|
||||
|
||||
+#if defined(CONFIG_FIT_SIGNATURE)
|
||||
static int bootm_host_load_image(const void *fit, int req_image_type)
|
||||
{
|
||||
const char *fit_uname_config = NULL;
|
||||
@@ -965,5 +966,6 @@ int bootm_host_load_images(const void *fit, int cfg_noffset)
|
||||
/* Return the first error we found */
|
||||
return err;
|
||||
}
|
||||
+#endif
|
||||
|
||||
#endif /* ndef USE_HOSTCC */
|
||||
diff --git a/include/bootm.h b/include/bootm.h
|
||||
index 4981377..94d62a1 100644
|
||||
--- a/include/bootm.h
|
||||
+++ b/include/bootm.h
|
||||
@@ -41,7 +41,9 @@ void lynxkdi_boot(image_header_t *hdr);
|
||||
|
||||
boot_os_fn *bootm_os_get_boot_func(int os);
|
||||
|
||||
+#if defined(CONFIG_FIT_SIGNATURE)
|
||||
int bootm_host_load_images(const void *fit, int cfg_noffset);
|
||||
+#endif
|
||||
|
||||
int boot_selected_os(int argc, char * const argv[], int state,
|
||||
bootm_headers_t *images, boot_os_fn *boot_fn);
|
||||
diff --git a/tools/Makefile b/tools/Makefile
|
||||
index f72294a..ccf5120 100644
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -54,6 +54,7 @@ mkenvimage-objs := mkenvimage.o os_support.o lib/crc32.o
|
||||
hostprogs-y += dumpimage mkimage
|
||||
hostprogs-$(CONFIG_FIT_SIGNATURE) += fit_info fit_check_sign
|
||||
|
||||
+FIT_OBJS-$(CONFIG_FIT) := fit_common.o fit_image.o image-host.o common/image-fit.o
|
||||
FIT_SIG_OBJS-$(CONFIG_FIT_SIGNATURE) := common/image-sig.o
|
||||
# Flattened device tree objects
|
||||
LIBFDT_OBJS := $(addprefix lib/libfdt/, \
|
||||
@@ -68,16 +69,13 @@ ROCKCHIP_OBS = lib/rc4.o rkcommon.o rkimage.o rksd.o rkspi.o
|
||||
# common objs for dumpimage and mkimage
|
||||
dumpimage-mkimage-objs := aisimage.o \
|
||||
atmelimage.o \
|
||||
+ $(FIT_OBJS-y) \
|
||||
$(FIT_SIG_OBJS-y) \
|
||||
common/bootm.o \
|
||||
lib/crc32.o \
|
||||
default_image.o \
|
||||
lib/fdtdec_common.o \
|
||||
lib/fdtdec.o \
|
||||
- fit_common.o \
|
||||
- fit_image.o \
|
||||
- common/image-fit.o \
|
||||
- image-host.o \
|
||||
common/image.o \
|
||||
imagetool.o \
|
||||
imximage.o \
|
||||
--
|
||||
2.9.1
|
||||
|
||||
87
bsp/buildroot-2017.02.11/package/uboot-tools/Config.in
Normal file
87
bsp/buildroot-2017.02.11/package/uboot-tools/Config.in
Normal file
@@ -0,0 +1,87 @@
|
||||
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.
|
||||
|
||||
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
|
||||
42
bsp/buildroot-2017.02.11/package/uboot-tools/Config.in.host
Normal file
42
bsp/buildroot-2017.02.11/package/uboot-tools/Config.in.host
Normal file
@@ -0,0 +1,42 @@
|
||||
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
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,2 @@
|
||||
# Locally computed:
|
||||
sha256 6c425175f93a4bcf2ec9faf5658ef279633dbd7856a293d95bd1ff516528ecf2 u-boot-2017.01.tar.bz2
|
||||
128
bsp/buildroot-2017.02.11/package/uboot-tools/uboot-tools.mk
Normal file
128
bsp/buildroot-2017.02.11/package/uboot-tools/uboot-tools.mk
Normal file
@@ -0,0 +1,128 @@
|
||||
################################################################################
|
||||
#
|
||||
# uboot-tools
|
||||
#
|
||||
################################################################################
|
||||
|
||||
UBOOT_TOOLS_VERSION = 2017.01
|
||||
UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2
|
||||
UBOOT_TOOLS_SITE = ftp://ftp.denx.de/pub/u-boot
|
||||
UBOOT_TOOLS_LICENSE = GPLv2+
|
||||
UBOOT_TOOLS_LICENSE_FILES = Licenses/gpl-2.0.txt
|
||||
UBOOT_TOOLS_INSTALL_STAGING = YES
|
||||
|
||||
define UBOOT_TOOLS_CONFIGURE_CMDS
|
||||
mkdir -p $(@D)/include/config
|
||||
touch $(@D)/include/config/auto.conf
|
||||
endef
|
||||
|
||||
UBOOT_TOOLS_MAKE_OPTS = CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
STRIP=$(TARGET_STRIP)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT),y)
|
||||
UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y
|
||||
UBOOT_TOOLS_DEPENDENCIES += dtc
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),y)
|
||||
UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT_SIGNATURE=y
|
||||
UBOOT_TOOLS_DEPENDENCIES += openssl host-pkgconf
|
||||
endif
|
||||
|
||||
define UBOOT_TOOLS_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(UBOOT_TOOLS_MAKE_OPTS) \
|
||||
CROSS_BUILD_TOOLS=y tools-only
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(UBOOT_TOOLS_MAKE_OPTS) \
|
||||
env no-dot-config-targets=env
|
||||
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_LIBUBOOTENV
|
||||
endef
|
||||
|
||||
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)
|
||||
endef
|
||||
|
||||
define HOST_UBOOT_TOOLS_CONFIGURE_CMDS
|
||||
mkdir -p $(@D)/include/config
|
||||
touch $(@D)/include/config/auto.conf
|
||||
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
|
||||
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
|
||||
HOST_UBOOT_TOOLS_DEPENDENCIES += host-openssl
|
||||
endif
|
||||
|
||||
define HOST_UBOOT_TOOLS_BUILD_CMDS
|
||||
$(MAKE1) -C $(@D) $(HOST_UBOOT_TOOLS_MAKE_OPTS) tools-only
|
||||
endef
|
||||
|
||||
define HOST_UBOOT_TOOLS_INSTALL_CMDS
|
||||
$(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/usr/bin/mkimage
|
||||
$(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/usr/bin/mkenvimage
|
||||
$(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/usr/bin/dumpimage
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
$(eval $(host-generic-package))
|
||||
|
||||
# Convenience variables for other mk files that make use of mkimage
|
||||
|
||||
MKIMAGE = $(HOST_DIR)/usr/bin/mkimage
|
||||
|
||||
# mkimage supports arm blackfin m68k microblaze mips mips64 nios2 powerpc ppc sh sparc sparc64 x86
|
||||
# KERNEL_ARCH can be arm64 arc arm blackfin m68k microblaze mips nios2 powerpc sh sparc i386 x86_64 xtensa
|
||||
# For arm64, arc, xtensa we'll just keep KERNEL_ARCH
|
||||
# For mips64, we'll just keep mips
|
||||
# For i386 and x86_64, we need to convert
|
||||
ifeq ($(KERNEL_ARCH),x86_64)
|
||||
MKIMAGE_ARCH = x86
|
||||
else ifeq ($(KERNEL_ARCH),i386)
|
||||
MKIMAGE_ARCH = x86
|
||||
else
|
||||
MKIMAGE_ARCH = $(KERNEL_ARCH)
|
||||
endif
|
||||
Reference in New Issue
Block a user