summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2006-10-23 22:11:02 +0200
committerThomas Bächler <thomas@archlinux.org>2006-10-23 22:11:02 +0200
commit6a2514b3009f7793b546871f159065690da13d87 (patch)
tree5eed0d770125a3496a75be2cd97a2e9bc49b8bfe
parentda24b3230234a6d73a7ea1d52422245522201d26 (diff)
downloadmkinitcpio-6a2514b3009f7793b546871f159065690da13d87.tar.gz
mkinitcpio-6a2514b3009f7793b546871f159065690da13d87.tar.xz
- Fixed autodetection
- Minor changes to presets - Removed ata, made sata 2.6.19-ready and added pata git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@179 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r--install/autodetect2
-rw-r--r--install/ide3
-rw-r--r--install/pata (renamed from install/ata)7
-rw-r--r--install/sata4
-rw-r--r--mkinitcpio43
5 files changed, 34 insertions, 25 deletions
diff --git a/install/autodetect b/install/autodetect
index f2c7cd1..a743601 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -40,7 +40,7 @@ install ()
for m in $AUTODETECT; do
modname="$(basename ${m%%\.ko})"
- grep "${modname}" "${MODULE_FILE}" >/dev/null 2>&1 && continue
+ grep "^${modname}$" "${MODULE_FILE}" >/dev/null 2>&1 && continue
case "${m}" in
#*/ieee1394/*) echo -e "sbp2\nsd_mod\nsr_mod" >> "${MODULE_FILE}";;
*ext3*) echo "jbd" >> "${MODULE_FILE}" ;;
diff --git a/install/ide b/install/ide
index 67b5be1..4b547e7 100644
--- a/install/ide
+++ b/install/ide
@@ -11,7 +11,8 @@ install ()
help ()
{
cat<<HELPEOF
- This hook loads the necessary modules for an ide root device.
+ This hook loads the necessary modules for an ide root device,
+ using the old ide subsystem.
Detection will take place at runtime. To minimize the modules
in the image, add the autodetect hook too.
HELPEOF
diff --git a/install/ata b/install/pata
index a374aeb..c3da76f 100644
--- a/install/ata
+++ b/install/pata
@@ -2,7 +2,8 @@
install ()
{
- MODULES=" $(checked_modules "ata/*")"
+ MODULES=" $(checked_modules "ata/pata_*") $(checked_modules "ata/ata_generic")
+ $(checked_modules "ata/ata_piix")"
MODULES=$(echo ${MODULES}) #trim whitespace
if [ "x${MODULES}" != "x" ]; then
@@ -17,8 +18,8 @@ install ()
help ()
{
cat<<HELPEOF
- This hook loads the necessary modules for sata or pata root device
- with the new ata subsystem on kernels >=2.6.19.
+ This hook loads the necessary modules for a pata (ide) root device,
+ using the new libata subsystem.
Detection will take place at runtime. To minimize the modules
in the image, add the autodetect hook too.
HELPEOF
diff --git a/install/sata b/install/sata
index dc20045..61f7dda 100644
--- a/install/sata
+++ b/install/sata
@@ -3,7 +3,9 @@
install ()
{
MODULES=" $(checked_modules "scsi/.*ata") $(checked_modules "block/sx8")
- $(checked_modules "scsi/ahci") $(checked_modules "scsi/pdc_adma")"
+ $(checked_modules "scsi/ahci") $(checked_modules "scsi/pdc_adma")
+ $(checked_modules "ata/sata_*") $(checked_modules "ata/ahci")
+ $(checked_modules "ata/pdc_adma") $(checked_modules "ata/ata_piix")"
MODULES=$(echo ${MODULES}) #trim whitespace
if [ "x${MODULES}" != "x" ]; then
diff --git a/mkinitcpio b/mkinitcpio
index 5084c2b..61ace57 100644
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -83,25 +83,30 @@ done
shift $(($OPTIND - 1))
# use preset $PRESET
-if [ -n "${PRESET}" -a -f "${PRESETDIR}/${PRESET}.preset" ]; then
- # Use -b and -v options specified earlier
- PRESET_MKOPTS=""
- [ -n "${BASEDIR}" ] && PRESET_MKOPTS="${PRESET_MKOPTS} -b ${BASEDIR}"
- [ "${QUIET}" = "n" ] && PRESET_MKOPTS="${PRESET_MKOPTS} -v"
- # Build all images
- source ${PRESETDIR}/${PRESET}.preset
- for ((i=0; i<${PRESET_N}; ++i)); do
- [ -z "${PRESET_NAME[${i}]}" -o -z "${PRESET_KVER[${i}]}" -o -z "${PRESET_CONFIG[${i}]}" -o -z "${PRESET_IMAGE[${i}]}" ] && continue
- echo "==> Building image \"${PRESET_NAME[${i}]}\""
- PRESET_CMD="${0} -c ${PRESET_CONFIG[${i}]} -k ${PRESET_KVER[${i}]} -g ${PRESET_IMAGE[${i}]} ${PRESET_MKOPTS}"
- echo "==> Running command: ${PRESET_CMD}"
- if ${PRESET_CMD}; then
- echo "==> SUCCESS"
- else
- echo "==> FAIL"
- fi
- done
- exit 0
+if [ -n "${PRESET}" ]; then
+ if [ -f "${PRESETDIR}/${PRESET}.preset" ]; then
+ # Use -b and -v options specified earlier
+ PRESET_MKOPTS=""
+ [ -n "${BASEDIR}" ] && PRESET_MKOPTS="${PRESET_MKOPTS} -b ${BASEDIR}"
+ [ "${QUIET}" = "n" ] && PRESET_MKOPTS="${PRESET_MKOPTS} -v"
+ # Build all images
+ source ${PRESETDIR}/${PRESET}.preset
+ for ((i=0; i<${PRESET_N}; ++i)); do
+ [ -z "${PRESET_NAME[${i}]}" -o -z "${PRESET_KVER[${i}]}" -o -z "${PRESET_CONFIG[${i}]}" -o -z "${PRESET_IMAGE[${i}]}" ] && continue
+ echo "==> Building image \"${PRESET_NAME[${i}]}\""
+ PRESET_CMD="${0} -c ${PRESET_CONFIG[${i}]} -k ${PRESET_KVER[${i}]} -g ${PRESET_IMAGE[${i}]} ${PRESET_MKOPTS}"
+ echo "==> Running command: ${PRESET_CMD}"
+ if ${PRESET_CMD}; then
+ echo "==> SUCCESS"
+ else
+ echo "==> FAIL"
+ fi
+ done
+ exit 0
+ else
+ echo "Preset ${PRESET} does not exist. Exiting."
+ exit 1
+ fi
fi
# append a trailing / if needed