summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index d4c3417aa..643b67e46 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -41,6 +41,7 @@ Example of usage:
my $vmlinuz_regexp = 'vmlinu[xz]|win4lin|uImage';
my $decompose_vmlinuz_name = qr/((?:$vmlinuz_regexp).*?)-(\d+\.\d+.*)/;
+my $liblinux_path = '/usr/lib/linux';
sub expand_vmlinuz_symlink {
my ($vmlinuz) = @_;
@@ -85,6 +86,10 @@ sub kernel_str2initrd_long {
my ($kernel) = @_;
basename2initrd_basename(kernel_str2short_name($kernel)) . '-' . $kernel->{version} . '.img';
}
+sub kernel_str2liblinux_long {
+ my ($kernel) = @_;
+ $liblinux_path . '-' . $kernel->{version};
+}
sub kernel_str2vmlinuz_short {
my ($kernel) = @_;
if ($kernel->{use_long_name}) {
@@ -101,6 +106,10 @@ sub kernel_str2initrd_short {
basename2initrd_basename(kernel_str2short_name($kernel)) . '.img';
}
}
+sub kernel_str2liblinux_short {
+ my ($kernel) = @_;
+ $liblinux_path;
+}
sub kernel_str2label {
my ($kernel, $o_use_long_name) = @_;
@@ -897,6 +906,11 @@ sub add_kernel {
$v->{initrd} = mkinitrd($kernel_str->{version}, $bootloader, $v, "/boot/$initrd_long");
}
+ my $liblinux_long = kernel_str2liblinux_long($kernel_str);
+ if (-d "$::prefix$liblinux_long") {
+ $v->{liblinux} = $v->{fdtdir} = $liblinux_long;
+ }
+
if (!$b_nolink) {
$v->{kernel_or_dev} = '/boot/' . kernel_str2vmlinuz_short($kernel_str);
_do_the_symlink($bootloader, $v->{kernel_or_dev}, $vmlinuz_long);
@@ -905,6 +919,11 @@ sub add_kernel {
$v->{initrd} = '/boot/' . kernel_str2initrd_short($kernel_str);
_do_the_symlink($bootloader, $v->{initrd}, $initrd_long);
}
+
+ if ($v->{liblinux}) {
+ $v->{liblinux} = kernel_str2liblinux_short($kernel_str);
+ _do_the_symlink($bootloader, $v->{liblinux}, basename($liblinux_long));
+ }
}
add_entry($bootloader, $v);