All of lore.kernel.org
 help / color / mirror / Atom feed
* Addendum to dracut in rootfs
@ 2019-02-20  4:37 Böszörményi Zoltán
  2019-02-20  4:37 ` [meta-oe][PATCH 1/3] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd Böszörményi Zoltán
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-20  4:37 UTC (permalink / raw)
  To: openembedded-devel

According to build testing for different architectures.

Best regards,
Zoltán Böszörményi




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [meta-oe][PATCH 1/3] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd
  2019-02-20  4:37 Addendum to dracut in rootfs Böszörményi Zoltán
@ 2019-02-20  4:37 ` Böszörményi Zoltán
  2019-02-20  4:37 ` [meta-initramfs][PATCH 2/3] dracut: Use "plymouth_initrd" DISTRO_FEATURE for dependency on plymouth-initrd Böszörményi Zoltán
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-20  4:37 UTC (permalink / raw)
  To: openembedded-devel

The new DISTRO_FEATURES knob is "plymouth_initrd".

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
index a5b16c979..b7be9f04b 100644
--- a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
+++ b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
@@ -36,7 +36,6 @@ PACKAGECONFIG_append_x86-64 = " drm"
 PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
 PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
 PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
-PACKAGECONFIG[initrd] = ",,,"
 
 LOGO ??= "${datadir}/plymouth/bizcom.png"
 
@@ -46,12 +45,12 @@ do_install_append() {
     # Remove /var/run from package as plymouth will populate it on startup
     rm -fr "${D}${localstatedir}/run"
 
-    if ! ${@bb.utils.contains('PACKAGECONFIG', 'initrd', 'true', 'false', d)}; then
+    if ! ${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', 'true', 'false', d)}; then
         rm -rf "${D}${libexecdir}"
     fi
 }
 
-PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'initrd', '${PN}-initrd ', '', d)}"
+PACKAGES =. "${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', '${PN}-initrd ', '', d)}"
 PACKAGES =+ "${PN}-set-default-theme"
 
 FILES_${PN}-initrd = "${libexecdir}/plymouth/*"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 2/3] dracut: Use "plymouth_initrd" DISTRO_FEATURE for dependency on plymouth-initrd
  2019-02-20  4:37 Addendum to dracut in rootfs Böszörményi Zoltán
  2019-02-20  4:37 ` [meta-oe][PATCH 1/3] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd Böszörményi Zoltán
@ 2019-02-20  4:37 ` Böszörményi Zoltán
  2019-02-20  4:37 ` [meta-initramfs][PATCH 3/3] dracut: Use architecture override to RRECOMMEND intel-microcode Böszörményi Zoltán
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-20  4:37 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 meta-initramfs/recipes-devtools/dracut/dracut_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index a148dc83f..4efdf39f6 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -68,8 +68,9 @@ CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
 
 RDEPENDS_${PN}_class-target = " \
                      findutils cpio util-linux-blkid util-linux-getopt util-linux-losetup util-linux-umount util-linux \
-                     bash ldd xz plymouth-initrd kbd-consolefonts kbd-consoletrans kbd-keymaps kbd-unimaps gzip tar sed \
+                     bash ldd xz kbd-consolefonts kbd-consoletrans kbd-keymaps kbd-unimaps gzip tar sed \
                      openssh-scp openssh-ssh linux-firmware \
+                     ${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', 'plymouth-initrd', '', d)} \
                      ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
                     "
 RDEPENDS_${PN}_class-native = "coreutils-native findutils-native cpio-native util-linux-native bash-native cross-compiler-ldd"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 3/3] dracut: Use architecture override to RRECOMMEND intel-microcode
  2019-02-20  4:37 Addendum to dracut in rootfs Böszörményi Zoltán
  2019-02-20  4:37 ` [meta-oe][PATCH 1/3] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd Böszörményi Zoltán
  2019-02-20  4:37 ` [meta-initramfs][PATCH 2/3] dracut: Use "plymouth_initrd" DISTRO_FEATURE for dependency on plymouth-initrd Böszörményi Zoltán
@ 2019-02-20  4:37 ` Böszörményi Zoltán
  2019-02-20  4:51 ` Addendum to dracut in rootfs v2 Böszörményi Zoltán
  2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
  4 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-20  4:37 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 meta-initramfs/recipes-devtools/dracut/dracut_git.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index 4efdf39f6..e168e05a6 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -80,7 +80,9 @@ RRECOMMENDS_${PN}_class-target = " \
                      kernel-modules \
                      busybox \
                      coreutils \
-                     intel-microcode \
                     "
 
+RRECOMMENDS_${PN}_append_x86 = " intel-microcode "
+RRECOMMENDS_${PN}_append_x86-64 = " intel-microcode "
+
 BBCLASSEXTEND = "native"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Addendum to dracut in rootfs v2
  2019-02-20  4:37 Addendum to dracut in rootfs Böszörményi Zoltán
                   ` (2 preceding siblings ...)
  2019-02-20  4:37 ` [meta-initramfs][PATCH 3/3] dracut: Use architecture override to RRECOMMEND intel-microcode Böszörményi Zoltán
@ 2019-02-20  4:51 ` Böszörményi Zoltán
  2019-02-20  4:51   ` [meta-oe][PATCH 1/4] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd Böszörményi Zoltán
                     ` (3 more replies)
  2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
  4 siblings, 4 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-20  4:51 UTC (permalink / raw)
  To: openembedded-devel

According to build testing for different architectures.

v2: dracut.bbclass needs to conditionally depend on systemd DISTRO_FEATURE




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [meta-oe][PATCH 1/4] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd
  2019-02-20  4:51 ` Addendum to dracut in rootfs v2 Böszörményi Zoltán
