[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#683329: flash-kernel: Toshiba AC100 support broken [fix included]



Package: flash-kernel
Version: 3.2
Followup-For: Bug #683329

Dear Maintainer,

This is probably the same bug, although the original report contains
close to zero information...

Trying to flash a new kernel failed - flash-kernel exits early because
some shell command returned an error code. I have tracked this down to
faulty boot device detection.

This little loop from /usr/share/flash-kernel/functions around line 468
does the detection:

		for p in "$android_boot_device"*[0-9]; do
			abootimg="$(LC_ALL=C abootimg -i "$p" 2>/dev/null)"
			image_size="$(abootimg_get_image_size "$abootimg")"
			if [ -n "$image_size" ] &&
				[ "$image_size" -gt "$largest_size" ]; then
				part="$p"
			fi
		done

The assignment to abootimg contains a call to abootimg -i "$p". This
call fails when the glob pattern on the line above returns a block device
that is not an android boot image. Since the script is executed with -e,
this aborts the script.

Adding a "|| :" after the command fixes the problem thus:

		for p in "$android_boot_device"*[0-9]; do
			abootimg="$(LC_ALL=C abootimg -i "$p" 2>/dev/null || : )"
			image_size="$(abootimg_get_image_size "$abootimg")"
			if [ -n "$image_size" ] &&
				[ "$image_size" -gt "$largest_size" ]; then
				part="$p"
			fi
		done

-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (800, 'precise-updates'), (800, 'precise-security'), (800, 'precise'), (700, 'testing'), (650, 'unstable'), (600, 'stable')
Architecture: armel (armv7l)

Kernel: Linux 3.0.27-1-ac100 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages flash-kernel depends on:
ii  devio            1.2-1build1
ii  initramfs-tools  0.99ubuntu13
ii  linux-base       3.4ubuntu2

flash-kernel recommends no packages.

Versions of packages flash-kernel suggests:
ii  u-boot-tools  2011.09-2

-- Configuration Files:
/etc/initramfs/post-update.d/flash-kernel changed [not included]
/etc/initramfs/post-update.d/zz-flash-kernel changed [not included]

-- no debconf information


Reply to: