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,30 @@
From 3984adc4976de7553f51e0cf4de1e18c373b332b Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il>
Date: Thu, 15 Dec 2016 15:10:19 +0200
Subject: [PATCH] Avoid redefinition of struct ethhdr
This is a workaround to the if_ether.h conflict between musl and the kernel.
Both define struct ethhdr.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
include/netinet/if_ether.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/netinet/if_ether.h b/include/netinet/if_ether.h
index 11ee65823f93..cfe1949d3371 100644
--- a/include/netinet/if_ether.h
+++ b/include/netinet/if_ether.h
@@ -1,6 +1,9 @@
#ifndef _NETINET_IF_ETHER_H
#define _NETINET_IF_ETHER_H
+/* Suppress kernel if_ether.h header inclusion */
+#define _LINUX_IF_ETHER_H
+
#include <stdint.h>
#include <sys/types.h>
--
2.10.2
@@ -0,0 +1,76 @@
From 407c96fc790d0d11ca9603a2a533216c745b5051 Mon Sep 17 00:00:00 2001
From: Stefan Nickl <Stefan.Nickl@gmail.com>
Date: Mon, 13 May 2019 22:33:21 +0200
Subject: [PATCH] Make scheduler functions Linux-compatible
Let sched_getscheduler(), sched_setscheduler(), sched_getparam(),
sched_setparam() invoke the Linux syscalls of the same name instead
of returning -ENOSYS.
Signed-off-by: Stefan Nickl <Stefan.Nickl@gmail.com>
---
src/sched/sched_getparam.c | 3 +--
src/sched/sched_getscheduler.c | 3 +--
src/sched/sched_setparam.c | 3 +--
src/sched/sched_setscheduler.c | 3 +--
4 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/sched/sched_getparam.c b/src/sched/sched_getparam.c
index 76f10e4..65be107 100644
--- a/src/sched/sched_getparam.c
+++ b/src/sched/sched_getparam.c
@@ -1,8 +1,7 @@
#include <sched.h>
-#include <errno.h>
#include "syscall.h"
int sched_getparam(pid_t pid, struct sched_param *param)
{
- return __syscall_ret(-ENOSYS);
+ return syscall(SYS_sched_getparam, pid, param);
}
diff --git a/src/sched/sched_getscheduler.c b/src/sched/sched_getscheduler.c
index 394e508..4c922f6 100644
--- a/src/sched/sched_getscheduler.c
+++ b/src/sched/sched_getscheduler.c
@@ -1,8 +1,7 @@
#include <sched.h>
-#include <errno.h>
#include "syscall.h"
int sched_getscheduler(pid_t pid)
{
- return __syscall_ret(-ENOSYS);
+ return syscall(SYS_sched_getscheduler, pid);
}
diff --git a/src/sched/sched_setparam.c b/src/sched/sched_setparam.c
index 18623ee..f699faf 100644
--- a/src/sched/sched_setparam.c
+++ b/src/sched/sched_setparam.c
@@ -1,8 +1,7 @@
#include <sched.h>
-#include <errno.h>
#include "syscall.h"
int sched_setparam(pid_t pid, const struct sched_param *param)
{
- return __syscall_ret(-ENOSYS);
+ return syscall(SYS_sched_setparam, pid, param);
}
diff --git a/src/sched/sched_setscheduler.c b/src/sched/sched_setscheduler.c
index 4435f21..e678221 100644
--- a/src/sched/sched_setscheduler.c
+++ b/src/sched/sched_setscheduler.c
@@ -1,8 +1,7 @@
#include <sched.h>
-#include <errno.h>
#include "syscall.h"
int sched_setscheduler(pid_t pid, int sched, const struct sched_param *param)
{
- return __syscall_ret(-ENOSYS);
+ return syscall(SYS_sched_setscheduler, pid, sched, param);
}
--
2.21.0
+12
View File
@@ -0,0 +1,12 @@
config BR2_PACKAGE_MUSL
bool
default y
depends on BR2_TOOLCHAIN_USES_MUSL
select BR2_PACKAGE_LINUX_HEADERS
# SSP broken on i386/ppc: http://www.openwall.com/lists/musl/2016/12/04/2
select BR2_TOOLCHAIN_HAS_SSP if BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI \
&& !(BR2_i386 || BR2_powerpc)
# Compatibility headers: cdefs.h, queue.h
select BR2_PACKAGE_MUSL_COMPAT_HEADERS
help
https://www.musl-libc.org/
+4
View File
@@ -0,0 +1,4 @@
# Locally calculated after checking pgp signature from
# https://musl.libc.org/releases/musl-1.2.2.tar.gz.asc
sha256 9b969322012d796dc23dda27a35866034fa67d8fb67e0e2c45c913c3d43219dd musl-1.2.2.tar.gz
sha256 f9bc4423732350eb0b3f7ed7e91d530298476f8fec0c6c427a1c04ade22655af COPYRIGHT
+65
View File
@@ -0,0 +1,65 @@
################################################################################
#
# musl
#
################################################################################
MUSL_VERSION = 1.2.2
MUSL_SITE = http://www.musl-libc.org/releases
MUSL_LICENSE = MIT
MUSL_LICENSE_FILES = COPYRIGHT
MUSL_CPE_ID_VENDOR = musl-libc
# Before musl is configured, we must have the first stage
# cross-compiler and the kernel headers
MUSL_DEPENDENCIES = host-gcc-initial linux-headers
# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
# So, add the musl-compat-headers package that will install those files,
# into the staging directory:
# sys/queue.h: header from NetBSD
# sys/cdefs.h: minimalist header bundled in Buildroot
MUSL_DEPENDENCIES += musl-compat-headers
# musl is part of the toolchain so disable the toolchain dependency
MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO
MUSL_INSTALL_STAGING = YES
# Thumb build is broken, build in ARM mode, since all architectures
# that support Thumb1 also support ARM.
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
MUSL_EXTRA_CFLAGS += -marm
endif
define MUSL_CONFIGURE_CMDS
(cd $(@D); \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) $(MUSL_EXTRA_CFLAGS)" \
CPPFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--prefix=/usr \
--libdir=/lib \
--disable-gcc-wrapper \
--enable-static \
$(if $(BR2_STATIC_LIBS),--disable-shared,--enable-shared))
endef
define MUSL_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
endef
define MUSL_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
DESTDIR=$(STAGING_DIR) install-libs install-tools install-headers
endef
define MUSL_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
DESTDIR=$(TARGET_DIR) install-libs
$(RM) $(addprefix $(TARGET_DIR)/lib/,crt1.o crtn.o crti.o rcrt1.o Scrt1.o)
endef
$(eval $(generic-package))