bootdisk/trunk/batch-installer: installer-prep installer.conf ui/ui-functions ui/ui-main ui/ui-makef...

hawk cvs at pld-linux.org
Wed Dec 7 01:59:15 CET 2005


Author: hawk
Date: Wed Dec  7 01:59:08 2005
New Revision: 6607

Modified:
   bootdisk/trunk/batch-installer/installer-prep
   bootdisk/trunk/batch-installer/installer.conf
   bootdisk/trunk/batch-installer/ui/ui-functions
   bootdisk/trunk/batch-installer/ui/ui-main
   bootdisk/trunk/batch-installer/ui/ui-makeform
   bootdisk/trunk/batch-installer/ui/ui-wizard
Log:
- added selectable option to enable DMA for IDE devices


Modified: bootdisk/trunk/batch-installer/installer-prep
==============================================================================
--- bootdisk/trunk/batch-installer/installer-prep	(original)
+++ bootdisk/trunk/batch-installer/installer-prep	Wed Dec  7 01:59:08 2005
@@ -612,6 +612,24 @@
   load_package parted
 fi
 
+# load hdparm if required and try to enable DMA for all IDE devices
+if test "x$ide_dma" = "xyes"; then
+  if ! test -x /bin/hdparm ; then
+    load_package hdparm
+  fi
+  ide_devices=`awk '
+    {
+    if (match($4, /hd[a-h]$/))
+    print "/dev/" $4
+    }
+  ' /proc/partitions`
+  for device in $ide_devices; do
+    if ! test -z $device; then
+      /bin/hdparm -d 1 $device
+    fi
+  done
+fi
+
 # load tools needed for particular filesystems
 have_ext2=""
 have_ext3=""

Modified: bootdisk/trunk/batch-installer/installer.conf
==============================================================================
--- bootdisk/trunk/batch-installer/installer.conf	(original)
+++ bootdisk/trunk/batch-installer/installer.conf	Wed Dec  7 01:59:08 2005
@@ -4,7 +4,9 @@
 
 # hostadapters_modules: space delimited list of modules which are required
 #   by your adapters and/or storage devices, example: "piix aic7xxx"
+# ide_dma: should installer try to enable DMA for IDE devices? "yes" or "no"
 hostadapters_modules=""
+ide_dma="no"
 
 # source is one of:
 #  - net - ftp, http. source_filesystem has to be net

Modified: bootdisk/trunk/batch-installer/ui/ui-functions
==============================================================================
--- bootdisk/trunk/batch-installer/ui/ui-functions	(original)
+++ bootdisk/trunk/batch-installer/ui/ui-functions	Wed Dec  7 01:59:08 2005
@@ -133,7 +133,9 @@
 
 # hostadapters_modules: space delimited list of modules which are required
 #   by your adapters and/or storage devices, example: "piix aic7xxx"
+# ide_dma: should installer try to enable DMA for IDE devices? "yes" or "no"
 hostadapters_modules="$hostadapters_modules"
+ide_dma="$ide_dma"
 
 # source is one of:
 #  - net - ftp, http. source_filesystem has to be net

Modified: bootdisk/trunk/batch-installer/ui/ui-main
==============================================================================
--- bootdisk/trunk/batch-installer/ui/ui-main	(original)
+++ bootdisk/trunk/batch-installer/ui/ui-main	Wed Dec  7 01:59:08 2005
@@ -697,6 +697,15 @@
 EOF
 }
 
+ui-ide_dma () {
+if test "x$ide_dma" = "xyes"; then
+    echo 'res_menu="no"'
+else 
+    echo 'res_menu="yes"'
+fi
+echo 'res=1'
+}
+
 ui-pcmcia_controller () {
 item1=tcic
 item2=i82365

Modified: bootdisk/trunk/batch-installer/ui/ui-makeform
==============================================================================
--- bootdisk/trunk/batch-installer/ui/ui-makeform	(original)
+++ bootdisk/trunk/batch-installer/ui/ui-makeform	Wed Dec  7 01:59:08 2005
@@ -100,6 +100,7 @@
 
 separator "$(nls "Other options")"
 item hostadapters_modules "$(nls "List of kernel modules for IDE/SCSI/SATA adapters")" 
+item ide_dma "$(nls "Try to enable DMA for IDE devices")" 
 item pcmcia_controller "$(nls "PCMCIA controller, if you have any")"
 
 item pkgs_installer "$(nls "Which installer use to install RPM packages")" 

Modified: bootdisk/trunk/batch-installer/ui/ui-wizard
==============================================================================
--- bootdisk/trunk/batch-installer/ui/ui-wizard	(original)
+++ bootdisk/trunk/batch-installer/ui/ui-wizard	Wed Dec  7 01:59:08 2005
@@ -116,7 +116,12 @@
 
   did_select_hostadapters_modules=yes
 
-  local entry module name
+  local entry module name autoscsimods autoidemods dma
+
+  dma=1
+  if [ "$ide_dma" = no ] ; then
+    dma=0
+  fi
 
   dial <<EOF
 <meta title='$(nls "IDE/SCSI/SATA adapters kernel module selection")'>
@@ -146,6 +151,9 @@
 )
   <item id=ide-generic checked=0>$(nls "Generic IDE driver")
 </menu><br>
+<check id=ide_dma checked=$dma> 
+$(nls "Try to enable DMA for IDE devices")
+<br><br>
 $ok_cancel
 EOF
   if [ "$res" = 1 ] ; then



More information about the pld-cvs-commit mailing list