From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- ...-util.h-include-sys-reg.h-when-libc-glibc.patch | 33 +++++++++++ .../recipes-devtools/dracut/dracut_git.bb | 69 ++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch create mode 100644 meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb (limited to 'meta-openembedded/meta-initramfs/recipes-devtools/dracut') diff --git a/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch b/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch new file mode 100644 index 000000000..32714038b --- /dev/null +++ b/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch @@ -0,0 +1,33 @@ +From 06011ce55b1e892e863568a73d64eebc6389544f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 13 Jul 2017 17:14:05 -0700 +Subject: [PATCH] util.h: include when libc != glibc + +For musl libc it is required to include to +have __WORDSIZE defined to e.g. 32 for arm*-musl. + +Taken from void-linux +https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dracut/patches/musl-__wordsize.patch + +Signed-off-by: Khem Raj +--- + install/util.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/install/util.h b/install/util.h +index 2ad3254d..062626ec 100644 +--- a/install/util.h ++++ b/install/util.h +@@ -36,6 +36,9 @@ + #include + #include + #include ++#if !defined(__GLIBC__) ++#include ++#endif + + #include "macro.h" + +-- +2.13.2 + diff --git a/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb new file mode 100644 index 000000000..ccf9f6ab1 --- /dev/null +++ b/meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb @@ -0,0 +1,69 @@ +SUMMARY = "Initramfs generator using udev" +HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page" +DESCRIPTION = "Dracut is an event driven initramfs infrastructure. dracut (the tool) is used to create an initramfs image by copying tools and files from an installed system and combining it with the dracut framework, usually found in /usr/lib/dracut/modules.d." + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +PE = "1" +PV = "046+git${SRCREV}" + +# v046 tag +SRCREV = "a0799ffb554487a370c2a1adafaedd2021b6dc8c" +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 \ + " + +DEPENDS += "kmod" +DEPENDS_append_libc-musl = " fts" + +inherit bash-completion pkgconfig + +S = "${WORKDIR}/git" + +EXTRA_OECONF = "--prefix=${prefix} \ + --libdir=${prefix}/lib \ + --datadir=${datadir} \ + --sysconfdir=${sysconfdir} \ + --sbindir=${sbindir} \ + --disable-documentation \ + --bindir=${bindir} \ + --includedir=${includedir} \ + --localstatedir=${localstatedir} \ + " + +# RDEPEND on systemd optionally +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd" + +EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"' + +LDLIBS_append_libc-musl = " -lfts" + +do_configure() { + ./configure ${EXTRA_OECONF} +} + +do_install() { + oe_runmake install DESTDIR=${D} + # 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 +} + +FILES_${PN} += "${prefix}/lib/kernel \ + ${prefix}/lib/dracut \ + ${systemd_unitdir} \ + " +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" + +# This could be optimized a bit, but let's avoid non-booting systems :) +RRECOMMENDS_${PN} = " \ + kernel-modules \ + busybox \ + coreutils \ + " -- cgit v1.2.3