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