initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
From dc8aa43b7b6d0cead7d8a0c1a151d289a5233a10 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
|
||||
Date: Wed, 2 Apr 2014 12:36:52 +0200
|
||||
Subject: [PATCH] libudev: Only use #pragma for ignoring diagnostics if GCC
|
||||
version supports it.
|
||||
|
||||
[Peter: update for 2.1.1, fix shared_assert issue]
|
||||
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
|
||||
---
|
||||
src/shared/macro.h | 8 +++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/shared/macro.h b/src/shared/macro.h
|
||||
--- a/src/shared/macro.h
|
||||
+++ b/src/shared/macro.h
|
||||
@@ -38,6 +38,7 @@
|
||||
#define _cleanup_(x) __attribute__((cleanup(x)))
|
||||
|
||||
/* Temporarily disable some warnings */
|
||||
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
|
||||
#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
|
||||
@@ -48,6 +49,13 @@
|
||||
|
||||
#define REENABLE_WARNING \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
+#else
|
||||
+#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT
|
||||
+#define DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
+#define REENABLE_WARNING
|
||||
+/* glibc unconditionally defines this, but it needs GCC 4.6+ */
|
||||
+#undef static_assert
|
||||
+#endif
|
||||
|
||||
#define XCONCATENATE(x, y) x ## y
|
||||
#define CONCATENATE(x, y) XCONCATENATE(x, y)
|
||||
--
|
||||
1.7.9.5
|
||||
@@ -0,0 +1,46 @@
|
||||
config BR2_PACKAGE_EUDEV
|
||||
bool "eudev"
|
||||
depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
|
||||
depends on BR2_USE_MMU # uses fork()
|
||||
depends on BR2_USE_WCHAR # needs C99 compiler
|
||||
depends on !BR2_STATIC_LIBS # kmod
|
||||
select BR2_PACKAGE_HAS_UDEV
|
||||
select BR2_PACKAGE_UDEV_GENTOO_SCRIPTS if BR2_INIT_OPENRC
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBS
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
|
||||
select BR2_PACKAGE_KMOD
|
||||
help
|
||||
eudev is a fork of systemd-udev with the goal of obtaining
|
||||
better compatibility with existing software such as OpenRC and
|
||||
Upstart, older kernels, various toolchains and anything else
|
||||
required by users and various distributions.
|
||||
|
||||
https://wiki.gentoo.org/wiki/Project:Eudev
|
||||
|
||||
if BR2_PACKAGE_EUDEV
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_UDEV
|
||||
default "eudev"
|
||||
|
||||
config BR2_PACKAGE_EUDEV_RULES_GEN
|
||||
bool "enable rules generator"
|
||||
help
|
||||
Enable persistent rules generator
|
||||
|
||||
config BR2_PACKAGE_EUDEV_ENABLE_HWDB
|
||||
bool "enable hwdb installation"
|
||||
default y
|
||||
select BR2_PACKAGE_HOST_EUDEV # for udevadm, during target-finalize
|
||||
help
|
||||
Enables hardware database installation to /etc/udev/hwdb.bin
|
||||
|
||||
endif
|
||||
|
||||
comment "eudev needs eudev /dev management"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
|
||||
|
||||
comment "eudev needs a toolchain w/ wchar, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
|
||||
@@ -0,0 +1,3 @@
|
||||
# Select this if you need host eudev tools (e.g. udevadm)
|
||||
config BR2_PACKAGE_HOST_EUDEV
|
||||
bool
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# udev This is a minimal non-LSB version of a UDEV startup script. It
|
||||
# was derived by stripping down the udev-058 LSB version for use
|
||||
# with buildroot on embedded hardware using Linux 2.6.34+ kernels.
|
||||
#
|
||||
# You may need to customize this for your system's resource limits
|
||||
# (including startup time!) and administration. For example, if
|
||||
# your early userspace has a custom initramfs or initrd you might
|
||||
# need /dev much earlier; or without hotpluggable busses (like USB,
|
||||
# PCMCIA, MMC/SD, and so on) your /dev might be static after boot.
|
||||
#
|
||||
# This script assumes your system boots right into the eventual root
|
||||
# filesystem, and that init runs this udev script before any programs
|
||||
# needing more device nodes than the bare-bones set -- /dev/console,
|
||||
# /dev/zero, /dev/null -- that's needed to boot and run this script.
|
||||
#
|
||||
|
||||
# Check for config file and read it
|
||||
UDEV_CONFIG=/etc/udev/udev.conf
|
||||
test -r $UDEV_CONFIG || exit 6
|
||||
. $UDEV_CONFIG
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Populating %s using udev: " "${udev_root:-/dev}"
|
||||
[ -e /proc/sys/kernel/hotplug ] && printf '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||
/sbin/udevd -d || { echo "FAIL"; exit 1; }
|
||||
udevadm trigger --type=subsystems --action=add
|
||||
udevadm trigger --type=devices --action=add
|
||||
udevadm settle --timeout=30 || echo "udevadm settle failed"
|
||||
echo "done"
|
||||
;;
|
||||
stop)
|
||||
# Stop execution of events
|
||||
udevadm control --stop-exec-queue
|
||||
killall udevd
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
# From http://dev.gentoo.org/~blueness/eudev/
|
||||
md5 60b135a189523f333cea5f71a3345c8d eudev-3.2.10.tar.gz
|
||||
# Locally calculated
|
||||
sha256 87bb028d470fd1b85169349b44c55d5b733733dc2d50ddf1196e026725ead034 eudev-3.2.10.tar.gz
|
||||
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
|
||||
@@ -0,0 +1,94 @@
|
||||
################################################################################
|
||||
#
|
||||
# eudev
|
||||
#
|
||||
################################################################################
|
||||
|
||||
EUDEV_VERSION = 3.2.10
|
||||
EUDEV_SITE = http://dev.gentoo.org/~blueness/eudev
|
||||
EUDEV_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (libraries)
|
||||
EUDEV_LICENSE_FILES = COPYING
|
||||
EUDEV_INSTALL_STAGING = YES
|
||||
|
||||
EUDEV_CONF_OPTS = \
|
||||
--disable-manpages \
|
||||
--sbindir=/sbin \
|
||||
--libexecdir=/lib \
|
||||
--disable-introspection \
|
||||
--enable-kmod \
|
||||
--enable-blkid
|
||||
|
||||
# eudev requires only the util-linux libraries at build time
|
||||
EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux-libs kmod
|
||||
EUDEV_PROVIDES = udev
|
||||
|
||||
ifeq ($(BR2_ROOTFS_MERGED_USR),)
|
||||
EUDEV_CONF_OPTS += --with-rootlibdir=/lib --enable-split-usr
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y)
|
||||
EUDEV_CONF_OPTS += --enable-rule-generator
|
||||
else
|
||||
EUDEV_CONF_OPTS += --disable-rule-generator
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_EUDEV_ENABLE_HWDB),y)
|
||||
EUDEV_CONF_OPTS += --enable-hwdb
|
||||
else
|
||||
EUDEV_CONF_OPTS += --disable-hwdb
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
||||
EUDEV_CONF_OPTS += --enable-selinux
|
||||
EUDEV_DEPENDENCIES += libselinux
|
||||
else
|
||||
EUDEV_CONF_OPTS += --disable-selinux
|
||||
endif
|
||||
|
||||
define EUDEV_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
|
||||
endef
|
||||
|
||||
# Avoid installing S10udev with openrc, as the service is started by a unit
|
||||
# from the udev-gentoo-scripts package.
|
||||
define EUDEV_INSTALL_INIT_OPENRC
|
||||
@:
|
||||
endef
|
||||
|
||||
HOST_EUDEV_DEPENDENCIES = host-gperf host-pkgconf
|
||||
|
||||
HOST_EUDEV_SYSCONFDIR = $(if $(BR2_PACKAGE_SYSTEMD),/usr/lib,/etc)
|
||||
HOST_EUDEV_CONF_OPTS = \
|
||||
--prefix=/usr \
|
||||
--sbindir=/sbin \
|
||||
--libexecdir=/lib \
|
||||
--with-rootlibdir=/lib \
|
||||
--sysconfdir=$(HOST_EUDEV_SYSCONFDIR) \
|
||||
--disable-blkid \
|
||||
--disable-introspection \
|
||||
--disable-kmod \
|
||||
--disable-manpages \
|
||||
--disable-rule-generator \
|
||||
--disable-selinux \
|
||||
--enable-hwdb
|
||||
|
||||
define HOST_EUDEV_INSTALL_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/src/udev/udevadm \
|
||||
$(HOST_DIR)/bin/udevadm
|
||||
endef
|
||||
|
||||
define HOST_EUDEV_BUILD_HWDB
|
||||
$(HOST_DIR)/bin/udevadm hwdb --update --root $(TARGET_DIR)
|
||||
endef
|
||||
HOST_EUDEV_TARGET_FINALIZE_HOOKS += HOST_EUDEV_BUILD_HWDB
|
||||
|
||||
# Note: this will run in the filesystem context, so will use a copy
|
||||
# of tharget/, not the real one, so the files are still available on
|
||||
# re-builds (foo-rebuild, etc...)
|
||||
define HOST_EUDEV_RM_HWDB_SRC
|
||||
rm -rf $(TARGET_DIR)/$(HOST_EUDEV_SYSCONFDIR)/udev/hwdb.d/
|
||||
endef
|
||||
HOST_EUDEV_ROOTFS_PRE_CMD_HOOKS += HOST_EUDEV_RM_HWDB_SRC
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user