@ 2019-02-20  4:51   ` Böszörményi Zoltán
  2019-02-20  4:51   ` [meta-initramfs][PATCH 2/4] dracut: Use "plymouth_initrd" DISTRO_FEATURE for dependency on plymouth-initrd Böszörményi Zoltán
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-20  4:51 UTC (permalink / raw)
  To: openembedded-devel

The new DISTRO_FEATURES knob is "plymouth_initrd".

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
index a5b16c979..b7be9f04b 100644
--- a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
+++ b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
@@ -36,7 +36,6 @@ PACKAGECONFIG_append_x86-64 = " drm"
 PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
 PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
 PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
-PACKAGECONFIG[initrd] = ",,,"
 
 LOGO ??= "${datadir}/plymouth/bizcom.png"
 
@@ -46,12 +45,12 @@ do_install_append() {
     # Remove /var/run from package as plymouth will populate it on startup
     rm -fr "${D}${localstatedir}/run"
 
-    if ! ${@bb.utils.contains('PACKAGECONFIG', 'initrd', 'true', 'false', d)}; then
+    if ! ${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', 'true', 'false', d)}; then
         rm -rf "${D}${libexecdir}"
     fi
 }
 
-PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'initrd', '${PN}-initrd ', '', d)}"
+PACKAGES =. "${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', '${PN}-initrd ', '', d)}"
 PACKAGES =+ "${PN}-set-default-theme"
 
 FILES_${PN}-initrd = "${libexecdir}/plymouth/*"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 2/4] dracut: Use "plymouth_initrd" DISTRO_FEATURE for dependency on plymouth-initrd
  2019-02-20  4:51 ` Addendum to dracut in rootfs v2 Böszörményi Zoltán
  2019-02-20  4:51   ` [meta-oe][PATCH 1/4] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd Böszörményi Zoltán
@ 2019-02-20  4:51   ` Böszörményi Zoltán
  2019-02-20  4:51   ` [meta-initramfs][PATCH 3/4] dracut: Use architecture override to RRECOMMEND intel-microcode Böszörményi Zoltán
  2019-02-20  4:51   ` [meta-initramfs][PATCH 4/4] dracut.bbclass: Use systemd DISTRO_FEATURE to depend on systemd Böszörményi Zoltán
  3 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-20  4:51 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 meta-initramfs/recipes-devtools/dracut/dracut_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index a148dc83f..4efdf39f6 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -68,8 +68,9 @@ CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
 
 RDEPENDS_${PN}_class-target = " \
                      findutils cpio util-linux-blkid util-linux-getopt util-linux-losetup util-linux-umount util-linux \
-                     bash ldd xz plymouth-initrd kbd-consolefonts kbd-consoletrans kbd-keymaps kbd-unimaps gzip tar sed \
+                     bash ldd xz kbd-consolefonts kbd-consoletrans kbd-keymaps kbd-unimaps gzip tar sed \
                      openssh-scp openssh-ssh linux-firmware \
+                     ${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', 'plymouth-initrd', '', d)} \
                      ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
                     "
 RDEPENDS_${PN}_class-native = "coreutils-native findutils-native cpio-native util-linux-native bash-native cross-compiler-ldd"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 3/4] dracut: Use architecture override to RRECOMMEND intel-microcode
  2019-02-20  4:51 ` Addendum to dracut in rootfs v2 Böszörményi Zoltán
  2019-02-20  4:51   ` [meta-oe][PATCH 1/4] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd Böszörményi Zoltán
  2019-02-20  4:51   ` [meta-initramfs][PATCH 2/4] dracut: Use "plymouth_initrd" DISTRO_FEATURE for dependency on plymouth-initrd Böszörményi Zoltán
@ 2019-02-20  4:51   ` Böszörményi Zoltán
  2019-02-20  4:51   ` [meta-initramfs][PATCH 4/4] dracut.bbclass: Use systemd DISTRO_FEATURE to depend on systemd Böszörményi Zoltán
  3 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-20  4:51 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 meta-initramfs/recipes-devtools/dracut/dracut_git.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index 4efdf39f6..e168e05a6 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -80,7 +80,9 @@ RRECOMMENDS_${PN}_class-target = " \
                      kernel-modules \
                      busybox \
                      coreutils \
-                     intel-microcode \
                     "
 
+RRECOMMENDS_${PN}_append_x86 = " intel-microcode "
+RRECOMMENDS_${PN}_append_x86-64 = " intel-microcode "
+
 BBCLASSEXTEND = "native"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 4/4] dracut.bbclass: Use systemd DISTRO_FEATURE to depend on systemd
  2019-02-20  4:51 ` Addendum to dracut in rootfs v2 Böszörményi Zoltán
                     ` (2 preceding siblings ...)
  2019-02-20  4:51   ` [meta-initramfs][PATCH 3/4] dracut: Use architecture override to RRECOMMEND intel-microcode Böszörményi Zoltán
@ 2019-02-20  4:51   ` Böszörményi Zoltán
  3 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-20  4:51 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 meta-initramfs/classes/dracut.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-initramfs/classes/dracut.bbclass b/meta-initramfs/classes/dracut.bbclass
index 3c1421df8..58c4493a3 100644
--- a/meta-initramfs/classes/dracut.bbclass
+++ b/meta-initramfs/classes/dracut.bbclass
@@ -76,7 +76,7 @@ DRACUT_DEPENDS = " \
 			ldconfig-native coreutils-native findutils-native \
 			cpio-native util-linux-native kmod-native xz-native \
 			dracut-native pkgconfig-native cross-compiler-ldd \
-			systemd \
+			${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
 		"
 DEPENDS_append_class-target = " ${DRACUT_DEPENDS}"
 PACKAGE_WRITE_DEPS_append = " ${DRACUT_DEPENDS}"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs
  2019-02-20  4:37 Addendum to dracut in rootfs Böszörményi Zoltán
                   ` (3 preceding siblings ...)
  2019-02-20  4:51 ` Addendum to dracut in rootfs v2 Böszörményi Zoltán
