summaryrefslogtreecommitdiffstats
path: root/make_boot_img
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-10-15 09:29:49 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-10-15 09:29:49 +0000
commite71cc7713c9a260a8a00fc9fed3c5147298f541f (patch)
tree89bfe8eb630a3a6c8082d58bd8f5d725ad87217f /make_boot_img
parentabc2e849606f93b2005e604b7de4dc2b811e9bd3 (diff)
downloaddrakx-e71cc7713c9a260a8a00fc9fed3c5147298f541f.tar
drakx-e71cc7713c9a260a8a00fc9fed3c5147298f541f.tar.gz
drakx-e71cc7713c9a260a8a00fc9fed3c5147298f541f.tar.bz2
drakx-e71cc7713c9a260a8a00fc9fed3c5147298f541f.tar.xz
drakx-e71cc7713c9a260a8a00fc9fed3c5147298f541f.zip
add support for ka.img
Diffstat (limited to 'make_boot_img')
-rwxr-xr-xmake_boot_img30
1 files changed, 25 insertions, 5 deletions
diff --git a/make_boot_img b/make_boot_img
index c71bfa30e..b2f7d8fbb 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -41,7 +41,7 @@ my @kernels = grep { /^2/ } all('kernel/all.kernels');
my @all_images = (
- if_($arch =~ /i.86/, 'cdrom.img', 'cdrom-changedisk.img', 'pcmcia.img', 'isolinux', 'boot.iso', 'hd_grub.img', 'network.img', 'network_drivers.img'),
+ if_($arch =~ /i.86/, 'cdrom.img', 'cdrom-changedisk.img', 'pcmcia.img', 'isolinux', 'boot.iso', 'hd_grub.img', 'network.img', 'network_drivers.img', 'ka.img'),
if_($arch =~ /x86_64/, 'cdrom.img', 'cdrom-changedisk.img', 'pcmcia.img', 'isolinux', 'boot.iso', 'network.img', 'network_drivers.img'),
if_($arch =~ /ia64/, 'all.img'),
);
@@ -133,10 +133,17 @@ sub install_stripped { _ "strip $_[0]"; _ "$sudo install $_[0] $_[1]" }
sub initrd {
my ($mnt, $type, $I, $img, $o_raw_stage1_tree_kind) = @_;
my $tmp = "$ENV{HOME}/tmp/initrd";
- my $tar = "$instdir/stage1-data/stage1$o_raw_stage1_tree_kind.tar.bz2";
+
+ if ($type eq "ka") {
+ our $tar = "$instdir/stage1-data/stage1-with-ka.tar.bz2";
+ $mke2fs = $mke2fs . " -N 700";
+ }
+ else {
+ our $tar = "$instdir/stage1-data/stage1$o_raw_stage1_tree_kind.tar.bz2";
+ }
__ "$sudo umount $tmp $mnt 2>/dev/null";
- _ "dd if=/dev/zero of=$tmp bs=1k count=" . ($arch =~ /ia64/ ? ($type eq "all" ? 16386 : 16384) : ($type eq "all" ? 5000 : 2000));
+ _ "dd if=/dev/zero of=$tmp bs=1k count=" . ($arch =~ /ia64/ ? ($type eq "all" ? 16386 : 16384) : ($type eq "ka" ? 2880 : ($type eq "all" ? 5000 : 2000)));
mke2fs($tmp);
_ "$sudo mount -t ext2 $tmp $mnt -o loop";
@@ -147,6 +154,7 @@ sub initrd {
my $install = ${{
network => "stage1-network",
cdrom => "stage1-cdrom",
+ ka => "stage1-full",
}}{$type} || 'stage1-full';
install_stripped("$instdir/init", "$mnt/sbin");
install_stripped("$instdir/$install", "$mnt/sbin/stage1");
@@ -184,8 +192,12 @@ sub initrd {
sub entries_append {
my ($type) = @_;
- my $automatic = $type =~ /cdrom/ ? 'automatic=method:cdrom' : '';
- $automatic .= " changedisk" if $type =~ /changedisk/;
+ my $automatic = "";
+ $automatic = "automatic=method:cdrom" if $type eq "cdrom";
+ $automatic = "automatic=method:disk" if $type eq "hd";
+ $automatic = "automatic=method:ka,interface:eth0,network:dhcp $DEFAULT_append rescue rw" if ($type eq "ka");
+# my $automatic = $type =~ /cdrom/ ? 'automatic=method:cdrom' : '';
+# $automatic .= " changedisk" if $type =~ /changedisk/;
my @simple_entries = (
linux => $default_vga,
@@ -214,6 +226,14 @@ sub boot_img_i386 {
__ "$sudo umount $mnt 2>/dev/null";
+ if ($type eq "hd") {
+ _ "bunzip2 -c $instdir/init-data/msgboot.img.bz2 > $img";
+ } elsif ($type eq "all" || $type eq "ka") {
+ _ "bunzip2 -c $instdir/init-data/msgboot-graphicallogo-2880.img.bz2 > $img";
+ } else {
+ _ "bunzip2 -c $instdir/init-data/msgboot-graphicallogo.img.bz2 > $img";
+ }
+
_ "dd if=/dev/zero of=$img bs=1k count=" . ($type eq 'all' ? 2880 : 1440);
_ "mkdosfs -f 1 -r 16 -s 2 $img"; # keep the FAT bookkeeping as small as possible
_ "$sudo syslinux-graphic $img";