diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2009-02-23 17:54:32 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@mandriva.com> | 2009-02-23 17:54:32 +0000 |
commit | 1908289165f052842a25ef97463dc6db9f9bd376 (patch) | |
tree | fe63a941101e121f4edb777fb7cca02589d82e69 /src/common.inc | |
parent | c2d8a6df00f879d0955fc0fd25ce552ddfe0c7d2 (diff) | |
download | bootloader-theme-1908289165f052842a25ef97463dc6db9f9bd376.tar bootloader-theme-1908289165f052842a25ef97463dc6db9f9bd376.tar.gz bootloader-theme-1908289165f052842a25ef97463dc6db9f9bd376.tar.bz2 bootloader-theme-1908289165f052842a25ef97463dc6db9f9bd376.tar.xz bootloader-theme-1908289165f052842a25ef97463dc6db9f9bd376.zip |
Rework the way we handle dual-arch
The autodetection of 32/64 ISOs uses getcwd which currently always
return '/' in the COM32 module so this can't work. Change it to check
for hardcoded paths working for mandriva CDs. Run a linux64 image when
using 64 bit mode since otherwise I'm not sure how to get gfxboot to
pick the proper kernel :-/
Diffstat (limited to 'src/common.inc')
-rw-r--r-- | src/common.inc | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/src/common.inc b/src/common.inc index ed54fc9..376a453 100644 --- a/src/common.inc +++ b/src/common.inc @@ -67,35 +67,18 @@ % ( ) ==> ( ) % /check_arch_boot_dir { - getcwd dup .undef ne { - /64bit.tmp 256 string def - - dup "i586" strstr 0 ne over "x86_64" strstr 0 ne or { - dup "i586" strstr { - /32bit_boot_dir exch def - /64bit_boot_dir 32bit_boot_dir "i586" "x86_64" strreplace - } { - /64bit_boot_dir exch def - /32bit_boot_dir 64bit_boot_dir "x86_64" "i586" strreplace - } ifelse - - dup "%s/isolinux.cfg" 64bit.tmp sprintf - 64bit.tmp filesize .undef ne { def } { free pop } ifelse - - } { - /32bit_boot_dir over def - /64bit_boot_dir exch def - } ifelse + "/i586/isolinux/isolinux.cfg" filesize .undef ne { + /32bit_boot_dir "/i586/isolinux/" def + } if - 64bit.tmp free + "/x86_64/isolinux/isolinux.cfg" filesize .undef ne { + /64bit_boot_dir "/x86_64/isolinux/" def + } if % font.normal setfont % 0 400 moveto 32bit_boot_dir print % 0 420 moveto 64bit_boot_dir print dtrace - } { - pop - } ifelse } def @@ -304,13 +287,19 @@ pop } ifelse } if - % getcwd 0 300 moveto show trace + % getcwd 0 300 moveto show % lilo & syslinux: prepend kernel/label name grub { bc.cmd 0 0 put } { - menu.texts menu.entry get "%s " bc.cmd sprintf + menu.texts menu.entry get + xmenu.bits .xm_current get 1 eq { + "64" exch "%s%s " + } { + "%s " + } ifelse + bc.cmd sprintf } ifelse xmenu.kernelopts { |