<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Thorsten,<br>
    <br>
    Thanks for the report. I'm the guy that originally wrote these lines
    ...<br>
    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.<br>
    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. <br>
    <br>
    @Pablo, I successfully tested building 4.19.27 from upstream. There
    are some minor changes:<br>
    - github now gives error 500 on the files we normally use<br>
    - the COPYING.linux file changed, so it needed a new location<br>
    - the patch for selinux needed to be remade.<br>
    <br>
    If interested, my patches and spec can be found here:<br>
<a class="moz-txt-link-freetext" href="https://github.com/redsleeve-linux/raspberrypi/tree/master/raspberrypi2">https://github.com/redsleeve-linux/raspberrypi/tree/master/raspberrypi2</a><br>
    <br>
    Jacco<br>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 3/3/19 4:24 PM, Thorsten Holtkämper
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:emc6713e00-50e4-417f-80bc-2fcb1787f8a4@bluebird">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <style>#x940a83e108c74e389c84fb24eb5ed9c9{
        font-family:Arial;
        font-size:10pt;
}</style>
      <style id="css_styles">
blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: right;'] {  list-style-position: inside;}
body { font-family: Arial; font-size: 10pt;   }
</style>Hi all,
      <div><br>
      </div>
      <div>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:</div>
      <div><br>
      </div>
      <div>postuninstall scriptlet (using /bin/sh):</div>
      <div>cp $(ls -1 /boot/kernel-*-*|tail -1) /boot/kernel7.img</div>
      <div>cp $(ls -1d /usr/share/raspberrypi2-kernel/*-*/|tail
        -1)/boot/*.dtb /boot/</div>
      <div>cp $(ls -1d /usr/share/raspberrypi2-kernel/*-*/|tail
        -1)/boot/overlays/*.dtb* /boot/overlays/</div>
      <div><br>
      </div>
      <div>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.</div>
      <div><br>
      </div>
      <div>An additional "sort -V" should fix the problem, i.e. "ls -1
        /boot/kernel-*-*|sort -V|tail -1".</div>
      <div><br>
      </div>
      <div>What do you think?</div>
      <div><br>
      </div>
      <div>Best regards,</div>
      <div>Thorsten</div>
      <div><br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Arm-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Arm-dev@centos.org">Arm-dev@centos.org</a>
<a class="moz-txt-link-freetext" href="https://lists.centos.org/mailman/listinfo/arm-dev">https://lists.centos.org/mailman/listinfo/arm-dev</a>
</pre>
    </blockquote>
  </body>
</html>