Magellan Linux

Diff of /alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3202 by niro, Wed Sep 14 13:12:00 2011 UTC revision 5006 by niro, Wed Aug 7 11:10:32 2013 UTC
# Line 43  FDISKPARTIONBELOW256MB=0 Line 43  FDISKPARTIONBELOW256MB=0
43    
44  # default specialdevices  # default specialdevices
45  SPECIALDEVICE=""  SPECIALDEVICE=""
46    FORMFACTOR="desktop"
47    
48  # target filesystem  # target filesystem
49  FORMAT_FILESYSTEM="ext4"  FORMAT_FILESYSTEM="ext4"
# Line 206  dialog_hardware_detection() Line 207  dialog_hardware_detection()
207   # other devices   # other devices
208   run_hardware_detection   run_hardware_detection
209   case "${SPECIALDEVICE}" in   case "${SPECIALDEVICE}" in
210   zotac) echo " \n\n\n \\Z2Zotac Device erkannt!\\Zn \\" >> ${hwtmp} ;;   zotac*) echo " \n\n\n \\Z2Zotac Device erkannt.\\Zn \\" >> ${hwtmp} ;;
211   rangee) echo " \n\n\n \\Z2Rangee Device erkannt!\\Zn \\" >> ${hwtmp} ;;   rangee) echo " \n\n\n \\Z2Rangee Device erkannt.\\Zn \\" >> ${hwtmp} ;;
212   *) echo " \n\n\n \\ZnStandard Device erkannt!\\Zn \\" >> ${hwtmp} ;;   maxdata) echo " \n\n\n \\Z2Maxdata Device erkannt.\\Zn \\" >> ${hwtmp} ;;
213     *) echo " \n\n\n \\ZnStandard Device erkannt.\\Zn \\" >> ${hwtmp} ;;
214   esac   esac
215     if [[ ${FORMFACTOR} = laptop ]]
216     then
217     echo " \n \\ZnFormfactor Laptop, Powersave Modus 'ondemand' wird aktiviert.\\Zn \\" >> ${hwtmp}
218     fi
219    
220   echo " \" 13 70" >> ${hwtmp}   echo " \" 14 70" >> ${hwtmp}
221   chmod a+x ${hwtmp}   chmod a+x ${hwtmp}
222   ${hwtmp}   ${hwtmp}
223    
# Line 441  run_hardware_detection() Line 447  run_hardware_detection()
447  {  {
448   local hwinfo   local hwinfo
449    
450   hwinfo="$(hwinfo --bios --storage)"   hwinfo="$(hwinfo --bios --storage --pci --gfxcard --sys)"
451    
452   # check for special devices/clients:   # check for special devices/clients:
453   # if zotac a zotac and the disk is a removeable device, then add rootdelay to kernelcmd   # if zotac a zotac and the disk is a removeable device, then add rootdelay to kernelcmd
# Line 458  run_hardware_detection() Line 464  run_hardware_detection()
464    
465   # only add this for grub legacy, grub2 detect these settings on its own   # only add this for grub legacy, grub2 detect these settings on its own
466   export GRUBLEGACYOPTS="rootdelay=8"   export GRUBLEGACYOPTS="rootdelay=8"
467   export SPECIALDEVICE="zotac"   # there are to zotac types in the wild, nvidia based gfx and intel
468     if [[ ! -z $(echo "${hwinfo}" | grep -i nouveau) ]]
469     then
470     export SPECIALDEVICE="zotac_nvidia"
471     else
472     export SPECIALDEVICE="zotac_intel"
473     fi
474   fi   fi
475    
476   # check for special devices/clients:   # check for special devices/clients:
# Line 470  run_hardware_detection() Line 482  run_hardware_detection()
482   export SPECIALDEVICE="rangee"   export SPECIALDEVICE="rangee"
483   export GRUBLEGACYOPTS=""   export GRUBLEGACYOPTS=""
484   fi   fi
485    
486     # check for special devices/clients:
487     # check for maxdata / i810/ i815 Chipsets and disable KMS and use i810fb frambuffer
488     if [[ ! -z $(echo "${hwinfo}" | grep -i i810) ]] || [[ ! -z $(echo "${hwinfo}" | grep -i i815) ]]
489     then
490     export SPECIALDEVICE="maxdata"
491     export GRUBLEGACYOPTS=""
492     fi
493    
494     # check for special devices/clients:
495     # check for laptops and activate cpufreq scaling
496     if [[ $(echo "${hwinfo}" | grep 'Formfactor:' | sed 's:.*Formfactor\:\ \"\(.*\)\":\1:') = laptop ]]
497     then
498     export FORMFACTOR="laptop"
499     export KERNELOPTS="${KERNELOPTS} cpufreq.governor=ondemand"
500     fi
501  }  }
502    
503  hdd_size_below_256mb()  hdd_size_below_256mb()
# Line 732  install_initrd_chroot() Line 760  install_initrd_chroot()
760   PATAMODS="ata_piix pata_amd pata_mpiix pata_oldpiix pata_sis pata_via"   PATAMODS="ata_piix pata_amd pata_mpiix pata_oldpiix pata_sis pata_via"
761   SATAMODS="sata_via sata_sis sata_nv"   SATAMODS="sata_via sata_sis sata_nv"
762   DRMMODS="i915 mga nouveau r128 radeon savage sis tdfx ttm via"   DRMMODS="i915 mga nouveau r128 radeon savage sis tdfx ttm via"
763     OTHERMODS=""
764   case ${SPECIALDEVICE} in   case ${SPECIALDEVICE} in
765   zotac) FBMODS="" ;;   zotac_intel) FBMODS=""; DRMMODS="i915" ;;
766   rangee) FBMODS="viafb" ;;   zotac_nvidia) FBMODS=""; DRMMODS="nouveau" ;;
767     rangee) FBMODS="" ;; ## fallback to vesafb, viafb does not run on all CLE266 boards
768     # not working with kms enabled drivers -> segfaults
769     #maxdata) FBMODS="i810fb" ;; ## check for maxdata / i810/ i815 Chipsets and disable KMS and use i810fb frambuffer
770     maxdata) FBMODS="" ;;
771   *) FBMODS="uvesafb" ;;   *) FBMODS="uvesafb" ;;
772   esac   esac
773    
774     if [[ ${FORMFACTOR} = laptop ]]
775     then
776     OTHERMODS="acpi-cpufreq cpufreq_ondemand cpufreq_conservative cpufreq_powersave"
777     fi
778    
779   # install an appropriate uvesafb.conf   # install an appropriate uvesafb.conf
780   install -d ${INSTALLPATH}/etc/modprobe.d || die   install -d ${INSTALLPATH}/etc/modprobe.d || die
781   echo "options uvesafb mode_option=1024x768-32@60 scroll=ywrap" > ${INSTALLPATH}/etc/modprobe.d/uvesafb.conf || die   echo "options uvesafb mode_option=1024x768-32@60 scroll=ywrap" > ${INSTALLPATH}/etc/modprobe.d/uvesafb.conf || die
# Line 745  install_initrd_chroot() Line 783  install_initrd_chroot()
783   # install an appropriate viafb.conf   # install an appropriate viafb.conf
784   echo "options viafb viafb_mode=1024x768 viafb_refresh=60" > ${INSTALLPATH}/etc/modprobe.d/viafb.conf || die   echo "options viafb viafb_mode=1024x768 viafb_refresh=60" > ${INSTALLPATH}/etc/modprobe.d/viafb.conf || die
785    
786     # install an appropriate i810fb.conf
787     echo "options i810fb xres=1024 yres=768 bpp=16 mtrr=1 hsync1=30 hsync2=62 vsync1=30 vsync2=60"  > ${INSTALLPATH}/etc/modprobe.d/i810fb.conf || die
788    
789   cat > ${INSTALLPATH}/root/.installrc << CHROOTEOF   cat > ${INSTALLPATH}/root/.installrc << CHROOTEOF
790  echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS}\"" > /etc/conf.d/mkinitrd  echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS} ${OTHERMODS}\"" > /etc/conf.d/mkinitrd
791  mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null  mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null
792  exit 0  exit 0
793  CHROOTEOF  CHROOTEOF
# Line 813  install_system_settings() Line 854  install_system_settings()
854    
855   # install network config skeleton   # install network config skeleton
856   install -m0644 ${INSTALLPATH}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLPATH}/etc/conf.d/ || die   install -m0644 ${INSTALLPATH}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLPATH}/etc/conf.d/ || die
857    
858     # intel framebufer quirk
859     if [[ -e /proc/fb ]]
860     then
861     if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]]
862     then
863     fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:')
864     if [[ ${fbdev} != 0 ]]
865     then
866     sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${INSTALLPATH}/etc/splash/splash.conf || die
867     fi
868     fi
869     fi
870  }  }
871    
872  install_system_settings_flash()  install_system_settings_flash()

Legend:
Removed from v.3202  
changed lines
  Added in v.5006