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,46 @@
From 8490a7ac101d4ee0a78c44b252d3b7a6c2508c74 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 21 Aug 2021 11:55:48 +0200
Subject: [PATCH] meson: add tests option
Add tests option to allow the user to disable them
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Retrieved from:
https://gitlab.freedesktop.org/spice/usbredir/-/commit/8490a7ac101d4ee0a78c44b252d3b7a6c2508c74]
---
meson.build | 4 +++-
meson_options.txt | 5 +++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 6e773a7..a6d21b8 100644
--- a/meson.build
+++ b/meson.build
@@ -106,7 +106,9 @@ if host_machine.system() != 'windows'
subdir('fuzzing')
endif
endif
-subdir('tests')
+if get_option('tests').enabled()
+ subdir('tests')
+endif
subdir('data')
summary(summary_info, bool_yn: true)
diff --git a/meson_options.txt b/meson_options.txt
index b35732b..63e8c85 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -21,3 +21,8 @@ option('tools',
type : 'feature',
value : 'enabled',
description : 'Build usbredir\'s tools such as usbredirect')
+
+option('tests',
+ type : 'feature',
+ value : 'enabled',
+ description : 'Build usbredir\'s tests such as filter')
--
GitLab
@@ -0,0 +1,60 @@
From 54cf1897ef3aa4d0a35b5f4eb1f5c6928b033af5 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 24 Sep 2021 17:24:43 +0200
Subject: [PATCH] meson: add stack_protector option
Add stack_protector option to allow the user to disable it as some
embedded toolchains don't support it which will result in the following
build failure:
/home/giuliobenetti/autobuild/run/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: usbredirparser/libusbredirparser.so.1.1.0.p/usbredirparser.c.o: in function `va_log':
usbredirparser.c:(.text+0x1c4): undefined reference to `__stack_chk_guard'
Fixes:
- http://autobuild.buildroot.org/results/40de5443e98157ad50c6841ea70a835cd5ad4fe9
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status:
https://gitlab.freedesktop.org/spice/usbredir/-/merge_requests/53]
---
meson.build | 6 +++++-
meson_options.txt | 5 +++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index a6d21b8..4350f53 100644
--- a/meson.build
+++ b/meson.build
@@ -17,8 +17,12 @@ cc_flags = [
if host_machine.system() != 'windows'
cc_flags += [
'-Wp,-D_FORTIFY_SOURCE=2',
- '-fstack-protector',
]
+ if get_option('stack_protector').enabled()
+ cc_flags += [
+ '-fstack-protector',
+ ]
+ endif
endif
# Check if we are building from .git
diff --git a/meson_options.txt b/meson_options.txt
index 63e8c85..34dd392 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -17,6 +17,11 @@ option('fuzzing-install-dir',
type : 'string',
description : 'Installation directory for fuzzing binaries')
+option('stack_protector',
+ type : 'feature',
+ value : 'enabled',
+ description : 'Build usbredir\'s with stack-protector')
+
option('tools',
type : 'feature',
value : 'enabled',
--
2.33.0
@@ -0,0 +1,39 @@
From 55fc307d23d657b52433d1c8508467d0589754d5 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 16 Oct 2021 15:45:57 +0200
Subject: [PATCH] meson.build: make C++ optional
Remove cpp from meson project statement to make C++ optional and avoid
the following build failure when the toolchain does not provide a C++
compiler:
../output-1/build/usbredir-0.11.0/meson.build:1:0: ERROR: Unknown compiler(s): [['/home/buildroot/autobuild/instance-3/output-1/host/bin/arm-linux-g++']]
The following exception(s) were encountered:
Running "/home/buildroot/autobuild/instance-3/output-1/host/bin/arm-linux-g++ --version" gave "[Errno 2] No such file or directory: '/home/buildroot/autobuild/instance-3/output-1/host/bin/arm-linux-g++'"
Indeed C++ is only required for fuzzing which is already handled by
meson through add_languages('cpp', required: true)
Fixes:
- http://autobuild.buildroot.org/results/eca1d8a2b73a769354ab1d24c7996be30f152138
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status:
https://gitlab.freedesktop.org/spice/usbredir/-/merge_requests/55]
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 49dbce4..ca19f22 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('usbredir', 'c', 'cpp',
+project('usbredir', 'c',
version: '0.11.0',
license: 'LGPLv2.1+',
meson_version : '>= 0.53',
--
2.33.0
+32
View File
@@ -0,0 +1,32 @@
comment "usbredir needs a toolchain w/ threads, gcc >= 4.9"
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
config BR2_PACKAGE_USBREDIR
bool "usbredir"
depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
select BR2_PACKAGE_LIBUSB
help
usbredir is the name of a network protocol for sending usb
device traffic over a network connection. It is also the
name of the software package offering a parsing library, a
usbredirhost library and several utilities implementing this
protocol.
Note: only the library is installed, not the utilities. Say
'y' below if you want the server too.
http://www.spice-space.org/page/UsbRedir
if BR2_PACKAGE_USBREDIR
config BR2_PACKAGE_USBREDIR_SERVER
bool "usbredirserver on target"
help
If you want to serve usbredir requests on your target, say
'y' here to have the usbredir server on the target.
Note: the server is not required to use the library.
endif
+6
View File
@@ -0,0 +1,6 @@
# https://spice-space.org/download/usbredir/usbredir-0.11.0.tar.xz.sha256sum
sha256 72dd5f3aa90dfbc0510b5149bb5b1654c8f21fdc405dfce7b5dc163dcff19cba usbredir-0.11.0.tar.xz
# Hash for license files
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c COPYING.LIB
+34
View File
@@ -0,0 +1,34 @@
################################################################################
#
# usbredir
#
################################################################################
USBREDIR_VERSION = 0.11.0
USBREDIR_SOURCE = usbredir-$(USBREDIR_VERSION).tar.xz
USBREDIR_SITE = http://spice-space.org/download/usbredir
USBREDIR_LICENSE = LGPL-2.1+ (libraries)
USBREDIR_LICENSE_FILES = COPYING.LIB
USBREDIR_INSTALL_STAGING = YES
USBREDIR_DEPENDENCIES = host-pkgconf libusb
USBREDIR_CONF_OPTS = \
-Dgit_werror=disabled \
-Dstack_protector=disabled \
-Dtests=disabled \
-Dtools=disabled
ifeq ($(BR2_PACKAGE_USBREDIR_SERVER),y)
USBREDIR_LICENSE += , GPL-2.0+ (program)
USBREDIR_LICENSE_FILES += COPYING
else # BR2_PACKAGE_USBREDIR_SERVER != y
define USBREDIR_POST_INSTALL_TARGET_RM_SERVER
rm -f $(TARGET_DIR)/usr/sbin/usbredirserver
endef
USBREDIR_POST_INSTALL_TARGET_HOOKS += USBREDIR_POST_INSTALL_TARGET_RM_SERVER
endif # BR2_PACKAGE_USBREDIR_SERVER
$(eval $(meson-package))