diff options
author | Paul Sokolovsky <pmiscml@gmail.com> | 2008-02-06 16:08:02 +0000 |
---|---|---|
committer | Paul Sokolovsky <pmiscml@gmail.com> | 2008-02-06 16:08:02 +0000 |
commit | fe124765315ee602acc6b4c4a2f07f008a242ce1 (patch) | |
tree | d338edf16feaa0068308d5ee77a2b6a432b2f814 /packages | |
parent | 8183955add59156fb35c173d14bf250378b1b9ad (diff) | |
parent | 6b9c2ffba4d6d8dc85d3667c76af92a8cf53eacf (diff) |
merge of '55373d0f032518e68dd4f39df8983ede9ea7659b'
and 'a7d8d33ac7c9103154c98fde0a758a23c99ed439'
Diffstat (limited to 'packages')
-rw-r--r-- | packages/images/initramfs-bootmenu-image.bb | 2 | ||||
-rw-r--r-- | packages/initrdscripts/files/90-check-modules.sh | 24 | ||||
-rw-r--r-- | packages/initrdscripts/initramfs-module-check-modules_1.0.bb | 12 |
3 files changed, 37 insertions, 1 deletions
diff --git a/packages/images/initramfs-bootmenu-image.bb b/packages/images/initramfs-bootmenu-image.bb index a495363661..237aecb621 100644 --- a/packages/images/initramfs-bootmenu-image.bb +++ b/packages/images/initramfs-bootmenu-image.bb @@ -1,6 +1,6 @@ # Sample initramfs image -IMAGE_INSTALL = "busybox-static initramfs-module-bootmenu" +IMAGE_INSTALL = "busybox-static initramfs-module-bootmenu initramfs-module-check-modules" IMAGE_LINGUAS = "" # Remove any kernel-image that the kernel-module-* packages may have pulled in. diff --git a/packages/initrdscripts/files/90-check-modules.sh b/packages/initrdscripts/files/90-check-modules.sh new file mode 100644 index 0000000000..2423d7f8c5 --- /dev/null +++ b/packages/initrdscripts/files/90-check-modules.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# Check that modules for the current kernel exist, error out otherwise + +uname=`cat /proc/version` +ver=`expr "x$uname" : 'xLinux version \([^ ]\+\) '` + +if [ -n "$BOOT_ROOT" -a ! -d "$BOOT_ROOT/lib/modules/$ver" ]; then + echo -e "\033[1m====================" + echo "ERROR!" + echo "There are no modules for this kernel" + echo "version ($ver) in the root file " + echo "system, which will lead to boot failure or" + echo "broken functionally. If you performed" + echo "a kernel upgrade, make sure that version" + echo "installed in root filesystem matches" + echo "version used in bootloader." + echo -e "====================\033[0m" + echo + + echo "System halted" + while true; do + sleep 10000 + done +fi diff --git a/packages/initrdscripts/initramfs-module-check-modules_1.0.bb b/packages/initrdscripts/initramfs-module-check-modules_1.0.bb new file mode 100644 index 0000000000..6986316a6f --- /dev/null +++ b/packages/initrdscripts/initramfs-module-check-modules_1.0.bb @@ -0,0 +1,12 @@ +SRC_URI = "file://90-check-modules.sh" +PR = "r0" +DESCRIPTION = "An initramfs module for checking that kernel modules exist in rootfs" +RDEPENDS = "initramfs-uniboot" + +do_install() { + install -d ${D}/initrd.d + install -m 0755 ${WORKDIR}/90-check-modules.sh ${D}/initrd.d/ +} + +PACKAGE_ARCH = "all" +FILES_${PN} += " /initrd.d/* " |