Problem facing while yocto "systemd" recipe.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Problem facing while yocto "systemd" recipe.

跳至解决方案
3,544 次查看
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

标签 (1)
0 项奖励
回复
1 解答
3,453 次查看
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 项奖励
回复
8 回复数
3,515 次查看
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 项奖励
回复
3,510 次查看
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 项奖励
回复
3,492 次查看
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.

 

标记 (1)
0 项奖励
回复
3,484 次查看
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 项奖励
回复
3,476 次查看
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 项奖励
回复
3,472 次查看
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 项奖励
回复
3,468 次查看
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 项奖励
回复
3,454 次查看
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 项奖励
回复