Bump buildroot to 2020.11-rc1 (#985)

* Update buildroot-patches for 2020.11-rc1 buildroot

* Update buildroot to 2020.11-rc1

Signed-off-by: Stefan Agner <stefan@agner.ch>

* Don't rely on sfdisk --list-free output

The --list-free (-F) argument does not allow machine readable mode. And
it seems that the output format changes over time (different spacing,
using size postfixes instead of raw blocks).

Use sfdisk json output and calculate free partition space ourselfs. This
works for 2.35 and 2.36 and is more robust since we rely on output which
is meant for scripts to parse.

* Migrate defconfigs for Buildroot 2020.11-rc1

In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE).

* Rebase/remove systemd patches for systemd 246

* Drop apparmor/libapparmor from buildroot-external

* hassos-persists: use /run as directory for lockfiles

The U-Boot tools use /var/lock by default which is not created any more
by systemd by default (it is under tmpfiles legacy.conf, which we no
longer install).

* Disable systemd-update-done.service

The service is not suited for pure read-only systems. In particular the
service needs to be able to write a file in /etc and /var. Remove the
service. Note: This is a static service and cannot be removed using
systemd-preset.

* Disable apparmor.service for now

The service loads all default profiles. Some might actually cause
problems. E.g. the profile for ping seems not to match our setup for
/etc/resolv.conf:
[85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
This commit is contained in:
Stefan Agner
2020-11-13 18:25:44 +01:00
committed by GitHub
parent 25a0dd3082
commit a0871be6c0
4024 changed files with 68095 additions and 47900 deletions

View File

@@ -1,111 +0,0 @@
From ad4cb0403c58430bf34a15e72f2edcf0f4317977 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 1 Feb 2020 23:38:11 +0100
Subject: [PATCH] Check for sys/auxv.h
Check for sys/auxv.h and getauxval before using them as they are not
always available (for example on uclibc)
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/facebook/rocksdb/pull/6359]
---
CMakeLists.txt | 5 +++++
build_tools/build_detect_platform | 14 ++++++++++++++
util/crc32c.cc | 4 +++-
util/crc32c_arm64.cc | 6 ++++++
4 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 017fe8675..32fc5cb30 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -481,6 +481,11 @@ if(HAVE_SCHED_GETCPU)
add_definitions(-DROCKSDB_SCHED_GETCPU_PRESENT)
endif()
+check_cxx_symbol_exists(getauxval auvx.h HAVE_AUXV_GETAUXVAL)
+if(HAVE_AUXV_GETAUXVAL)
+ add_definitions(-DROCKSDB_AUXV_GETAUXVAL_PRESENT)
+endif()
+
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.8.1/fused-src)
diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform
index 36a013f6f..2535d8124 100755
--- a/build_tools/build_detect_platform
+++ b/build_tools/build_detect_platform
@@ -506,6 +506,20 @@ EOF
fi
fi
+ if ! test $ROCKSDB_DISABLE_AUXV_GETAUXVAL; then
+ # Test whether getauxval is supported
+ $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
+ #include <sys/auxv.h>
+ int main() {
+ uint64_t auxv = getauxval(AT_HWCAP);
+ (void)auxv;
+ }
+EOF
+ if [ "$?" = 0 ]; then
+ COMMON_FLAGS="$COMMON_FLAGS -DROCKSDB_AUXV_GETAUXVAL_PRESENT"
+ fi
+ fi
+
if ! test $ROCKSDB_DISABLE_ALIGNED_NEW; then
# Test whether c++17 aligned-new is supported
$CXX $PLATFORM_CXXFLAGS -faligned-new -x c++ - -o /dev/null 2>/dev/null <<EOF
diff --git a/util/crc32c.cc b/util/crc32c.cc
index 9e838b830..3063884db 100644
--- a/util/crc32c.cc
+++ b/util/crc32c.cc
@@ -25,7 +25,9 @@
#include "util/crc32c_ppc_constants.h"
#if __linux__
+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
#include <sys/auxv.h>
+#endif
#ifndef PPC_FEATURE2_VEC_CRYPTO
#define PPC_FEATURE2_VEC_CRYPTO 0x02000000
@@ -451,7 +453,7 @@ uint32_t ExtendPPCImpl(uint32_t crc, const char *buf, size_t size) {
static int arch_ppc_probe(void) {
arch_ppc_crc32 = 0;
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) && defined(ROCKSDB_AUXV_GETAUXVAL_PRESENT)
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_VEC_CRYPTO) arch_ppc_crc32 = 1;
#endif /* __powerpc64__ */
diff --git a/util/crc32c_arm64.cc b/util/crc32c_arm64.cc
index 591c623a5..61b2ccaba 100644
--- a/util/crc32c_arm64.cc
+++ b/util/crc32c_arm64.cc
@@ -8,7 +8,9 @@
#if defined(__linux__) && defined(HAVE_ARM64_CRC)
#include <asm/hwcap.h>
+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
#include <sys/auxv.h>
+#endif
#ifndef HWCAP_CRC32
#define HWCAP_CRC32 (1 << 7)
#endif
@@ -34,8 +36,12 @@
#endif
uint32_t crc32c_runtime_check(void) {
+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
uint64_t auxv = getauxval(AT_HWCAP);
return (auxv & HWCAP_CRC32) != 0;
+#else
+ return 0;
+#endif
}
uint32_t crc32c_arm64(uint32_t crc, unsigned char const *data,
--
2.24.1

View File

@@ -14,6 +14,7 @@ EOF
/home/fabrice/buildroot/output/host/lib/gcc/xtensa-buildroot-linux-uclibc/8.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: final link failed: file truncated
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/facebook/rocksdb/pull/6479]
---
build_tools/build_detect_platform | 58 +++++++++++++++----------------
1 file changed, 29 insertions(+), 29 deletions(-)

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
# Locally computed:
sha256 feab859ee355fbe7beffd7085904b63f560417f450f83cc34310e6dadff936f6 rocksdb-6.6.4.tar.gz
sha256 d573d2f15cdda883714f7e0bc87b814a8d4a53a82edde558f08f940e905541ee rocksdb-6.10.1.tar.gz
# Hash for license files:
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.Apache
sha256 b568f1f37a5a1d37a3e981e7c8b7fc4856ca33b2ca0a45bc8e847aaaf7afe485 LICENSE.leveldb
sha256 112d88749baec5ddecba47057216465e91e22352aac7677c50bd237a27614083 README.md
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.Apache
sha256 b568f1f37a5a1d37a3e981e7c8b7fc4856ca33b2ca0a45bc8e847aaaf7afe485 LICENSE.leveldb
sha256 054f4b04473dd7003fcd9e48b75c61fd257e50beb418c501099c651c0356a556 README.md

View File

@@ -4,7 +4,7 @@
#
################################################################################
ROCKSDB_VERSION = 6.6.4
ROCKSDB_VERSION = 6.10.1
ROCKSDB_SITE = $(call github,facebook,rocksdb,v$(ROCKSDB_VERSION))
ROCKSDB_LICENSE = GPL-2.0 or Apache-2.0
ROCKSDB_LICENSE_FILES = COPYING LICENSE.Apache LICENSE.leveldb README.md