Magellan Linux

Contents of /trunk/installer-simple/functions/mkinitrd.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2885 - (show annotations) (download) (as text)
Fri Jul 31 10:09:08 2015 UTC (8 years, 9 months ago) by niro
File MIME type: application/x-sh
File size: 1929 byte(s)
-introduce single mode and allow diffrent filesystems for rootfs/bootfs partitions
1 initrd_config()
2 {
3 FSMODS="${FORMAT_FILESYSTEM_BOOTHDD} ${FORMAT_FILESYSTEM_ROOTHDD}"
4 DISKMODS="sd_mod"
5 OLDPATAMODS="amd74xx piix sis5513 via82cxxx"
6 PATAMODS="ata_piix pata_amd pata_mpiix pata_oldpiix pata_sis pata_via"
7 SATAMODS="sata_via sata_sis sata_nv"
8 DRMMODS="i915 mga nouveau r128 radeon savage sis tdfx ttm via"
9 OTHERMODS=""
10 case ${SPECIALDEVICE} in
11 zotac_intel) FBMODS=""; DRMMODS="i915" ;;
12 zotac_nvidia) FBMODS=""; DRMMODS="nouveau" ;;
13 rangee) FBMODS="" ;; ## fallback to vesafb, viafb does not run on all CLE266 boards
14 # not working with kms enabled drivers -> segfaults
15 #maxdata) FBMODS="i810fb" ;; ## check for maxdata / i810/ i815 Chipsets and disable KMS and use i810fb frambuffer
16 maxdata) FBMODS="" ;;
17 *) FBMODS="uvesafb" ;;
18 esac
19
20 if [[ ${FORMFACTOR} = laptop ]]
21 then
22 OTHERMODS="acpi-cpufreq cpufreq_ondemand cpufreq_conservative cpufreq_powersave"
23 fi
24
25 # install an appropriate uvesafb.conf
26 install -d ${INSTALLROOT}/etc/modprobe.d || dialog_die
27 CONFIG="${INSTALLROOT}/etc/modprobe.d/uvesafb.conf"
28 clearconfig
29 addconfig "options uvesafb mode_option=1024x768-32@60 scroll=ywrap"
30
31 # install an appropriate viafb.conf
32 CONFIG="${INSTALLROOT}/etc/modprobe.d/viafb.conf"
33 clearconfig
34 addconfig "options viafb viafb_mode=1024x768 viafb_refresh=60"
35
36 # install an appropriate i810fb.conf
37 CONFIG="${INSTALLROOT}/etc/modprobe.d/i810fb.conf"
38 clearconfig
39 addconfig "options i810fb xres=1024 yres=768 bpp=16 mtrr=1 hsync1=30 hsync2=62 vsync1=30 vsync2=60"
40 }
41
42 initrd_install()
43 {
44 cat > ${INSTALLROOT}/root/.installrc << CHROOTEOF
45 echo "MODULES=\"${FSMODS} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS} ${OTHERMODS}\"" > /etc/conf.d/mkinitrd
46 mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null
47 exit 0
48 CHROOTEOF
49
50 # run installrc
51 chrooted /bin/bash --rcfile /root/.installrc -i
52 rm ${INSTALLROOT}/root/.installrc
53 }