On Mon, Feb 8, 2016 at 4:37 PM, Steve McIntyre steve.mcintyre@linaro.org wrote:
On Mon, Feb 08, 2016 at 03:35:36PM +0000, Grant Likely wrote:
Hi all,
I've spent some time over the past couple of days getting update-grub working on the hikey. It works for me, but I need some review. The solution consists of three parts:
- a new config file in /etc/default/kernel that can contain
KERNEL_DEVICETREE="<board-name>" 2) a new script in /etc/kernel/postinst.d/devicetree that copies the requested device tree file into /boot when KERNEL_DEVICETREE is set 3) a modifcation to /etc/grub.d/10_linux that will add the devicetree command when KERNEL_DEVICETREE is set.
Hmmmm. Other machines aren't needing to know the specific devicetree in this way.
As already discussed, this is an issue that firmware doesn't yet supply a DT. We will get this fixed on HiKey, but that isn't the only reason for doing this. During development it will still be important to override the firmware provided DT. There needs to be some mechanism for making update-grub respect that.
I'm happy to change the rules by which the loaded devicetree is chosen. It doesn't have to require the DTB to be shipped in the kernel package (I merely chose that because it was convenient), and it doesn't need to be based on the kernel version number (although that may also prove to be useful at times). Just as long as the functionality is there to get update-grub to insert the devicetree line when the user requires it.
g.