[ 物联网篇 ] 08 - Yocto 文件系统中启用 Sysvinit

NXP Yocto 默认文件系统的启动方式是Systemd ,通过修改配置文件改为Sysvinit启动方式

sources/meta-fsl-bsp-release/imx/meta-sdk/conf/distro/include/fsl-imx-preferred-env.inc 
中的 
 # Use systemd as default init manager
 # VIRTUAL-RUNTIME_init_manager = "systemd"
 # PREFERRED_PROVIDER_udev = "systemd"
 # PREFERRED_PROVIDER_udev-utils = "systemd"
 # DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
 # IMX_DEFAULT_DISTRO_FEATURES += " systemd"
//改为
 VIRTUAL-RUNTIME_init_manager = "busybox"
 # PREFERRED_PROVIDER_udev = "sysvinit"
 # PREFERRED_PROVIDER_udev-utils = "sysvinit"
 # DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
 IMX_DEFAULT_DISTRO_FEATURES += " sysvinit"

然后重新配置编译 

DISTRO=fsl-imx-wayland MACHINE=imx8mmevk source fsl-setup-release.sh -b build-wayland
bitbake -k core-image-minimal

另外一种方式:

在编译输出目录build-wayland/conf/local.conf  添加

# Use systemd as default init manager
VIRTUAL-RUNTIME_init_manager = "systemd"
PREFERRED_PROVIDER_udev = "systemd"
PREFERRED_PROVIDER_udev-utils = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
IMX_DEFAULT_DISTRO_FEATURES += " systemd"

其中有写示例文件提供了参考

sources/poky/meta-poky/conf/local.conf.sample.extended 提供了修改示例

#
# Use busybox/mdev for system initialization
#
#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"

# Use systemd as default init manager
VIRTUAL-RUNTIME_init_manager = "systemd"
PREFERRED_PROVIDER_udev = "systemd"
PREFERRED_PROVIDER_udev-utils = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
IMX_DEFAULT_DISTRO_FEATURES += " systemd"
©️2020 CSDN 皮肤主题: Age of Ai 设计师: meimeiellie 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值