@ 2019-02-26  9:54 ` Böszörményi Zoltán
  2019-02-26  9:54   ` [meta-initramfs][PATCH 1/7] cross-compiler-ldd: add new recipe Böszörményi Zoltán
                     ` (6 more replies)
  4 siblings, 7 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-26  9:54 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj

This patchset adds the necessary pieces to create the initramfs
with dracut during do_rootfs.

The 7th patch references a GitHub branch for which a pull request
was made against dracut. See: https://github.com/dracutdevs/dracut/pull/535

Best regards,
Zoltán Böszörményi




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 1/7] cross-compiler-ldd: add new recipe
  2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
@ 2019-02-26  9:54   ` Böszörményi Zoltán
  2019-02-26  9:54   ` [meta-initramfs][PATCH 2/7 v3] dracut: Allow native build Böszörményi Zoltán
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-26  9:54 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj

dracut runs ldd internally when discovering library dependencies
for executables. cross-compiler-ldd is needed so dracut may
eventually run while creating the rootfs.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 .../cross-compile-ldd-fix-infinite-loop.patch | 19 +++++++++++
 .../dracut/cross-compiler-ldd_git.bb          | 33 +++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 meta-initramfs/recipes-devtools/dracut/cross-compiler-ldd/cross-compile-ldd-fix-infinite-loop.patch
 create mode 100644 meta-initramfs/recipes-devtools/dracut/cross-compiler-ldd_git.bb

diff --git a/meta-initramfs/recipes-devtools/dracut/cross-compiler-ldd/cross-compile-ldd-fix-infinite-loop.patch b/meta-initramfs/recipes-devtools/dracut/cross-compiler-ldd/cross-compile-ldd-fix-infinite-loop.patch
new file mode 100644
index 000000000..4aae731d1
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/dracut/cross-compiler-ldd/cross-compile-ldd-fix-infinite-loop.patch
@@ -0,0 +1,19 @@
+diff --git a/cross-compile-ldd b/cross-compile-ldd
+index ef2ca20..332d57f 100644
+--- a/cross-compile-ldd
++++ b/cross-compile-ldd
+@@ -337,13 +337,13 @@ do_scan_etc_ldsoconf() {
+ # Build up the full list of search directories
+ declare -a needed_search_path
+ do_trace "Adding basic lib dirs\n"
+-ld_library_path="${ld_library_path}:"
+ while [ -n "${ld_library_path}" ]; do
+     d="${ld_library_path%%:*}"
+     if [ -n "${d}" ]; then
+         do_trace "-> adding search dir '%s'\n" "${d}"
+         needed_search_path+=( "${d}" )
+     fi
++    [[ "$ld_library_path" == "${ld_library_path#*:}" ]] && break
+     ld_library_path="${ld_library_path#*:}"
+ done
+ do_trace "Done adding basic lib dirs\n"
diff --git a/meta-initramfs/recipes-devtools/dracut/cross-compiler-ldd_git.bb b/meta-initramfs/recipes-devtools/dracut/cross-compiler-ldd_git.bb
new file mode 100644
index 000000000..f8b7906ea
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/dracut/cross-compiler-ldd_git.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Cross-compiler LDD"
+HOMEPAGE = "https://gist.github.com/c403786c1394f53f44a3b61214489e6f"
+BUGTRACKER = ""
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://cross-compile-ldd;beginline=53;endline=57;md5=2b29d19d18a430b931dda3750e865c84"
+
+SRCBRANCH = "master"
+SRCREV = "eb44581caf7dd60b149a6691abef46264c46e866"
+SRC_URI = " \
+			git://gist.github.com/c403786c1394f53f44a3b61214489e6f.git;protocol=https;branch=${SRCBRANCH} \
+			file://cross-compile-ldd-fix-infinite-loop.patch \
+		"
+
+S = "${WORKDIR}/git"
+
+inherit siteinfo
+
+SYSROOT_PREPROCESS_FUNCS += " cross_ldd_populate_sysroot "
+
+cross_ldd_populate_sysroot() {
+	mkdir -p ${SYSROOT_DESTDIR}${bindir_crossscripts}
+	cat ${S}/cross-compile-ldd | \
+		sed \
+			-e "s,^prefix=.*$,prefix=${TARGET_SYS}," \
+			-e "s,^bits=.*$,bits=${SITEINFO_BITS}," \
+			-e "s,^ld_library_path=.*$,ld_library_path=${LD_LIBRARY_PATH:-/lib:/usr/lib}," \
+		>${SYSROOT_DESTDIR}${bindir_crossscripts}/ldd
+	chmod +x ${SYSROOT_DESTDIR}${bindir_crossscripts}/ldd
+}
+
+DEPENDS = "coreutils-native sed-native binutils-cross-${TARGET_ARCH} gcc-cross-${TARGET_ARCH}"
+PACKAGE_WRITE_DEPS = "coreutils-native sed-native binutils-cross-${TARGET_ARCH} gcc-cross-${TARGET_ARCH}"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 2/7 v3] dracut: Allow native build
  2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
  2019-02-26  9:54   ` [meta-initramfs][PATCH 1/7] cross-compiler-ldd: add new recipe Böszörményi Zoltán
@ 2019-02-26  9:54   ` Böszörményi Zoltán
  2019-02-26  9:54   ` [meta-initramfs][PATCH 3/7 v2] dracut: Add execute_dracut opkg intercept script Böszörményi Zoltán
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-26  9:54 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj

For useful modules to be successfully included into the initramfs,
the dependencies must be extended.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: Only RDEPEND on systemd if DISTRO_FEATURES has it.

v3: Use plymouth_initrd DISTRO_FEATURE to depend on plymouth-initrd.

 .../recipes-devtools/dracut/dracut_git.bb        | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index dd2e8bbb3..a1d7cb119 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -59,11 +59,23 @@ FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
 
 CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
 
-RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
+RDEPENDS_${PN}_class-target = " \
+                     findutils cpio util-linux-blkid util-linux-getopt util-linux-losetup util-linux-umount util-linux \
+                     bash ldd xz kbd-consolefonts kbd-consoletrans kbd-keymaps kbd-unimaps gzip tar sed \
+                     openssh-scp openssh-ssh linux-firmware \
+                     ${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', 'plymouth-initrd', '', d)} \
+                     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+                    "
+RDEPENDS_${PN}_class-native = "coreutils-native findutils-native cpio-native util-linux-native bash-native cross-compiler-ldd"
 
 # This could be optimized a bit, but let's avoid non-booting systems :)
-RRECOMMENDS_${PN} = " \
+RRECOMMENDS_${PN}_class-target = " \
                      kernel-modules \
                      busybox \
                      coreutils \
                     "
+
+RRECOMMENDS_${PN}_append_x86_class-target = " intel-microcode "
+RRECOMMENDS_${PN}_append_x86-64_class-target = " intel-microcode "
+
+BBCLASSEXTEND = "native"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 3/7 v2] dracut: Add execute_dracut opkg intercept script
  2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
  2019-02-26  9:54   ` [meta-initramfs][PATCH 1/7] cross-compiler-ldd: add new recipe Böszörményi Zoltán
  2019-02-26  9:54   ` [meta-initramfs][PATCH 2/7 v3] dracut: Allow native build Böszörményi Zoltán
@ 2019-02-26  9:54   ` Böszörményi Zoltán
  2019-03-03 22:05     ` Khem Raj
  2019-02-26  9:54   ` [meta-initramfs][PATCH 4/7] meta-initramfs: Add postinst-intercepts/execute_dracut Böszörményi Zoltán
                     ` (3 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-26  9:54 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: The script name is execute_dracut, not execute-dracut
    so it is identical to the postinst-intercepts variant.

 .../dracut/dracut/execute_dracut              | 21 +++++++++++++++++++
 .../recipes-devtools/dracut/dracut_git.bb     |  5 +++++
 2 files changed, 26 insertions(+)
 create mode 100755 meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut

diff --git a/meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut b/meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut
new file mode 100755
index 000000000..96bcc92ed
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ ! -f $OPKG_INTERCEPT_DIR/execute-dracut ]; then
+	KERNEL_VERSION=$1
+	shift
+	MY_KERNEL_VERSION=$(readlink /boot/bzimage | sed 's,^.*bzImage-,,')
+	if [[ -z "$MY_KERNEL_VERSION" ]]; then
+		if [[ -d /lib/modules/$KERNEL_VERSION ]]; then
+			MY_KERNEL_VERSION="${KERNEL_VERSION}"
+		fi
+	fi
+	[[ -z "$MY_KERNEL_VERSION" ]] && echo COULD NOT DETERMINE KERNEL VERSION TO RUN DEPMOD AND DRACUT && echo PLEASE DO IT MANUALLY && exit 0
+	cat <<EOF > $OPKG_INTERCEPT_DIR/execute-dracut
+echo RUNNING: depmod -a $MY_KERNEL_VERSION
+depmod -a $MY_KERNEL_VERSION
+echo RUNNING: dracut -f $@ /boot/initramfs.img $MY_KERNEL_VERSION
+echo "dracut: $(dracut --help | grep 'Version:')"
+dracut -f $@ /boot/initramfs.img $MY_KERNEL_VERSION
+EOF
+	chmod +x $OPKG_INTERCEPT_DIR/execute-dracut
+fi
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index a1d7cb119..cb49d9539 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -12,6 +12,7 @@ PV = "049"
 SRCREV = "225e4b94cbdb702cf512490dcd2ad9ca5f5b22c1"
 SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
            file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
+           file://execute_dracut \
            "
 
 DEPENDS += "kmod"
@@ -49,11 +50,15 @@ do_install() {
     # Its Makefile uses cp -arx to install modules.d, so fix the owner
     # to root:root
     chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
+
+    install -d -m0755 ${D}${datadir}/opkg/intercept
+    install -m0755 ${WORKDIR}/execute_dracut ${D}${datadir}/opkg/intercept
 }
 
 FILES_${PN} += "${prefix}/lib/kernel \
                 ${prefix}/lib/dracut \
                 ${systemd_unitdir} \
+                ${datadir}/opkg/intercept \
                "
 FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 4/7] meta-initramfs: Add postinst-intercepts/execute_dracut
  2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
                     ` (2 preceding siblings ...)
  2019-02-26  9:54   ` [meta-initramfs][PATCH 3/7 v2] dracut: Add execute_dracut opkg intercept script Böszörményi Zoltán
@ 2019-02-26  9:54   ` Böszörményi Zoltán
  2019-02-26  9:55   ` [meta-initramfs][PATCH 5/7 v3] classes/dracut.bbclass: add new bbclass Böszörményi Zoltán
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-26  9:54 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj

So dracut can be triggered to run during do_rootfs.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 .../postinst-intercepts/execute_dracut          | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100755 meta-initramfs/postinst-intercepts/execute_dracut

