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,67 @@
From 086283ed7f1886de05407bc75dd4c070c78a6f50 Mon Sep 17 00:00:00 2001
From: Lothar Felten <lothar.felten@gmail.com>
Date: Mon, 8 Oct 2018 13:29:44 +0200
Subject: [PATCH] Fix include guards for older kernel/u-boot sources
Linux kernels before 4.17 and U-Boot versions before 2018.07 use libfdt
include guards with leading underscores.
Those have been removed in dtc-1.4.7.
This patch handles both include guard types and allows the compilation
of older Linux kernel and u-boot sources.
Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
[ThomasDS: also update fdt.h which has the same issue, seen on U-Boot
2011.03]
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
[SB: Updated to match context change in v1.5.1]
Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
---
libfdt/fdt.h | 4 ++++
libfdt/libfdt.h | 4 ++++
libfdt/libfdt_env.h | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/libfdt/fdt.h b/libfdt/fdt.h
index f2e6880..0f1dc4d 100644
--- a/libfdt/fdt.h
+++ b/libfdt/fdt.h
@@ -1,4 +1,8 @@
/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */
+#ifdef _FDT_H
+#warning "Please consider updating your kernel and/or u-boot version"
+#define FDT_H
+#endif
#ifndef FDT_H
#define FDT_H
/*
diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
index 8037f39..7668432 100644
--- a/libfdt/libfdt.h
+++ b/libfdt/libfdt.h
@@ -1,4 +1,8 @@
/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */
+#ifdef _LIBFDT_H
+#warning "Please consider updating your kernel and/or u-boot version"
+#define LIBFDT_H
+#endif
#ifndef LIBFDT_H
#define LIBFDT_H
/*
diff --git a/libfdt/libfdt_env.h b/libfdt/libfdt_env.h
index 73b6d40..b95a287 100644
--- a/libfdt/libfdt_env.h
+++ b/libfdt/libfdt_env.h
@@ -1,4 +1,8 @@
/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */
+#ifdef _LIBFDT_ENV_H
+#warning "Please consider updating your kernel and/or u-boot version"
+#define LIBFDT_ENV_H
+#endif
#ifndef LIBFDT_ENV_H
#define LIBFDT_ENV_H
/*
--
2.22.0.216.g00a2a96fc9
+39
View File
@@ -0,0 +1,39 @@
config BR2_PACKAGE_DTC
bool "dtc (libfdt)"
depends on !BR2_STATIC_LIBS
help
The Device Tree Compiler, dtc, takes as input a device-tree in
a given format and outputs a device-tree in another format.
Note that only the library is installed.
If you want the programs, say 'y' here, and to "dtc programs",
below.
https://git.kernel.org/cgit/utils/dtc/dtc.git
if BR2_PACKAGE_DTC
config BR2_PACKAGE_DTC_PROGRAMS
bool "dtc programs"
help
Say 'y' here if you also want the programs on the target:
- convert-dtsv0 convert from version 0 to version 1
- dtc the device tree compiler
- dtdiff compare two device trees (needs bash)
- fdtdump print a readable version of a
flat device tree
- fdtget read values from device tree
- fdtput write a property value to a device tree
Note: dtdiff requires bash, so if bash is not selected, dtdiff
will be removed from the target file system. Enable bash if
you need dtdiff on the target.
comment "dtdiff will not be installed: it requires bash"
depends on BR2_PACKAGE_DTC_PROGRAMS
depends on !BR2_PACKAGE_BASH
endif
comment "dtc needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
+10
View File
@@ -0,0 +1,10 @@
config BR2_PACKAGE_HOST_DTC
bool "host dtc"
help
The Device Tree Compiler, dtc, takes as input a device-tree in
a given format and outputs a device-tree in another format.
Install host tools: dtc, convert-dtsv0, fdtdump, fdtget and
fdtput.
https://git.kernel.org/cgit/utils/dtc/dtc.git
+7
View File
@@ -0,0 +1,7 @@
# from https://www.kernel.org/pub/software/utils/dtc/sha256sums.asc
sha256 65cec529893659a49a89740bb362f507a3b94fc8cd791e76a8d6a2b6f3203473 dtc-1.6.1.tar.xz
# Hash for license files
sha256 78e1e1ce5728a990d59c7de61d4741c49185d5129daf783b386380a214328d68 README.license
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 GPL
sha256 6313108c23efffa36948f8b2cff1560a5935373b527b0e1a837cc77e6ed1bacd BSD-2-Clause
+79
View File
@@ -0,0 +1,79 @@
################################################################################
#
# dtc
#
################################################################################
DTC_VERSION = 1.6.1
DTC_SOURCE = dtc-$(DTC_VERSION).tar.xz
DTC_SITE = https://www.kernel.org/pub/software/utils/dtc
DTC_LICENSE = GPL-2.0+ or BSD-2-Clause (library)
DTC_LICENSE_FILES = README.license GPL BSD-2-Clause
DTC_CPE_ID_VENDOR = dtc_project
DTC_INSTALL_STAGING = YES
DTC_DEPENDENCIES = host-bison host-flex host-pkgconf
HOST_DTC_DEPENDENCIES = host-bison host-flex host-pkgconf
DTC_MAKE_OPTS = \
PREFIX=/usr \
NO_PYTHON=1 \
NO_VALGRIND=1
# For the host, we install headers in a special subdirectory to avoid
# conflicts with the in-kernel libfdt copy.
HOST_DTC_MAKE_OPTS = \
PREFIX=$(HOST_DIR) \
INCLUDEDIR=$(HOST_DIR)/include/libfdt \
NO_PYTHON=1 \
NO_VALGRIND=1 \
NO_YAML=1
ifeq ($(BR2_PACKAGE_LIBYAML),y)
DTC_DEPENDENCIES += libyaml
else
DTC_MAKE_OPTS += NO_YAML=1
endif
define DTC_POST_INSTALL_TARGET_RM_DTDIFF
rm -f $(TARGET_DIR)/usr/bin/dtdiff
endef
ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y)
DTC_LICENSE += , GPL-2.0+ (programs)
DTC_INSTALL_GOAL = install
ifeq ($(BR2_PACKAGE_BASH),)
DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF
endif
else # $(BR2_PACKAGE_DTC_PROGRAMS) != y
DTC_INSTALL_GOAL = install-lib
endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y
define DTC_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) EXTRA_CFLAGS="$(TARGET_CFLAGS) -fPIC" -C $(@D) $(DTC_MAKE_OPTS)
endef
# For staging, only the library is needed
define DTC_INSTALL_STAGING_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) $(DTC_MAKE_OPTS) install-lib \
install-includes
endef
define DTC_INSTALL_TARGET_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(DTC_MAKE_OPTS) $(DTC_INSTALL_GOAL)
endef
# host build
define HOST_DTC_BUILD_CMDS
$(HOST_CONFIGURE_OPTS) $(MAKE) EXTRA_CFLAGS="$(HOST_CFLAGS) -fPIC" -C $(@D) $(HOST_DTC_MAKE_OPTS)
endef
define HOST_DTC_INSTALL_CMDS
$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(HOST_DTC_MAKE_OPTS) install
endef
$(eval $(generic-package))
$(eval $(host-generic-package))