Skip to contentSkip to conversation

poky-tiny: Switch to using kernel 4.4 and busybox for init

PATCH In review Khem Raj 2 participants 3 messages Apr 7, 2016

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 poky-tiny: Switch to using kernel 4.4 and busybox for init

busybox based init system is available and used in many other distributions e.g. buildroot, therefore use that combination with mdev gives a scalable image and chance to execute sysvinit scripts as well, adding nothing to image size.

---
 meta-poky/conf/distro/poky-tiny.conf | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
meta-poky/conf/distro/poky-tiny.conf +8 -6
index 0ac46ac..4d30bde 100644
@@ -37,7 +37,7 @@ TCLIBC = "musl"
 # Distro config is evaluated after the machine config, so we have to explicitly
 # set the kernel provider to override a machine config.
 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
-PREFERRED_VERSION_linux-yocto-tiny ?= "4.1%"
+PREFERRED_VERSION_linux-yocto-tiny ?= "4.4%"
 
 # We can use packagegroup-core-boot, but in the future we may need a new packagegroup-core-tiny
 #POKY_DEFAULT_EXTRA_RDEPENDS += "packagegroup-core-boot"
@@ -80,11 +80,13 @@ DISTRO_FEATURES_append_libc-musl = " largefile"
 DISTRO_FEATURES_class-native = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
 DISTRO_FEATURES_class-nativesdk = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
 
-# Use tmpdevfs and the busybox runtime services
-VIRTUAL-RUNTIME_dev_manager = ""
-VIRTUAL-RUNTIME_login_manager = ""
-VIRTUAL-RUNTIME_init_manager = "tiny-init"
-VIRTUAL-RUNTIME_keymaps = ""
+# enable mdev/busybox for init
+VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
+VIRTUAL-RUNTIME_login_manager = "busybox"
+VIRTUAL-RUNTIME_init_manager = "busybox"
+VIRTUAL-RUNTIME_initscripts = "initscripts"
+VIRTUAL-RUNTIME_keymaps = "keymaps"
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
 
 # FIXME: Consider adding "modules" to MACHINE_FEATURES and using that in
 # packagegroup-core-base to select modutils-initscripts or not.  Similar with "net" and
Signature · 1 line
1.9.1
#1 lore raw

meta-poky/conf/distro/poky-tiny.conf DISTRO_FEATURES_append_libc-musl = " largefile" · line 89

Quoted 12 lines · Khem Raj

busybox based init system is available and used in many other distributions e.g. buildroot, therefore use that combination with mdev gives a scalable image and chance to execute sysvinit scripts as well, adding nothing to image size.

meta-poky/conf/distro/poky-tiny.conf +3 -0
+VIRTUAL-RUNTIME_initscripts = "initscripts"
+VIRTUAL-RUNTIME_keymaps = "keymaps"
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"

Do you really want to have sysvinit removed from DISTRO_FEATURES if you're claiming this lets you support init scripts?

Ross

author
#2 lore raw
Quoted 10 lines · Ross
Quoted 9 lines · Khem Raj

busybox based init system is available and used in many other distributions e.g. buildroot, therefore use that combination with mdev gives a scalable image and chance to execute sysvinit scripts as well, adding nothing to image size.

Quoted 8 lines

meta-poky/conf/distro/poky-tiny.conf DISTRO_FEATURES_append_libc-musl = " largefile" · line 89

Quoted 3 lines
meta-poky/conf/distro/poky-tiny.conf +3 -0
+VIRTUAL-RUNTIME_initscripts = "initscripts"
+VIRTUAL-RUNTIME_keymaps = "keymaps"
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"

Do you really want to have sysvinit removed from DISTRO_FEATURES if you're claiming this lets you support init scripts?

Scripts would be fine, however the minimal
image boots fine with above and the scripts add about 15K compressed. thats why its removed