Skip to contentSkip to conversation

dracut: add git version

PATCH New Koen Kooi 1 participant 1 message Jan 11, 2014

lore
Share & tools
lore

Koen Kooi

author
#0 lore raw

PATCH 1/1 dracut: add git version

---
 ...-xz-lzma-option-to-use-all-cores-for-mult.patch | 39 ++++++++++++++++++++++
 .../recipes-devtools/dracut/dracut_git.bb          | 38 +++++++++++++++++++++
 2 files changed, 77 insertions(+)
 create mode 100644 meta-initramfs/recipes-devtools/dracut/dracut/0001-Use-builtin-xz-lzma-option-to-use-all-cores-for-mult.patch
 create mode 100644 meta-initramfs/recipes-devtools/dracut/dracut_git.bb
meta-initramfs/recipes-devtools/dracut/dracut/0001-Use-builtin-xz-lzma-option-to-use-all-cores-for-mult.patch new file +39 -0
new file mode 100644
index 0000000..7dc62de
@@ -0,0 +1,39 @@
+From c92ea797c43aa811e98b6bd8fb4aae921fa08592 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <[email protected]>
+Date: Fri, 10 Jan 2014 21:11:40 +0100
+Subject: [PATCH] Use builtin xz/lzma option to use all cores for multihreaded
+ compression
+
+This removes the dependency on 'getconf' as well, which is not installed by default on my embedded systems.
+
+Signed-off-by: Koen Kooi <[email protected]>
+Upstream-status: Submitted
+
+---
+ dracut.sh | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/dracut.sh b/dracut.sh
+index 11dcd0e..2e6ea67 100755
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -697,14 +697,12 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
+ # eliminate IFS hackery when messing with fw_dir
+ fw_dir=${fw_dir//:/ }
+ 
+-cpu_count=$(getconf _NPROCESSORS_ONLN)
+-
+ # handle compression options.
+ [[ $compress ]] || compress="gzip"
+ case $compress in
+     bzip2) compress="bzip2 -9";;
+-    lzma)  compress="lzma -9 ${cpu_count:+-T$cpu_count}";;
+-    xz)    compress="xz --check=crc32 --lzma2=dict=1MiB ${cpu_count:+-T$cpu_count}";;
++    lzma)  compress="lzma -9 -T0";;
++    xz)    compress="xz --check=crc32 --lzma2=dict=1MiB -T0";;
+     gzip)  compress="gzip -9"; command -v pigz > /dev/null 2>&1 && compress="pigz -9";;
+     lzo)   compress="lzop -9";;
+     lz4)   compress="lz4 -9";;
+-- 
+1.8.0
+
meta-initramfs/recipes-devtools/dracut/dracut_git.bb new file +38 -0
new file mode 100644
index 0000000..ccc4e7d
@@ -0,0 +1,38 @@
+SUMMARY = "Initramfs generator using udev"
+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"
+
+SRCREV = "bb1ba3a1ca9dd6284f6319eb197de4a757a7f99d"
+SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git \
+           file://0001-Use-builtin-xz-lzma-option-to-use-all-cores-for-mult.patch \
+          "
+
+S = "${WORKDIR}/git"
+
+do_configure() {
+    ./configure --prefix=${prefix} \
+                --libdir=${libdir} \
+                --datadir=${datadir} \
+                --sysconfdir=${sysconfdir} \
+                --sbindir=${sbindir} \
+                --disable-documentation \
+                --bindir=${bindir} \
+                --includedir=${includedir} \
+                --localstatedir=${localstatedir} \
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D}
+}
+
+FILES_${PN} += "${datadir}/bash-completion \ 
+                ${libdir}/kernel \
+               "
+
+RDEPENDS_${PN} = "systemd findutils cpio util-linux-blkid bash ldd"
+# This could be optimized a bit, but let's avoid non-booting systems :)
+RRECOMMENDS_${PN} = " \
+                     kernel-modules \ 
+                    "
Signature · 1 line
1.8.4.2