Skip to content

Conversation

@thomas-roos
Copy link

otherwise no systemd init.cfg is used always, mean /sbin/init is pointing at busybox, by this modification this is only using init.cfg when busybox is enabled, as it is in done in poky layer.

# otherwise no systemd init.cfg is used always, mean /sbin/init is pointing at busybox, by this modification this is only using init.cfg when busybox is enabled, as it is in done in poky layer.
@ciprianmcostea
Copy link
Contributor

Hello @thomas-roos , it seems that on a regular 'fsl-image-auto' Yocto build, as supported by 'meta-alb' layer, the /sbin/init correctly points to 'systemd'
(/sbin/init -> ../lib/systemd/systemd)

Hence, maybe additional changes from other Yocto layers are leading to a wrongly defined '/sbin/init'.

As part of meta-alb, we added this 'init.cfg' config fragment in order to support LXC feature.

Therefore, instead of directly removing init.cfg or masking the 'busybox' bbappend file from meta-alb layer, maybe a conditional enablement based on 'lxc' DISTRO_FEATURE would be feasible ?
such as : ${@bb.utils.contains('DISTRO_FEATURES', 'lxc', 'file://init.cfg', '', d)}

@thomas-roos
Copy link
Author

Hi,
lxc DISTRO_FEATURE is depending on BUSYBOX init manager?
So ${@["", " file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \ makes this clear.
But of course yours is also okay.
I removed all other layers - it's just yours causing this issue.
Build Configuration:

BB_VERSION           = "2.0.0"
BUILD_SYS            = "aarch64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-fsl-linux"
MACHINE              = "s32g274ardb2"
DISTRO               = "fsl-auto"
DISTRO_VERSION       = "36.0srm0.2"
TUNE_FEATURES        = "aarch64 armv8a crc cortexa53 crypto"
TARGET_FPU           = ""
meta                 
meta-poky            = "HEAD:5d822b31316663c838c5864ab68b28fb3ca41351"
meta-oe              
meta-python          
meta-networking      
meta-filesystems     
meta-multimedia      = "HEAD:a88cb922f91fda95e8a584cee3092083d5ad3e98"
meta-alb             = "HEAD:9c110e64164be47f832d345a40bceb8d8ec0851f"
meta-freescale       = "HEAD:3e9ef23d98aa842cf84251a27c9b8dde8925ea61"

Also fsl-image-auto does not work correctly here:

fsl-image-auto-1.0# ls -al ../rootfs/sbin/init 
lrwxrwxrwx 1 root root 12 Mar  9  2018 ../rootfs/sbin/init -> /bin/busybox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants