Skip to contentSkip to conversation

how to use systemd as system init manager

DISCUSSION Jin Li 2 participants 5 messages Dec 25, 2015 – Dec 26, 2015

lore
Share & tools
lore

Jin Li

author
#0 lore raw

Hi,

I am trying to build yocto project which use systemd as system init manager. But the qemu boot up and still use INIT as usual. The rootfs even fail to install systemd.

I refers to yocto docs http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#ref-features-distro
I use meta/recipes-extended/images/core-image-full-cmdline.bb and add the following part to support systemd:

DISTRO_FEATURES_append = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

Did I miss somethings ?

Any help would be appreciated.

Jin

#1 lore raw
Quoted 10 lines · Jin Li

Hi,

I am trying to build yocto project which use systemd as system init manager. But the qemu boot up and still use INIT as usual. The rootfs even fail to install systemd.

I refers to yocto docs http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#ref-features-distro
I use meta/recipes-extended/images/core-image-full-cmdline.bb and add the following part to support systemd:

DISTRO_FEATURES_append = "systemd"

space after first "

Quoted 4 lines

DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

Did I miss somethings ?

DISTRO_FEATURES_append = " systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

Quoted 10 lines

Any help would be appreciated.

Jin

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

author
#2 lore raw
Quoted 16 lines · Khem Raj
Quoted 10 lines · Jin Li

Hi,

I am trying to build yocto project which use systemd as system init manager. But the qemu boot up and still use INIT as usual. The rootfs even fail to install systemd.

I refers to yocto docs http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#ref-features-distro
I use meta/recipes-extended/images/core-image-full-cmdline.bb and add the following part to support systemd:

DISTRO_FEATURES_append = "systemd"

space after first "

Quoted 2 lines

DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

Quoted 8 lines
Quoted 2 lines

Did I miss somethings ?

DISTRO_FEATURES_append = " systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

Hi Raj

I used add the above code in meta/recipes-extended/images/core-image-full-cmdline.bb to build image with systemd, but still get the same result - get no systemd installed in rootfs image and system use "INIT" as usual as follows:

$ runqemu qemuarm64
...
root@qemuarm64:~# systemctl
-sh: systemctl: command not found
root@qemuarm64:~#
root@qemuarm64:~# ps aux | grep init
root         1  5.1  0.2   1764  1176 ?        Ss   01:57   0:04 init [5]

Regards,

Jin

Quoted 13 lines
Quoted 11 lines

Any help would be appreciated.

Jin

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#3 lore raw

Put that in local.conf not in image recipe

Quoted 67 lines · Jin Li
Quoted 4 lines · Khem Raj
Quoted 3 lines · Jin Li

Hi,

I am trying to build yocto project which use systemd as system init

manager.

Quoted 1 line
Quoted 1 line

But the qemu boot up and still use INIT as usual. The rootfs even fail

to install systemd.

Quoted 2 lines
Quoted 2 lines

I refers to yocto docs

http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#ref-features-distro

Quoted 1 line
Quoted 1 line

I use meta/recipes-extended/images/core-image-full-cmdline.bb and add

the following part

Quoted 8 lines
Quoted 3 lines

to support systemd:

DISTRO_FEATURES_append = "systemd"

space after first "

Quoted 2 lines

DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

Quoted 8 lines
Quoted 2 lines

Did I miss somethings ?

DISTRO_FEATURES_append = " systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

Hi Raj

I used add the above code in meta/recipes-extended/images/ core-image-full-cmdline.bb to
build image with systemd, but still get the same result - get no systemd installed in rootfs image and
system use "INIT" as usual as follows:

$ runqemu qemuarm64
...
root@qemuarm64:~# systemctl
-sh: systemctl: command not found
root@qemuarm64:~#
root@qemuarm64:~# ps aux | grep init
root         1  5.1  0.2   1764  1176 ?        Ss   01:57   0:04 init [5]

Regards,

Jin

Quoted 13 lines
Quoted 11 lines

Any help would be appreciated.

Jin

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

author
#4 lore raw
Quoted 1 line · Khem Raj

Put that in local.conf not in image recipe

Raj,

It works well now.

Cheers,

Jin

Quoted 63 lines · On Dec 25, 2015 5:57 PM, "Jin Li" <[email protected]…
    On 2015/12/25 13:55, Khem Raj wrote:
    > On Thu, Dec 24, 2015 at 5:59 PM, Jin Li <[email protected] <mailto:[email protected]>> wrote:
    >> Hi,
    >>
    >> I am trying to build yocto project which use systemd as system init manager.
    >> But the qemu boot up and still use INIT as usual. The rootfs even fail to install systemd.
    >>
    >> I refers to yocto docs http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#ref-features-distro
    >> I use meta/recipes-extended/images/core-image-full-cmdline.bb <http://core-image-full-cmdline.bb> and add the following part
    >> to support systemd:
    >>
    >> DISTRO_FEATURES_append = "systemd"
    >
    > space after first "
    >
    >> DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
    >>
    >> Did I miss somethings ?
    >>
    >
    > DISTRO_FEATURES_append = " systemd"
    > DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
    > VIRTUAL-RUNTIME_init_manager = "systemd"
    > VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
    >

    Hi Raj

    I used add the above code in meta/recipes-extended/images/core-image-full-cmdline.bb <http://core-image-full-cmdline.bb> to
    build image with systemd, but still get the same result - get no systemd installed in rootfs image and
    system use "INIT" as usual as follows:

    $ runqemu qemuarm64
    ...

    root@qemuarm64:~# systemctl
    -sh: systemctl: command not found
    root@qemuarm64:~#
    root@qemuarm64:~# ps aux | grep init
    root         1  5.1  0.2   1764  1176 ?        Ss   01:57   0:04 init [5]

    Regards,

    Jin

    >
    >> Any help would be appreciated.
    >>
    >> Jin
    >>
    >>
    >> --
    >> _______________________________________________
    >> yocto mailing list
    >> [email protected] <mailto:[email protected]>
    >> https://lists.yoctoproject.org/listinfo/yocto
    >
    >