Skip to contentSkip to conversation

Need Suggestion to upstream the changes with respect to systemd build failure in core-image-minimal. #poky

PATCH Rahul Chauhan 2 participants 2 messages Sep 5, 2020

lore
Share & tools
lore
#0 lore raw

Hi Community Members,

I was trying to build core-image-minimal with systemd support. Yocto Project Version 3.1 (dunfell).

To enable systemd as system init manager I added below lines in local.conf DISTRO_FEATURES_append = " systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

but during build it got failed.

/opt/Projects/eboards-project/project-layres/poky/meta/recipes-devtools/gcc/gcc-runtime_9.3.bb:do_populate_sysroot']

| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['pseudo-native', 'glibc', 'patch-native', 'quilt-native', 'gcc-cross-arm', 'gcc-runtime', 'linux-libc-headers', 'libgcc', 'flex-native', 'xz-native', 'libtool-native', 'automake-native', 'binutils-cross-arm', 'zlib-native', 'mpfr-native', 'texinfo-dummy-native', 'autoconf-native', 'libmpc-native', 'gnu-config-native', 'gmp-native', 'attr-native', 'm4-native', 'gettext-minimal-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| sed: -e expression #1, char 13: unterminated `s' command
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/opt/Projects/eboards-project/eboards-build/tmp/work/eb_beaglebone_black-poky-linux-gnueabi/systemd-serialgetty/1.0-r5/temp/run.do_install.11228' failed with exit code 1:
| sed: -e expression #1, char 13: unterminated `s' command
| WARNING: exit code 1 from a shell command.
|

ERROR: Task (/opt/Projects/eboards-project/project-layres/poky/meta/recipes-core/systemd/systemd-serialgetty.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1852 tasks of which 1847 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/opt/Projects/eboards-project/project-layres/poky/meta/recipes-core/systemd/systemd-serialgetty.bb:do_install
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

I debug the recipe and found the solution and created a patch which solved this issue for me.

rahul@rahul-Latitude-3460:/opt/Projects/eboards-project/project-layres/poky$ git diff
meta/recipes-core/systemd/systemd-serialgetty.bb +0 -0
index 044c6c5b67..059fccc2b6 100644
@@ -21,7 +21,7 @@ do_install() {

install -d ${D}${systemd_unitdir}/system/
install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/
install -m 0644 ${WORKDIR}/[email protected] ${D}${systemd_unitdir}/system/
-               sed -i -e s/\@BAUDRATE\@/$default_baudrate/g ${D}${systemd_unitdir}/system/[email protected] +               sed -i -e 's/\@BAUDRATE\@/$default_baudrate/g' ${D}${systemd_unitdir}/system/[email protected]

tmp="${SERIAL_CONSOLES}"
for entry in $tmp ; do

Can anyone please suggest me, to send this patch to upstream or this is not a bug this is my local system issue.

#1 lore raw
Quoted 41 lines · Rahul Chauhan

Hi Community Members,

I was trying to build core-image-minimal with systemd support. Yocto Project Version 3.1 (dunfell).

To enable systemd as system init manager I added below lines in local.conf DISTRO_FEATURES_append = " systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

but during build it got failed.

/opt/Projects/eboards-project/project-layres/poky/meta/recipes-devtools/gcc/gcc-runtime_9.3.bb:do_populate_sysroot']

| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['pseudo-native', 'glibc', 'patch-native', 'quilt-native', 'gcc-cross-arm', 'gcc-runtime', 'linux-libc-headers', 'libgcc', 'flex-native', 'xz-native', 'libtool-native', 'automake-native', 'binutils-cross-arm', 'zlib-native', 'mpfr-native', 'texinfo-dummy-native', 'autoconf-native', 'libmpc-native', 'gnu-config-native', 'gmp-native', 'attr-native', 'm4-native', 'gettext-minimal-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| sed: -e expression #1, char 13: unterminated `s' command
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/opt/Projects/eboards-project/eboards-build/tmp/work/eb_beaglebone_black-poky-linux-gnueabi/systemd-serialgetty/1.0-r5/temp/run.do_install.11228' failed with exit code 1:
| sed: -e expression #1, char 13: unterminated `s' command
| WARNING: exit code 1 from a shell command.
|

ERROR: Task (/opt/Projects/eboards-project/project-layres/poky/meta/recipes-core/systemd/systemd-serialgetty.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1852 tasks of which 1847 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/opt/Projects/eboards-project/project-layres/poky/meta/recipes-core/systemd/systemd-serialgetty.bb:do_install
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

I debug the recipe and found the solution and created a patch which solved this issue for me.

rahul@rahul-Latitude-3460:/opt/Projects/eboards-project/project-layres/poky$ git diff
meta/recipes-core/systemd/systemd-serialgetty.bb +0 -0
index 044c6c5b67..059fccc2b6 100644

meta/recipes-core/systemd/systemd-serialgetty.bb do_install() { · line 24

Quoted 5 lines
meta/recipes-core/systemd/systemd-serialgetty.bb +1 -1
@@ -21,7 +21,7 @@ do_install() {
                install -d ${D}${systemd_unitdir}/system/
                install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/
                install -m 0644 ${WORKDIR}/[email protected] ${D}${systemd_unitdir}/system/
-               sed -i -e s/\@BAUDRATE\@/$default_baudrate/g ${D}${systemd_unitdir}/system/[email protected]
+               sed -i -e 's/\@BAUDRATE\@/$default_baudrate/g' ${D}${systemd_unitdir}/system/[email protected]

this change is fine, please prepare a patch and send it to oe-core ml

Quoted 5 lines
meta/recipes-core/systemd/systemd-serialgetty.bb +0 -0
                tmp="${SERIAL_CONSOLES}"
                for entry in $tmp ; do
 

Can anyone please suggest me, to send this patch to upstream or this is not a bug this is my local system issue.