How to enable systemd support

2019-09-01 09:14发布

I have built a system with Yocto 2.4.2 supporting systemd. But there are some issues seemed to be missed in my configurations leading to failure of kernel starting. Any one can help ?

  DISTRO_FEATURES_append = " systemd"
  VIRTUAL-RUNTIME_init_manager = "systemd"

标签: systemd
2条回答
闹够了就滚
2楼-- · 2019-09-01 09:34

I had to enable cgroups in defconfig :)

查看更多
Evening l夕情丶
3楼-- · 2019-09-01 09:40

systemd and cgroup should be enabled together

  • systemd manager (local.conf)

    DISTRO_FEATURES_append = " systemd"

    VIRTUAL-RUNTIME_init_manager = "systemd"

  • For systemd handler (defconfig)

    CONFIG_FHANDLE=y #for systemd

  • cgroups is required by systemd (defconfig)

    CONFIG_CGROUPS=y

    CONFIG_CGROUP_FREEZER=y

    CONFIG_CGROUP_PIDS=y

    CONFIG_CGROUP_DEVICE=y

    CONFIG_CPUSETS=y

    CONFIG_PROC_PID_CPUSET=y

    CONFIG_CGROUP_CPUACCT=y

    CONFIG_PAGE_COUNTER=y

    CONFIG_MEMCG=y

    CONFIG_CGROUP_SCHED=y

    CONFIG_NAMESPACES=y

    CONFIG_OVERLAY_FS=y

查看更多
登录 后发表回答