summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Powalowski <tpowa@archlinux.org>2006-05-03 18:27:38 +0200
committerTobias Powalowski <tpowa@archlinux.org>2006-05-03 18:27:38 +0200
commit8366d90a197780866aae68eda441f884619964bd (patch)
tree04a3de486f39296ea00f796251456fe451e5711d
parentad1050964eabbbc00547e8c6c91d8a7c3f13598f (diff)
downloadmkinitcpio-8366d90a197780866aae68eda441f884619964bd.tar.gz
mkinitcpio-8366d90a197780866aae68eda441f884619964bd.tar.xz
"added my changes"
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@49 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r--PKGBUILD27
-rw-r--r--hooks/usb2
-rw-r--r--install/autodetect23
-rw-r--r--install/filesystems2
-rw-r--r--install/ide2
-rw-r--r--install/sata2
-rw-r--r--install/scsi2
-rw-r--r--install/udev7
-rw-r--r--install/usb4
-rw-r--r--mkinitcpio2
-rw-r--r--mkinitcpio-0.1-1.pkg.tar.gzbin0 -> 17149 bytes
-rw-r--r--mkinitcpio.tar.bz2bin0 -> 12868 bytes
12 files changed, 60 insertions, 13 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..40c5b9f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD,v 1.63 2005/12/26 09:54:29 tpowa Exp $
+# Maintainer : Tobias Powalowski <tpowa@archlinux.org>, Aaron Griffin <aaron@archlinux.org>
+
+pkgname=mkinitcpio
+pkgver=0.1
+pkgrel=1
+pkgdesc="Program to create initramfs images for archlinux"
+url="http://www.archlinux.org/"
+depends=('klibc' 'klibc-extras' 'klibc-udev' 'gen-init-cpio')
+source=(mkinitcpio.tar.bz2)
+
+build()
+{
+ cd $startdir/src/
+ # fixing paths in mkinitcpio
+ sed -i -e 's|FILELIST=".tmpfilelist"|FILELIST="/tmp/.tmpfilelist"|g' mkinitcpio
+ sed -i -e 's|CONFIG="mkinitcpio.conf"|CONFIG="/etc/mkinitcpio.conf"|g' mkinitcpio
+ sed -i -e 's|FUNCTIONS="functions"|FUNCTIONS="/lib/initcpio/functions"|g' mkinitcpio
+ sed -i -e 's|HOOKDIR="hooks"|HOOKDIR="/lib/initcpio/hooks"|g' mkinitcpio
+ sed -i -e 's|INSTDIR="install"|INSTDIR="/lib/initcpio/install"|g' mkinitcpio
+ install -D -m644 mkinitcpio.conf $startdir/pkg/etc/mkinitcpio.conf
+ install -D -m755 mkinitcpio $startdir/pkg/sbin/mkinitcpio
+ install -D -m755 init $startdir/pkg/lib/initcpio/init
+ install -D -m644 functions $startdir/pkg/lib/initcpio/functions
+ cp -r hooks/ $startdir/pkg/lib/initcpio/
+ cp -r install/ $startdir/pkg/lib/initcpio/
+}
diff --git a/hooks/usb b/hooks/usb
index ece3950..1a91fe2 100644
--- a/hooks/usb
+++ b/hooks/usb
@@ -1,8 +1,6 @@
# vim: set ft=sh:
run_hook ()
{
- msg -n "Loading usb modules..."
- /bin/modprobe -aq $(/bin/cat /sys/bus/usb/devices/*/modalias) >/dev/null 2>&1
#allow 'usbdelay' on the kernel param line
msg -n "waiting for usb to settle..."
/bin/sleep ${usbdelay:-5}
diff --git a/install/autodetect b/install/autodetect
index c851a4b..70dc779 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -17,7 +17,17 @@ install ()
for m in $AUTODETECT; do
echo $(basename ${m//\.ko/}) >> $modtmp
+ # fixing missing depends for filesystems
[ "$m" == "ext3" ] && echo "jbd" >> $modtmp
+ [ "$m" == "afs" ] && echo "rxrpc" >> $modtmp
+ [ "$m" == "cramfs" ] && echo "zlib_inflate" >> $modtmp
+ [ "$m" == "isofs" ] && echo "zlib_inflate" >> $modtmp
+ [ "$m" == "msdos" ] && echo "fat" >> $modtmp
+ [ "$m" == "vfat" ] && echo "fat" >> $modtmp
+ [ "$m" == "ocfs2" ] && echo "ocfs2_dlm" >> $modtmp
+ [ "$m" == "ocfs2" ] && echo "jbd" >> $modtmp
+ [ "$m" == "ocfs2" ] && echo "ocfs2_nodemanager" >> $modtmp
+ [ "$m" == "ocfs2" ] && echo "configfs" >> $modtmp
done
grep "file /lib/modules" ${FILELIST} >>$modall
@@ -35,3 +45,16 @@ install ()
FILES=""
SCRIPT=""
}
+
+help ()
+{
+cat <<HELPEOF
+ This hook shrinks your initramdisk to a smaller size
+ by autodetecting your needed modules.
+ Please take a look at the included modules for completeness,
+ else your system might be unbootable.
+ Valid Hooks are: base,udev,ide,scsi,sata,usb,fw,filesystems
+ Put this hook at the end of your valid hooks.
+ Put other hooks behind autodetect hook.
+HELPEOF
+}
diff --git a/install/filesystems b/install/filesystems
index 1da1f13..bebef3e 100644
--- a/install/filesystems
+++ b/install/filesystems
@@ -13,6 +13,6 @@ help ()
cat<<HELPEOF
This hook is responsible for loading filesystems for the root device.
Detection will be done at runtime. If you would like to minimize the
- modules installed in the image, use the -auto flavor.
+ modules installed in the image, add the autodetect hook too.
HELPEOF
}
diff --git a/install/ide b/install/ide
index b8aafc3..ac0ea62 100644
--- a/install/ide
+++ b/install/ide
@@ -13,6 +13,6 @@ help ()
cat<<HELPEOF
This hook loads the necessary modules for an ide root device.
Detection will take place at runtime. To minimize the modules
- in the image, use the -auto flavor.
+ in the image, add the autodetect hook too.
HELPEOF
}
diff --git a/install/sata b/install/sata
index e50ffee..a31b55a 100644
--- a/install/sata
+++ b/install/sata
@@ -13,6 +13,6 @@ help ()
cat<<HELPEOF
This hook loads the necessary modules for an sata root device.
Detection will take place at runtime. To minimize the modules
- in the image, use the -auto flavor.
+ in the image, add the autodetect hook too.
HELPEOF
}
diff --git a/install/scsi b/install/scsi
index 0525ae4..fc6f940 100644
--- a/install/scsi
+++ b/install/scsi
@@ -15,6 +15,6 @@ help ()
cat<<HELPEOF
This hook loads the necessary modules for an scsi root device.
Detection will take place at runtime. To minimize the modules
- in the image, use the -auto flavor.
+ in the image, add the autodetect hook too.
HELPEOF
}
diff --git a/install/udev b/install/udev
index 120b3f2..bfe4a1b 100644
--- a/install/udev
+++ b/install/udev
@@ -11,15 +11,14 @@ install ()
add_file /lib/initcpio/udev/udevsettle /sbin/udevsettle
add_file /lib/initcpio/udev/udev.rules /etc/udev/rules.d/udev.rules
add_file /lib/initcpio/udev/start_udev /etc/start_udev
- add_file /lib/initcpio/udev/load-modules.sh /lib/udev/load-modules.sh
add_file /lib/initcpio/udev/modalias_ieee1394 /lib/udev/modalias_ieee1394
}
help ()
{
cat <<HELPEOF
- This hook will use udev to create your root device node.
- It is recommended to use this hook if you are using any
- non ide/sata block device.
+ This hook will use udev to create your root device node
+ and detect the needed modules for your root device.
+ It is recommended to use this hook instead of modload.
HELPEOF
}
diff --git a/install/usb b/install/usb
index 4d53e8f..0e655bd 100644
--- a/install/usb
+++ b/install/usb
@@ -2,7 +2,7 @@
install ()
{
- MODULES=" $(all_modules "/usb/" | grep -ve "_cs" -e "sl1811-hcd" -e "isp116x-hcd")
+ MODULES=" $(all_modules "/usb/host" | grep -ve "_cs" -e "sl1811-hcd" -e "isp116x-hcd")
usb_storage usbhid sd_mod sr_mod "
BINARIES=""
FILES=""
@@ -14,6 +14,6 @@ help ()
cat<<HELPEOF
This hook loads the necessary modules for an usb root device.
Detection will take place at runtime. To minimize the modules
- in the image, use the -auto flavor.
+ in the image, add the autodetect hook too.
HELPEOF
}
diff --git a/mkinitcpio b/mkinitcpio
index c50e9f0..061301f 100644
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -117,7 +117,7 @@ done
if [ "${HAS_MODULES}" == "y" ]; then
[ -e /tmp${MODULEDIR}/ ] && rm -r /tmp${MODULEDIR}/
- cp --parents `grep "file /lib/modules" .tmpfilelist | awk '{print $2}'` /tmp/
+ cp --parents $(grep "file /lib/modules" ${FILELIST} | awk '{print $2}') /tmp/
depmod -b /tmp ${KERNELVERSION}
add_file /tmp${MODULEDIR}/modules.dep ${MODULEDIR}/modules.dep
add_file /tmp${MODULEDIR}/modules.alias ${MODULEDIR}/modules.alias
diff --git a/mkinitcpio-0.1-1.pkg.tar.gz b/mkinitcpio-0.1-1.pkg.tar.gz
new file mode 100644
index 0000000..ed941e0
--- /dev/null
+++ b/mkinitcpio-0.1-1.pkg.tar.gz
Binary files differ
diff --git a/mkinitcpio.tar.bz2 b/mkinitcpio.tar.bz2
new file mode 100644
index 0000000..e782574
--- /dev/null
+++ b/mkinitcpio.tar.bz2
Binary files differ