[PATCH 0/5] [U/master-next] [Packaging] arm*: move dbts to /boot/dtb-$(uname -r)

Paolo Pisati paolo.pisati at canonical.com
Wed Aug 27 15:28:47 UTC 2014


Since kernel version 3.10, many arm boards require a DTB file to boot, and while we were able to support old
bootloaders unaware of DTB files concatenating the DTB to the kernel during
flash-kernel invocation, the situation is becoming increasingly difficult to mantain.

Different revisions of the same board (and in some cases even different versions/setup of the same board) report
the same identification string, making our process of attaching the correct dtb to the kernel less and less
accurate and more of a guess work while, on the other hand, bootloaders have grown up the ability to
distinguish at boot time on which board they are running, and the exact version of dtb that the board
require, making it desirable to move the selection of the DTB file at boot time.

Moreover, with arm soc becoming more and more powerful (and with the advent of arm servers), people might
want to partition and use different filesystems for different parts of the system (or they might simply want to use
and advanced fs like btrfs or xfs for /), so making the DTB file accesible to the bootloader (that can only
read files off vfat or extX) is imperative.

Last but not least, with the DTB file available at boot time and given u-boot has grown support for
loading raw zImage, execution of flash-kernel after kernel installation is, in many cases,
not necessary, and as time progresses and old installation receive a new bootloader
(and bootscripts get updated), in the future it will be able completeley useless and we will be able
to remove flash-kernel as a dependency from the kernel.

For all the above reasons, this pachset move dtbs from /lib/firmware/$(uname -r)/device-tree
to /boot/dtb-$(uname -r), and creates the appropiate helper symlinks (e.g. /boot/dtb) to simplify
the boot process on arm boards.

This patchset _does_not_ break any installation (thanks to patch 5), and people willing to use the DTB
suggested by the bootloader require an up-to-date u-boot and manual intervention to uEnv.txt/boot.scr:
these two last steps are board, installation and environment dependent and are left as an exercise
to the reader.

Patch 1 move dtbs from the old path to /boot/dtb-$(uname -r)
Patch 2 creates the /boot/dtb symlink (and create/move it to /boot/dtb.old
	when a new kernel is installed)
Patch 3 and 4 make our installation functions able to cope with symlink to directory
Patch 5 is a helper symlink from dtb old path to the new path, to keep flash-kernel functioning
	and, among other things, make it possible to backport this kernel as-is to old Ubuntu releases

I've tested this patchset on different arm boards and i386/amd64, and iven our LTS just behind us,
i think this is a good time for such a move, thus i'm proposing this patchset for U/master-next.

Paolo Pisati (5):
  UBUNTU: [Packaging] dtb: move dtbs installation to /boot/dtb-$(uname -r)
  UBUNTU: [Packaging] dtb: symlink from /boot/dtb-$(uname -r) to /boot/dtb
  UBUNTU: [Packaging] dtb: don't follow simlink when checking for a directory
  UBUNTU: [Packaging] dtb: don't remove a symlink dereferencing an existing directory
  UBUNTU: [Packaging] dtb: symlink /lib/firmware/$(uname -r)/device-tree to /boot/dtb-$(uname -r) to make flash-kernel happy

 debian/control-scripts/postinst | 23 ++++++++++++++++++++++-
 debian/control-scripts/postrm   |  5 ++++-
 debian/rules.d/2-binary-arch.mk |  4 ++--
 3 files changed, 28 insertions(+), 4 deletions(-)

-- 
2.1.0





More information about the kernel-team mailing list