All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] system: Move skeleton-init-* selection to init
@ 2020-10-13 19:41 Brandon Maier
  2020-10-13 19:41 ` [Buildroot] [PATCH 2/2] system: support br2-external init systems Brandon Maier
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Brandon Maier @ 2020-10-13 19:41 UTC (permalink / raw)
  To: buildroot

In preparation for supporting br2-external inits, move the 'select' for
the BR2_PACKAGE_SKELETON_INIT_* to their respective init systems. This
will allow a br2-external init to 'select' which skeleton it needs.

Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
---
 system/Config.in | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/system/Config.in b/system/Config.in
index b8b7c16529..ec61fac781 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -1,21 +1,17 @@
 menu "System configuration"
 
-# Note: usually, it is not possible to select a provider of a virtual
-# package. But here we have an exception: there are only four providers
-# and they only get selected by separate entries in this choice and
-# under different, exclusive conditions. So this is a safe situation.
+# Note on package/skeleton: usually, it is not safe to 'select' a
+# provider of a virtual package. But below we have an exception: each
+# init system may select one of the virtual skeleton-init-* packages. As
+# only one init system may be enabled, only one skeleton-init-* may be
+# selected. So this is a safe situation.
 choice
 	prompt "Root FS skeleton"
 
 config BR2_ROOTFS_SKELETON_DEFAULT
 	bool "default target skeleton"
-	select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_INIT_SYSV
-	select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_INIT_BUSYBOX
-	select BR2_PACKAGE_SKELETON_INIT_OPENRC if BR2_INIT_OPENRC
-	select BR2_PACKAGE_SKELETON_INIT_SYSTEMD if BR2_INIT_SYSTEMD
-	select BR2_PACKAGE_SKELETON_INIT_NONE if BR2_INIT_NONE
 	help
-	  Use default target skeleton
+	  Use default target skeleton for selected init system.
 
 config BR2_ROOTFS_SKELETON_CUSTOM
 	bool "custom target skeleton"
@@ -91,6 +87,7 @@ config BR2_INIT_BUSYBOX
 	bool "BusyBox"
 	select BR2_PACKAGE_BUSYBOX
 	select BR2_PACKAGE_INITSCRIPTS
+	select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_ROOTFS_SKELETON_DEFAULT
 
 config BR2_INIT_SYSV
 	bool "systemV"
@@ -98,12 +95,14 @@ config BR2_INIT_SYSV
 	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # sysvinit
 	select BR2_PACKAGE_INITSCRIPTS
 	select BR2_PACKAGE_SYSVINIT
+	select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_ROOTFS_SKELETON_DEFAULT
 
 config BR2_INIT_OPENRC
 	bool "OpenRC"
 	depends on BR2_USE_MMU
 	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_OPENRC
+	select BR2_PACKAGE_SKELETON_INIT_OPENRC if BR2_ROOTFS_SKELETON_DEFAULT
 
 comment "openrc needs a toolchain w/ dynamic library"
 	depends on BR2_USE_MMU
@@ -126,6 +125,7 @@ config BR2_INIT_SYSTEMD
 	depends on BR2_HOST_GCC_AT_LEAST_5
 	select BR2_ROOTFS_MERGED_USR
 	select BR2_PACKAGE_SYSTEMD
+	select BR2_PACKAGE_SKELETON_INIT_SYSTEMD if BR2_ROOTFS_SKELETON_DEFAULT
 
 comment "systemd needs a glibc toolchain w/ SSP, headers >= 3.10, host and target gcc >= 5"
 	depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
@@ -138,6 +138,7 @@ comment "systemd needs a glibc toolchain w/ SSP, headers >= 3.10, host and targe
 
 config BR2_INIT_NONE
 	bool "None"
+	select BR2_PACKAGE_SKELETON_INIT_NONE if BR2_ROOTFS_SKELETON_DEFAULT
 	help
 	  Buildroot will not install any init system. You will
 	  have to provide your own, either with a new package
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-14 21:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 19:41 [Buildroot] [PATCH 1/2] system: Move skeleton-init-* selection to init Brandon Maier
2020-10-13 19:41 ` [Buildroot] [PATCH 2/2] system: support br2-external init systems Brandon Maier
2020-10-13 22:36 ` [Buildroot] [PATCH v2 1/5] system: support br2-external skeleton packages Brandon Maier
2020-10-14 21:17   ` Yann E. MORIN
2020-10-13 22:36 ` [Buildroot] [PATCH v2 2/5] docs/manual: add section about br2-external skeleton Brandon Maier
2020-10-13 22:36 ` [Buildroot] [PATCH v2 3/5] system: Move skeleton-init-* selection to init Brandon Maier
2020-10-13 22:36 ` [Buildroot] [PATCH v2 4/5] system: support br2-external init systems Brandon Maier
2020-10-13 22:36 ` [Buildroot] [PATCH v2 5/5] docs/manual: add section about br2-external init Brandon Maier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.