summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/attachments/20110207/5f16c035
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/attachments/20110207/5f16c035')
-rw-r--r--zarb-ml/mageia-sysadm/attachments/20110207/5f16c035/attachment-0001.html1340
-rw-r--r--zarb-ml/mageia-sysadm/attachments/20110207/5f16c035/attachment.html1340
2 files changed, 2680 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/attachments/20110207/5f16c035/attachment-0001.html b/zarb-ml/mageia-sysadm/attachments/20110207/5f16c035/attachment-0001.html
new file mode 100644
index 000000000..99683303f
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/attachments/20110207/5f16c035/attachment-0001.html
@@ -0,0 +1,1340 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<title>[473] Import images</title>
+</head>
+<body>
+
+<style type="text/css"><!--
+#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
+#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
+#msg dt:after { content:':';}
+#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
+#msg dl a { font-weight: bold}
+#msg dl a:link { color:#fc3; }
+#msg dl a:active { color:#ff0; }
+#msg dl a:visited { color:#cc6; }
+h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
+#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
+#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
+#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
+#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
+#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
+#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
+#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
+#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
+#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
+#logmsg pre { background: #eee; padding: 1em; }
+#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
+#logmsg dl { margin: 0; }
+#logmsg dt { font-weight: bold; }
+#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
+#logmsg dd:before { content:'\00bb';}
+#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
+#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
+#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
+#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
+#logmsg table th.Corner { text-align: left; }
+#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
+#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
+#patch { width: 100%; }
+--></style>
+<div id="msg">
+<dl class="meta">
+<dt>Revision</dt> <dd>473</dd>
+<dt>Author</dt> <dd>dmorgan</dd>
+<dt>Date</dt> <dd>2011-02-07 12:20:50 +0100 (Mon, 07 Feb 2011)</dd>
+</dl>
+
+<h3>Log Message</h3>
+<pre>Import images</pre>
+
+<h3>Added Paths</h3>
+<ul>
+<li>drakx/trunk/images/</li>
+<li><a href="#drakxtrunkimagesperl_checker">drakx/trunk/images/.perl_checker</a></li>
+<li><a href="#drakxtrunkimagesMakefile">drakx/trunk/images/Makefile</a></li>
+<li><a href="#drakxtrunkimagesNEWS">drakx/trunk/images/NEWS</a></li>
+<li><a href="#drakxtrunkimagesadvancedmsgxml">drakx/trunk/images/advanced.msg.xml</a></li>
+<li><a href="#drakxtrunkimageshelpmsgxml">drakx/trunk/images/help.msg.xml</a></li>
+<li><a href="#drakxtrunkimagesmake_boot_img">drakx/trunk/images/make_boot_img</a></li>
+<li><a href="#drakxtrunkimagesupdate_kernel">drakx/trunk/images/update_kernel</a></li>
+</ul>
+
+</div>
+<div id="patch"><pre>
+<a id="drakxtrunkimagesperl_checker">Added: drakx/trunk/images/.perl_checker</a>
+===================================================================
+--- drakx/trunk/images/.perl_checker (rev 0)
++++ drakx/trunk/images/.perl_checker 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1 @@
++XML::Parser
+
+<a id="drakxtrunkimagesMakefile">Added: drakx/trunk/images/Makefile</a>
+===================================================================
+--- drakx/trunk/images/Makefile (rev 0)
++++ drakx/trunk/images/Makefile 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,57 @@
++include ../Makefile.config
++
++VERSION=1.50
++PRODUCT=drakx-installer-images
++KERNELS=$(shell rpm -qf /lib/modules/2.*)
++
++IMAGES_DEST = $(ROOTDEST)/install/images
++
++all: images
++
++images: all.kernels
++ DISTRIB_DESCR=$(DISTRIB_DESCR) ./make_boot_img
++ rm -rf images/alternatives
++ if [ `ls images/*.img-* 2&gt;/dev/null | wc -l` -gt 0 ]; then \
++ mkdir images/alternatives; cd images/alternatives; mv ../*.img-* .; md5sum *.img-* &gt; MD5SUM; \
++ fi
++ cd images ; md5sum *.{img,iso}* &gt; MD5SUM
++
++all.kernels: update_kernel ../kernel/list_modules.pm
++ ./update_kernel $(KERNELS)
++
++dist: tar
++tar:
++ @rm -rf $(PRODUCT)*.tar* $(PRODUCT)-$(VERSION)
++ @if [ -e &quot;.svn&quot; ]; then \
++ $(MAKE) dist-svn; \
++ elif [ -e &quot;../.git&quot; ]; then \
++ $(MAKE) dist-git; \
++ else \
++ echo &quot;Unknown SCM (not SVN nor GIT)&quot;;\
++ exit 1; \
++ fi;
++ $(info $(PRODUCT)-$(VERSION).tar.bz2 is ready)
++
++dist-svn:
++ mkdir -p $(PRODUCT)-$(VERSION)
++ svn export -q -rBASE . $(PRODUCT)-$(VERSION)/images
++ svn export -q -rBASE ../kernel $(PRODUCT)-$(VERSION)/kernel
++ cp ../Makefile.config $(PRODUCT)-$(VERSION)/
++ tar cfj $(PRODUCT)-$(VERSION).tar.bz2 $(PRODUCT)-$(VERSION)
++ rm -rf $(PRODUCT)-$(VERSION)
++
++dist-git:
++ @cd ..; git archive --prefix=$(PRODUCT)-$(VERSION)/ HEAD images kernel Makefile.config | bzip2 &gt;images/$(PRODUCT)-$(VERSION).tar.bz2;
++
++clean:
++ rm -rf images isolinux all.kernels modules.description
++ find . -name &quot;*~&quot; -o -name &quot;.#*&quot; | xargs rm -f
++
++install:
++ install -d $(IMAGES_DEST)
++ rm -rf $(IMAGES_DEST)/alternatives
++ cp -r images/* $(IMAGES_DEST)
++ ifneq (,$(findstring $(ARCH), i386 x86_64))
++ rm -rf $(ROOTDEST)/isolinux
++ cp -af isolinux $(ROOTDEST)
++ endif
+
+
+Property changes on: drakx/trunk/images/Makefile
+___________________________________________________________________
+<a id="svneolstyle">Added: svn:eol-style</a>
+ + native
+
+<a id="drakxtrunkimagesNEWS">Added: drakx/trunk/images/NEWS</a>
+===================================================================
+--- drakx/trunk/images/NEWS (rev 0)
++++ drakx/trunk/images/NEWS 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,208 @@
++Version 1.50 - 13 Oct 2010, by Thierry Vignaud
++
++- 2011.0 build
++
++Version 1.49 - 27 May 2010, by Olivier Blin
++
++- disable restore option
++
++Version 1.48 - 28 February 2010, by Thierry Vignaud
++
++- handle new SCSI driver: mpt2sas (#57833)
++
++Version 1.47 - 4 January 2010, by Pascal Terjan
++
++- use /bin/busybox.static
++
++Version 1.46 - 12 October 2009, by Olivier Blin
++
++- properly fix FileHandle issue
++
++Version 1.45 - 12 October 2009, by Thierry Vignaud
++
++- fix firmware again (#53220)
++
++Version 1.44 - 6 October 2009, by Thierry Vignaud
++
++- do not do anything anymore with bootsplash.cfg
++
++Version 1.43 - 22 September 2009, by Olivier Blin
++
++- fix firmware loading (#49195)
++- revert squashfs-lzma and sqlzma inclusion (this breaks install)
++- list asix module in network/usb group
++
++Version 1.42 - 9 September 2009, by Pascal Terjan
++
++- include squashfs-lzma and sqlzma kernel modules in all.rdz
++- add /dev/ptmx (for screen to work)
++- drop duplicated code including busybox, ka version is better than
++ the one of DEBUGSTAGE1
++- embed all firmwares that are needed by the modules we embed
++
++Version 1.40 - 14 April 2009, by Pascal Terjan
++
++- handle firmware loading in stage2 too
++
++Version 1.39 - 6 April 2009, by Pascal Terjan
++
++- fix firmware helper generation
++
++Version 1.38 - 3 April 2009, by Thierry Vignaud
++
++- include firmwares for most common network cards (#49195)
++- pass restore instead of --restore option
++- add a userspace helper to load firmwares
++
++Version 1.37 - 3 April 2009, by Pascal Terjan
++
++- fix crypto module names when arch is not i586 (#46814)
++
++Version 1.36 - 9 March 2009, by Thierry Vignaud
++
++- add /dev/random and /dev/urandom (for curl)
++
++Version 1.35 - 18 February 2009, by Thierry Vignaud
++
++- pass --restore instead of restore option
++
++Version 1.34 - 10 February 2009, by Thierry Vignaud
++
++- enable to select restore option
++
++Version 1.33 - 23 January 2009, by Christophe Fergeau
++
++- adjust to new syslinux 3.72 gfxboot COM32 module
++
++Version 1.32 - 15 January 2008, by Thierry Vignaud
++
++- include:
++ o network drivers: enic, et131x, qlge, smsc95xx, sxg &amp; w35und
++ o IDE driver: tx4939ide
++- ext4dev was renamed as ext4 in 2.6.29-rc1 (keep ext4dev for older kernels)
++
++Version 1.31 - 19 September 2008, by Pascal &quot;pixel&quot; Rigaux
++
++- add modules &quot;sha256_generic cbc amd768_rng&quot; for crypsetup/LUKS
++
++Version 1.30 - 12 June 2008, by Olivier &quot;blino&quot; Blin
++
++- handle ide-cd being renamed as ide-cd_mod
++
++Version 1.29 - 2 April 2008, by Olivier &quot;blino&quot; Blin
++
++- use &quot;Mdv Boot ISO&quot; as label for boot.iso
++
++Version 1.28 - 12 February 2008, by Olivier &quot;blino&quot; Blin
++
++- restore full modules.alias (depmod keeps only available modules in
++ modules.alias, but we want them all)
++
++Version 1.27 - 12 February 2008, by Olivier &quot;blino&quot; Blin
++
++- add modules in /modules/`uname -r` and use depmod to build
++ modules.dep and modules.alias
++- remove symlinks in toplevel /modules
++- fix custom bootsplash theme support
++
++Version 1.26 - 21 December 2007, by Olivier &quot;blino&quot; Blin
++
++- rebuild with list_modules to handle atl2 ethernet driver
++- fix live stage2 support
++
++Version 1.25 - 12 December 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- rebuild for new list_modules
++
++Version 1.24 - 15 October 2007, by Olivier &quot;blino&quot; Blin
++
++- rebuild for new list_modules (to include ipw3945)
++
++Version 1.23 - 17 September 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- add dm-zero for dmraid
++
++Version 1.22 - 11 September 2007, by Olivier &quot;blino&quot; Blin
++
++- add /lib/module-init-tools/ldetect-lst-modules.alias
++
++Version 1.21 - 7 September 2007, by Olivier &quot;blino&quot; Blin
++
++- add jmicron driver
++- provide /usr/share/ldetect-lst/*-modules.alias in installer images
++
++Version 1.20 - 31 August 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- dynamically determine the size of all.img
++
++Version 1.19 - 27 August 2007, by Olivier &quot;blino&quot; Blin
++
++- add raid456 module
++
++Version 1.18 - 21 August 2007, by Olivier &quot;blino&quot; Blin
++
++- release with latest scripts from drakx/kernel
++
++Version 1.17 - 21 August 2007, by Olivier &quot;blino&quot; Blin
++
++- keep modules without dependencies in modules.dep
++
++Version 1.16 - 21 August 2007, by Olivier &quot;blino&quot; Blin
++
++- build with new list_modules
++
++Version 1.15 - 15 August 2007, by Olivier &quot;blino&quot; Blin
++
++- add pcitable, usbtable and pci.ids
++- fix typos affecting mtab and /var/run creation
++- add a /lib/modules symlink
++
++Version 1.14 - 9 August 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- update_kernel: now require install rpms or rpm files as arguments
++ (this allow specifying precisely which installed kernels are used)
++
++Version 1.13 - 8 August 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- add modules.alias in /modules/&lt;version&gt; as required by stage2 with new libldetect
++- add unionfs module
++- revert isolinux starting install by default instead of booting on harddrive (#32040)
++
++Version 1.12 - 17 July 2007, by Olivier &quot;blino&quot; Blin
++
++- add ide-disk module
++
++Version 1.11 - 29 June 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- increase all.img size to 10.5MB
++- default to theme Mandriva-Free, and allow setting another one through THEME
++ environment variable
++
++Version 1.9 - 3 April 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- include mmc_block for card readers
++
++Version 1.8 - 23 March 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- restore F1 &amp; F2 in boot.iso (#29766)
++
++Version 1.6 - 14 March 2007, by Olivier Blin
++
++- add tifm modules (Titi)
++
++Version 1.5 - 9 March 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- copy isolinux images for x86_64 as well
++
++Version 1.4 - 8 March 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- restore vga= and automatic= default options.
++ also restore noacpi, alt0, vgalo, vgahi, text entries
++ (all this is needed when gfxboot is not working or not there)
++
++Version 1.3 - 16 February 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- rely on gfxboot for options (vga=, automatic=...)
++- really use memtest instead of memtest.bin
++ (with file name &quot;memtest.bin&quot; it fails with error 8000, with &quot;memtest&quot; it works)
++ (it seems to be an ancient bug as far as google says)
+
+<a id="drakxtrunkimagesadvancedmsgxml">Added: drakx/trunk/images/advanced.msg.xml</a>
+===================================================================
+--- drakx/trunk/images/advanced.msg.xml (rev 0)
++++ drakx/trunk/images/advanced.msg.xml 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,17 @@
++&lt;document&gt;
++The following install types may be used instead of previously notified :
++ o &lt;white&gt;vgahi&lt;/white&gt; for high resolution graphical installation.
++ o &lt;white&gt;vga16&lt;/white&gt; for 640x480 in 16 colors graphical installation.
++
++The following options may be added on the command line :
++ o &lt;white&gt;readonly=1&lt;/white&gt; to disable editing disk partitions.
++ o &lt;white&gt;display=ackbar:0&lt;/white&gt; to export display to &lt;blue&gt;ackbar&lt;/blue&gt; machine screen 0 during
++ installation (only for network installations).
++ o &lt;white&gt;noauto&lt;/white&gt; to disable automatic detection.
++ o &lt;white&gt;nodmraid&lt;/white&gt; to disable BIOS software RAID.
++ o &lt;white&gt;updatemodules&lt;/white&gt; to use the special update floppy containing modules updates.
++ o &lt;white&gt;patch&lt;/white&gt; to use a patch from the floppy (file named &lt;blue&gt;patch.pl&lt;/blue&gt;).
++ o &lt;white&gt;auto_install=floppy&lt;/white&gt; to enable auto_install using &lt;blue&gt;auto_inst.cfg&lt;/blue&gt; file on the
++ floppy.
++ o &lt;white&gt;memtest&lt;/white&gt; to test your computer RAM for faulty memory modules.
++&lt;/document&gt;
+
+<a id="drakxtrunkimageshelpmsgxml">Added: drakx/trunk/images/help.msg.xml</a>
+===================================================================
+--- drakx/trunk/images/help.msg.xml (rev 0)
++++ drakx/trunk/images/help.msg.xml 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,21 @@
++&lt;document&gt;
++ &lt;green&gt;Welcome to &lt;blue&gt;Mageia&lt;/blue&gt; install help&lt;/green&gt;
++
++In most cases, the best way to get started is to simply press the &lt;yellow&gt;&amp;lt;Enter&amp;gt;&lt;/yellow&gt; key.
++If you experience problems with standard install, try one of the following
++install types (type the highlighted text and press &lt;yellow&gt;&amp;lt;Enter&amp;gt;&lt;/yellow&gt;):
++
++ o &lt;white&gt;text&lt;/white&gt; for text installation instead of the graphical one.
++ o &lt;white&gt;linux&lt;/white&gt; for standard graphical installation at normal resolution.
++ o &lt;white&gt;linux vga=785&lt;/white&gt; for low resolution graphical installation.
++
++
++To repair an already installed system type &lt;white&gt;rescue&lt;/white&gt; followed
++by &lt;yellow&gt;&amp;lt;Enter&amp;gt;&lt;/yellow&gt;.
++
++You can also pass some &lt;white&gt;&amp;lt;specific kernel options&amp;gt;&lt;/white&gt; to the Linux kernel.
++For example, try &lt;white&gt;linux noapic&lt;/white&gt; if your system has trouble operating
++your network adapter correctly.
++&lt;red&gt;NOTE&lt;/red&gt;: 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 noauto mode.
++&lt;/document&gt;
+
+<a id="drakxtrunkimagesmake_boot_img">Added: drakx/trunk/images/make_boot_img</a>
+===================================================================
+--- drakx/trunk/images/make_boot_img (rev 0)
++++ drakx/trunk/images/make_boot_img 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,826 @@
++#!/usr/bin/perl
++
++use Config;
++use FileHandle;
++use MDK::Common;
++Config-&gt;import;
++my ($arch) = $Config{archname} =~ /(.*?)-/;
++
++my $default_append = '';
++my $default_acpi = '';
++my $default_vga = &quot;vga=788 splash=silent&quot;;
++my $timeout = 150;
++my $isolinux_bin = $arch eq 'x86_64' ? '/usr/lib/syslinux/isolinux-x86_64.bin' : '/usr/lib/syslinux/isolinux-i586.bin';
++my $lib = $arch eq 'x86_64' ? 'lib64' : 'lib';
++
++my $tmp_mnt = '/tmp/drakx_mnt';
++my $tmp_initrd = '/tmp/drakx_initrd';
++
++my $sudo;
++if ($&gt;) {
++ $sudo = &quot;sudo&quot;;
++ $ENV{PATH} = &quot;/sbin:/usr/sbin:$ENV{PATH}&quot;;
++}
++
++sub __ { print @_, &quot;\n&quot;; system(@_) }
++sub _ { __ @_; $? and die }
++sub mke2fs {
++ my ($f) = @_;
++ _ &quot;/sbin/mke2fs -q -m 0 -F -s 1 $f&quot;;
++ _ &quot;/sbin/tune2fs -c 0 -U clear -T 1970010101 $f&quot;;
++}
++
++_ &quot;mkdir -p $tmp_mnt&quot;;
++mkdir &quot;images&quot;;
++
++my @kernels = chomp_(cat_('all.kernels/.list'));
++
++my @all_images = (
++ if_($arch =~ /i.86/, 'isolinux', 'boot.iso', 'all.img', 'hd_grub.img'),
++ if_($arch =~ /x86_64/, 'isolinux', 'boot.iso', 'all.img', 'hd_grub.img'),
++ if_($arch =~ /ia64/, 'all.img'),
++ if_($arch =~ /ppc/, 'all.img'),
++ );
++
++my @images = @ARGV ? @ARGV : map { &quot;images/$_&quot; } @all_images;
++
++foreach my $img (@images) {
++ my ($type, $I, $extension) = $img =~ m!([^/]*)(64)?\.([^.]*)$!;
++
++ if ($img =~ /hd_grub/) {
++ hd_grub($img);
++ } elsif ($img =~ /isolinux/) {
++ isolinux(\@kernels);
++
++ if (my ($tftpboot) = grep { -e $_ } qw(/tftpboot /var/lib/tftpboot)) {
++ system(&quot;/bin/cp -f isolinux/alt0/* $tftpboot&quot;);
++ }
++ } elsif ($img =~ /boot.iso/) {
++ boot_iso($img, \@kernels);
++ } elsif ($extension eq 'rdz') {
++ initrd($type, $I, &quot;$img-$_&quot;) foreach @kernels;
++ } elsif ($extension eq 'img') {
++ print STDERR &quot;calling boot_img_$arch for $img\n&quot;;
++ $::{&quot;boot_img_$arch&quot;}-&gt;($type, $I, &quot;$img-$_&quot;, &quot;all.kernels/$_/vmlinuz&quot;) foreach @kernels;
++ rename(&quot;$img-$kernels[0]&quot;, $img);
++ } else {
++ die &quot;unknown image $img&quot;;
++ }
++}
++
++sub syslinux_color {
++ &quot;0&quot; . {
++ default =&gt; '7',
++ blue =&gt; '9',
++ green =&gt; 'a',
++ red =&gt; 'c',
++ yellow =&gt; 'e',
++ white =&gt; 'f',
++ }-&gt;{$_[0]} || die &quot;unknown color $_[0]\n&quot;;
++}
++
++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 &quot;parsing $msg_xml_file\n&quot;;
++ my $tree = XML::Parser-&gt;new(Style =&gt; 'Tree')-&gt;parsefile($msg_xml_file);
++ $tree-&gt;[0] eq 'document' or die &quot;bad file $msg_xml_file\n&quot;;
++ my $text = xml_tree2syslinux('default', $tree-&gt;[1]);
++
++ pack(&quot;C*&quot;, 0x0E, 0x80, 0x03, 0x00) . &quot; &quot;
++ . $text . join('', @more_text)
++ . &quot;\n&quot; . syslinux_color('red') . &quot;[F1-Help] [F2-Advanced Help]&quot; . syslinux_color('default') . &quot;\n&quot;;
++}
++
++sub syslinux_cfg {
++ my ($entries, $b_gfxboot) = @_;
++ my $default = 'linux';
++
++ my $header = &lt;&lt;EOF;
++default $default
++prompt 1
++timeout $timeout
++display help.msg
++implicit 1
++EOF
++ my $header_gfxboot = &lt;&lt;EOF;
++ui gfxboot.com bootlogo
++label harddisk
++ localboot 0x80
++EOF
++ my $header_non_gfxboot = &lt;&lt;EOF;
++F1 help.msg
++F2 advanced.msg
++F3 boot.msg
++EOF
++
++ my @l = map {
++ $_-&gt;{append} =~ s/\s+/ /g;
++ &quot;label $_-&gt;{label}\n&quot; .
++ &quot; kernel $_-&gt;{kernel}\n&quot; .
++ ($_-&gt;{initrd} ? &quot; append initrd=$_-&gt;{initrd} $_-&gt;{append}\n&quot; : '');
++ } @$entries;
++
++ $header . ($b_gfxboot ? $header_gfxboot : $header_non_gfxboot) . join('', @l);
++}
++
++sub initrd {
++ my ($type, $I, $img) = @_;
++ my $stage1_root = $ENV{DEBUGSTAGE1} ? &quot;../mdk-stage1&quot; : &quot;/usr/$lib/drakx-installer-binaries&quot;;
++ my ($ext) = $img =~ /rdz-(.*)/ or die &quot;bad initrd name ($img)&quot;;
++
++ _ &quot;rm -rf $tmp_initrd&quot;;
++ mkdir_p(&quot;$tmp_initrd$_&quot;) foreach qw(/etc /firmware /lib /modules /sbin /tmp /var);
++ symlink &quot;../modules&quot;, &quot;$tmp_initrd/lib/modules&quot;;
++ symlink &quot;../firmware&quot;, &quot;$tmp_initrd/lib/firmware&quot;;
++
++ symlink &quot;/proc/mounts&quot;, &quot;$tmp_initrd/etc/mtab&quot;;
++ symlink &quot;../tmp&quot;, &quot;$tmp_initrd/var/run&quot;;
++ _ &quot;install -D /usr/share/terminfo/l/linux $tmp_initrd/usr/share/terminfo/l/linux&quot;;
++ foreach ('pcitable', 'usbtable') {
++ _ &quot;install -D /usr/share/ldetect-lst/$_.gz $tmp_initrd/usr/share/ldetect-lst/$_.gz&quot;;
++ }
++ _ &quot;install -D /usr/share/pci.ids $tmp_initrd/usr/share/pci.ids&quot;;
++ foreach (&quot;/usr/share/ldetect-lst/fallback-modules.alias&quot;, &quot;/lib/module-init-tools/ldetect-lst-modules.alias&quot;) {
++ _ &quot;install -D $_ $tmp_initrd$_&quot;;
++ }
++ foreach my $firm (glob_(&quot;all.kernels$I/$ext/firmware/*&quot;)) {
++ my $dest=$firm;
++ $dest =~ s|all.kernels$I/$ext/||;
++ _ &quot;cp -a $firm $tmp_initrd/$dest&quot;;
++ };
++
++ output(&quot;$tmp_initrd/hotplug&quot;, q{#!/bin/sh -e
++if [ &quot;$SUBSYSTEM&quot; = firmware ] &amp;&amp; [ &quot;$ACTION&quot; = add ] &amp;&amp; [ -n &quot;$FIRMWARE&quot; ] ; then
++ if [ ! -e /sys$DEVPATH/loading ]; then
++ exit 1
++ fi
++ if [ -e &quot;/lib/firmware/$FIRMWARE&quot; ]; then
++ echo 1 &gt; /sys$DEVPATH/loading
++ cat &quot;/lib/firmware/$FIRMWARE&quot; &gt; /sys$DEVPATH/data
++ echo 0 &gt; /sys$DEVPATH/loading
++ exit 0
++ fi
++ echo -1 &gt; /sys$DEVPATH/loading
++ exit 1
++fi
++});
++ _ &quot;chmod 755 $tmp_initrd/hotplug&quot;;
++ symlink &quot;../hotplug&quot;, &quot;$tmp_initrd/sbin/hotplug&quot;;
++ _ &quot;install $stage1_root/init $tmp_initrd/&quot;;
++ foreach ('stage1', 'pppd', 'pppoe') {
++ _ &quot;install $stage1_root/$_ $tmp_initrd/sbin/&quot;;
++ }
++
++ if ($arch !~ /ppc|ia64/) {
++ mkdir_p(&quot;$tmp_initrd/etc/pcmcia&quot;);
++ _ &quot;cp -a /etc/pcmcia/config.opts $tmp_initrd/etc/pcmcia&quot;;
++ }
++ {
++ my $modz = &quot;all.kernels$I/$ext&quot;;
++ mkdir_p(&quot;$tmp_initrd/modules/$ext&quot;);
++ __ &quot;tar xC $tmp_initrd/modules/$ext -f $modz/${type}_modules.tar&quot;;
++ _ &quot;depmod -b $tmp_initrd $ext&quot;;
++ # depmod keeps only available modules in modules.alias, but we want them all
++ _ &quot;cp -f $modz/modules.alias $modz/modules.description $tmp_initrd/modules/$ext&quot;;
++ }
++ # ka deploy need some files in all.rdz
++ {
++ mkdir_p(&quot;$tmp_initrd/$_&quot;) foreach qw(dev ka proc var/tmp tmp/stage2);
++ symlink(&quot;/sbin&quot;, &quot;$tmp_initrd/bin&quot;);
++ cp_af(&quot;/usr/bin/ka-d-client&quot;, &quot;$tmp_initrd/ka/ka-d-client&quot;);
++ cp_af(&quot;/bin/busybox.static&quot;, &quot;$tmp_initrd/sbin/busybox&quot;);
++ my @funct = map { /functions:/ .. /^$/ ? do { s/\s//g; split /,/ } : () } `busybox.static`;
++ shift @funct;
++ symlink('busybox', $tmp_initrd . &quot;/sbin/$_&quot;) foreach @funct;
++ }
++
++ my $devs = sprintf &quot;ls /dev/{%s}&quot;, join(',', qw(console fb0 fd0 loop3 mem null ppp ptmx ptyp0 ram3 random tty[0-7] ttyp0 ttyS0 urandom));
++
++ _ &quot;(cd $tmp_initrd; (find . ; $devs) | cpio -o -c --quiet) | gzip -9 &gt; $img&quot;;
++ _ &quot;rm -rf $tmp_initrd&quot;;
++}
++
++sub entries_append {
++ my ($type) = @_;
++
++ my $automatic = $type =~ /cdrom/ ? 'automatic=method:cdrom ' : '';
++ $automatic .= 'changedisk ' if $type =~ /changedisk/;
++
++ my @simple_entries = (
++ linux =&gt; $default_vga,
++ vgalo =&gt; &quot;vga=785&quot;,
++ vgahi =&gt; &quot;vga=791&quot;,
++ text =&gt; &quot;text&quot;,
++# patch =&gt; &quot;patch $default_vga&quot;,
++ rescue =&gt; &quot;rescue&quot;,
++ );
++ my @entries = (
++ (map { $_-&gt;[0] =&gt; &quot;$automatic$default_acpi $_-&gt;[1]&quot; } group_by2(@simple_entries)),
++ noacpi =&gt; &quot;$automatic$default_vga acpi=off&quot;,
++# restore =&gt; &quot;$automatic$default_vga restore&quot;,
++ );
++
++ map { { label =&gt; $_-&gt;[0], append =&gt; join(' ', grep { $_ } $default_append, $_-&gt;[1]) } }
++ group_by2(@entries);
++}
++
++sub syslinux_cfg_all {
++ my ($type, $b_gfxboot) = @_;
++
++ syslinux_cfg([
++ (map {
++ { kernel =&gt; 'alt0/vmlinuz', initrd =&gt; 'alt0/all.rdz', %$_ };
++ } entries_append($type)),
++ (map_index {
++ { label =&gt; &quot;alt$::i&quot;, kernel =&gt; &quot;alt$::i/vmlinuz&quot;, initrd =&gt; &quot;alt$::i/all.rdz&quot;,
++ append =&gt; join(' ', grep { $_ } $default_append, $default_acpi, $default_vga) };
++ } @kernels),
++ { label =&gt; 'memtest', kernel =&gt; 'memtest' },
++ ], $b_gfxboot);
++}
++sub remove_ending_zero {
++ my ($img) = @_;
++ _(q(perl -0777 -pi -e 's/\0+$//' ) . $img);
++}
++
++sub boot_img_i386 {
++ my ($type, $I, $img, $kernel) = @_;
++
++ _ &quot;rm -rf $tmp_mnt&quot;; mkdir $tmp_mnt;
++ _ &quot;cat $kernel &gt; $tmp_mnt/vmlinuz&quot;;
++
++ output(&quot;$tmp_mnt/help.msg&quot;, syslinux_msg('help.msg.xml'));
++ output(&quot;$tmp_mnt/advanced.msg&quot;, syslinux_msg('advanced.msg.xml'));
++
++ (my $rdz = $img) =~ s/\.img/.rdz/;
++ (my $initrd_type = $type) =~ s/-changedisk//;
++ initrd($initrd_type, $I, $rdz);
++ my $short_type = substr($type, 0, 8);
++
++ output(&quot;$tmp_mnt/syslinux.cfg&quot;,
++ syslinux_cfg([ map {
++ { kernel =&gt; 'vmlinuz', initrd =&gt; &quot;$short_type.rdz&quot;, %$_ };
++ } entries_append($type) ]));
++
++ _ &quot;cp -f $rdz $tmp_mnt/$short_type.rdz&quot;;
++ unlink $rdz;
++
++ my $size = max(chomp_(`du -s -k $tmp_mnt`) + 50, 1440);
++ _ &quot;dd if=/dev/zero of=$img bs=1k count=$size&quot;;
++
++ _ &quot;mkdosfs-with-dir $tmp_mnt $img&quot;;
++ _ &quot;syslinux $img&quot;;
++ _ &quot;rm -rf $tmp_mnt&quot;;
++}
++
++# alias to x86 variant, slightly bigger with images though
++sub boot_img_x86_64 { &amp;boot_img_i386 }
++
++sub boot_img_alpha {
++ my ($type, $I, $img) = @_;
++
++ __ &quot;$sudo umount $tmp_mnt 2&gt;/dev/null&quot;;
++ _ &quot;dd if=/dev/zero of=$img bs=1k count=1440&quot;;
++ mke2fs($img);
++ _ &quot;/sbin/e2writeboot $img /boot/bootlx&quot;;
++ _ &quot;$sudo mount -t ext2 $img $tmp_mnt -o loop&quot;;
++ _ &quot;cp -f vmlinux.gz $tmp_mnt&quot;;
++ -f &quot;$type.rdz&quot; ? _ &quot;cp -f $type.rdz $tmp_mnt&quot; : initrd($type, $I, &quot;$tmp_mnt/$type.rdz&quot;);
++
++ mkdir &quot;$tmp_mnt/etc&quot;, 0777;
++ output(&quot;$tmp_mnt/etc/aboot.conf&quot;,
++&quot;0:vmlinux.gz initrd=$type.rdz rw $default_append $type
++1:vmlinux.gz initrd=$type.rdz rw $default_append text $type
++&quot;);
++ _ &quot;sync&quot;;
++ _ &quot;df $tmp_mnt&quot;;
++}
++
++sub boot_img_ia64 {
++ my ($type, $_I, $img, $kernel) = @_;
++ my $rdz = $img; $rdz =~ s/\.img/.rdz/;
++
++ __ &quot;$sudo umount $tmp_mnt 2&gt;/dev/null&quot;;
++ _ &quot;dd if=/dev/zero of=$img bs=1k count=16384&quot;;
++ _ &quot;mkdosfs $img&quot;;
++ _ &quot;$sudo mount -t vfat $img $tmp_mnt -o loop,umask=000&quot;;
++ _ &quot;$sudo cp -f $kernel $tmp_mnt/vmlinux&quot;;
++ _ &quot;cp -f $rdz $tmp_mnt/$type.rdz&quot;;
++ _ &quot;$sudo cp -f tools/ia64/elilo.efi $tmp_mnt&quot;;
++ output(&quot;$tmp_mnt/elilo.conf&quot;, qq(
++prompt
++timeout=50
++
++image=vmlinux
++ label=linux
++ initrd=$type.rdz
++ append=&quot; ramdisk_size=120000&quot;
++ read-only
++
++image=vmlinux
++ label=rescue
++ initrd=$type.rdz
++ append=&quot; rescue ramdisk_size=120000&quot;
++&quot;));
++ _ &quot;sync&quot;;
++ _ &quot;df $tmp_mnt&quot;;
++
++}
++
++sub boot_img_sparc {
++ my ($type, $I, $_img) = @_;
++ if ($type =~ /^live(.*)/) {
++ #- hack to produce directly into /export the needed file for cdrom boot.
++ my $dir = &quot;/export&quot;;
++ my $boot = &quot;boot&quot;; #- non-absolute pathname only!
++
++ _ &quot;mkdir -p $dir/$boot&quot;;
++ _ &quot;cp -f /boot/cd.b /boot/second.b $dir/$boot&quot;;
++ _ &quot;cp -f vmlinux$1 $dir/$boot/vmlinux$1&quot;;
++ -f &quot;live$1.rdz&quot; ? _ &quot;cp -f live$1.rdz $dir/$boot&quot; : initrd($type, $I, &quot;$dir/$boot/live$1.rdz&quot;);
++
++ output(&quot;$dir/$boot/silo.conf&quot;, qq(
++partition=1
++default=linux
++timeout=100
++read-write
++message=/$boot/boot.msg
++image=&quot;cat /$boot/boot.msg&quot;
++ label=1
++ single-key
++image=&quot;cat /$boot/general.msg&quot;
++ label=2
++ single-key
++image=&quot;cat /$boot/expert.msg&quot;
++ label=3
++ single-key
++image=&quot;cat /$boot/rescue.msg&quot;
++ label=4
++ single-key
++image=&quot;cat /$boot/kickit.msg&quot;
++ label=5
++ single-key
++image=&quot;cat /$boot/param.msg&quot;
++ label=6
++ single-key
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=linux
++ alias=install
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000&quot;
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=text
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000 text&quot;
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=expert
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000 expert&quot;
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=ks
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000 ks&quot;
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=rescue
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000 rescue&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=linux
++ alias=install
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=text
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000 text&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=expert
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000 expert&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=ks
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000 ks&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=rescue
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000 rescue&quot;
++&quot;));
++
++ output(&quot;$dir/$boot/README&quot;, &quot;
++To Build a Bootable CD-ROM, try:
++ genisoimage -R -o t.iso -s /$boot/silo.conf /export
++&quot;);
++ } elsif ($type =~ /^tftprd(.*)/) {
++ my $dir = &quot;/export&quot;;
++ my $boot = &quot;images&quot;;
++ my $setarch = $1 ? &quot;sparc64&quot; : &quot;sparc32&quot;;
++
++ _ &quot;mkdir -p $dir/$boot&quot;;
++ -f &quot;$type.rdz&quot; or initrd($type, $I, &quot;$type.rdz&quot;);
++ _ &quot;cp -f vmlinux$1.aout $dir/$boot/$type.img&quot;;
++ _ &quot;$setarch kernel$1/src/arch/sparc$1/boot/piggyback $dir/$boot/$type.img kernel$1/boot/System.map $type.rdz&quot;;
++ } elsif ($type =~ /^tftp(.*)/) {
++ my $dir = &quot;/export&quot;;
++ my $boot = &quot;images&quot;;
++
++ _ &quot;mkdir -p $dir/$boot&quot;;
++ _ &quot;cp -f vmlinux$1.aout $dir/$boot/$type.img&quot;;
++ } else {
++ my $dir = &quot;floppy&quot;;
++ __ &quot;$sudo umount $tmp_mnt 2&gt;/dev/null&quot;;
++ _ &quot;rm -rf $dir&quot;;
++ _ &quot;mkdir -p $dir&quot;;
++ _ &quot;cp -f /boot/fd.b /boot/second.b $dir&quot;;
++ _ &quot;cp -f vmlinuz$I $dir/vmlinux$I.gz&quot;;
++ -f &quot;$type.rdz&quot; ? _ &quot;cp -f $type.rdz $dir&quot; : initrd($type, $I, &quot;$dir/$type.rdz&quot;);
++
++ output(&quot;$dir/boot.msg&quot;, &quot;
++Welcome to Mageia 1
++
++Press &lt;Enter&gt; to install or upgrade a system 7mMageia7m
++&quot;);
++
++ output(&quot;$dir/silo.conf&quot;, qq(
++partition=1
++default=linux
++timeout=100
++read-write
++message=/boot.msg
++image=/vmlinux$I.gz
++ label=linux
++ initrd=/$type.rdz
++ append=&quot;ramdisk_size=128000 $type&quot;
++&quot;));
++ _ &quot;genromfs -d $dir -f /dev/ram -A 2048,/.. -a 512 -V 'DrakX boot disk'&quot;;
++ _ &quot;$sudo mount -t romfs /dev/ram $tmp_mnt&quot;;
++ _ &quot;silo -r $tmp_mnt -F -i /fd.b -b /second.b -C /silo.conf&quot;;
++ _ &quot;$sudo umount $tmp_mnt&quot;;
++ _ &quot;dd if=/dev/ram of=$type.img bs=1440k count=1&quot;;
++ _ &quot;sync&quot;;
++ _ &quot;$sudo mount -t romfs /dev/ram $tmp_mnt&quot;;
++ _ &quot;df $tmp_mnt&quot;;
++ }
++}
++
++sub boot_img_ppc {
++ my ($_type, $I, $_img, $_kernel) = @_;
++ foreach (glob(&quot;all.kernels/*&quot;)) {
++ my $ext = basename($_);
++ if ($ext =~ /legacy/) {
++ initrd(&quot;all&quot;, $I, &quot;images/all.rdz-$ext&quot;);
++ _ &quot;mv images/all.rdz-$ext images/all.rdz-legacy&quot;;
++ _ &quot;cp $_/vmlinuz images/vmlinux-legacy&quot;;
++ }
++ elsif ($ext =~ /2.6/) {
++ initrd(&quot;all&quot;, $I, &quot;images/all.rdz-$ext&quot;);
++ _ &quot;mv images/all.rdz-$ext images/all.rdz&quot;;
++ _ &quot;cp $_/vmlinuz images/vmlinux&quot;;
++ }
++ }
++ _ &quot;cp -f /usr/lib/yaboot/yaboot images/yaboot&quot;;
++
++ output(&quot;images/ofboot.b&quot;, '&lt;CHRP-BOOT&gt;
++&lt;COMPATIBLE&gt;
++MacRISC
++&lt;/COMPATIBLE&gt;
++&lt;DESCRIPTION&gt;
++Mageia PPC bootloader
++&lt;/DESCRIPTION&gt;
++&lt;BOOT-SCRIPT&gt;
++&quot; screen&quot; output
++load-base release-load-area
++dev screen
++&quot; &quot;(0000000000aa00aa0000aaaaaa0000aa00aaaa5500aaaaaa)&quot; drop 0 8 set-colors
++&quot; &quot;(5555555555ff55ff5555ffffff5555ff55ffffff55ffffff)&quot; drop 8 8 set-colors
++device-end
++3 to foreground-color
++0 to background-color
++&quot; &quot;(0C)&quot; fb8-write drop
++&quot; Booting Mageia PPC...&quot; fb8-write drop 100 ms
++boot cd:,\boot\yaboot
++&lt;/BOOT-SCRIPT&gt;
++&lt;OS-BADGE-ICONS&gt;
++1010
++000000000000F8FEACF6000000000000
++0000000000F5FFFFFEFEF50000000000
++00000000002BFAFEFAFCF70000000000
++0000000000F65D5857812B0000000000
++0000000000F5350B2F88560000000000
++0000000000F6335708F8FE0000000000
++00000000005600F600F5FD8100000000
++00000000F9F8000000F5FAFFF8000000
++000000008100F5F50000F6FEFE000000
++000000F8F700F500F50000FCFFF70000
++00000088F70000F50000F5FCFF2B0000
++0000002F582A00F5000008ADE02C0000
++00090B0A35A62B0000002D3B350A0000
++000A0A0B0B3BF60000505E0B0A0B0A00
++002E350B0B2F87FAFCF45F0B2E090000
++00000007335FF82BF72B575907000000
++000000000000ACFFFF81000000000000
++000000000081FFFFFFFF810000000000
++0000000000FBFFFFFFFFAC0000000000
++000000000081DFDFDFFFFB0000000000
++000000000081DD5F83FFFD0000000000
++000000000081DDDF5EACFF0000000000
++0000000000FDF981F981FFFF00000000
++00000000FFACF9F9F981FFFFAC000000
++00000000FFF98181F9F981FFFF000000
++000000ACACF981F981F9F9FFFFAC0000
++000000FFACF9F981F9F981FFFFFB0000
++00000083DFFBF981F9F95EFFFFFC0000
++005F5F5FDDFFFBF9F9F983DDDD5F0000
++005F5F5F5FDD81F9F9E7DF5F5F5F5F00
++0083DD5F5F83FFFFFFFFDF5F835F0000
++000000FBDDDFACFBACFBDFDFFB000000
++000000000000FFFFFFFF000000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFFFF00000000
++00000000FFFFFFFFFFFFFFFFFF000000
++00000000FFFFFFFFFFFFFFFFFF000000
++000000FFFFFFFFFFFFFFFFFFFFFF0000
++000000FFFFFFFFFFFFFFFFFFFFFF0000
++000000FFFFFFFFFFFFFFFFFFFFFF0000
++00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
++00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00
++00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
++000000FFFFFFFFFFFFFFFFFFFF000000
++&lt;/OS-BADGE-ICONS&gt;
++&lt;/CHRP-BOOT&gt;
++');
++
++ output(&quot;images/yaboot.conf&quot;, '
++init-message = &quot;\nWelcome to Mageia PPC!\nHit &lt;TAB&gt; for boot options.\n\n&quot;
++timeout = 150
++device=cd:
++default = install-gui
++message=/boot/yaboot.msg
++
++image = /boot/vmlinux
++ label = install-gui
++ initrd = /boot/all.gz
++ initrd-size = 34000
++ append = &quot; ramdisk_size=128000&quot;
++
++image = /boot/vmlinux-power4
++ label = install-gui-power4
++ initrd = /boot/all-power4.gz
++ initrd-size = 34000
++ append = &quot; ramdisk_size=128000&quot;
++
++image = /boot/vmlinux
++ label = install-text
++ initrd = /boot/all.gz
++ initrd-size = 34000
++ append = &quot; text ramdisk_size=128000&quot;
++
++image = /boot/vmlinux-power4
++ label = install-text-power4
++ initrd = /boot/all-power4.gz
++ initrd-size = 34000
++ append = &quot; text ramdisk_size=128000&quot;
++
++image = /boot/vmlinux
++ label = install-gui-old
++ initrd = /boot/all.gz
++ initrd-size = 34000
++ append = &quot; gui-old ramdisk_size=128000&quot;
++
++image = /boot/vmlinux-power4
++ label = install-gui-old-power4
++ initrd = /boot/all-power4.gz
++ initrd-size = 34000
++ append = &quot; gui-old ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux
++ label = install-net
++ initrd = enet:0,all.gz
++ initrd-size = 34000
++ append = &quot; ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux-power4
++ label = install-net-power4
++ initrd = enet:0,all-power4.gz
++ initrd-size = 34000
++ append = &quot; ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux
++ label = install-net-text
++ initrd = enet:0,all.gz
++ initrd-size = 34000
++ append = &quot; text ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux-power4
++ label = install-net-text-power4
++ initrd = enet:0,all-power4.gz
++ initrd-size = 34000
++ append = &quot; text ramdisk_size=128000&quot;
++
++image = /boot/vmlinux
++ label = rescue
++ initrd = /boot/all.gz
++ initrd-size = 34000
++ append = &quot; rescue ramdisk_size=128000&quot;
++
++image = /boot/vmlinux-power4
++ label = rescue-power4
++ initrd = /boot/all-power4.gz
++ initrd-size = 34000
++ append = &quot; rescue ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux
++ label = rescue-net
++ initrd = enet:0,all.gz
++ initrd-size = 34000
++ append = &quot; rescue ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux-power4
++ label = rescue-net-power4
++ initrd = enet:0,all-power4.gz
++ initrd-size = 34000
++ append = &quot; rescue ramdisk_size=128000&quot;
++');
++
++ output(&quot;images/yaboot.msg&quot;, '
++Thanks for choosing Mageia PPC. The following is a short
++explanation of the various options for booting the install CD.
++
++All options ending with &quot;-power4&quot; use the BOOT kernel for ppc 9xx and POWER4.
++The default syntax with no suffix uses the BOOT kernel for ppc 6xx 7xx and 7xxx.
++The default if you just hit enter is &quot;install-gui&quot;.
++
++install-gui: uses Xorg fbdev mode
++install-text: text based install
++install-net: allows you to use a minimal boot CD,
++ pulling the rest of the install from
++ a network server
++install-net-text: text mode network install
++rescue: boots the rescue image
++rescue-net: boots the rescue image from a network server
++
++');
++
++}
++
++sub VERSION {
++ my ($kernels) = @_;
++
++ map { &quot;$_\n&quot; }
++ $ENV{DISTRIB_DESCR},
++ scalar gmtime(),
++ '', @$kernels;
++}
++
++sub syslinux_all_files {
++ my ($dir, $kernels) = @_;
++
++ eval { rm_rf($dir) }; mkdir_p($dir);
++
++ @$kernels or die &quot;syslinux_all_files: no kernel\n&quot;;
++
++ $default_vga =~ /788/ or die 'we rely on vga=788 for bootsplash';
++ my $theme = $ENV{THEME} || 'Mageia-Free';
++
++ each_index {
++ mkdir &quot;$dir/alt$::i&quot;, 0777;
++ _ &quot;cp all.kernels/$_/vmlinuz $dir/alt$::i&quot;;
++ initrd('all', '', &quot;images/all.rdz-$_&quot;);
++ rename(&quot;images/all.rdz-$_&quot;, &quot;$dir/alt$::i/all.rdz&quot;);
++ } @$kernels;
++
++ _ &quot;install -m 644 -D /boot/memtest* $dir/memtest&quot;;
++
++ output(&quot;$dir/help.msg&quot;, syslinux_msg('help.msg.xml'));
++ output(&quot;$dir/advanced.msg&quot;, syslinux_msg('advanced.msg.xml',
++ &quot;\nYou can choose the following kernels :\n&quot;,
++ map_index { &quot; o &quot; . syslinux_color('white') . &quot;alt$::i&quot; . syslinux_color('default') . &quot; is kernel $_\n&quot; } @$kernels));
++}
++
++sub isolinux {
++ my ($kernels) = @_;
++
++ syslinux_all_files('isolinux', $kernels);
++
++ _ &quot;cp $isolinux_bin isolinux/isolinux.bin&quot;;
++ _ &quot;cp /usr/lib/syslinux/gfxboot.com isolinux/gfxboot.com&quot;;
++ output(&quot;isolinux/isolinux.cfg&quot;, syslinux_cfg_all('cdrom', 1));
++
++ xbox_stage1() if arch() =~ /i.86/;
++}
++
++sub xbox_stage1() {
++ my $xbox_kernel = find { /xbox/ } all('all.kernels') or return;
++
++ my $dir = 'isolinux/xbox';
++ eval { rm_rf($dir) }; mkdir_p($dir);
++
++ _ &quot;cp all.kernels/$xbox_kernel/vmlinuz $dir&quot;;
++ initrd('all', '', &quot;images/all.rdz-$xbox_kernel&quot;);
++ rename(&quot;images/all.rdz-$xbox_kernel&quot;, &quot;$dir/initrd&quot;);
++
++ _ &quot;cp /usr/share/cromwell/xromwell-installer.xbe $dir/default.xbe&quot;;
++ output(&quot;$dir/linuxboot.cfg&quot;, &lt;&lt;EOF);
++kernel $dir/vmlinuz
++initrd $dir/initrd
++append root=/dev/ram3 ramdisk_size=36000 automatic=method:cdrom
++EOF
++}
++
++sub boot_iso {
++ my ($iso, $kernels) = @_;
++
++ syslinux_all_files('.boot_iso/isolinux', $kernels);
++
++ output('.boot_iso/VERSION', VERSION($kernels));
++
++ # for the boot iso, use standard isolinux
++ _ &quot;cp /usr/lib/syslinux/isolinux.bin .boot_iso/isolinux/isolinux.bin&quot;;
++
++ my $with_gfxboot = 0;
++ _ &quot;cp /usr/share/gfxboot/themes/Mageia/install/* .boot_iso/isolinux&quot; if $with_gfxboot;
++# _ &quot;cp /home/pixel/cooker/soft/theme/mandriva-gfxboot-theme/inst/* .boot_iso/isolinux&quot; if $with_gfxboot;
++ #_ &quot;cp /home/teuf/mdv/src/mandriva-gfxboot-theme/inst/* .boot_iso/isolinux&quot; if $with_gfxboot;
++ _ &quot;cp /usr/lib/syslinux/gfxboot.com .boot_iso/isolinux/gfxboot.com&quot; if $with_gfxboot;
++
++ output('.boot_iso/isolinux/isolinux.cfg', syslinux_cfg_all('', $with_gfxboot));
++
++ _ &quot;genisoimage -r -f -J -cache-inodes -V 'Mga Boot ISO' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $iso .boot_iso&quot;;
++ rm_rf('.boot_iso');
++}
++
++sub hd_grub {
++ my ($img) = @_;
++ my $mapfile = '/tmp/device.map.tmp';
++
++ my ($grub_dir) = glob(&quot;/lib/grub/*-*&quot;);
++ my @grub_files = map { &quot;$grub_dir/$_&quot; } qw(stage1 stage2);
++ my $size = 40_000 + sum(map { -s $_ } @grub_files);
++
++ _ &quot;dd if=/dev/zero of=$img bs=1 count=$size&quot;;
++
++ _ &quot;rm -rf $tmp_mnt&quot;; mkdir $tmp_mnt;
++ _ &quot;cp @grub_files $tmp_mnt&quot;;
++
++ output(&quot;$tmp_mnt/menu.lst&quot;, &lt;&lt;EOF);
++timeout 10
++default 0
++fallback 1
++
++title Mageia Install
++
++root (hd0,0)
++kernel /cooker/isolinux/alt0/vmlinuz $default_append $default_acpi $default_vga automatic=method:disk
++initrd /cooker/isolinux/alt0/all.rdz
++
++title Help
++
++pause To display the help, press &lt;space&gt; until you reach &quot;HELP END&quot;
++pause .
++pause Please see http://qa.mandriva.com/hd_grub.cgi for a friendlier solution
++pause .
++pause To specify the location where Mageia is copied,
++pause choose &quot;Mageia Install&quot;, and press &quot;e&quot;.
++pause Then change &quot;root (hd0,0)&quot;. FYI:
++pause - (hd0,0) is the first partition on first bios hard drive (usually hda1)
++pause - (hd0,4) is the first extended partition (usually hda5)
++pause - (hd1,0) is the first partition on second bios hard drive
++pause Replace /cauldron to suit the directory containing Mageia
++pause .
++pause HELP END
++EOF
++
++ _ &quot;mkdosfs-with-dir $tmp_mnt $img&quot;;
++ _ &quot;rm -rf $tmp_mnt&quot;;
++
++ output($mapfile, &quot;(fd0) $img\n&quot;);
++
++ open(my $G, &quot;| grub --device-map=$mapfile --batch&quot;);
++ print $G &lt;&lt;EOF;
++root (fd0)
++install /stage1 d (fd0) /stage2 p /menu.lst
++quit
++EOF
++ close $G;
++ unlink $mapfile;
++}
+
+
+Property changes on: drakx/trunk/images/make_boot_img
+___________________________________________________________________
+<a id="svnexecutable">Added: svn:executable</a>
+ + *
+
+<a id="drakxtrunkimagesupdate_kernel">Added: drakx/trunk/images/update_kernel</a>
+===================================================================
+--- drakx/trunk/images/update_kernel (rev 0)
++++ drakx/trunk/images/update_kernel 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,80 @@
++#!/usr/bin/perl
++
++# this script takes command kernel rpms (either installed rpms or rpm files)
++# and create various files in all_kernels/:
++# all.kernels/VER/all_modules.tar (used for all.rdz)
++# all.kernels/VER/modules.dep
++# all.kernels/VER/modules.alias
++# all.kernels/VER/vmlinuz
++
++use lib '../kernel';
++use MDK::Common;
++use list_modules;
++
++(my $karch = arch()) =~ s/^i.86$/i586/;
++my $rpm = 'rpm --nosignature';
++
++
++@ARGV or die &quot;usage: ./update_kernel [--move] (&lt;kernel rpm&gt; ... | &lt;installed kernel name&gt; ...)\n&quot;;
++
++eval { rm_rf('all.kernels') }; #- remove old things
++mkdir 'all.kernels';
++
++my @kernels = map {
++ my $kern_ver = rpm2version($_);
++ if (/\.rpm$/) {
++ extract_kernel($_, $kern_ver);
++ } else {
++ extract_installed_rpm('', $kern_ver);
++ }
++ $kern_ver;
++} @ARGV;
++
++output('all.kernels/.list', map { &quot;$_\n&quot; } @kernels);
++
++sub system_verbose { print join(' ', @_), &quot;\n&quot;; system(@_) }
++sub sys { &amp;system_verbose; $? and die }
++
++sub rpm2version {
++ my ($kernel_rpm) = @_;
++ my $opt = -e $kernel_rpm ? '-qpl' : '-ql';
++ `$rpm $opt $kernel_rpm` =~ m!/boot/vmlinuz-(.*)! &amp;&amp; $1 or die &quot;can't find vmlinuz in $kernel_rpm (is it installed?)\n&quot;;
++}
++
++sub extract_kernel {
++ my ($kernel_rpm, $kern_ver) = @_;
++
++ my $dir = &quot;all.kernels/$kern_ver&quot;;
++
++ warn &quot;Extracting kernel $kern_ver\n&quot;;
++
++ eval { rm_rf($dir) };
++ mkdir_p(&quot;$dir/modules&quot;);
++ sys(&quot;rpm2cpio $kernel_rpm | (cd $dir ; cpio -id)&quot;);
++
++ extract_installed_rpm($dir, $kern_ver);
++
++ eval { rm_rf(&quot;$dir$_&quot;) } foreach qw(/boot /lib /usr);
++}
++
++sub extract_installed_rpm {
++ my ($installed_dir, $kern_ver) = @_;
++ my $local_dir = &quot;all.kernels/$kern_ver&quot;;
++ mkdir_p(&quot;$local_dir/modules&quot;);
++
++ sys('cp', &quot;$installed_dir/boot/vmlinuz-$kern_ver&quot;, &quot;$local_dir/vmlinuz&quot;);
++ sys(&quot;cp $installed_dir/lib/modules/$kern_ver/modules.* $local_dir&quot;);
++
++ open(my $F, &quot;find $installed_dir/lib/modules/$kern_ver -name '*.ko.gz' |&quot;);
++ my $file; while ($file = &lt;$F&gt;) {
++ chomp($file);
++ system('cp', $file, &quot;$local_dir/modules/&quot; . basename($file)) == 0
++ or warn &quot;conflict for $file\n&quot;;
++ }
++
++ sys('perl', '../kernel/modules.pl', 'remove_unneeded_modules', $kern_ver);
++ sys('perl', '../kernel/modules.pl', 'get_firmwares', $kern_ver);
++ sys('perl', '../kernel/modules.pl', 'make_modules_per_image', $kern_ver);
++
++ rm_rf(&quot;$local_dir/modules&quot;);
++}
+
+
+Property changes on: drakx/trunk/images/update_kernel
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+</pre></div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/zarb-ml/mageia-sysadm/attachments/20110207/5f16c035/attachment.html b/zarb-ml/mageia-sysadm/attachments/20110207/5f16c035/attachment.html
new file mode 100644
index 000000000..99683303f
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/attachments/20110207/5f16c035/attachment.html
@@ -0,0 +1,1340 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<title>[473] Import images</title>
+</head>
+<body>
+
+<style type="text/css"><!--
+#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
+#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
+#msg dt:after { content:':';}
+#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
+#msg dl a { font-weight: bold}
+#msg dl a:link { color:#fc3; }
+#msg dl a:active { color:#ff0; }
+#msg dl a:visited { color:#cc6; }
+h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
+#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
+#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
+#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
+#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
+#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
+#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
+#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
+#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
+#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
+#logmsg pre { background: #eee; padding: 1em; }
+#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
+#logmsg dl { margin: 0; }
+#logmsg dt { font-weight: bold; }
+#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
+#logmsg dd:before { content:'\00bb';}
+#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
+#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
+#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
+#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
+#logmsg table th.Corner { text-align: left; }
+#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
+#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
+#patch { width: 100%; }
+--></style>
+<div id="msg">
+<dl class="meta">
+<dt>Revision</dt> <dd>473</dd>
+<dt>Author</dt> <dd>dmorgan</dd>
+<dt>Date</dt> <dd>2011-02-07 12:20:50 +0100 (Mon, 07 Feb 2011)</dd>
+</dl>
+
+<h3>Log Message</h3>
+<pre>Import images</pre>
+
+<h3>Added Paths</h3>
+<ul>
+<li>drakx/trunk/images/</li>
+<li><a href="#drakxtrunkimagesperl_checker">drakx/trunk/images/.perl_checker</a></li>
+<li><a href="#drakxtrunkimagesMakefile">drakx/trunk/images/Makefile</a></li>
+<li><a href="#drakxtrunkimagesNEWS">drakx/trunk/images/NEWS</a></li>
+<li><a href="#drakxtrunkimagesadvancedmsgxml">drakx/trunk/images/advanced.msg.xml</a></li>
+<li><a href="#drakxtrunkimageshelpmsgxml">drakx/trunk/images/help.msg.xml</a></li>
+<li><a href="#drakxtrunkimagesmake_boot_img">drakx/trunk/images/make_boot_img</a></li>
+<li><a href="#drakxtrunkimagesupdate_kernel">drakx/trunk/images/update_kernel</a></li>
+</ul>
+
+</div>
+<div id="patch"><pre>
+<a id="drakxtrunkimagesperl_checker">Added: drakx/trunk/images/.perl_checker</a>
+===================================================================
+--- drakx/trunk/images/.perl_checker (rev 0)
++++ drakx/trunk/images/.perl_checker 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1 @@
++XML::Parser
+
+<a id="drakxtrunkimagesMakefile">Added: drakx/trunk/images/Makefile</a>
+===================================================================
+--- drakx/trunk/images/Makefile (rev 0)
++++ drakx/trunk/images/Makefile 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,57 @@
++include ../Makefile.config
++
++VERSION=1.50
++PRODUCT=drakx-installer-images
++KERNELS=$(shell rpm -qf /lib/modules/2.*)
++
++IMAGES_DEST = $(ROOTDEST)/install/images
++
++all: images
++
++images: all.kernels
++ DISTRIB_DESCR=$(DISTRIB_DESCR) ./make_boot_img
++ rm -rf images/alternatives
++ if [ `ls images/*.img-* 2&gt;/dev/null | wc -l` -gt 0 ]; then \
++ mkdir images/alternatives; cd images/alternatives; mv ../*.img-* .; md5sum *.img-* &gt; MD5SUM; \
++ fi
++ cd images ; md5sum *.{img,iso}* &gt; MD5SUM
++
++all.kernels: update_kernel ../kernel/list_modules.pm
++ ./update_kernel $(KERNELS)
++
++dist: tar
++tar:
++ @rm -rf $(PRODUCT)*.tar* $(PRODUCT)-$(VERSION)
++ @if [ -e &quot;.svn&quot; ]; then \
++ $(MAKE) dist-svn; \
++ elif [ -e &quot;../.git&quot; ]; then \
++ $(MAKE) dist-git; \
++ else \
++ echo &quot;Unknown SCM (not SVN nor GIT)&quot;;\
++ exit 1; \
++ fi;
++ $(info $(PRODUCT)-$(VERSION).tar.bz2 is ready)
++
++dist-svn:
++ mkdir -p $(PRODUCT)-$(VERSION)
++ svn export -q -rBASE . $(PRODUCT)-$(VERSION)/images
++ svn export -q -rBASE ../kernel $(PRODUCT)-$(VERSION)/kernel
++ cp ../Makefile.config $(PRODUCT)-$(VERSION)/
++ tar cfj $(PRODUCT)-$(VERSION).tar.bz2 $(PRODUCT)-$(VERSION)
++ rm -rf $(PRODUCT)-$(VERSION)
++
++dist-git:
++ @cd ..; git archive --prefix=$(PRODUCT)-$(VERSION)/ HEAD images kernel Makefile.config | bzip2 &gt;images/$(PRODUCT)-$(VERSION).tar.bz2;
++
++clean:
++ rm -rf images isolinux all.kernels modules.description
++ find . -name &quot;*~&quot; -o -name &quot;.#*&quot; | xargs rm -f
++
++install:
++ install -d $(IMAGES_DEST)
++ rm -rf $(IMAGES_DEST)/alternatives
++ cp -r images/* $(IMAGES_DEST)
++ ifneq (,$(findstring $(ARCH), i386 x86_64))
++ rm -rf $(ROOTDEST)/isolinux
++ cp -af isolinux $(ROOTDEST)
++ endif
+
+
+Property changes on: drakx/trunk/images/Makefile
+___________________________________________________________________
+<a id="svneolstyle">Added: svn:eol-style</a>
+ + native
+
+<a id="drakxtrunkimagesNEWS">Added: drakx/trunk/images/NEWS</a>
+===================================================================
+--- drakx/trunk/images/NEWS (rev 0)
++++ drakx/trunk/images/NEWS 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,208 @@
++Version 1.50 - 13 Oct 2010, by Thierry Vignaud
++
++- 2011.0 build
++
++Version 1.49 - 27 May 2010, by Olivier Blin
++
++- disable restore option
++
++Version 1.48 - 28 February 2010, by Thierry Vignaud
++
++- handle new SCSI driver: mpt2sas (#57833)
++
++Version 1.47 - 4 January 2010, by Pascal Terjan
++
++- use /bin/busybox.static
++
++Version 1.46 - 12 October 2009, by Olivier Blin
++
++- properly fix FileHandle issue
++
++Version 1.45 - 12 October 2009, by Thierry Vignaud
++
++- fix firmware again (#53220)
++
++Version 1.44 - 6 October 2009, by Thierry Vignaud
++
++- do not do anything anymore with bootsplash.cfg
++
++Version 1.43 - 22 September 2009, by Olivier Blin
++
++- fix firmware loading (#49195)
++- revert squashfs-lzma and sqlzma inclusion (this breaks install)
++- list asix module in network/usb group
++
++Version 1.42 - 9 September 2009, by Pascal Terjan
++
++- include squashfs-lzma and sqlzma kernel modules in all.rdz
++- add /dev/ptmx (for screen to work)
++- drop duplicated code including busybox, ka version is better than
++ the one of DEBUGSTAGE1
++- embed all firmwares that are needed by the modules we embed
++
++Version 1.40 - 14 April 2009, by Pascal Terjan
++
++- handle firmware loading in stage2 too
++
++Version 1.39 - 6 April 2009, by Pascal Terjan
++
++- fix firmware helper generation
++
++Version 1.38 - 3 April 2009, by Thierry Vignaud
++
++- include firmwares for most common network cards (#49195)
++- pass restore instead of --restore option
++- add a userspace helper to load firmwares
++
++Version 1.37 - 3 April 2009, by Pascal Terjan
++
++- fix crypto module names when arch is not i586 (#46814)
++
++Version 1.36 - 9 March 2009, by Thierry Vignaud
++
++- add /dev/random and /dev/urandom (for curl)
++
++Version 1.35 - 18 February 2009, by Thierry Vignaud
++
++- pass --restore instead of restore option
++
++Version 1.34 - 10 February 2009, by Thierry Vignaud
++
++- enable to select restore option
++
++Version 1.33 - 23 January 2009, by Christophe Fergeau
++
++- adjust to new syslinux 3.72 gfxboot COM32 module
++
++Version 1.32 - 15 January 2008, by Thierry Vignaud
++
++- include:
++ o network drivers: enic, et131x, qlge, smsc95xx, sxg &amp; w35und
++ o IDE driver: tx4939ide
++- ext4dev was renamed as ext4 in 2.6.29-rc1 (keep ext4dev for older kernels)
++
++Version 1.31 - 19 September 2008, by Pascal &quot;pixel&quot; Rigaux
++
++- add modules &quot;sha256_generic cbc amd768_rng&quot; for crypsetup/LUKS
++
++Version 1.30 - 12 June 2008, by Olivier &quot;blino&quot; Blin
++
++- handle ide-cd being renamed as ide-cd_mod
++
++Version 1.29 - 2 April 2008, by Olivier &quot;blino&quot; Blin
++
++- use &quot;Mdv Boot ISO&quot; as label for boot.iso
++
++Version 1.28 - 12 February 2008, by Olivier &quot;blino&quot; Blin
++
++- restore full modules.alias (depmod keeps only available modules in
++ modules.alias, but we want them all)
++
++Version 1.27 - 12 February 2008, by Olivier &quot;blino&quot; Blin
++
++- add modules in /modules/`uname -r` and use depmod to build
++ modules.dep and modules.alias
++- remove symlinks in toplevel /modules
++- fix custom bootsplash theme support
++
++Version 1.26 - 21 December 2007, by Olivier &quot;blino&quot; Blin
++
++- rebuild with list_modules to handle atl2 ethernet driver
++- fix live stage2 support
++
++Version 1.25 - 12 December 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- rebuild for new list_modules
++
++Version 1.24 - 15 October 2007, by Olivier &quot;blino&quot; Blin
++
++- rebuild for new list_modules (to include ipw3945)
++
++Version 1.23 - 17 September 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- add dm-zero for dmraid
++
++Version 1.22 - 11 September 2007, by Olivier &quot;blino&quot; Blin
++
++- add /lib/module-init-tools/ldetect-lst-modules.alias
++
++Version 1.21 - 7 September 2007, by Olivier &quot;blino&quot; Blin
++
++- add jmicron driver
++- provide /usr/share/ldetect-lst/*-modules.alias in installer images
++
++Version 1.20 - 31 August 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- dynamically determine the size of all.img
++
++Version 1.19 - 27 August 2007, by Olivier &quot;blino&quot; Blin
++
++- add raid456 module
++
++Version 1.18 - 21 August 2007, by Olivier &quot;blino&quot; Blin
++
++- release with latest scripts from drakx/kernel
++
++Version 1.17 - 21 August 2007, by Olivier &quot;blino&quot; Blin
++
++- keep modules without dependencies in modules.dep
++
++Version 1.16 - 21 August 2007, by Olivier &quot;blino&quot; Blin
++
++- build with new list_modules
++
++Version 1.15 - 15 August 2007, by Olivier &quot;blino&quot; Blin
++
++- add pcitable, usbtable and pci.ids
++- fix typos affecting mtab and /var/run creation
++- add a /lib/modules symlink
++
++Version 1.14 - 9 August 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- update_kernel: now require install rpms or rpm files as arguments
++ (this allow specifying precisely which installed kernels are used)
++
++Version 1.13 - 8 August 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- add modules.alias in /modules/&lt;version&gt; as required by stage2 with new libldetect
++- add unionfs module
++- revert isolinux starting install by default instead of booting on harddrive (#32040)
++
++Version 1.12 - 17 July 2007, by Olivier &quot;blino&quot; Blin
++
++- add ide-disk module
++
++Version 1.11 - 29 June 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- increase all.img size to 10.5MB
++- default to theme Mandriva-Free, and allow setting another one through THEME
++ environment variable
++
++Version 1.9 - 3 April 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- include mmc_block for card readers
++
++Version 1.8 - 23 March 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- restore F1 &amp; F2 in boot.iso (#29766)
++
++Version 1.6 - 14 March 2007, by Olivier Blin
++
++- add tifm modules (Titi)
++
++Version 1.5 - 9 March 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- copy isolinux images for x86_64 as well
++
++Version 1.4 - 8 March 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- restore vga= and automatic= default options.
++ also restore noacpi, alt0, vgalo, vgahi, text entries
++ (all this is needed when gfxboot is not working or not there)
++
++Version 1.3 - 16 February 2007, by Pascal &quot;Pixel&quot; Rigaux
++
++- rely on gfxboot for options (vga=, automatic=...)
++- really use memtest instead of memtest.bin
++ (with file name &quot;memtest.bin&quot; it fails with error 8000, with &quot;memtest&quot; it works)
++ (it seems to be an ancient bug as far as google says)
+
+<a id="drakxtrunkimagesadvancedmsgxml">Added: drakx/trunk/images/advanced.msg.xml</a>
+===================================================================
+--- drakx/trunk/images/advanced.msg.xml (rev 0)
++++ drakx/trunk/images/advanced.msg.xml 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,17 @@
++&lt;document&gt;
++The following install types may be used instead of previously notified :
++ o &lt;white&gt;vgahi&lt;/white&gt; for high resolution graphical installation.
++ o &lt;white&gt;vga16&lt;/white&gt; for 640x480 in 16 colors graphical installation.
++
++The following options may be added on the command line :
++ o &lt;white&gt;readonly=1&lt;/white&gt; to disable editing disk partitions.
++ o &lt;white&gt;display=ackbar:0&lt;/white&gt; to export display to &lt;blue&gt;ackbar&lt;/blue&gt; machine screen 0 during
++ installation (only for network installations).
++ o &lt;white&gt;noauto&lt;/white&gt; to disable automatic detection.
++ o &lt;white&gt;nodmraid&lt;/white&gt; to disable BIOS software RAID.
++ o &lt;white&gt;updatemodules&lt;/white&gt; to use the special update floppy containing modules updates.
++ o &lt;white&gt;patch&lt;/white&gt; to use a patch from the floppy (file named &lt;blue&gt;patch.pl&lt;/blue&gt;).
++ o &lt;white&gt;auto_install=floppy&lt;/white&gt; to enable auto_install using &lt;blue&gt;auto_inst.cfg&lt;/blue&gt; file on the
++ floppy.
++ o &lt;white&gt;memtest&lt;/white&gt; to test your computer RAM for faulty memory modules.
++&lt;/document&gt;
+
+<a id="drakxtrunkimageshelpmsgxml">Added: drakx/trunk/images/help.msg.xml</a>
+===================================================================
+--- drakx/trunk/images/help.msg.xml (rev 0)
++++ drakx/trunk/images/help.msg.xml 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,21 @@
++&lt;document&gt;
++ &lt;green&gt;Welcome to &lt;blue&gt;Mageia&lt;/blue&gt; install help&lt;/green&gt;
++
++In most cases, the best way to get started is to simply press the &lt;yellow&gt;&amp;lt;Enter&amp;gt;&lt;/yellow&gt; key.
++If you experience problems with standard install, try one of the following
++install types (type the highlighted text and press &lt;yellow&gt;&amp;lt;Enter&amp;gt;&lt;/yellow&gt;):
++
++ o &lt;white&gt;text&lt;/white&gt; for text installation instead of the graphical one.
++ o &lt;white&gt;linux&lt;/white&gt; for standard graphical installation at normal resolution.
++ o &lt;white&gt;linux vga=785&lt;/white&gt; for low resolution graphical installation.
++
++
++To repair an already installed system type &lt;white&gt;rescue&lt;/white&gt; followed
++by &lt;yellow&gt;&amp;lt;Enter&amp;gt;&lt;/yellow&gt;.
++
++You can also pass some &lt;white&gt;&amp;lt;specific kernel options&amp;gt;&lt;/white&gt; to the Linux kernel.
++For example, try &lt;white&gt;linux noapic&lt;/white&gt; if your system has trouble operating
++your network adapter correctly.
++&lt;red&gt;NOTE&lt;/red&gt;: 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 noauto mode.
++&lt;/document&gt;
+
+<a id="drakxtrunkimagesmake_boot_img">Added: drakx/trunk/images/make_boot_img</a>
+===================================================================
+--- drakx/trunk/images/make_boot_img (rev 0)
++++ drakx/trunk/images/make_boot_img 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,826 @@
++#!/usr/bin/perl
++
++use Config;
++use FileHandle;
++use MDK::Common;
++Config-&gt;import;
++my ($arch) = $Config{archname} =~ /(.*?)-/;
++
++my $default_append = '';
++my $default_acpi = '';
++my $default_vga = &quot;vga=788 splash=silent&quot;;
++my $timeout = 150;
++my $isolinux_bin = $arch eq 'x86_64' ? '/usr/lib/syslinux/isolinux-x86_64.bin' : '/usr/lib/syslinux/isolinux-i586.bin';
++my $lib = $arch eq 'x86_64' ? 'lib64' : 'lib';
++
++my $tmp_mnt = '/tmp/drakx_mnt';
++my $tmp_initrd = '/tmp/drakx_initrd';
++
++my $sudo;
++if ($&gt;) {
++ $sudo = &quot;sudo&quot;;
++ $ENV{PATH} = &quot;/sbin:/usr/sbin:$ENV{PATH}&quot;;
++}
++
++sub __ { print @_, &quot;\n&quot;; system(@_) }
++sub _ { __ @_; $? and die }
++sub mke2fs {
++ my ($f) = @_;
++ _ &quot;/sbin/mke2fs -q -m 0 -F -s 1 $f&quot;;
++ _ &quot;/sbin/tune2fs -c 0 -U clear -T 1970010101 $f&quot;;
++}
++
++_ &quot;mkdir -p $tmp_mnt&quot;;
++mkdir &quot;images&quot;;
++
++my @kernels = chomp_(cat_('all.kernels/.list'));
++
++my @all_images = (
++ if_($arch =~ /i.86/, 'isolinux', 'boot.iso', 'all.img', 'hd_grub.img'),
++ if_($arch =~ /x86_64/, 'isolinux', 'boot.iso', 'all.img', 'hd_grub.img'),
++ if_($arch =~ /ia64/, 'all.img'),
++ if_($arch =~ /ppc/, 'all.img'),
++ );
++
++my @images = @ARGV ? @ARGV : map { &quot;images/$_&quot; } @all_images;
++
++foreach my $img (@images) {
++ my ($type, $I, $extension) = $img =~ m!([^/]*)(64)?\.([^.]*)$!;
++
++ if ($img =~ /hd_grub/) {
++ hd_grub($img);
++ } elsif ($img =~ /isolinux/) {
++ isolinux(\@kernels);
++
++ if (my ($tftpboot) = grep { -e $_ } qw(/tftpboot /var/lib/tftpboot)) {
++ system(&quot;/bin/cp -f isolinux/alt0/* $tftpboot&quot;);
++ }
++ } elsif ($img =~ /boot.iso/) {
++ boot_iso($img, \@kernels);
++ } elsif ($extension eq 'rdz') {
++ initrd($type, $I, &quot;$img-$_&quot;) foreach @kernels;
++ } elsif ($extension eq 'img') {
++ print STDERR &quot;calling boot_img_$arch for $img\n&quot;;
++ $::{&quot;boot_img_$arch&quot;}-&gt;($type, $I, &quot;$img-$_&quot;, &quot;all.kernels/$_/vmlinuz&quot;) foreach @kernels;
++ rename(&quot;$img-$kernels[0]&quot;, $img);
++ } else {
++ die &quot;unknown image $img&quot;;
++ }
++}
++
++sub syslinux_color {
++ &quot;0&quot; . {
++ default =&gt; '7',
++ blue =&gt; '9',
++ green =&gt; 'a',
++ red =&gt; 'c',
++ yellow =&gt; 'e',
++ white =&gt; 'f',
++ }-&gt;{$_[0]} || die &quot;unknown color $_[0]\n&quot;;
++}
++
++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 &quot;parsing $msg_xml_file\n&quot;;
++ my $tree = XML::Parser-&gt;new(Style =&gt; 'Tree')-&gt;parsefile($msg_xml_file);
++ $tree-&gt;[0] eq 'document' or die &quot;bad file $msg_xml_file\n&quot;;
++ my $text = xml_tree2syslinux('default', $tree-&gt;[1]);
++
++ pack(&quot;C*&quot;, 0x0E, 0x80, 0x03, 0x00) . &quot; &quot;
++ . $text . join('', @more_text)
++ . &quot;\n&quot; . syslinux_color('red') . &quot;[F1-Help] [F2-Advanced Help]&quot; . syslinux_color('default') . &quot;\n&quot;;
++}
++
++sub syslinux_cfg {
++ my ($entries, $b_gfxboot) = @_;
++ my $default = 'linux';
++
++ my $header = &lt;&lt;EOF;
++default $default
++prompt 1
++timeout $timeout
++display help.msg
++implicit 1
++EOF
++ my $header_gfxboot = &lt;&lt;EOF;
++ui gfxboot.com bootlogo
++label harddisk
++ localboot 0x80
++EOF
++ my $header_non_gfxboot = &lt;&lt;EOF;
++F1 help.msg
++F2 advanced.msg
++F3 boot.msg
++EOF
++
++ my @l = map {
++ $_-&gt;{append} =~ s/\s+/ /g;
++ &quot;label $_-&gt;{label}\n&quot; .
++ &quot; kernel $_-&gt;{kernel}\n&quot; .
++ ($_-&gt;{initrd} ? &quot; append initrd=$_-&gt;{initrd} $_-&gt;{append}\n&quot; : '');
++ } @$entries;
++
++ $header . ($b_gfxboot ? $header_gfxboot : $header_non_gfxboot) . join('', @l);
++}
++
++sub initrd {
++ my ($type, $I, $img) = @_;
++ my $stage1_root = $ENV{DEBUGSTAGE1} ? &quot;../mdk-stage1&quot; : &quot;/usr/$lib/drakx-installer-binaries&quot;;
++ my ($ext) = $img =~ /rdz-(.*)/ or die &quot;bad initrd name ($img)&quot;;
++
++ _ &quot;rm -rf $tmp_initrd&quot;;
++ mkdir_p(&quot;$tmp_initrd$_&quot;) foreach qw(/etc /firmware /lib /modules /sbin /tmp /var);
++ symlink &quot;../modules&quot;, &quot;$tmp_initrd/lib/modules&quot;;
++ symlink &quot;../firmware&quot;, &quot;$tmp_initrd/lib/firmware&quot;;
++
++ symlink &quot;/proc/mounts&quot;, &quot;$tmp_initrd/etc/mtab&quot;;
++ symlink &quot;../tmp&quot;, &quot;$tmp_initrd/var/run&quot;;
++ _ &quot;install -D /usr/share/terminfo/l/linux $tmp_initrd/usr/share/terminfo/l/linux&quot;;
++ foreach ('pcitable', 'usbtable') {
++ _ &quot;install -D /usr/share/ldetect-lst/$_.gz $tmp_initrd/usr/share/ldetect-lst/$_.gz&quot;;
++ }
++ _ &quot;install -D /usr/share/pci.ids $tmp_initrd/usr/share/pci.ids&quot;;
++ foreach (&quot;/usr/share/ldetect-lst/fallback-modules.alias&quot;, &quot;/lib/module-init-tools/ldetect-lst-modules.alias&quot;) {
++ _ &quot;install -D $_ $tmp_initrd$_&quot;;
++ }
++ foreach my $firm (glob_(&quot;all.kernels$I/$ext/firmware/*&quot;)) {
++ my $dest=$firm;
++ $dest =~ s|all.kernels$I/$ext/||;
++ _ &quot;cp -a $firm $tmp_initrd/$dest&quot;;
++ };
++
++ output(&quot;$tmp_initrd/hotplug&quot;, q{#!/bin/sh -e
++if [ &quot;$SUBSYSTEM&quot; = firmware ] &amp;&amp; [ &quot;$ACTION&quot; = add ] &amp;&amp; [ -n &quot;$FIRMWARE&quot; ] ; then
++ if [ ! -e /sys$DEVPATH/loading ]; then
++ exit 1
++ fi
++ if [ -e &quot;/lib/firmware/$FIRMWARE&quot; ]; then
++ echo 1 &gt; /sys$DEVPATH/loading
++ cat &quot;/lib/firmware/$FIRMWARE&quot; &gt; /sys$DEVPATH/data
++ echo 0 &gt; /sys$DEVPATH/loading
++ exit 0
++ fi
++ echo -1 &gt; /sys$DEVPATH/loading
++ exit 1
++fi
++});
++ _ &quot;chmod 755 $tmp_initrd/hotplug&quot;;
++ symlink &quot;../hotplug&quot;, &quot;$tmp_initrd/sbin/hotplug&quot;;
++ _ &quot;install $stage1_root/init $tmp_initrd/&quot;;
++ foreach ('stage1', 'pppd', 'pppoe') {
++ _ &quot;install $stage1_root/$_ $tmp_initrd/sbin/&quot;;
++ }
++
++ if ($arch !~ /ppc|ia64/) {
++ mkdir_p(&quot;$tmp_initrd/etc/pcmcia&quot;);
++ _ &quot;cp -a /etc/pcmcia/config.opts $tmp_initrd/etc/pcmcia&quot;;
++ }
++ {
++ my $modz = &quot;all.kernels$I/$ext&quot;;
++ mkdir_p(&quot;$tmp_initrd/modules/$ext&quot;);
++ __ &quot;tar xC $tmp_initrd/modules/$ext -f $modz/${type}_modules.tar&quot;;
++ _ &quot;depmod -b $tmp_initrd $ext&quot;;
++ # depmod keeps only available modules in modules.alias, but we want them all
++ _ &quot;cp -f $modz/modules.alias $modz/modules.description $tmp_initrd/modules/$ext&quot;;
++ }
++ # ka deploy need some files in all.rdz
++ {
++ mkdir_p(&quot;$tmp_initrd/$_&quot;) foreach qw(dev ka proc var/tmp tmp/stage2);
++ symlink(&quot;/sbin&quot;, &quot;$tmp_initrd/bin&quot;);
++ cp_af(&quot;/usr/bin/ka-d-client&quot;, &quot;$tmp_initrd/ka/ka-d-client&quot;);
++ cp_af(&quot;/bin/busybox.static&quot;, &quot;$tmp_initrd/sbin/busybox&quot;);
++ my @funct = map { /functions:/ .. /^$/ ? do { s/\s//g; split /,/ } : () } `busybox.static`;
++ shift @funct;
++ symlink('busybox', $tmp_initrd . &quot;/sbin/$_&quot;) foreach @funct;
++ }
++
++ my $devs = sprintf &quot;ls /dev/{%s}&quot;, join(',', qw(console fb0 fd0 loop3 mem null ppp ptmx ptyp0 ram3 random tty[0-7] ttyp0 ttyS0 urandom));
++
++ _ &quot;(cd $tmp_initrd; (find . ; $devs) | cpio -o -c --quiet) | gzip -9 &gt; $img&quot;;
++ _ &quot;rm -rf $tmp_initrd&quot;;
++}
++
++sub entries_append {
++ my ($type) = @_;
++
++ my $automatic = $type =~ /cdrom/ ? 'automatic=method:cdrom ' : '';
++ $automatic .= 'changedisk ' if $type =~ /changedisk/;
++
++ my @simple_entries = (
++ linux =&gt; $default_vga,
++ vgalo =&gt; &quot;vga=785&quot;,
++ vgahi =&gt; &quot;vga=791&quot;,
++ text =&gt; &quot;text&quot;,
++# patch =&gt; &quot;patch $default_vga&quot;,
++ rescue =&gt; &quot;rescue&quot;,
++ );
++ my @entries = (
++ (map { $_-&gt;[0] =&gt; &quot;$automatic$default_acpi $_-&gt;[1]&quot; } group_by2(@simple_entries)),
++ noacpi =&gt; &quot;$automatic$default_vga acpi=off&quot;,
++# restore =&gt; &quot;$automatic$default_vga restore&quot;,
++ );
++
++ map { { label =&gt; $_-&gt;[0], append =&gt; join(' ', grep { $_ } $default_append, $_-&gt;[1]) } }
++ group_by2(@entries);
++}
++
++sub syslinux_cfg_all {
++ my ($type, $b_gfxboot) = @_;
++
++ syslinux_cfg([
++ (map {
++ { kernel =&gt; 'alt0/vmlinuz', initrd =&gt; 'alt0/all.rdz', %$_ };
++ } entries_append($type)),
++ (map_index {
++ { label =&gt; &quot;alt$::i&quot;, kernel =&gt; &quot;alt$::i/vmlinuz&quot;, initrd =&gt; &quot;alt$::i/all.rdz&quot;,
++ append =&gt; join(' ', grep { $_ } $default_append, $default_acpi, $default_vga) };
++ } @kernels),
++ { label =&gt; 'memtest', kernel =&gt; 'memtest' },
++ ], $b_gfxboot);
++}
++sub remove_ending_zero {
++ my ($img) = @_;
++ _(q(perl -0777 -pi -e 's/\0+$//' ) . $img);
++}
++
++sub boot_img_i386 {
++ my ($type, $I, $img, $kernel) = @_;
++
++ _ &quot;rm -rf $tmp_mnt&quot;; mkdir $tmp_mnt;
++ _ &quot;cat $kernel &gt; $tmp_mnt/vmlinuz&quot;;
++
++ output(&quot;$tmp_mnt/help.msg&quot;, syslinux_msg('help.msg.xml'));
++ output(&quot;$tmp_mnt/advanced.msg&quot;, syslinux_msg('advanced.msg.xml'));
++
++ (my $rdz = $img) =~ s/\.img/.rdz/;
++ (my $initrd_type = $type) =~ s/-changedisk//;
++ initrd($initrd_type, $I, $rdz);
++ my $short_type = substr($type, 0, 8);
++
++ output(&quot;$tmp_mnt/syslinux.cfg&quot;,
++ syslinux_cfg([ map {
++ { kernel =&gt; 'vmlinuz', initrd =&gt; &quot;$short_type.rdz&quot;, %$_ };
++ } entries_append($type) ]));
++
++ _ &quot;cp -f $rdz $tmp_mnt/$short_type.rdz&quot;;
++ unlink $rdz;
++
++ my $size = max(chomp_(`du -s -k $tmp_mnt`) + 50, 1440);
++ _ &quot;dd if=/dev/zero of=$img bs=1k count=$size&quot;;
++
++ _ &quot;mkdosfs-with-dir $tmp_mnt $img&quot;;
++ _ &quot;syslinux $img&quot;;
++ _ &quot;rm -rf $tmp_mnt&quot;;
++}
++
++# alias to x86 variant, slightly bigger with images though
++sub boot_img_x86_64 { &amp;boot_img_i386 }
++
++sub boot_img_alpha {
++ my ($type, $I, $img) = @_;
++
++ __ &quot;$sudo umount $tmp_mnt 2&gt;/dev/null&quot;;
++ _ &quot;dd if=/dev/zero of=$img bs=1k count=1440&quot;;
++ mke2fs($img);
++ _ &quot;/sbin/e2writeboot $img /boot/bootlx&quot;;
++ _ &quot;$sudo mount -t ext2 $img $tmp_mnt -o loop&quot;;
++ _ &quot;cp -f vmlinux.gz $tmp_mnt&quot;;
++ -f &quot;$type.rdz&quot; ? _ &quot;cp -f $type.rdz $tmp_mnt&quot; : initrd($type, $I, &quot;$tmp_mnt/$type.rdz&quot;);
++
++ mkdir &quot;$tmp_mnt/etc&quot;, 0777;
++ output(&quot;$tmp_mnt/etc/aboot.conf&quot;,
++&quot;0:vmlinux.gz initrd=$type.rdz rw $default_append $type
++1:vmlinux.gz initrd=$type.rdz rw $default_append text $type
++&quot;);
++ _ &quot;sync&quot;;
++ _ &quot;df $tmp_mnt&quot;;
++}
++
++sub boot_img_ia64 {
++ my ($type, $_I, $img, $kernel) = @_;
++ my $rdz = $img; $rdz =~ s/\.img/.rdz/;
++
++ __ &quot;$sudo umount $tmp_mnt 2&gt;/dev/null&quot;;
++ _ &quot;dd if=/dev/zero of=$img bs=1k count=16384&quot;;
++ _ &quot;mkdosfs $img&quot;;
++ _ &quot;$sudo mount -t vfat $img $tmp_mnt -o loop,umask=000&quot;;
++ _ &quot;$sudo cp -f $kernel $tmp_mnt/vmlinux&quot;;
++ _ &quot;cp -f $rdz $tmp_mnt/$type.rdz&quot;;
++ _ &quot;$sudo cp -f tools/ia64/elilo.efi $tmp_mnt&quot;;
++ output(&quot;$tmp_mnt/elilo.conf&quot;, qq(
++prompt
++timeout=50
++
++image=vmlinux
++ label=linux
++ initrd=$type.rdz
++ append=&quot; ramdisk_size=120000&quot;
++ read-only
++
++image=vmlinux
++ label=rescue
++ initrd=$type.rdz
++ append=&quot; rescue ramdisk_size=120000&quot;
++&quot;));
++ _ &quot;sync&quot;;
++ _ &quot;df $tmp_mnt&quot;;
++
++}
++
++sub boot_img_sparc {
++ my ($type, $I, $_img) = @_;
++ if ($type =~ /^live(.*)/) {
++ #- hack to produce directly into /export the needed file for cdrom boot.
++ my $dir = &quot;/export&quot;;
++ my $boot = &quot;boot&quot;; #- non-absolute pathname only!
++
++ _ &quot;mkdir -p $dir/$boot&quot;;
++ _ &quot;cp -f /boot/cd.b /boot/second.b $dir/$boot&quot;;
++ _ &quot;cp -f vmlinux$1 $dir/$boot/vmlinux$1&quot;;
++ -f &quot;live$1.rdz&quot; ? _ &quot;cp -f live$1.rdz $dir/$boot&quot; : initrd($type, $I, &quot;$dir/$boot/live$1.rdz&quot;);
++
++ output(&quot;$dir/$boot/silo.conf&quot;, qq(
++partition=1
++default=linux
++timeout=100
++read-write
++message=/$boot/boot.msg
++image=&quot;cat /$boot/boot.msg&quot;
++ label=1
++ single-key
++image=&quot;cat /$boot/general.msg&quot;
++ label=2
++ single-key
++image=&quot;cat /$boot/expert.msg&quot;
++ label=3
++ single-key
++image=&quot;cat /$boot/rescue.msg&quot;
++ label=4
++ single-key
++image=&quot;cat /$boot/kickit.msg&quot;
++ label=5
++ single-key
++image=&quot;cat /$boot/param.msg&quot;
++ label=6
++ single-key
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=linux
++ alias=install
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000&quot;
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=text
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000 text&quot;
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=expert
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000 expert&quot;
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=ks
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000 ks&quot;
++image[sun4c,sun4d,sun4m]=/$boot/vmlinux
++ label=rescue
++ initrd=/$boot/live.rdz
++ append=&quot;ramdisk_size=128000 rescue&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=linux
++ alias=install
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=text
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000 text&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=expert
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000 expert&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=ks
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000 ks&quot;
++image[sun4u]=/$boot/vmlinux64
++ label=rescue
++ initrd=/$boot/live64.rdz
++ append=&quot;ramdisk_size=128000 rescue&quot;
++&quot;));
++
++ output(&quot;$dir/$boot/README&quot;, &quot;
++To Build a Bootable CD-ROM, try:
++ genisoimage -R -o t.iso -s /$boot/silo.conf /export
++&quot;);
++ } elsif ($type =~ /^tftprd(.*)/) {
++ my $dir = &quot;/export&quot;;
++ my $boot = &quot;images&quot;;
++ my $setarch = $1 ? &quot;sparc64&quot; : &quot;sparc32&quot;;
++
++ _ &quot;mkdir -p $dir/$boot&quot;;
++ -f &quot;$type.rdz&quot; or initrd($type, $I, &quot;$type.rdz&quot;);
++ _ &quot;cp -f vmlinux$1.aout $dir/$boot/$type.img&quot;;
++ _ &quot;$setarch kernel$1/src/arch/sparc$1/boot/piggyback $dir/$boot/$type.img kernel$1/boot/System.map $type.rdz&quot;;
++ } elsif ($type =~ /^tftp(.*)/) {
++ my $dir = &quot;/export&quot;;
++ my $boot = &quot;images&quot;;
++
++ _ &quot;mkdir -p $dir/$boot&quot;;
++ _ &quot;cp -f vmlinux$1.aout $dir/$boot/$type.img&quot;;
++ } else {
++ my $dir = &quot;floppy&quot;;
++ __ &quot;$sudo umount $tmp_mnt 2&gt;/dev/null&quot;;
++ _ &quot;rm -rf $dir&quot;;
++ _ &quot;mkdir -p $dir&quot;;
++ _ &quot;cp -f /boot/fd.b /boot/second.b $dir&quot;;
++ _ &quot;cp -f vmlinuz$I $dir/vmlinux$I.gz&quot;;
++ -f &quot;$type.rdz&quot; ? _ &quot;cp -f $type.rdz $dir&quot; : initrd($type, $I, &quot;$dir/$type.rdz&quot;);
++
++ output(&quot;$dir/boot.msg&quot;, &quot;
++Welcome to Mageia 1
++
++Press &lt;Enter&gt; to install or upgrade a system 7mMageia7m
++&quot;);
++
++ output(&quot;$dir/silo.conf&quot;, qq(
++partition=1
++default=linux
++timeout=100
++read-write
++message=/boot.msg
++image=/vmlinux$I.gz
++ label=linux
++ initrd=/$type.rdz
++ append=&quot;ramdisk_size=128000 $type&quot;
++&quot;));
++ _ &quot;genromfs -d $dir -f /dev/ram -A 2048,/.. -a 512 -V 'DrakX boot disk'&quot;;
++ _ &quot;$sudo mount -t romfs /dev/ram $tmp_mnt&quot;;
++ _ &quot;silo -r $tmp_mnt -F -i /fd.b -b /second.b -C /silo.conf&quot;;
++ _ &quot;$sudo umount $tmp_mnt&quot;;
++ _ &quot;dd if=/dev/ram of=$type.img bs=1440k count=1&quot;;
++ _ &quot;sync&quot;;
++ _ &quot;$sudo mount -t romfs /dev/ram $tmp_mnt&quot;;
++ _ &quot;df $tmp_mnt&quot;;
++ }
++}
++
++sub boot_img_ppc {
++ my ($_type, $I, $_img, $_kernel) = @_;
++ foreach (glob(&quot;all.kernels/*&quot;)) {
++ my $ext = basename($_);
++ if ($ext =~ /legacy/) {
++ initrd(&quot;all&quot;, $I, &quot;images/all.rdz-$ext&quot;);
++ _ &quot;mv images/all.rdz-$ext images/all.rdz-legacy&quot;;
++ _ &quot;cp $_/vmlinuz images/vmlinux-legacy&quot;;
++ }
++ elsif ($ext =~ /2.6/) {
++ initrd(&quot;all&quot;, $I, &quot;images/all.rdz-$ext&quot;);
++ _ &quot;mv images/all.rdz-$ext images/all.rdz&quot;;
++ _ &quot;cp $_/vmlinuz images/vmlinux&quot;;
++ }
++ }
++ _ &quot;cp -f /usr/lib/yaboot/yaboot images/yaboot&quot;;
++
++ output(&quot;images/ofboot.b&quot;, '&lt;CHRP-BOOT&gt;
++&lt;COMPATIBLE&gt;
++MacRISC
++&lt;/COMPATIBLE&gt;
++&lt;DESCRIPTION&gt;
++Mageia PPC bootloader
++&lt;/DESCRIPTION&gt;
++&lt;BOOT-SCRIPT&gt;
++&quot; screen&quot; output
++load-base release-load-area
++dev screen
++&quot; &quot;(0000000000aa00aa0000aaaaaa0000aa00aaaa5500aaaaaa)&quot; drop 0 8 set-colors
++&quot; &quot;(5555555555ff55ff5555ffffff5555ff55ffffff55ffffff)&quot; drop 8 8 set-colors
++device-end
++3 to foreground-color
++0 to background-color
++&quot; &quot;(0C)&quot; fb8-write drop
++&quot; Booting Mageia PPC...&quot; fb8-write drop 100 ms
++boot cd:,\boot\yaboot
++&lt;/BOOT-SCRIPT&gt;
++&lt;OS-BADGE-ICONS&gt;
++1010
++000000000000F8FEACF6000000000000
++0000000000F5FFFFFEFEF50000000000
++00000000002BFAFEFAFCF70000000000
++0000000000F65D5857812B0000000000
++0000000000F5350B2F88560000000000
++0000000000F6335708F8FE0000000000
++00000000005600F600F5FD8100000000
++00000000F9F8000000F5FAFFF8000000
++000000008100F5F50000F6FEFE000000
++000000F8F700F500F50000FCFFF70000
++00000088F70000F50000F5FCFF2B0000
++0000002F582A00F5000008ADE02C0000
++00090B0A35A62B0000002D3B350A0000
++000A0A0B0B3BF60000505E0B0A0B0A00
++002E350B0B2F87FAFCF45F0B2E090000
++00000007335FF82BF72B575907000000
++000000000000ACFFFF81000000000000
++000000000081FFFFFFFF810000000000
++0000000000FBFFFFFFFFAC0000000000
++000000000081DFDFDFFFFB0000000000
++000000000081DD5F83FFFD0000000000
++000000000081DDDF5EACFF0000000000
++0000000000FDF981F981FFFF00000000
++00000000FFACF9F9F981FFFFAC000000
++00000000FFF98181F9F981FFFF000000
++000000ACACF981F981F9F9FFFFAC0000
++000000FFACF9F981F9F981FFFFFB0000
++00000083DFFBF981F9F95EFFFFFC0000
++005F5F5FDDFFFBF9F9F983DDDD5F0000
++005F5F5F5FDD81F9F9E7DF5F5F5F5F00
++0083DD5F5F83FFFFFFFFDF5F835F0000
++000000FBDDDFACFBACFBDFDFFB000000
++000000000000FFFFFFFF000000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFF0000000000
++0000000000FFFFFFFFFFFFFF00000000
++00000000FFFFFFFFFFFFFFFFFF000000
++00000000FFFFFFFFFFFFFFFFFF000000
++000000FFFFFFFFFFFFFFFFFFFFFF0000
++000000FFFFFFFFFFFFFFFFFFFFFF0000
++000000FFFFFFFFFFFFFFFFFFFFFF0000
++00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
++00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00
++00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
++000000FFFFFFFFFFFFFFFFFFFF000000
++&lt;/OS-BADGE-ICONS&gt;
++&lt;/CHRP-BOOT&gt;
++');
++
++ output(&quot;images/yaboot.conf&quot;, '
++init-message = &quot;\nWelcome to Mageia PPC!\nHit &lt;TAB&gt; for boot options.\n\n&quot;
++timeout = 150
++device=cd:
++default = install-gui
++message=/boot/yaboot.msg
++
++image = /boot/vmlinux
++ label = install-gui
++ initrd = /boot/all.gz
++ initrd-size = 34000
++ append = &quot; ramdisk_size=128000&quot;
++
++image = /boot/vmlinux-power4
++ label = install-gui-power4
++ initrd = /boot/all-power4.gz
++ initrd-size = 34000
++ append = &quot; ramdisk_size=128000&quot;
++
++image = /boot/vmlinux
++ label = install-text
++ initrd = /boot/all.gz
++ initrd-size = 34000
++ append = &quot; text ramdisk_size=128000&quot;
++
++image = /boot/vmlinux-power4
++ label = install-text-power4
++ initrd = /boot/all-power4.gz
++ initrd-size = 34000
++ append = &quot; text ramdisk_size=128000&quot;
++
++image = /boot/vmlinux
++ label = install-gui-old
++ initrd = /boot/all.gz
++ initrd-size = 34000
++ append = &quot; gui-old ramdisk_size=128000&quot;
++
++image = /boot/vmlinux-power4
++ label = install-gui-old-power4
++ initrd = /boot/all-power4.gz
++ initrd-size = 34000
++ append = &quot; gui-old ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux
++ label = install-net
++ initrd = enet:0,all.gz
++ initrd-size = 34000
++ append = &quot; ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux-power4
++ label = install-net-power4
++ initrd = enet:0,all-power4.gz
++ initrd-size = 34000
++ append = &quot; ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux
++ label = install-net-text
++ initrd = enet:0,all.gz
++ initrd-size = 34000
++ append = &quot; text ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux-power4
++ label = install-net-text-power4
++ initrd = enet:0,all-power4.gz
++ initrd-size = 34000
++ append = &quot; text ramdisk_size=128000&quot;
++
++image = /boot/vmlinux
++ label = rescue
++ initrd = /boot/all.gz
++ initrd-size = 34000
++ append = &quot; rescue ramdisk_size=128000&quot;
++
++image = /boot/vmlinux-power4
++ label = rescue-power4
++ initrd = /boot/all-power4.gz
++ initrd-size = 34000
++ append = &quot; rescue ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux
++ label = rescue-net
++ initrd = enet:0,all.gz
++ initrd-size = 34000
++ append = &quot; rescue ramdisk_size=128000&quot;
++
++image = enet:0,vmlinux-power4
++ label = rescue-net-power4
++ initrd = enet:0,all-power4.gz
++ initrd-size = 34000
++ append = &quot; rescue ramdisk_size=128000&quot;
++');
++
++ output(&quot;images/yaboot.msg&quot;, '
++Thanks for choosing Mageia PPC. The following is a short
++explanation of the various options for booting the install CD.
++
++All options ending with &quot;-power4&quot; use the BOOT kernel for ppc 9xx and POWER4.
++The default syntax with no suffix uses the BOOT kernel for ppc 6xx 7xx and 7xxx.
++The default if you just hit enter is &quot;install-gui&quot;.
++
++install-gui: uses Xorg fbdev mode
++install-text: text based install
++install-net: allows you to use a minimal boot CD,
++ pulling the rest of the install from
++ a network server
++install-net-text: text mode network install
++rescue: boots the rescue image
++rescue-net: boots the rescue image from a network server
++
++');
++
++}
++
++sub VERSION {
++ my ($kernels) = @_;
++
++ map { &quot;$_\n&quot; }
++ $ENV{DISTRIB_DESCR},
++ scalar gmtime(),
++ '', @$kernels;
++}
++
++sub syslinux_all_files {
++ my ($dir, $kernels) = @_;
++
++ eval { rm_rf($dir) }; mkdir_p($dir);
++
++ @$kernels or die &quot;syslinux_all_files: no kernel\n&quot;;
++
++ $default_vga =~ /788/ or die 'we rely on vga=788 for bootsplash';
++ my $theme = $ENV{THEME} || 'Mageia-Free';
++
++ each_index {
++ mkdir &quot;$dir/alt$::i&quot;, 0777;
++ _ &quot;cp all.kernels/$_/vmlinuz $dir/alt$::i&quot;;
++ initrd('all', '', &quot;images/all.rdz-$_&quot;);
++ rename(&quot;images/all.rdz-$_&quot;, &quot;$dir/alt$::i/all.rdz&quot;);
++ } @$kernels;
++
++ _ &quot;install -m 644 -D /boot/memtest* $dir/memtest&quot;;
++
++ output(&quot;$dir/help.msg&quot;, syslinux_msg('help.msg.xml'));
++ output(&quot;$dir/advanced.msg&quot;, syslinux_msg('advanced.msg.xml',
++ &quot;\nYou can choose the following kernels :\n&quot;,
++ map_index { &quot; o &quot; . syslinux_color('white') . &quot;alt$::i&quot; . syslinux_color('default') . &quot; is kernel $_\n&quot; } @$kernels));
++}
++
++sub isolinux {
++ my ($kernels) = @_;
++
++ syslinux_all_files('isolinux', $kernels);
++
++ _ &quot;cp $isolinux_bin isolinux/isolinux.bin&quot;;
++ _ &quot;cp /usr/lib/syslinux/gfxboot.com isolinux/gfxboot.com&quot;;
++ output(&quot;isolinux/isolinux.cfg&quot;, syslinux_cfg_all('cdrom', 1));
++
++ xbox_stage1() if arch() =~ /i.86/;
++}
++
++sub xbox_stage1() {
++ my $xbox_kernel = find { /xbox/ } all('all.kernels') or return;
++
++ my $dir = 'isolinux/xbox';
++ eval { rm_rf($dir) }; mkdir_p($dir);
++
++ _ &quot;cp all.kernels/$xbox_kernel/vmlinuz $dir&quot;;
++ initrd('all', '', &quot;images/all.rdz-$xbox_kernel&quot;);
++ rename(&quot;images/all.rdz-$xbox_kernel&quot;, &quot;$dir/initrd&quot;);
++
++ _ &quot;cp /usr/share/cromwell/xromwell-installer.xbe $dir/default.xbe&quot;;
++ output(&quot;$dir/linuxboot.cfg&quot;, &lt;&lt;EOF);
++kernel $dir/vmlinuz
++initrd $dir/initrd
++append root=/dev/ram3 ramdisk_size=36000 automatic=method:cdrom
++EOF
++}
++
++sub boot_iso {
++ my ($iso, $kernels) = @_;
++
++ syslinux_all_files('.boot_iso/isolinux', $kernels);
++
++ output('.boot_iso/VERSION', VERSION($kernels));
++
++ # for the boot iso, use standard isolinux
++ _ &quot;cp /usr/lib/syslinux/isolinux.bin .boot_iso/isolinux/isolinux.bin&quot;;
++
++ my $with_gfxboot = 0;
++ _ &quot;cp /usr/share/gfxboot/themes/Mageia/install/* .boot_iso/isolinux&quot; if $with_gfxboot;
++# _ &quot;cp /home/pixel/cooker/soft/theme/mandriva-gfxboot-theme/inst/* .boot_iso/isolinux&quot; if $with_gfxboot;
++ #_ &quot;cp /home/teuf/mdv/src/mandriva-gfxboot-theme/inst/* .boot_iso/isolinux&quot; if $with_gfxboot;
++ _ &quot;cp /usr/lib/syslinux/gfxboot.com .boot_iso/isolinux/gfxboot.com&quot; if $with_gfxboot;
++
++ output('.boot_iso/isolinux/isolinux.cfg', syslinux_cfg_all('', $with_gfxboot));
++
++ _ &quot;genisoimage -r -f -J -cache-inodes -V 'Mga Boot ISO' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $iso .boot_iso&quot;;
++ rm_rf('.boot_iso');
++}
++
++sub hd_grub {
++ my ($img) = @_;
++ my $mapfile = '/tmp/device.map.tmp';
++
++ my ($grub_dir) = glob(&quot;/lib/grub/*-*&quot;);
++ my @grub_files = map { &quot;$grub_dir/$_&quot; } qw(stage1 stage2);
++ my $size = 40_000 + sum(map { -s $_ } @grub_files);
++
++ _ &quot;dd if=/dev/zero of=$img bs=1 count=$size&quot;;
++
++ _ &quot;rm -rf $tmp_mnt&quot;; mkdir $tmp_mnt;
++ _ &quot;cp @grub_files $tmp_mnt&quot;;
++
++ output(&quot;$tmp_mnt/menu.lst&quot;, &lt;&lt;EOF);
++timeout 10
++default 0
++fallback 1
++
++title Mageia Install
++
++root (hd0,0)
++kernel /cooker/isolinux/alt0/vmlinuz $default_append $default_acpi $default_vga automatic=method:disk
++initrd /cooker/isolinux/alt0/all.rdz
++
++title Help
++
++pause To display the help, press &lt;space&gt; until you reach &quot;HELP END&quot;
++pause .
++pause Please see http://qa.mandriva.com/hd_grub.cgi for a friendlier solution
++pause .
++pause To specify the location where Mageia is copied,
++pause choose &quot;Mageia Install&quot;, and press &quot;e&quot;.
++pause Then change &quot;root (hd0,0)&quot;. FYI:
++pause - (hd0,0) is the first partition on first bios hard drive (usually hda1)
++pause - (hd0,4) is the first extended partition (usually hda5)
++pause - (hd1,0) is the first partition on second bios hard drive
++pause Replace /cauldron to suit the directory containing Mageia
++pause .
++pause HELP END
++EOF
++
++ _ &quot;mkdosfs-with-dir $tmp_mnt $img&quot;;
++ _ &quot;rm -rf $tmp_mnt&quot;;
++
++ output($mapfile, &quot;(fd0) $img\n&quot;);
++
++ open(my $G, &quot;| grub --device-map=$mapfile --batch&quot;);
++ print $G &lt;&lt;EOF;
++root (fd0)
++install /stage1 d (fd0) /stage2 p /menu.lst
++quit
++EOF
++ close $G;
++ unlink $mapfile;
++}
+
+
+Property changes on: drakx/trunk/images/make_boot_img
+___________________________________________________________________
+<a id="svnexecutable">Added: svn:executable</a>
+ + *
+
+<a id="drakxtrunkimagesupdate_kernel">Added: drakx/trunk/images/update_kernel</a>
+===================================================================
+--- drakx/trunk/images/update_kernel (rev 0)
++++ drakx/trunk/images/update_kernel 2011-02-07 11:20:50 UTC (rev 473)
+@@ -0,0 +1,80 @@
++#!/usr/bin/perl
++
++# this script takes command kernel rpms (either installed rpms or rpm files)
++# and create various files in all_kernels/:
++# all.kernels/VER/all_modules.tar (used for all.rdz)
++# all.kernels/VER/modules.dep
++# all.kernels/VER/modules.alias
++# all.kernels/VER/vmlinuz
++
++use lib '../kernel';
++use MDK::Common;
++use list_modules;
++
++(my $karch = arch()) =~ s/^i.86$/i586/;
++my $rpm = 'rpm --nosignature';
++
++
++@ARGV or die &quot;usage: ./update_kernel [--move] (&lt;kernel rpm&gt; ... | &lt;installed kernel name&gt; ...)\n&quot;;
++
++eval { rm_rf('all.kernels') }; #- remove old things
++mkdir 'all.kernels';
++
++my @kernels = map {
++ my $kern_ver = rpm2version($_);
++ if (/\.rpm$/) {
++ extract_kernel($_, $kern_ver);
++ } else {
++ extract_installed_rpm('', $kern_ver);
++ }
++ $kern_ver;
++} @ARGV;
++
++output('all.kernels/.list', map { &quot;$_\n&quot; } @kernels);
++
++sub system_verbose { print join(' ', @_), &quot;\n&quot;; system(@_) }
++sub sys { &amp;system_verbose; $? and die }
++
++sub rpm2version {
++ my ($kernel_rpm) = @_;
++ my $opt = -e $kernel_rpm ? '-qpl' : '-ql';
++ `$rpm $opt $kernel_rpm` =~ m!/boot/vmlinuz-(.*)! &amp;&amp; $1 or die &quot;can't find vmlinuz in $kernel_rpm (is it installed?)\n&quot;;
++}
++
++sub extract_kernel {
++ my ($kernel_rpm, $kern_ver) = @_;
++
++ my $dir = &quot;all.kernels/$kern_ver&quot;;
++
++ warn &quot;Extracting kernel $kern_ver\n&quot;;
++
++ eval { rm_rf($dir) };
++ mkdir_p(&quot;$dir/modules&quot;);
++ sys(&quot;rpm2cpio $kernel_rpm | (cd $dir ; cpio -id)&quot;);
++
++ extract_installed_rpm($dir, $kern_ver);
++
++ eval { rm_rf(&quot;$dir$_&quot;) } foreach qw(/boot /lib /usr);
++}
++
++sub extract_installed_rpm {
++ my ($installed_dir, $kern_ver) = @_;
++ my $local_dir = &quot;all.kernels/$kern_ver&quot;;
++ mkdir_p(&quot;$local_dir/modules&quot;);
++
++ sys('cp', &quot;$installed_dir/boot/vmlinuz-$kern_ver&quot;, &quot;$local_dir/vmlinuz&quot;);
++ sys(&quot;cp $installed_dir/lib/modules/$kern_ver/modules.* $local_dir&quot;);
++
++ open(my $F, &quot;find $installed_dir/lib/modules/$kern_ver -name '*.ko.gz' |&quot;);
++ my $file; while ($file = &lt;$F&gt;) {
++ chomp($file);
++ system('cp', $file, &quot;$local_dir/modules/&quot; . basename($file)) == 0
++ or warn &quot;conflict for $file\n&quot;;
++ }
++
++ sys('perl', '../kernel/modules.pl', 'remove_unneeded_modules', $kern_ver);
++ sys('perl', '../kernel/modules.pl', 'get_firmwares', $kern_ver);
++ sys('perl', '../kernel/modules.pl', 'make_modules_per_image', $kern_ver);
++
++ rm_rf(&quot;$local_dir/modules&quot;);
++}
+
+
+Property changes on: drakx/trunk/images/update_kernel
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+</pre></div>
+
+</body>
+</html> \ No newline at end of file