diff --git a/meta-initramfs/postinst-intercepts/execute_dracut b/meta-initramfs/postinst-intercepts/execute_dracut
new file mode 100755
index 000000000..78d81a902
--- /dev/null
+++ b/meta-initramfs/postinst-intercepts/execute_dracut
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+export \
+	prefix dracutsysrootdir \
+	systemdutildir systemdsystemunitdir systemdsystemconfdir udevdir \
+	DRACUT_ARCH DRACUT_TESTBIN DRACUT_LDD DRACUT_LDCONFIG \
+	DRACUT_COMPRESS_LZMA DRACUT_INSTALL DRACUT_INSTALL_PATH
+
+[[ -d $DRACUT_TMPDIR ]] || mkdir -p $DRACUT_TMPDIR
+
+echo RUNNING: depmod $DEPMODOPT -a $MY_KERNEL_VERSION
+depmod $DEPMODOPT -a $MY_KERNEL_VERSION
+echo "dracut: $(dracut --help | grep 'Version:')"
+echo RUNNING: dracut -f --tmpdir $DRACUT_TMPDIR $DRACUT_OPTS $DEBUGOPTS $EXTRAOPTS $D/boot/initramfs.img $MY_KERNEL_VERSION
+dracut -f --tmpdir $DRACUT_TMPDIR $DRACUT_OPTS $DEBUGOPTS $EXTRAOPTS $D/boot/initramfs.img $MY_KERNEL_VERSION
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 5/7 v3] classes/dracut.bbclass: add new bbclass
  2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
                     ` (3 preceding siblings ...)
  2019-02-26  9:54   ` [meta-initramfs][PATCH 4/7] meta-initramfs: Add postinst-intercepts/execute_dracut Böszörményi Zoltán
@ 2019-02-26  9:55   ` Böszörményi Zoltán
  2019-02-26  9:55   ` [meta-oe][PATCH 6/7] plymouth: Use plymouth_initrd DISTRO_FEATURE Böszörményi Zoltán
  2019-02-26  9:55   ` [meta-initramfs][PATCH 7/7] dracut: use the code that allows running under do_rootfs Böszörményi Zoltán
  6 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-26  9:55 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj

dracut.bbclass can be used from kernel or other recipes, like
custom dracut modules or plymouth boot splash themes.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: Use ${TUNE_ARCH} so allarch packages can use this bbclass.

v3: Conditionally depend on systemd based on DISTRO_FEATURES.

 meta-initramfs/classes/dracut.bbclass | 82 +++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)
 create mode 100644 meta-initramfs/classes/dracut.bbclass

diff --git a/meta-initramfs/classes/dracut.bbclass b/meta-initramfs/classes/dracut.bbclass
new file mode 100644
index 000000000..58c4493a3
--- /dev/null
+++ b/meta-initramfs/classes/dracut.bbclass
@@ -0,0 +1,82 @@
+DRACUT_PN ??= "${PN}"
+DRACUT_OPTS ??= "--early-microcode --lzma"
+
+python __anonymous () {
+    pkg = d.getVar("DRACUT_PN", True)
+    if pkg != 'dracut':
+        d.appendVar("RDEPENDS_%s" % pkg, " dracut ")
+    if not pkg.startswith('kernel'):
+        d.appendVarFlag("do_configure", "depends", "virtual/kernel:do_shared_workdir")
+        d.appendVarFlag("do_compile", "depends", "virtual/kernel:do_compile_kernelmodules")
+}
+
+export BUILD_TIME_KERNEL_VERSION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
+
+dracut_postinst () {
+	MY_KERNEL_VERSION=$(readlink $D/boot/bzimage | sed 's,^.*bzImage-,,')
+	if [[ -z "$MY_KERNEL_VERSION" ]]; then
+		MY_KERNEL_VERSION="${KERNEL_VERSION}"
+	fi
+	if [[ -z "$MY_KERNEL_VERSION" ]]; then
+		MY_KERNEL_VERSION="${BUILD_TIME_KERNEL_VERSION}"
+	fi
+	if [[ -z "$MY_KERNEL_VERSION" ]]; then
+		exit 1
+	fi
+
+	if [ -n "$D" ]; then
+		#DEBUGOPTS="--debug --keep"
+		DEBUGOPTS="--keep"
+
+		# We have to unset "prefix" as dracut uses it to move files around.
+		# Yocto has it set as part of the build environment.
+		$INTERCEPT_DIR/postinst_intercept execute_dracut ${PKG} mlprefix=${MLPREFIX} \
+			prefix= \
+			MY_KERNEL_VERSION=$MY_KERNEL_VERSION \
+			DEPMODOPT="\"-b $D\"" \
+			dracutsysrootdir=$D \
+			DEBUGOPTS="\"$DEBUGOPTS\"" \
+			DRACUT_OPTS="\"${DRACUT_OPTS}\"" \
+			EXTRAOPTS="\"-k $D/lib/modules/$MY_KERNEL_VERSION\"" \
+			systemdutildir=${systemd_unitdir} \
+			systemdsystemunitdir=${systemd_system_unitdir} \
+			systemdsystemconfdir=/etc/systemd/system \
+			udevdir=/usr/lib/udev \
+			DRACUT_TMPDIR=${WORKDIR}/dracut-tmpdir \
+			DRACUT_ARCH="${TUNE_ARCH}" \
+			DRACUT_TESTBIN=/bin/bash.bash \
+			DRACUT_COMPRESS_LZMA=$NATIVE_ROOT/usr/bin/lzma \
+			DRACUT_LDD="\"PATH='$PATH' ${STAGING_BINDIR_CROSS}/ldd --root $D\"" \
+			DRACUT_LDCONFIG=$NATIVE_ROOT/usr/bin/ldconfig \
+			DRACUT_INSTALL="\"$NATIVE_ROOT/usr/lib/dracut/dracut-install\"" \
+			DRACUT_INSTALL_PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+	else
+		execute_dracut $MY_KERNEL_VERSION ${DRACUT_OPTS}
+	fi
+}
+
+dracut_populate_packages[vardeps] += "dracut_postinst"
+
+python dracut_populate_packages() {
+    localdata = d.createCopy()
+
+    pkg = d.getVar('DRACUT_PN', True)
+
+    postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+    if not postinst:
+        postinst = '#!/bin/sh\n'
+    postinst += localdata.getVar('dracut_postinst', True)
+    d.setVar('pkg_postinst_%s' % pkg, postinst)
+}
+
+PACKAGESPLITFUNCS_prepend = "dracut_populate_packages "
+
+DRACUT_DEPENDS = " \
+			binutils-cross-${TUNE_ARCH} gcc-cross-${TUNE_ARCH} \
+			ldconfig-native coreutils-native findutils-native \
+			cpio-native util-linux-native kmod-native xz-native \
+			dracut-native pkgconfig-native cross-compiler-ldd \
+			${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+		"
+DEPENDS_append_class-target = " ${DRACUT_DEPENDS}"
+PACKAGE_WRITE_DEPS_append = " ${DRACUT_DEPENDS}"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-oe][PATCH 6/7] plymouth: Use plymouth_initrd DISTRO_FEATURE
  2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
                     ` (4 preceding siblings ...)
  2019-02-26  9:55   ` [meta-initramfs][PATCH 5/7 v3] classes/dracut.bbclass: add new bbclass Böszörményi Zoltán
@ 2019-02-26  9:55   ` Böszörményi Zoltán
  2019-02-26 18:16     ` Khem Raj
  2019-02-26  9:55   ` [meta-initramfs][PATCH 7/7] dracut: use the code that allows running under do_rootfs Böszörményi Zoltán
  6 siblings, 1 reply; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-26  9:55 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj

