summaryrefslogtreecommitdiffstats
path: root/images/make_boot_img
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-09-10 12:43:39 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-09-10 12:43:39 +0000
commit38b7179eb5855ff61a319c5b182f3e7ab60e20fe (patch)
tree15488bcd5b0db0084cbf9d5180f51aaaab1bb3e6 /images/make_boot_img
parent697b2d487bda46dee8968f1496fca468fa23043b (diff)
downloaddrakx-backup-do-not-use-38b7179eb5855ff61a319c5b182f3e7ab60e20fe.tar
drakx-backup-do-not-use-38b7179eb5855ff61a319c5b182f3e7ab60e20fe.tar.gz
drakx-backup-do-not-use-38b7179eb5855ff61a319c5b182f3e7ab60e20fe.tar.bz2
drakx-backup-do-not-use-38b7179eb5855ff61a319c5b182f3e7ab60e20fe.tar.xz
drakx-backup-do-not-use-38b7179eb5855ff61a319c5b182f3e7ab60e20fe.zip
Fix firmware loading
Diffstat (limited to 'images/make_boot_img')
-rwxr-xr-ximages/make_boot_img12
1 files changed, 7 insertions, 5 deletions
diff --git a/images/make_boot_img b/images/make_boot_img
index 2d077d4b2..60906f4c5 100755
--- a/images/make_boot_img
+++ b/images/make_boot_img
@@ -141,6 +141,7 @@ EOF
sub initrd {
my ($type, $I, $img, $o_bootsplash_cfg) = @_;
my $stage1_root = $ENV{DEBUGSTAGE1} ? "../mdk-stage1" : "/usr/$lib/drakx-installer-binaries";
+ my ($ext) = $img =~ /rdz-(.*)/ or die "bad initrd name ($img)";
_ "rm -rf $tmp_initrd";
mkdir_p("$tmp_initrd$_") foreach qw(/etc /firmware /lib /modules /sbin /tmp /var);
@@ -157,13 +158,15 @@ sub initrd {
foreach ("/usr/share/ldetect-lst/fallback-modules.alias", "/lib/module-init-tools/ldetect-lst-modules.alias") {
_ "install -D $_ $tmp_initrd$_";
}
- foreach (glob_("all.kernels$I/firmware/*")) {
- _ "cp -a $_ $tmp_initrd$_";
+ foreach my $firm (glob_("all.kernels$I/$ext/firmware/*")) {
+ my $dest=$firm;
+ $dest =~ s|all.kernels$I/$ext/firmware/||;
+ _ "cp -a $firm $tmp_initrd/$dest";
};
output("$tmp_initrd/hotplug", q{#!/bin/sh -e
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
@@ -188,7 +191,6 @@ fi
_ "cp -a /etc/pcmcia/config.opts $tmp_initrd/etc/pcmcia";
}
{
- my ($ext) = $img =~ /rdz-(.*)/ or die "bad initrd name ($img)";
my $modz = "all.kernels$I/$ext";
mkdir_p("$tmp_initrd/modules/$ext");
__ "tar xC $tmp_initrd/modules/$ext -f $modz/${type}_modules.tar";
@@ -198,7 +200,7 @@ 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);
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");