flash-kernel subarch check fails with Linaro OMAP kernels

Bug #721147 reported by Ken Werner
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
flash-kernel (Ubuntu)
Fix Released
Undecided
Oliver Grawert
Natty
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: flash-kernel

When using flash-kernel with a recent Linaro kernel on an OMAP4 board the subarch check fails because the kfile does not end with a '3' or '4' - it's just named like this: vmlinuz-2.6.37-1002-linaro-omap. Since the linaro-omap kernel supports both the OMAP3 and OMAP4 there is no need to add a '3' or '4'.

The attached patch omits the check_subarch check for OMAP boards if $kfile matches the substring 'linaro-omap'.

Revision history for this message
Ken Werner (kwerner) wrote :
tags: added: patch
Changed in flash-kernel (Ubuntu):
status: New → Confirmed
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Debdiff with the fix, based on Ken Werner's fix.

Tested with Ubuntu OMAP 4 kernel and with linux-linaro-omap.

Revision history for this message
Oliver Grawert (ogra) wrote :

fix uploaded to -proposed

Changed in flash-kernel (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → Oliver Grawert (ogra)
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted flash-kernel into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in flash-kernel (Ubuntu Natty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Worked fine for me:

linaro@linaro:~/kernel$ dpkg -l | grep flash-kernel
ii flash-kernel 2.28ubuntu20 utility to make certain embedded devices bootable
linaro@linaro:~/kernel$ cd

linaro@linaro:~/kernel$ ls -l /boot/
total 21028
-rw------- 1 root root 2008637 May 24 03:32 System.map-2.6.38-1003-linaro-omap
-rw-r--r-- 1 root root 525199 May 24 03:32 abi-2.6.38-1003-linaro-omap
-rw-r--r-- 1 root root 361 May 24 05:14 boot.script
-rw-r--r-- 1 root root 94559 May 24 03:32 config-2.6.38-1003-linaro-omap
drwxr-xr-x 2 root root 4096 May 24 06:47 dt-2.6.38-1003-linaro-omap
-rw-r--r-- 1 root root 3991086 May 24 06:48 initrd.img-2.6.38-1003-linaro-omap
-rw------- 1 root root 4196708 May 24 03:32 vmlinuz-2.6.38-1003-linaro-omap

linaro@linaro:~/kernel$ sudo flash-kernel
Using u-boot partition: /dev/mmcblk0p1
Creating backups of uImage and uInitrd... done.
Generating kernel u-boot image... done.
Generating Initramfs u-boot image... done.
Generating u-boot configuration from /boot/boot.script... done.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Actually flash-kernel fails when you're using dash, as the applied patch contains a bashism.

Another issue with the upload is wrong version number, it should be 19.1 instead of 20.

With patch posted at comment #2 it all works well.

tags: added: verification-failed
removed: verification-done
Revision history for this message
Fathi Boudra (fboudra) wrote :

it doesn't work for me on linaro-developer image:

root@linaro:~# apt-get install flash-kernel
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  uboot-envtools redboot-tools
The following packages will be upgraded:
  flash-kernel
1 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
Need to get 12.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports/ natty-proposed/main flash-kernel armel 2.28ubuntu20 [12.8 kB]
Fetched 12.8 kB in 0s (50.5 kB/s)
(Reading database ... 55978 files and directories currently installed.)
Preparing to replace flash-kernel 2.28ubuntu19 (using .../flash-kernel_2.28ubuntu20_armel.deb) ...
Unpacking replacement flash-kernel ...
Setting up flash-kernel (2.28ubuntu20) ...
root@linaro:~# flash-kernel
/usr/sbin/flash-kernel: 951: [[: not found
Kernel /boot/vmlinuz-2.6.38-1003-linaro-omap does not match your subarchitecture
omap4, therefore not writing it to flash.
root@linaro:~# ls -l /boot
total 25544
-rw-r--r-- 1 root root 922401 Mar 4 03:55 System.map-2.6.35-1-n900
-rw------- 1 root root 1956901 Apr 16 00:01 System.map-2.6.38-1002-linaro-omap
-rw------- 1 root root 2008637 May 24 03:32 System.map-2.6.38-1003-linaro-omap
-rw-r--r-- 1 root root 266621 Mar 4 03:55 abi-2.6.35-1-n900
-rw-r--r-- 1 root root 513865 Apr 16 00:01 abi-2.6.38-1002-linaro-omap
-rw-r--r-- 1 root root 525199 May 24 03:32 abi-2.6.38-1003-linaro-omap
-rw-r--r-- 1 root root 52101 Mar 4 03:55 config-2.6.35-1-n900
-rw-r--r-- 1 root root 94519 Apr 16 00:01 config-2.6.38-1002-linaro-omap
-rw-r--r-- 1 root root 94559 May 24 03:32 config-2.6.38-1003-linaro-omap
drwxr-xr-x 2 root root 4096 May 20 18:18 dt-2.6.38-1002-linaro-omap
drwxr-xr-x 2 root root 4096 May 24 07:20 dt-2.6.38-1003-linaro-omap
-rw-r--r-- 1 root root 2381136 May 20 20:08 initrd.img-2.6.35-1-n900
-rw-r--r-- 1 root root 3713329 May 20 18:19 initrd.img-2.6.38-1002-linaro-omap
-rw-r--r-- 1 root root 3699209 May 24 07:21 initrd.img-2.6.38-1003-linaro-omap
-rw-r--r-- 1 root root 1611356 Mar 4 03:55 vmlinuz-2.6.35-1-n900
-rw------- 1 root root 4073680 Apr 16 00:01 vmlinuz-2.6.38-1002-linaro-omap
-rw------- 1 root root 4196708 May 24 03:32 vmlinuz-2.6.38-1003-linaro-omap
root@linaro:~# dpkg -l |grep linux-image
ii linux-image-2.6.35-1-n900 2.6.35-1.3.1 Linux kernel image for version 2.6.35 on Nokia N900
ii linux-image-2.6.38-1002-linaro-omap 2.6.38-1002.3 Linux kernel image for version 2.6.38 on TI OMAP[34]-based systems
ii linux-image-2.6.38-1003-linaro-omap 2.6.38-1003.4~ppa3 Linux kernel image for version 2.6.38 on TI OMAP[34]-based systems
ii linux-image-linaro-omap 2.6.38.1003.4 Linux kernel image for the OMAP architecture.

Revision history for this message
Fathi Boudra (fboudra) wrote :

> With patch posted at comment #2 it all works well.

confirmed.

Revision history for this message
Oliver Grawert (ogra) wrote :

this was fixed in the dev release quite a while ago, closing the non SRU task (is the SRU still relevant ?)

Changed in flash-kernel (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

natty has seen the end of its life and is no longer receiving any updates. Marking the natty task for this ticket as "Won't Fix".

Changed in flash-kernel (Ubuntu Natty):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.