dracut conditionally depends plymouth-initrd using the same
DISTRO_FEATURE knob.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
index a5b16c979..b7be9f04b 100644
--- a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
+++ b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
@@ -36,7 +36,6 @@ PACKAGECONFIG_append_x86-64 = " drm"
 PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
 PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
 PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
-PACKAGECONFIG[initrd] = ",,,"
 
 LOGO ??= "${datadir}/plymouth/bizcom.png"
 
@@ -46,12 +45,12 @@ do_install_append() {
     # Remove /var/run from package as plymouth will populate it on startup
     rm -fr "${D}${localstatedir}/run"
 
-    if ! ${@bb.utils.contains('PACKAGECONFIG', 'initrd', 'true', 'false', d)}; then
+    if ! ${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', 'true', 'false', d)}; then
         rm -rf "${D}${libexecdir}"
     fi
 }
 
-PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'initrd', '${PN}-initrd ', '', d)}"
+PACKAGES =. "${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', '${PN}-initrd ', '', d)}"
 PACKAGES =+ "${PN}-set-default-theme"
 
 FILES_${PN}-initrd = "${libexecdir}/plymouth/*"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [meta-initramfs][PATCH 7/7] dracut: use the code that allows running under do_rootfs
  2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
                     ` (5 preceding siblings ...)
  2019-02-26  9:55   ` [meta-oe][PATCH 6/7] plymouth: Use plymouth_initrd DISTRO_FEATURE Böszörményi Zoltán
@ 2019-02-26  9:55   ` Böszörményi Zoltán
  6 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-02-26  9:55 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
 meta-initramfs/recipes-devtools/dracut/dracut_git.bb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index cb49d9539..fdc4c1309 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -6,11 +6,13 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 PE = "1"
-PV = "049"
+PV = "050"
+PR = "r0.alpha.rootfs"
 
-# v048 tag
-SRCREV = "225e4b94cbdb702cf512490dcd2ad9ca5f5b22c1"
-SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
+# v049 tag plus run from a rootfs
+SRCBRANCH = "allow-separate-rootfs"
+SRCREV = "6fe40f64f923e61e17c9d3db06cf9bfe6e83a68a"
+SRC_URI = "git://github.com/zboszor/dracut.git;protocol=https;branch=${SRCBRANCH} \
            file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
            file://execute_dracut \
            "
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [meta-oe][PATCH 6/7] plymouth: Use plymouth_initrd DISTRO_FEATURE
  2019-02-26  9:55   ` [meta-oe][PATCH 6/7] plymouth: Use plymouth_initrd DISTRO_FEATURE Böszörményi Zoltán
@ 2019-02-26 18:16     ` Khem Raj
  0 siblings, 0 replies; 20+ messages in thread
From: Khem Raj @ 2019-02-26 18:16 UTC (permalink / raw)
  To: Böszörményi Zoltán; +Cc: openembeded-devel

On Tue, Feb 26, 2019 at 1:55 AM Böszörményi Zoltán <zboszor@pr.hu> wrote:
>
> dracut conditionally depends plymouth-initrd using the same
> DISTRO_FEATURE knob.
>

cant apply this on top of master-next, can you rebase and resend

> Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
> ---
>  meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
> index a5b16c979..b7be9f04b 100644
> --- a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
> +++ b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
> @@ -36,7 +36,6 @@ PACKAGECONFIG_append_x86-64 = " drm"
>  PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
>  PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
>  PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
> -PACKAGECONFIG[initrd] = ",,,"
>
>  LOGO ??= "${datadir}/plymouth/bizcom.png"
>
> @@ -46,12 +45,12 @@ do_install_append() {
>      # Remove /var/run from package as plymouth will populate it on startup
>      rm -fr "${D}${localstatedir}/run"
>
> -    if ! ${@bb.utils.contains('PACKAGECONFIG', 'initrd', 'true', 'false', d)}; then
> +    if ! ${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', 'true', 'false', d)}; then
>          rm -rf "${D}${libexecdir}"
>      fi
>  }
>
> -PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'initrd', '${PN}-initrd ', '', d)}"
> +PACKAGES =. "${@bb.utils.contains('DISTRO_FEATURES', 'plymouth_initrd', '${PN}-initrd ', '', d)}"
>  PACKAGES =+ "${PN}-set-default-theme"
>
>  FILES_${PN}-initrd = "${libexecdir}/plymouth/*"
> --
> 2.20.1
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [meta-initramfs][PATCH 3/7 v2] dracut: Add execute_dracut opkg intercept script
  2019-02-26  9:54   ` [meta-initramfs][PATCH 3/7 v2] dracut: Add execute_dracut opkg intercept script Böszörményi Zoltán
