install-modules: modules
$(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
modules_install
+ @./scripts/update-initramfs
install-scripts:
@# All the scripts we can use
--- /dev/null
+#!/bin/bash
+# Copyright 2009 Luis R. Rodriguez <mcgrof@gmail.com>
+#
+# Since we provide ssb, the Ethernet module b44 some people may
+# rely on it to netboot, so update the initrafms for each
+# distribution.
+#
+# Note that in the future people may want to wireless-boot
+# so this will help with that as well.
+
+LSB_RED_ID=$(/usr/bin/lsb_release -i -s)
+
+KLIB=/lib/modules/2.6.31-wl/build
+ver=$(echo $KLIB | awk -F "/lib/modules/" '{print $2}' | awk -F"/" '{print $1}')
+dir=/boot/
+
+case $LSB_RED_ID in
+"Ubuntu")
+ echo "Updating Ubuntu's initramfs for $ver under $dir ..."
+ mkinitramfs -o $dir/initrd.img-$ver $ver
+ echo "Will now run update-grub to ensure grub will find the new initramfs ..."
+ update-grub
+ ;;
+*)
+ echo "Warning:"
+ echo "You may or may not need to update your initframfs, you should if"
+ echo "any of the modules installed are part of your initramfs. To add"
+ echo "support for your distribution to do this automatically send a"
+ echo "patch against $0. If your distribution does not require this"
+ echo "send a patch against the '/usr/bin/lsb_release -i -s': $LSB_RED_ID"
+ echo "tag for your distribution to avoid this warning."
+ ;;
+esac