Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
From b39ab180358ed451eae9df900f49a72ef1eb7442 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Santos <unixmania@gmail.com>
|
||||
Date: Sun, 1 Mar 2020 09:04:48 -0300
|
||||
Subject: [PATCH] init.d/agetty: replace /sbin/agetty by /sbin/getty
|
||||
|
||||
In Buildroot getty is provided by BusyBox or util-linux (agetty). Both
|
||||
create a /sbin/getty symlink pointing to the actual program, so make the
|
||||
agetty service use that path instead of /sbin/agetty.
|
||||
|
||||
The patch is required because it's not possible to override the command
|
||||
by means of a configuration file.
|
||||
|
||||
Signed-off-by: Carlos Santos <unixmania@gmail.com>
|
||||
---
|
||||
init.d/agetty.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/init.d/agetty.in b/init.d/agetty.in
|
||||
index e4866f7a..e1864628 100644
|
||||
--- a/init.d/agetty.in
|
||||
+++ b/init.d/agetty.in
|
||||
@@ -14,7 +14,7 @@ supervisor=supervise-daemon
|
||||
port="${RC_SVCNAME#*.}"
|
||||
respawn_period="${respawn_period:-60}"
|
||||
term_type="${term_type:-linux}"
|
||||
-command=/sbin/agetty
|
||||
+command=/sbin/getty
|
||||
command_args_foreground="${agetty_options} ${port} ${baud} ${term_type}"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
--
|
||||
2.18.2
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From c2dc04f6b8c6784941b896e0b17c160dd43a566f Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Santos <unixmania@gmail.com>
|
||||
Date: Sun, 1 Mar 2020 11:14:37 -0300
|
||||
Subject: [PATCH] init.d/agetty: start agetty after all services
|
||||
|
||||
This is required for Buildroot, to prevent mixing service initialization
|
||||
messages with the getty prompt on devices with a single serial console.
|
||||
|
||||
Signed-off-by: Carlos Santos <unixmania@gmail.com>
|
||||
---
|
||||
init.d/agetty.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/init.d/agetty.in b/init.d/agetty.in
|
||||
index e1864628..a1ad4e9f 100644
|
||||
--- a/init.d/agetty.in
|
||||
+++ b/init.d/agetty.in
|
||||
@@ -19,7 +19,7 @@ command_args_foreground="${agetty_options} ${port} ${baud} ${term_type}"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
depend() {
|
||||
- after local
|
||||
+ after *
|
||||
keyword -prefix
|
||||
provide getty
|
||||
}
|
||||
--
|
||||
2.18.2
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 014dc43447fa553e875984ac4a528e5916cc9e06 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Santos <unixmania@gmail.com>
|
||||
Date: Sat, 29 Feb 2020 22:41:30 -0300
|
||||
Subject: [PATCH] runlevels: do not add agetty.tty[1-6] if MKSYSVINIT=yes
|
||||
|
||||
Buildroot starts a single getty, according to the system configuration.
|
||||
Also tty[1-6] may not exist (e.g. embedded devices with serial consoles
|
||||
only).
|
||||
|
||||
Signed-off-by: Carlos Santos <unixmania@gmail.com>
|
||||
---
|
||||
runlevels/Makefile | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/runlevels/Makefile b/runlevels/Makefile
|
||||
index 73843d8b..dbfb59ca 100644
|
||||
--- a/runlevels/Makefile
|
||||
+++ b/runlevels/Makefile
|
||||
@@ -90,12 +90,6 @@ install:
|
||||
fi; \
|
||||
ln -snf ${INITDIR}/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \
|
||||
fi
|
||||
- if test "${MKSYSVINIT}" = yes && test "${OS}" = Linux; then \
|
||||
- for x in tty1 tty2 tty3 tty4 tty5 tty6; do \
|
||||
- ln -snf ${INITDIR}/agetty ${DESTDIR}/${INITDIR}/"agetty.$$x" || exit $$?; \
|
||||
- ln -snf ${INITDIR}/agetty.$$x ${DEFAULTDIR}/"agetty.$$x" || exit $$?; \
|
||||
- done; \
|
||||
- fi
|
||||
|
||||
check test::
|
||||
|
||||
--
|
||||
2.18.2
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# based on agetty service from OpenRC package
|
||||
|
||||
description="start getty on terminal"
|
||||
supervisor=supervise-daemon
|
||||
port="${RC_SVCNAME#*.}"
|
||||
term_type="${term_type:-linux}"
|
||||
command=/sbin/getty
|
||||
command_args_foreground="${getty_options} ${baud} ${port} ${term_type}"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
depend() {
|
||||
# start getty at the very end of init
|
||||
after *
|
||||
keyword -prefix
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
export EINFO_QUIET="${quiet:-yes}"
|
||||
}
|
||||
|
||||
stop_pre() {
|
||||
export EINFO_QUIET="${quiet:-yes}"
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 c99488ca54f2b795328d07bbd456ade49b571136bba7501f7eaaeb1ca9f9ecc4 openrc-0.41.2.tar.gz
|
||||
sha256 91a01ca6d930a0688fb91338209985de57cac7aa2d37feddacb78fd3d95308e2 openrc-0.42.1.tar.gz
|
||||
sha256 96862463f4e77e2508e4fc2c83773fd24807cb699368b63fd93a5e2b466dd624 LICENSE
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OPENRC_VERSION = 0.41.2
|
||||
OPENRC_VERSION = 0.42.1
|
||||
OPENRC_SITE = $(call github,OpenRC,openrc,$(OPENRC_VERSION))
|
||||
OPENRC_LICENSE = BSD-2-Clause
|
||||
OPENRC_LICENSE_FILES = LICENSE
|
||||
@@ -18,7 +18,6 @@ OPENRC_MAKE_OPTS = \
|
||||
LIBNAME=lib \
|
||||
LIBEXECDIR=/usr/libexec/rc \
|
||||
MKPKGCONFIG=no \
|
||||
MKSELINUX=no \
|
||||
MKSYSVINIT=yes \
|
||||
BRANDING="Buildroot $(BR2_VERSION_FULL)" \
|
||||
CC=$(TARGET_CC)
|
||||
@@ -29,6 +28,13 @@ else
|
||||
OPENRC_MAKE_OPTS += MKSTATICLIBS=yes
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
||||
OPENRC_MAKE_OPTS += MKSELINUX=yes
|
||||
OPENRC_DEPENDENCIES += libselinux
|
||||
else
|
||||
OPENRC_MAKE_OPTS += MKSELINUX=no
|
||||
endif
|
||||
|
||||
define OPENRC_BUILD_CMDS
|
||||
$(MAKE) $(OPENRC_MAKE_OPTS) -C $(@D)
|
||||
endef
|
||||
@@ -68,17 +74,15 @@ endef
|
||||
OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_REMOVE_UNNEEDED
|
||||
|
||||
ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
|
||||
OPENRC_GETTY_SVCNAME = getty.$(SYSTEM_GETTY_PORT)
|
||||
OPENRC_GETTY_SVCNAME = agetty.$(SYSTEM_GETTY_PORT)
|
||||
OPENRC_GETTY_CONF_D = $(TARGET_DIR)/etc/conf.d/$(OPENRC_GETTY_SVCNAME)
|
||||
define OPENRC_SET_GETTY
|
||||
{ \
|
||||
echo "baud=\"$(SYSTEM_GETTY_BAUDRATE)\""; \
|
||||
echo "term_type=\"$(SYSTEM_GETTY_TERM)\"" ; \
|
||||
echo "getty_options=\"-L $(SYSTEM_GETTY_OPTIONS)\""; \
|
||||
echo "agetty_options=\"-L $(SYSTEM_GETTY_OPTIONS)\""; \
|
||||
} > $(OPENRC_GETTY_CONF_D)
|
||||
$(INSTALL) -D -m 0755 $(OPENRC_PKGDIR)/getty \
|
||||
$(TARGET_DIR)/etc/init.d/getty
|
||||
ln -sf getty $(TARGET_DIR)/etc/init.d/$(OPENRC_GETTY_SVCNAME)
|
||||
ln -sf agetty $(TARGET_DIR)/etc/init.d/$(OPENRC_GETTY_SVCNAME)
|
||||
ln -sf /etc/init.d/$(OPENRC_GETTY_SVCNAME) \
|
||||
$(TARGET_DIR)/etc/runlevels/default/$(OPENRC_GETTY_SVCNAME)
|
||||
endef
|
||||
|
||||
Reference in New Issue
Block a user