@ 2019-03-03 22:05     ` Khem Raj
  2019-03-04  9:04       ` Böszörményi Zoltán
  0 siblings, 1 reply; 20+ messages in thread
From: Khem Raj @ 2019-03-03 22:05 UTC (permalink / raw)
  To: Böszörményi Zoltán; +Cc: openembeded-devel

On Tue, Feb 26, 2019 at 1:55 AM Böszörményi Zoltán <zboszor@pr.hu> wrote:
>
> Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
> ---
> v2: The script name is execute_dracut, not execute-dracut
>     so it is identical to the postinst-intercepts variant.
>
>  .../dracut/dracut/execute_dracut              | 21 +++++++++++++++++++
>  .../recipes-devtools/dracut/dracut_git.bb     |  5 +++++
>  2 files changed, 26 insertions(+)
>  create mode 100755 meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut
>
> diff --git a/meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut b/meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut
> new file mode 100755
> index 000000000..96bcc92ed
> --- /dev/null
> +++ b/meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +
> +if [ ! -f $OPKG_INTERCEPT_DIR/execute-dracut ]; then
> +       KERNEL_VERSION=$1
> +       shift
> +       MY_KERNEL_VERSION=$(readlink /boot/bzimage | sed 's,^.*bzImage-,,')

this assumption breaks all image builds for qemux86 and qemux86_64
unless that is fixed, it will be hard to accept this series. bzImage
is not the kernel name always and may not be present in rootfs all the
time.

ERROR: yoe-simple-image-1.0-r0 do_rootfs: The postinstall intercept
hook 'execute_dracut' failed, details in
/mnt/a/yoe/build/tmp/work/qemux86-yoe-linux/yoe-s
imple-image/1.0-r0/temp/log.do_rootfs
ERROR: yoe-simple-image-1.0-r0 do_rootfs:
ERROR: yoe-simple-image-1.0-r0 do_rootfs: Function failed: do_rootfs



> +       if [[ -z "$MY_KERNEL_VERSION" ]]; then
> +               if [[ -d /lib/modules/$KERNEL_VERSION ]]; then
> +                       MY_KERNEL_VERSION="${KERNEL_VERSION}"
> +               fi
> +       fi
> +       [[ -z "$MY_KERNEL_VERSION" ]] && echo COULD NOT DETERMINE KERNEL VERSION TO RUN DEPMOD AND DRACUT && echo PLEASE DO IT MANUALLY && exit 0
> +       cat <<EOF > $OPKG_INTERCEPT_DIR/execute-dracut
> +echo RUNNING: depmod -a $MY_KERNEL_VERSION
> +depmod -a $MY_KERNEL_VERSION
> +echo RUNNING: dracut -f $@ /boot/initramfs.img $MY_KERNEL_VERSION
> +echo "dracut: $(dracut --help | grep 'Version:')"
> +dracut -f $@ /boot/initramfs.img $MY_KERNEL_VERSION
> +EOF
> +       chmod +x $OPKG_INTERCEPT_DIR/execute-dracut
> +fi
> diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
> index a1d7cb119..cb49d9539 100644
> --- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
> +++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
> @@ -12,6 +12,7 @@ PV = "049"
>  SRCREV = "225e4b94cbdb702cf512490dcd2ad9ca5f5b22c1"
>  SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
>             file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
> +           file://execute_dracut \
>             "
>
>  DEPENDS += "kmod"
> @@ -49,11 +50,15 @@ do_install() {
>      # Its Makefile uses cp -arx to install modules.d, so fix the owner
>      # to root:root
>      chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
> +
> +    install -d -m0755 ${D}${datadir}/opkg/intercept
> +    install -m0755 ${WORKDIR}/execute_dracut ${D}${datadir}/opkg/intercept
>  }
>
>  FILES_${PN} += "${prefix}/lib/kernel \
>                  ${prefix}/lib/dracut \
>                  ${systemd_unitdir} \
> +                ${datadir}/opkg/intercept \
>                 "
>  FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
>
> --
> 2.20.1
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [meta-initramfs][PATCH 3/7 v2] dracut: Add execute_dracut opkg intercept script
  2019-03-03 22:05     ` Khem Raj
@ 2019-03-04  9:04       ` Böszörményi Zoltán
  0 siblings, 0 replies; 20+ messages in thread
From: Böszörményi Zoltán @ 2019-03-04  9:04 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

2019. 03. 03. 23:05 keltezéssel, Khem Raj írta:
> On Tue, Feb 26, 2019 at 1:55 AM Böszörményi Zoltán <zboszor@pr.hu> wrote:
>>
>> Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
>> ---
>> v2: The script name is execute_dracut, not execute-dracut
>>      so it is identical to the postinst-intercepts variant.
>>
>>   .../dracut/dracut/execute_dracut              | 21 +++++++++++++++++++
>>   .../recipes-devtools/dracut/dracut_git.bb     |  5 +++++
>>   2 files changed, 26 insertions(+)
>>   create mode 100755 meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut
>>
>> diff --git a/meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut b/meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut
>> new file mode 100755
>> index 000000000..96bcc92ed
>> --- /dev/null
>> +++ b/meta-initramfs/recipes-devtools/dracut/dracut/execute_dracut
>> @@ -0,0 +1,21 @@
>> +#!/bin/sh
>> +
>> +if [ ! -f $OPKG_INTERCEPT_DIR/execute-dracut ]; then
>> +       KERNEL_VERSION=$1
>> +       shift
>> +       MY_KERNEL_VERSION=$(readlink /boot/bzimage | sed 's,^.*bzImage-,,')
> 
> this assumption breaks all image builds for qemux86 and qemux86_64
> unless that is fixed, it will be hard to accept this series. bzImage
> is not the kernel name always

I have read kernel.bbclass more closely and I can use ${KERNEL_IMAGETYPE}
and ${KERNEL_IMAGEDEST} to remove these assumptions.

