[Arm-dev] raspi kernel upgrade activates not the latest kernel version

Sun Mar 10 11:50:57 UTC 2019
Pablo Sebastián Greco <pablo at fliagreco.com.ar>

El 9/3/19 a las 14:52, Jacco Ligthart escribió:
> Hi Thorsten,
>
> Thanks for the report. I'm the guy that originally wrote these lines ...
> I always knew that this issue was present, but was not aware of the 
> '-V' option to sort. Therefore I never had a quick fix.
> I hoped that somebody would extend the "installkernel" script from 
> grubby, so that it also works for raspberries. I don't think that will 
> happen any more. Maybe we should have a look at how this works on 
> raspbian.
>
> @Pablo, I successfully tested building 4.19.27 from upstream. There 
> are some minor changes:
Good, It is in my to-do list, currently working on the other alternate 
kernels, that was next.
> - github now gives error 500 on the files we normally use
Yeap, I've been bitten by that one, I think it is a problem in the 
github repo
> - the COPYING.linux file changed, so it needed a new location
> - the patch for selinux needed to be remade.
Ack
>
> If interested, my patches and spec can be found here:
> https://github.com/redsleeve-linux/raspberrypi/tree/master/raspberrypi2
Sure, I intend to keep updating the 4.14.x (with 4.19.x as an alternate) 
until CentOS 7.7 comes out, and then make the switch to 4.19.
>
> Jacco


Thanks.
Pablo.

>
> On 3/3/19 4:24 PM, Thorsten Holtkämper wrote:
>> Hi all,
>>
>> kernel upgrades on the raspi sometimes end up with not the latest 
>> kernel being "activated" in the /boot directory. The reason for this 
>> is the kernel rpm postuninstall script of the old kernel that is removed:
>>
>> postuninstall scriptlet (using /bin/sh):
>> cp $(ls -1 /boot/kernel-*-*|tail -1) /boot/kernel7.img
>> cp $(ls -1d /usr/share/raspberrypi2-kernel/*-*/|tail -1)/boot/*.dtb 
>> /boot/
>> cp $(ls -1d /usr/share/raspberrypi2-kernel/*-*/|tail 
>> -1)/boot/overlays/*.dtb* /boot/overlays/
>>
>> It chooses the latest kernel version with "ls -1 
>> /boot/kernel-*-*|tail -1" which fails for kernel versions that have 
>> different number of digits in the version string, e.g. 4.9 and 4.14 
>> or 4.14.91 and 4.14.103.
>>
>> An additional "sort -V" should fix the problem, i.e. "ls -1 
>> /boot/kernel-*-*|sort -V|tail -1".
>>
>> What do you think?
>>
>> Best regards,
>> Thorsten
>>
>>
>> _______________________________________________
>> Arm-dev mailing list
>> Arm-dev at centos.org
>> https://lists.centos.org/mailman/listinfo/arm-dev
>
> _______________________________________________
> Arm-dev mailing list
> Arm-dev at centos.org
> https://lists.centos.org/mailman/listinfo/arm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/arm-dev/attachments/20190310/e5607c18/attachment-0006.html>