omap3-pandora-kernel2: search harder for SD kernel
authorGrazvydas Ignotas <notasas@gmail.com>
Mon, 15 Sep 2014 22:56:48 +0000 (01:56 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 15 Sep 2014 22:58:09 +0000 (01:58 +0300)
recipes/linux/omap3-pandora-kernel2_3.2-pandora.bb

index 6cfc138..5702b89 100644 (file)
@@ -31,10 +31,10 @@ pkg_postinst_${PN} () {
   sync
 
   if ! grep -q '[[:blank:]]/[[:blank:]]*ubifs' /proc/mounts; then
   sync
 
   if ! grep -q '[[:blank:]]/[[:blank:]]*ubifs' /proc/mounts; then
-    test -e /media/PANDORABOOT/uImage && oldkernel=/media/PANDORABOOT/uImage
-    test -e /media/PANDORABOOT/uImage-3 && oldkernel=/media/PANDORABOOT/uImage-3
-    test -e /media/BOOT/uImage && oldkernel=/media/BOOT/uImage
-    test -e /media/BOOT/uImage-3 && oldkernel=/media/BOOT/uImage-3
+    for dir in `ls -d /media/*boot* 2> /dev/null` `ls -d /media/*BOOT* 2> /dev/null`; do
+      test -e $dir/uImage && oldkernel=$dir/uImage
+      test -e $dir/uImage-3 && oldkernel=$dir/uImage-3
+    done
 
     if test -n "$oldkernel"; then
       cp /boot/uImage-3 $oldkernel
 
     if test -n "$oldkernel"; then
       cp /boot/uImage-3 $oldkernel