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,31 @@
From 40ab4167b5a45c772304a879c71b47d54de3b0e3 Mon Sep 17 00:00:00 2001
From: Esben Haabendal <esben@haabendal.dk>
Date: Wed, 20 Mar 2019 14:19:40 +0100
Subject: [PATCH] Allow building with newer glibc versions
Newer glibc versions does not include sys/sysmacros.h from sys/types.h
anymore. Including it unconditionally should be safe.
See https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html for why
this was done.
Signed-off-by: Esben Haabendal <esben@haabendal.dk>
---
src/setup/setup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/setup/setup.c b/src/setup/setup.c
index 6a4275a2ae36..53429375a146 100644
--- a/src/setup/setup.c
+++ b/src/setup/setup.c
@@ -37,6 +37,7 @@
#include <ftw.h>
#include <stdbool.h>
#include <blkid.h>
+#include <sys/sysmacros.h>
#include "efivars.h"
--
2.21.0
@@ -0,0 +1,54 @@
From fc05ced797b87286b8ec7303fe32bf200a072972 Mon Sep 17 00:00:00 2001
From: Esben Haabendal <esben@haabendal.dk>
Date: Mon, 18 Mar 2019 11:14:31 +0100
Subject: [PATCH] Fix linking for non-host compatible targets
Without this, gummiboot build system will use host 'ld' when linking
target binary, which is obviously not a good idea.
Signed-off-by: Esben Haabendal <esben@haabendal.dk>
---
Makefile.am | 4 ++--
configure.ac | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 6568a355ed74..9051dd44edd9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -142,7 +142,7 @@ $(top_builddir)/src/efi/%.o: $(top_srcdir)/src/efi/%.c $(addprefix $(top_srcdir)
$(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
$(gummiboot_solib): $(gummiboot_objects)
- $(AM_V_CCLD)$(LD) $(efi_ldflags) $(gummiboot_objects) \
+ $(AM_V_CCLD)$(EFI_LD) $(efi_ldflags) $(gummiboot_objects) \
-o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
nm -D -u $@ | grep ' U ' && exit 1 || :
.DELETE_ON_ERROR: $(gummboot_solib)
@@ -177,7 +177,7 @@ $(top_builddir)/src/efi/%.o: $(top_srcdir)/src/efi/%.c $(addprefix $(top_srcdir)
$(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
$(stub_solib): $(stub_objects)
- $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
+ $(AM_V_CCLD)$(EFI_LD) $(efi_ldflags) $(stub_objects) \
-o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
nm -D -u $@ | grep ' U ' && exit 1 || :
.DELETE_ON_ERROR: $(gummboot_solib)
diff --git a/configure.ac b/configure.ac
index 27bbe1d73396..b948696c220b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,10 @@ dnl Don't try to use things like -std=c99 for efi compilation
EFI_CC=$CC
AC_SUBST([EFI_CC])
+dnl Allow specifying linker compatible with the compiler
+EFI_LD=$LD
+AC_SUBST([EFI_LD])
+
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
--
2.21.0
+24
View File
@@ -0,0 +1,24 @@
config BR2_TARGET_GUMMIBOOT
bool "gummiboot"
depends on BR2_i386 || BR2_x86_64
depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS
select BR2_PACKAGE_GNU_EFI
select BR2_PACKAGE_UTIL_LINUX
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
help
gummiboot is a simple UEFI boot manager which executes
configured EFI images. The default entry is selected by a
configured pattern (glob) or an on-screen menu.
gummiboot operates on the EFI System Partition (ESP)
only. Configuration file fragments, kernels, initrds, other
EFI images need to reside on the ESP. Linux kernels need to
be built with CONFIG_EFI_STUB to be able to be directly
executed as an EFI image.
See the Grub2 help text for details on preparing an EFI
capable disk image using Gummiboot: the instructions are
exactly the same, except that the Gummiboot configuration
files will be located in /loader/ inside the EFI partition.
http://freedesktop.org/wiki/Software/gummiboot/
+4
View File
@@ -0,0 +1,4 @@
title Buildroot
version 1
linux /bzImage
options console=ttyS0 root=/dev/sda2
+41
View File
@@ -0,0 +1,41 @@
################################################################################
#
# gummiboot
#
################################################################################
GUMMIBOOT_SITE = https://gitlab.freedesktop.org/archived-projects/gummiboot.git
GUMMIBOOT_SITE_METHOD = git
GUMMIBOOT_VERSION = 2bcd919c681c952eb867ef1bdb458f1bc49c2d55
GUMMIBOOT_LICENSE = LGPL-2.1+
GUMMIBOOT_LICENSE_FILES = LICENSE
# The git archive does not have the autoconf/automake stuff generated.
GUMMIBOOT_AUTORECONF = YES
GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linux
GUMMIBOOT_INSTALL_TARGET = NO
GUMMIBOOT_INSTALL_IMAGES = YES
ifeq ($(BR2_i386),y)
GUMMIBOOT_IMGARCH = ia32
else ifeq ($(BR2_x86_64),y)
GUMMIBOOT_IMGARCH = x64
endif
GUMMIBOOT_CONF_OPTS = \
--host=$(BR2_ARCH) \
--with-efi-libdir=$(STAGING_DIR)/usr/lib \
--with-efi-ldsdir=$(STAGING_DIR)/usr/lib \
--with-efi-includedir=$(STAGING_DIR)/usr/include \
--disable-manpages
define GUMMIBOOT_INSTALL_IMAGES_CMDS
$(INSTALL) -D -m 0644 $(@D)/gummiboot$(GUMMIBOOT_IMGARCH).efi \
$(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(GUMMIBOOT_IMGARCH).efi
$(INSTALL) -D -m 0644 boot/gummiboot/loader.conf \
$(BINARIES_DIR)/efi-part/loader/loader.conf
$(INSTALL) -D -m 0644 boot/gummiboot/buildroot.conf \
$(BINARIES_DIR)/efi-part/loader/entries/buildroot.conf
endef
$(eval $(autotools-package))
+2
View File
@@ -0,0 +1,2 @@
timeout 3
default buildroot