diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index e97bd74a0..4c9f08905 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -2,6 +2,7 @@ o don't list HDA "input" devices as keyboards (mga#9986) - drakboot: o build initrd for ARM arch + o create /usr/lib/linux symlink for devicee tree files Version 17.96 - 13 March 2018 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); |