Add buildroot 2018-02

This commit is contained in:
Pascal Vizeli
2018-03-17 23:47:00 +00:00
parent 3776c47f83
commit 67742041ad
10007 changed files with 405098 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
From 1438211660e700b2c9505863aae1cc957236b7c8 Mon Sep 17 00:00:00 2001
From: Alex Suykov <alex.suykov@gmail.com>
Date: Thu, 21 Jan 2016 21:59:46 +0100
Subject: [PATCH] Add missing definition of MTD_CHAR_MAJOR
This definition missing from <linux/major.h> for kernels <= 3.13
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
---
cgpt/cgpt_wrapper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cgpt/cgpt_wrapper.c b/cgpt/cgpt_wrapper.c
index dcfaab9..4d07aad 100644
--- a/cgpt/cgpt_wrapper.c
+++ b/cgpt/cgpt_wrapper.c
@@ -25,6 +25,10 @@
#include "cgpt_nor.h"
#include "cryptolib.h"
+#ifndef MTD_CHAR_MAJOR
+#define MTD_CHAR_MAJOR 90
+#endif
+
// Check if cmdline |argv| has "-D". "-D" signifies that GPT structs are stored
// off device, and hence we should not wrap around cgpt.
static bool has_dash_D(int argc, const char *const argv[]) {
--
2.6.4

View File

@@ -0,0 +1,27 @@
From b6bed8d4e9453bc74ba021c8c17e20c3b5964c37 Mon Sep 17 00:00:00 2001
From: Alex Suykov <alex.suykov@gmail.com>
Date: Thu, 21 Jan 2016 22:00:34 +0100
Subject: [PATCH] Add missing header include for ssize_t
The code uses ssize_t which is usually defined in <unistd.h>.
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
---
host/lib/fmap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/host/lib/fmap.c b/host/lib/fmap.c
index c95338d..e3db826 100644
--- a/host/lib/fmap.c
+++ b/host/lib/fmap.c
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <string.h>
+#include <unistd.h>
#include "fmap.h"
--
2.6.4

View File

@@ -0,0 +1,44 @@
From 593407d2b3ea3b871d55ec399671e48c84b900a7 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Thu, 21 Jan 2016 22:01:37 +0100
Subject: [PATCH] Avoid RSA type redefinition
The host_key.h headers does:
typedef struct rsa_st RSA;
But this type definition is already done by the OpenSSL headers.
While such a type redefinition is legal with recent gcc versions, it
doesn't build with older gcc versions such as gcc 4.4.
To work around this problem, we instead use a forward declaration of
"struct rsa_st", and change the only place where the RSA type was used
by "struct rsa_st".
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
host/lib/include/host_key.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/host/lib/include/host_key.h b/host/lib/include/host_key.h
index 9f98ccc..c2d01a5 100644
--- a/host/lib/include/host_key.h
+++ b/host/lib/include/host_key.h
@@ -12,11 +12,11 @@
#include "vboot_struct.h"
-typedef struct rsa_st RSA;
+struct rsa_st;
/* Private key data */
typedef struct VbPrivateKey {
- RSA* rsa_private_key; /* Private key data */
+ struct rsa_rt* rsa_private_key; /* Private key data */
uint64_t algorithm; /* Algorithm to use when signing */
} VbPrivateKey;
--
2.6.4

View File

@@ -0,0 +1,30 @@
The package attempts to build a statically-linked host binary, futility_s,
which is not used anywhere in buildroot but may be causing build failures
if the build host lacks static libc.
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
--- a/Makefile
+++ b/Makefile
@@ -1079,7 +1079,7 @@
# new Firmware Utility
.PHONY: futil
-futil: ${FUTIL_STATIC_BIN} ${FUTIL_BIN}
+futil: ${FUTIL_BIN}
${FUTIL_STATIC_BIN}: ${FUTIL_STATIC_OBJS} ${UTILLIB}
@${PRINTF} " LD $(subst ${BUILD}/,,$@)\n"
@@ -1091,10 +1091,10 @@
${Q}${LD} -o $@ ${CFLAGS} ${LDFLAGS} $^ ${LDLIBS}
.PHONY: futil_install
-futil_install: ${FUTIL_BIN} ${FUTIL_STATIC_BIN}
+futil_install: ${FUTIL_BIN}
@${PRINTF} " INSTALL futility\n"
${Q}mkdir -p ${UB_DIR}
- ${Q}${INSTALL} -t ${UB_DIR} ${FUTIL_BIN} ${FUTIL_STATIC_BIN}
+ ${Q}${INSTALL} -t ${UB_DIR} ${FUTIL_BIN}
${Q}for prog in ${FUTIL_SYMLINKS}; do \
ln -sf futility "${UB_DIR}/$$prog"; done

View File

@@ -0,0 +1,7 @@
config BR2_PACKAGE_HOST_VBOOT_UTILS
bool "host vboot utils"
select BR2_PACKAGE_HOST_UTIL_LINUX
help
Chromium OS verified boot utilities: futility and cgpt.
https://www.chromium.org/chromium-os/chromiumos-design-docs/verified-boot

View File

@@ -0,0 +1,2 @@
# Locally computed
sha256 d95b64b1f1de4a3ffa5c2e446d7c8e92aa197aee10de24206b2ea2deb5a8b947 vboot-utils-bbdd62f9b030db7ad8eef789aaf58a7ff9a25656.tar.gz

View File

@@ -0,0 +1,43 @@
################################################################################
#
# vboot-utils
#
################################################################################
VBOOT_UTILS_VERSION = bbdd62f9b030db7ad8eef789aaf58a7ff9a25656
VBOOT_UTILS_SITE = https://chromium.googlesource.com/chromiumos/platform/vboot_reference
VBOOT_UTILS_SITE_METHOD = git
VBOOT_UTILS_LICENSE = BSD-3-Clause
VBOOT_UTILS_LICENSE_FILES = LICENSE
HOST_VBOOT_UTILS_DEPENDENCIES = host-openssl host-util-linux host-pkgconf
# vboot_reference contains code that goes into bootloaders,
# utilities intended for the target system, and a bunch of scripts
# for Chromium OS build system. Most of that does not make sense
# in a buildroot host-package.
#
# We only need futility for signing images, the keys, and cgpt for boot
# media partitioning.
#
# make target for futility is "futil".
#
# The value of ARCH is only relevant for crossystem (a target tool) and
# does not affect futil or cgpt in any way as long as it is one of the
# supported targets.
define HOST_VBOOT_UTILS_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS) -D_LARGEFILE64_SOURCE -D_GNU_SOURCE" \
LDFLAGS="$(HOST_LDFLAGS)" \
ARCH=arm \
futil cgpt
endef
define HOST_VBOOT_UTILS_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) \
futil_install cgpt_install devkeys_install
endef
$(eval $(host-generic-package))