summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-05-02 09:53:50 +0200
committerAaron Griffin <aaron@archlinux.org>2006-05-02 09:53:50 +0200
commit66f28ea341f293cbddd30242f9ea03673d4674d2 (patch)
treecd4a229b169e0adedaebc7cf09ba295bada7fcab
parentdbfcaacf40ca356d7623408b4bfca828f8bd880d (diff)
downloadmkinitcpio-66f28ea341f293cbddd30242f9ea03673d4674d2.tar.gz
mkinitcpio-66f28ea341f293cbddd30242f9ea03673d4674d2.tar.xz
Minor changes... more to come - out of time for the day
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@42 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r--functions29
-rw-r--r--hooks/udev7
-rw-r--r--init1
-rw-r--r--install/udev10
-rw-r--r--mkinitcpio.conf4
5 files changed, 36 insertions, 15 deletions
diff --git a/functions b/functions
index e7fd578..ac3d5a7 100644
--- a/functions
+++ b/functions
@@ -13,10 +13,10 @@ all_modules ()
grep ${@} | sort -u
}
-msg() { [ "${QUIET}" = "n" ] && echo "${@}"; }
-err() { echo "ERROR: ${@}" >&2; }
+msg () { [ "${QUIET}" = "n" ] && echo "${@}"; }
+err () { echo "ERROR: ${@}" >&2; }
-add_dir()
+add_dir ()
{
if [ "x${1}" != "x" -a "${1}" != "/" ]; then
@@ -28,8 +28,8 @@ add_dir()
fi
}
-# add_devnode /dev/foo type major minor [permissions]
-add_device()
+# add_device /dev/foo type major minor [permissions]
+add_device ()
{
if [ $# -ge 4 ]; then
local perms
@@ -50,10 +50,10 @@ add_symlink ()
local fil dest dir
if [ -L ${1} ]; then
fil="${1}"
- dest="${fil##$BASEDIR}"
+ dest="${2##$BASEDIR}"
add_dir $(dirname "${dest}")
if ! grep "slink ${dest} " "${FILELIST}" 2>&1 > /dev/null; then
- msg " adding symlink ${dest}"
+ msg " adding link ${fil} -> ${dest}"
echo "slink ${dest} ${fil} $(stat -c '%a %u %g' ${fil})" >> "${FILELIST}"
fi
fi
@@ -67,7 +67,7 @@ add_file ()
fil="${1}"
lnk=$(readlink -f "${fil}")
if [ -n "${lnk}" ]; then
- add_symlink "${fil}"
+ add_symlink "${fil}" "${lnk}"
fil="${lnk}"
fi
if [ $# -eq 2 ]; then
@@ -89,7 +89,8 @@ add_file ()
}
HAS_MODULES="n"
-add_module()
+#modules are handled specially in order to enable autodetection
+add_module ()
{
local fil path mod deps
#cleanup - remove .ko, replace - and _ with [-_] to match either
@@ -106,7 +107,13 @@ add_module()
done
}
-add_binary()
+_finish_modules ()
+{
+ echo "wtf!"
+
+}
+
+add_binary ()
{
local bin type lib
bin=$(which "${1}")
@@ -147,7 +154,7 @@ add_binary()
fi
}
-parse_hook()
+parse_hook ()
{
local mod bin fil
for mod in $MODULES; do
diff --git a/hooks/udev b/hooks/udev
new file mode 100644
index 0000000..fc4c814
--- /dev/null
+++ b/hooks/udev
@@ -0,0 +1,7 @@
+# vim: set ft=sh:
+run_hook ()
+{
+ msg -n ":: Loading udev..."
+ /etc/start_udev
+ msg "done."
+}
diff --git a/init b/init
index d7bcb32..5aee024 100644
--- a/init
+++ b/init
@@ -65,4 +65,5 @@ fi
# Optimize fs type loop for mounting rootfs
msg ":: Initramfs Completed - control passing to kinit"
+
exec /bin/kinit rootfstype=${FSTYPE} $CMDLINE < /dev/console > /dev/console
diff --git a/install/udev b/install/udev
index 58b2448..8f1f570 100644
--- a/install/udev
+++ b/install/udev
@@ -4,8 +4,14 @@ install ()
{
MODULES=""
BINARIES=""
- FILES=" /etc/udev/rules.d/udev.rules /etc/udev/udev.conf "
- add_file /lib/initramfs/udevd /bin/udevd
+ FILES=" /etc/udev/udev.conf /lib/udev/modalias_ieee1394"
+ SCRIPT="udev"
+ add_file /lib/initcpio/udev/udevd /sbin/udevd
+ add_file /lib/initcpio/udev/udevtrigger /sbin/udevtrigger
+ 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
}
help ()
diff --git a/mkinitcpio.conf b/mkinitcpio.conf
index 65b2ffa..4754a6d 100644
--- a/mkinitcpio.conf
+++ b/mkinitcpio.conf
@@ -13,7 +13,7 @@ MODULES=""
# be used to override the actual binaries used in a given hook.
# (Existing files are NOT overwritten is already added)
# BINARIES are dependancy parsed, so you may safely ignore libraries
-BINARIES=""
+BINARIES="fbxine"
# FILES
# This setting is similar to BINARIES above, however, files are added
@@ -49,4 +49,4 @@ FILES=""
#
# This setup loads an LVM volume group on a usb device.
# HOOKS="base usb lvm"
-HOOKS="base ide scsi sata usb filesystems autodetect"
+HOOKS="base autodetect"