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

Bug#789886: linux-image-3.2.0-4-kirkwood: Couldn't find /usr/lib/linux-image-3.2.0-4-kirkwood/kirkwood-sheevaplug.dtb



* Jesse Adelman <jesse@boldandbusted.com> [2015-06-20 20:35]:
> When I upgrade this package on my Debian Wheezy Sheevaplug, I get this error:
> 
> Couldn't find /usr/lib/linux-image-3.2.0-4-kirkwood/kirkwood-sheevaplug.dtb

> Full log:
> 
> flash-kernel: installing version 3.2.0-4-kirkwood
> Generating kernel u-boot image... done.
> Taking backup of uImage.
> Installing new uImage.
> Generating initramfs u-boot image... done.
> Taking backup of uInitrd.
> Installing new uInitrd.
> Couldn't find /usr/lib/linux-image-3.2.0-4-kirkwood/kirkwood-sheevaplug.dtb
> dpkg: error processing package flash-kernel (--configure):
>  subprocess installed post-installation script returned error exit status 1

Sorry for the delay in responding to this bug.  I believe I know what
the issue is.  I've copied Ian Campbell who knows the code best.

Ian, I've attached a proposed patch below.  Do you agree with the
logic described or am I missing something?

The log also shows:

> update-initramfs: Generating /boot/initrd.img-3.2.0-4-kirkwood
> /usr/lib/linux-image-3.2.0-4-kirkwood/kirkwood-sheevaplug.dtb not found
> /usr/lib/linux-image-3.2.0-4-kirkwood/kirkwood-sheevaplug.dtb not found

I'm not sure where this is from but it seems isn't not causing an
actual error.


Only create DTB boot file on kernels that require DTB

Boot-DTB-Path can be specified to install the DTB to a file.  Some
machines, such as the SheevaPlug, contain both a DTB-Append-From and
a Boot-DTB-Path.

If DTB-Append-From is set, a verson check is performed to see if the
DTB is required and dtb_append is set to "yes" or "no" accordingly.
However, there is no version check for Boot-DTB-Path.  This can lead
to errors that the DTB couldn't be found on older kernels (i.e. older
than the version specified in DTB-Append-From).

Arguably, DTB-Append-From and Boot-DTB-Path together don't make sense
(why would you append the DTB _and_ install it to /boot), but it's
possible that users rely on this behaviour.

Therefore, only honour Boot-DTB-Path if $dtb_append is not "no".  If
it's "yes" or empty, we want to install the DTB to Boot-DTB-Path.
But if $dtb_append is "no", it means we're on an old kernel without
DTBs.

diff --git a/functions b/functions
index 368cbf2..c4ef6a3 100644
--- a/functions
+++ b/functions
@@ -939,7 +939,7 @@ case "$method" in
 			boot_script="$tmpdir/boot.scr"
 			backup_and_install "$boot_script" "$boot_script_path"
 		fi
-		if [ -n "$boot_dtb_path" ]; then
+		if [ -n "$boot_dtb_path" ] && [ "$dtb_append" != "no" ]; then
 			boot_dtb_path="$boot_mnt_dir/$boot_dtb_path"
 			boot_dtb=$(find_dtb_file)
 			if [ ! -f "$boot_dtb" ]; then

-- 
Martin Michlmayr
http://www.cyrius.com/


Reply to: