[oe-commits] [meta-openembedded] 03/08: dracut: Add execute_dracut opkg intercept script
git at git.openembedded.org
git at git.openembedded.org
Tue Feb 19 06:52:40 UTC 2019
This is an automated email from the git hooks/post-receive script.
khem pushed a commit to branch master-next
in repository meta-openembedded.
commit abe4916dafb1a988da260dfd09b072db72ec2948
Author: William A. Kennington III via Openembedded-devel <openembedded-devel at lists.openembedded.org>
AuthorDate: Mon Feb 18 11:47:01 2019 +0100
dracut: Add execute_dracut opkg intercept script
Signed-off-by: Böszörményi Zoltán <zboszor at pr.hu>
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
.../recipes-devtools/dracut/dracut/execute_dracut | 21 +++++++++++++++++++++
.../recipes-devtools/dracut/dracut_git.bb | 5 +++++
2 files changed, 26 insertions(+)
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 0000000..96bcc92
--- /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 aad3c68..dd94ac5 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"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list