> and may not be present in rootfs all the
> time.

Now, based on the code of kernel.bbclass, it's hard to believe that
the kernel image is not always present in rootfs.

According to the code in kernel.bbclass
${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} will always be
a symlink to ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} in the same
directory.

> 
> ERROR: yoe-simple-image-1.0-r0 do_rootfs: The postinstall intercept
> hook 'execute_dracut' failed, details in
> /mnt/a/yoe/build/tmp/work/qemux86-yoe-linux/yoe-s
> imple-image/1.0-r0/temp/log.do_rootfs
> ERROR: yoe-simple-image-1.0-r0 do_rootfs:
> ERROR: yoe-simple-image-1.0-r0 do_rootfs: Function failed: do_rootfs
> 
> 
> 
>> +       if [[ -z "$MY_KERNEL_VERSION" ]]; then
>> +               if [[ -d /lib/modules/$KERNEL_VERSION ]]; then
>> +                       MY_KERNEL_VERSION="${KERNEL_VERSION}"
>> +               fi
>> +       fi
>> +       [[ -z "$MY_KERNEL_VERSION" ]] && echo COULD NOT DETERMINE KERNEL VERSION TO RUN DEPMOD AND DRACUT && echo PLEASE DO IT MANUALLY && exit 0
>> +       cat <<EOF > $OPKG_INTERCEPT_DIR/execute-dracut
>> +echo RUNNING: depmod -a $MY_KERNEL_VERSION
>> +depmod -a $MY_KERNEL_VERSION
>> +echo RUNNING: dracut -f $@ /boot/initramfs.img $MY_KERNEL_VERSION
>> +echo "dracut: $(dracut --help | grep 'Version:')"
>> +dracut -f $@ /boot/initramfs.img $MY_KERNEL_VERSION
>> +EOF
>> +       chmod +x $OPKG_INTERCEPT_DIR/execute-dracut
>> +fi
>> diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
>> index a1d7cb119..cb49d9539 100644
>> --- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
>> +++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
>> @@ -12,6 +12,7 @@ PV = "049"
>>   SRCREV = "225e4b94cbdb702cf512490dcd2ad9ca5f5b22c1"
>>   SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
>>              file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
>> +           file://execute_dracut \
>>              "
>>
>>   DEPENDS += "kmod"
>> @@ -49,11 +50,15 @@ do_install() {
>>       # Its Makefile uses cp -arx to install modules.d, so fix the owner
>>       # to root:root
>>       chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
>> +
>> +    install -d -m0755 ${D}${datadir}/opkg/intercept
>> +    install -m0755 ${WORKDIR}/execute_dracut ${D}${datadir}/opkg/intercept
>>   }
>>
>>   FILES_${PN} += "${prefix}/lib/kernel \
>>                   ${prefix}/lib/dracut \
>>                   ${systemd_unitdir} \
>> +                ${datadir}/opkg/intercept \
>>                  "
>>   FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
>>
>> --
>> 2.20.1
>>
> 



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-03-04  9:04 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20  4:37 Addendum to dracut in rootfs Böszörményi Zoltán
2019-02-20  4:37 ` [meta-oe][PATCH 1/3] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd Böszörményi Zoltán
2019-02-20  4:37 ` [meta-initramfs][PATCH 2/3] dracut: Use "plymouth_initrd" DISTRO_FEATURE for dependency on plymouth-initrd Böszörményi Zoltán
2019-02-20  4:37 ` [meta-initramfs][PATCH 3/3] dracut: Use architecture override to RRECOMMEND intel-microcode Böszörményi Zoltán
2019-02-20  4:51 ` Addendum to dracut in rootfs v2 Böszörményi Zoltán
2019-02-20  4:51   ` [meta-oe][PATCH 1/4] plymouth: Use a new DISTRO_FEATURE to enable plymouth-initrd Böszörményi Zoltán
2019-02-20  4:51   ` [meta-initramfs][PATCH 2/4] dracut: Use "plymouth_initrd" DISTRO_FEATURE for dependency on plymouth-initrd Böszörményi Zoltán
2019-02-20  4:51   ` [meta-initramfs][PATCH 3/4] dracut: Use architecture override to RRECOMMEND intel-microcode Böszörményi Zoltán
2019-02-20  4:51   ` [meta-initramfs][PATCH 4/4] dracut.bbclass: Use systemd DISTRO_FEATURE to depend on systemd Böszörményi Zoltán
2019-02-26  9:54 ` [meta-initramfs][meta-oe][PATCH 0/7 v3] Run dracut from rootfs Böszörményi Zoltán
2019-02-26  9:54   ` [meta-initramfs][PATCH 1/7] cross-compiler-ldd: add new recipe Böszörményi Zoltán
2019-02-26  9:54   ` [meta-initramfs][PATCH 2/7 v3] dracut: Allow native build Böszörményi Zoltán
2019-02-26  9:54   ` [meta-initramfs][PATCH 3/7 v2] dracut: Add execute_dracut opkg intercept script Böszörményi Zoltán
2019-03-03 22:05     ` Khem Raj
2019-03-04  9:04       ` Böszörményi Zoltán
2019-02-26  9:54   ` [meta-initramfs][PATCH 4/7] meta-initramfs: Add postinst-intercepts/execute_dracut Böszörményi Zoltán
2019-02-26  9:55   ` [meta-initramfs][PATCH 5/7 v3] classes/dracut.bbclass: add new bbclass Böszörményi Zoltán
2019-02-26  9:55   ` [meta-oe][PATCH 6/7] plymouth: Use plymouth_initrd DISTRO_FEATURE Böszörményi Zoltán
2019-02-26 18:16     ` Khem Raj
2019-02-26  9:55   ` [meta-initramfs][PATCH 7/7] dracut: use the code that allows running under do_rootfs Böszörményi Zoltán

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.