Problem facing while yocto "systemd" recipe.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem facing while yocto "systemd" recipe.

Jump to solution
2,476 Views
Chethan
Contributor III

Hi, 

I am using LS1046ardb board for one of my project, In that I want to build Yocto RFS with some more additional recipes. While adding Systemd recipe I am not able to build the Yocto RFS. 

Please throw some light to resolve this problem. To add the systemd recipe into my root file system to make our life easier.

NOTE: I am adding Yocto recipes in local_arm64_devel.conf file and flex-builder -i mkrfs -r yocto:devel -a arm64 -m ls1046ardb is the command using to build the yocto root file system.

ERROR : NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'systemd' (but /home/auser/chethan/FR3_5/flexbuild_lsdk2004/packages/rfs/yocto-poky/meta/recipes-sato/images/core-image-sato.bb RDEPENDS on or otherwise requires it)
systemd was skipped: missing required distro feature 'systemd' (not in DISTRO_FEATURES)
NOTE: Runtime target 'systemd' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['systemd']
ERROR: Required build target 'core-image-sato' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-sato', 'systemd']

 

Thanks & Regards,

Chethan GR

Labels (1)
0 Kudos
1 Solution
2,385 Views
Chethan
Contributor III

Hi,

After following the above steps, now I am able to configure the Systemd on my root file system. but after the adding the Systemd. in /etc directory all rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d, rc6.d & rcS.d folder got removed so please provide me the solution its should have the both (means Systemd plus rcS.d). because i am going use both

Thanks & regards

Chethan GR

View solution in original post

0 Kudos
8 Replies
2,447 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please add "systemd-conf" to variable IMAGE_INSTALL_append in configs/yocto/local_arm64_devel.conf, then run the following command.

$ flex-builder -i mkrfs -r yocto:devel -a arm64

0 Kudos
2,442 Views
Chethan
Contributor III

Hi,

After adding "systemd-conf" to variable IMAGE_INSTALL_append in configs/yocto/local_arm64_devel.conf, I got the yocto root file system. then same image I flash to the board. 

I try to create the systemd service on /etc/systemd/system/ directory and service name is Startup@.service

Startup@.service is contains: 

Description=Service Start
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=on-failure
RestartSec=2
ExecStart=/bin/bash /etc/init.d/startup_service
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

After the creating Startup@.service file i try to enable the service using "systemctl enable Startup@.service"  but this command is giving error.

ERROR : "-sh: systemctl: command not found"

Please let me know where missing while creating a systemd service OR is there any other way to create the systemd service means procedure.

Thanks & Regards,

Chethan GR

0 Kudos
2,424 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please add the following line in packages/rfs/yocto-poky/meta/conf/layer.conf.

DISTRO_FEATURES_append = " systemd"

Then add "systemd" in configs/yocto/local_arm64_devel.conf and rebuild rootfs image.

 

Tags (1)
0 Kudos
2,416 Views
Chethan
Contributor III

Hi,

After adding DISTRO_FEATURES_append = " systemd" this in packages/rfs/yocto-poky/meta/conf/layer.conf. and "systemd-conf" in configs/yocto/local_arm64_devel.conf again give the build but No use. I am not able to get the systemd configure on my root file system

Please throw some light on same.

Thanks & Regards

Chethan GR

0 Kudos
2,408 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following procedure.

1. Please add the following line in packages/rfs/yocto-poky/meta/conf/layer.conf.

DISTRO_FEATURES_append = " systemd"

2. Please add "systemd" to variable IMAGE_INSTALL_append in configs/yocto/local_arm64_devel.conf.

3. $ flex-builder -i clean-rfs -r yocto:devel

4. $ flex-builder -i mkrfs -r yocto:devel -a arm64

0 Kudos
2,404 Views
Chethan
Contributor III

Hi,

I follow the above steps but I did not get the Systemd configuration on my root file system.

Please help me to clear this problem and move forward.

Thanks & Regards

Chethan GR

0 Kudos
2,400 Views
yipingwang
NXP TechSupport
NXP TechSupport

Yocto uses sysvinit to do INIT by default.

Please add the following in configs/yocto/local_arm64_devel.conf to invoke systemd init function.

VIRTUAL-RUNTIME_init_manager = "systemd"
PREFERRED_PROVIDER_udev = "systemd"
PREFERRED_PROVIDER_udev-utils = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
IMX_DEFAULT_DISTRO_FEATURES += " systemd"
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_remove = " sysvinit"
 
Then run the following
$ flex-builder -i clean-rfs -r yocto
$ flex-builder -i mkrfs -r yocto:devel
0 Kudos
2,386 Views
Chethan
Contributor III

Hi,

After following the above steps, now I am able to configure the Systemd on my root file system. but after the adding the Systemd. in /etc directory all rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d, rc6.d & rcS.d folder got removed so please provide me the solution its should have the both (means Systemd plus rcS.d). because i am going use both

Thanks & regards

Chethan GR

0 Kudos