diff options
author | Olivier Blin <dev@blino.org> | 2018-04-09 22:19:09 +0200 |
---|---|---|
committer | Olivier Blin <dev@blino.org> | 2018-05-13 22:28:56 +0200 |
commit | 28043924cf781f55a79c8f3542dc5cc7009df35b (patch) | |
tree | d404eb4ec11687a80d9d36fb3728c9922d021214 /perl-install/bootloader.pm | |
parent | 509e2d6f5fa05787c00b57890312c9acd5af1b21 (diff) | |
download | drakx-28043924cf781f55a79c8f3542dc5cc7009df35b.tar drakx-28043924cf781f55a79c8f3542dc5cc7009df35b.tar.gz drakx-28043924cf781f55a79c8f3542dc5cc7009df35b.tar.bz2 drakx-28043924cf781f55a79c8f3542dc5cc7009df35b.tar.xz drakx-28043924cf781f55a79c8f3542dc5cc7009df35b.zip |
bootloader: create /usr/lib/linux symlink for devicee tree files
Also save it as fdtdir
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 19 |
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); |