summaryrefslogtreecommitdiffstats
path: root/images/make_boot_img
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2011-01-31 13:29:15 +0000
committerAntoine Ginies <aginies@mandriva.com>2011-01-31 13:29:15 +0000
commit7e11b4fe1eca20de3fdc7495614c015fd030e115 (patch)
tree51ccf2540f4f482958d03e3c021573ea241277a1 /images/make_boot_img
parentd47c8e5649c64ca814fc838d67263a1a6ba1870b (diff)
downloaddrakx-backup-do-not-use-7e11b4fe1eca20de3fdc7495614c015fd030e115.tar
drakx-backup-do-not-use-7e11b4fe1eca20de3fdc7495614c015fd030e115.tar.gz
drakx-backup-do-not-use-7e11b4fe1eca20de3fdc7495614c015fd030e115.tar.bz2
drakx-backup-do-not-use-7e11b4fe1eca20de3fdc7495614c015fd030e115.tar.xz
drakx-backup-do-not-use-7e11b4fe1eca20de3fdc7495614c015fd030e115.zip
add more log using hotplug script, increase run_program timeout
Diffstat (limited to 'images/make_boot_img')
-rwxr-xr-ximages/make_boot_img26
1 files changed, 15 insertions, 11 deletions
diff --git a/images/make_boot_img b/images/make_boot_img
index 7c81cecb3..f35bbe4c5 100755
--- a/images/make_boot_img
+++ b/images/make_boot_img
@@ -165,17 +165,22 @@ sub initrd {
};
output("$tmp_initrd/hotplug", q{#!/bin/sh -e
+echo "Loading firmware" > /tmp/log.$FIRMWARE
+echo "SUBSYSTEM: $SUBSYSTEM" > /tmp/log.$FIRMWARE
+echo "ACTION: $ACTION" >> /tmp/log.$FIRMWARE
+echo "/sys/DEVPATH/loading: /sys/$DEVPATH/loading" >> /tmp/log.$FIRMWARE
+echo "/firmware/FIRMWARE: /firmware/$FIRMWARE" >> /tmp/log.$FIRMWARE
if [ "$SUBSYSTEM" = firmware ] && [ "$ACTION" = add ] && [ -n "$FIRMWARE" ] ; then
- if [ ! -e /sys$DEVPATH/loading ]; then
+ if [ ! -e /sys/$DEVPATH/loading ]; then
exit 1
fi
- if [ -e "/lib/firmware/$FIRMWARE" ]; then
- echo 1 > /sys$DEVPATH/loading
- cat "/lib/firmware/$FIRMWARE" > /sys$DEVPATH/data
- echo 0 > /sys$DEVPATH/loading
+ if [ -e "/firmware/$FIRMWARE" ]; then
+ echo 1 > /sys/$DEVPATH/loading
+ cat "/firmware/$FIRMWARE" > /sys/$DEVPATH/data
+ echo 0 > /sys/$DEVPATH/loading
exit 0
fi
- echo -1 > /sys$DEVPATH/loading
+ echo -1 > /sys/$DEVPATH/loading
exit 1
fi
});
@@ -201,12 +206,11 @@ fi
}
# ka deploy need some files in all.rdz
{
- mkdir_p("$tmp_initrd/$_") foreach qw(sbin dev ka proc sbin var/tmp);
+ mkdir_p("$tmp_initrd/$_") foreach qw(dev ka proc var/tmp tmp/stage2);
symlink("/sbin", "$tmp_initrd/bin");
cp_af("/usr/bin/ka-d-client", "$tmp_initrd/ka/ka-d-client");
- cp_af("/usr/bin/mke2fs_diet", "$tmp_initrd/sbin/mke2fs");
- cp_af("/usr/bin/busybox", "$tmp_initrd/sbin/busybox");
- my @funct = map { /functions:/ .. /^$/ ? do { s/\s//g; split /,/ } : () } `busybox`;
+ cp_af("/bin/busybox.static", "$tmp_initrd/sbin/busybox");
+ my @funct = map { /functions:/ .. /^$/ ? do { s/\s//g; split /,/ } : () } `busybox.static`;
shift @funct;
symlink('busybox', $tmp_initrd . "/sbin/$_") foreach @funct;
}
@@ -220,7 +224,7 @@ fi
_ "splash -s -f $o_bootsplash_cfg > $tmp_initrd/bootsplash";
}
- my $devs = sprintf "ls /dev/{%s}", join(',', qw(console fb0 fd0 loop3 mem null ppp ptyp0 ram3 tty[0-7] ttyp0 ttyS0));
+ my $devs = sprintf "ls /dev/{%s}", join(',', qw(console fb0 fd0 loop3 mem null ppp ptmx ptyp0 ram3 random tty[0-7] ttyp0 ttyS0 urandom));
_ "(cd $tmp_initrd; (find . ; $devs) | cpio -o -c --quiet) | gzip -9 > $img";
_ "rm -rf $tmp_initrd";