diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-05-03 13:00:07 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-05-03 13:00:07 +0000 |
commit | c6f3c5e2231430e3359f31050643b903262e0ca9 (patch) | |
tree | c6a74622d81c0badd9d4f65dacd85f1f0a0d41dd /make_boot_img | |
parent | 2c4835721ce19f9b9d0b60c259ef551f14c5daf2 (diff) | |
download | drakx-backup-do-not-use-c6f3c5e2231430e3359f31050643b903262e0ca9.tar drakx-backup-do-not-use-c6f3c5e2231430e3359f31050643b903262e0ca9.tar.gz drakx-backup-do-not-use-c6f3c5e2231430e3359f31050643b903262e0ca9.tar.bz2 drakx-backup-do-not-use-c6f3c5e2231430e3359f31050643b903262e0ca9.tar.xz drakx-backup-do-not-use-c6f3c5e2231430e3359f31050643b903262e0ca9.zip |
- move boot help messages out of make_boot_img and the various msgboot*.img.bz2
- move them in help.msg.xml and advanced.msg.xml
- talk about noapic in help.msg
(thanks to switzerland, esp. to gc)
Diffstat (limited to 'make_boot_img')
-rwxr-xr-x | make_boot_img | 94 |
1 files changed, 46 insertions, 48 deletions
diff --git a/make_boot_img b/make_boot_img index 0e0aa51c8..4b18ad11f 100755 --- a/make_boot_img +++ b/make_boot_img @@ -83,6 +83,45 @@ foreach my $img (@images) { } } +sub syslinux_color { + "0" . { + default => '7', + blue => '9', + green => 'a', + red => 'c', + yellow => 'e', + white => 'f', + }->{$_[0]} || die "unknown color $_[0]\n"; +} + +sub syslinux_msg { + my ($msg_xml_file, @more_text) = @_; + + require XML::Parser; + + sub xml_tree2syslinux { + my ($current_color, $tree) = @_; + my (undef, @l) = @$tree; + join('', map { + my ($type, $val) = @$_; + if ($type eq '0') { + $val; + } else { + syslinux_color($type) . xml_tree2syslinux($type, $val) . syslinux_color($current_color); + } + } group_by2(@l)); + }; + + print "parsing $msg_xml_file\n"; + my $tree = XML::Parser->new(Style => 'Tree')->parsefile($msg_xml_file); + $tree->[0] eq 'document' or die "bad file $msg_xml_file\n"; + my $text = xml_tree2syslinux('default', $tree->[1]); + + pack("C*", 0x0E, 0x80, 0x03, 0x00) . "" + . $text . join('', @more_text) + . "\n" . syslinux_color('red') . "[F1-Help] [F2-Advanced Help] [F3-Main]" . syslinux_color('default') . "\n"; +} + sub install_stripped { _ "strip $_[0]"; _ "$sudo install $_[0] $_[1]" } sub initrd { @@ -174,6 +213,9 @@ sub boot_img_i386 { _ "cat $kernel > $mnt/vmlinuz"; bmp_to_msg('isolinux-graphic-simple.bmp', "$mnt/boot.msg", '397,190,14,6', 27, 27); + output("$mnt/help.msg", syslinux_msg('help.msg.xml')); + output("$mnt/advanced.msg", syslinux_msg('advanced.msg.xml')); + (my $rdz = $img) =~ s/\.img/.rdz/; (my $initrd_type = $type) =~ s/-changedisk//; initrd($tmp_mnt_initrd, $initrd_type, $I, $rdz); @@ -661,54 +703,10 @@ F3 boot.msg kernel test/memtest.bin "; - output "isolinux/help.msg", pack("C*", 0x0E, 0x80, 0x03, 0x00) . -" - 0aWelcome to 09Mandrake Linux0a install help07 - -In most cases, the best way to get started is to simply press the 0e<Enter>07 key. -If you experience problems with standard install, try one of the following -install types (type the highlighted text and press 0e<Enter>07): - - o 0fvgalo07 for low resolution graphical installation. - o 0ftext07 for text installation instead of the graphical one. - o 0flinux07 for standard graphical installation at normal resolution. - o 0fexpert07 for expert graphical installation at normal resolution. - - -To use this CD to repair an already installed system type 0frescue07 -followed by 0e<Enter>07. - -You can also pass some 0f<specific kernel options>07 to the Linux kernel. -For example, try 0flinux mem=128M07 if your system has 128Mb of RAM but the default -kernel ($main) does not detect it correctly. -0cNOTE07: You cannot pass options to modules (SCSI, ethernet card) or devices -such as CD-ROM drives in this way. If you need to do so, use expert mode. - -0c[F1-Help] [F2-Advanced Help] [F3-Main]07 -"; - - output "isolinux/advanced.msg", pack("C*", 0x0E, 0x80, 0x03, 0x00) . -" -The following install types may be used instead of previously notified : - o 0fvgahi07 for high resolution graphical installation. - o 0fvga1607 for 640x480 in 16 colors graphical installation. - -The following options may be added on the command line : - o 0freadonly=107 to disable editing disk partitions. - o 0fdisplay=ackbar:007 to export display to 09ackbar07 machine screen 0 during - installation. - o 0fnoauto07 to disable automatic detection (generally used with 0fexpert07). - o 0fsecurity=n07 to set security level to value 09n07. - o 0fupdatemodules07 to use the special update floppy containing modules updates. - o 0fpatch07 to use a patch from the floppy (file named 09patch.pl07). - o 0fauto_install=floppy07 to enable auto_install using 09auto_inst.cfg07 file on the - floppy. - o 0fmemtest07 to test your computer RAM for faulty memory modules. - -You can choose the following kernels : -" . join('', map_index { " o 0falt$::i07 is kernel $_\n" } @kernels) . " -0c[F1-Help] [F2-Advanced Help] [F3-Main]07 -"; + output("isolinux/help.msg", syslinux_msg('help.msg.xml')); + output("isolinux/advanced.msg", syslinux_msg('advanced.msg.xml', + "\nYou can choose the following kernels :\n", + map_index { " o " . syslinux_color('white') . "alt$::i" . syslinux_color('default') . " is kernel $_\n" } @kernels)); } sub isolinux_move { |