From 5755998c09b1f993106659ad3ccd9272cebc5ee1 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 6 Jun 2013 18:43:54 +0200 Subject: [PATCH] linuxrc: add depmod call as workaround for missing modules.dep.bb busybox depmod -b is broken, and busybox modprobe does not seem to correctly deal with module dependencies. See bug #472312 --- defaults/initrd.scripts | 16 ++++++++++++++++ defaults/linuxrc | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 9b0e899..14378df 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -2,6 +2,22 @@ . /etc/initrd.defaults +# We should ship the initramfs with modules.dep.bb +# But current busybox depmod has broken -b support +# so we can't do that at build time, unless we want +# to chroot into the initramfs root, which is much more +# fragile. See bug #472312 +busybox_depmod_workaround() { + local depmod_args + if [ -n "${DEBUG}" ] + then + depmod_args="-v" + elif [ -n "${QUIET}" ]; then + depmod_args="-q" + fi + depmod ${depmod_args} +} + modules_load() { for module in $* do diff --git a/defaults/linuxrc b/defaults/linuxrc index 9ea305b..ad6af4b 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -320,6 +320,13 @@ mount_devfs # Mount sysfs mount_sysfs +# We should ship the initramfs with modules.dep.bb +# But current busybox depmod has broken -b support +# so we can't do that at build time, unless we want +# to chroot into the initramfs root, which is much more +# fragile. See bug #472312 +busybox_depmod_workaround + # Initialize mdev good_msg 'Activating mdev' -- 1.8.2.1