linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ian.molton@codethink.co.uk (Ian Molton)
To: linux-arm-kernel@lists.infradead.org
Subject: Device tree.
Date: Tue, 17 Jul 2012 12:55:53 +0100	[thread overview]
Message-ID: <500552C9.4090107@codethink.co.uk> (raw)

I've found some references to this in the mailinglist archives but 
nothing conclusive.

Whats the recommended way of dealing with devicetree when one is stuck 
with an unco-operative bootloader?

I've made a small hack (below) to allow me to append a .dtb to the end 
of the kernel image. I note that other similar hacks have not been 
picked up, but I can't see why. Or I've missed the one that did get chosen.

TTFN!

-Ian

------------------------------- arch/arm/Kconfig 
-------------------------------
index 519b5e0..cd82cbc 100644
@@ -1105,6 +1105,10 @@ source "arch/arm/mach-vt8500/Kconfig"

  source "arch/arm/mach-w90x900/Kconfig"

+config EMBEDDED_DTB
+    string "Embedded device tree blob" if OF
+    default ""
+
  # Definitions to make life easier
  config ARCH_ACORN
      bool

---------------------------- arch/arm/boot/Makefile 
----------------------------
index c877087..8e43741 100644
@@ -44,6 +44,9 @@ $(obj)/xipImage: FORCE
      @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)'
      @false

+#append Device Tree .dtb file after vmlinux
+cmd_do_append_dtb = if [ "$(CONFIG_EMBEDDED_DTB)" != "" ]; then cat 
$(CONFIG_EMBEDDED_DTB) >> $@ ; fi
+
  $(obj)/Image: vmlinux FORCE
      $(call if_changed,objcopy)
      @echo '  Kernel: $@ is ready'
@@ -53,6 +56,7 @@ $(obj)/compressed/vmlinux: $(obj)/Image FORCE

  $(obj)/zImage:    $(obj)/compressed/vmlinux FORCE
      $(call if_changed,objcopy)
+    $(call if_changed,do_append_dtb)
      @echo '  Kernel: $@ is ready'

  endif

             reply	other threads:[~2012-07-17 11:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17 11:55 Ian Molton [this message]
2012-07-17 12:01 ` Device tree Thomas Petazzoni
2012-07-17 12:13   ` Ian Molton
2012-07-17 12:29     ` Thomas Petazzoni
2012-07-17 12:41       ` Florian Fainelli
2012-07-17 13:32         ` Thomas Petazzoni
2012-07-17 12:32     ` Josh Coombs
2012-07-17 13:07       ` Ian Molton
2012-07-17 13:25         ` Ben Dooks
2012-07-17 13:52           ` Rob Herring
2012-07-17 13:56             ` Ben Dooks
2012-07-17 14:02               ` Florian Fainelli
2012-07-17 14:55                 ` Ian Molton
2012-07-17 21:18                   ` Nicolas Pitre
2012-07-18  7:51                     ` Ian Molton
2012-07-18 13:42                       ` Nicolas Pitre
2012-07-19  9:07                         ` Ian Molton
2012-07-19 21:32                           ` Nicolas Pitre
2012-07-23 13:10                             ` Mark Brown
2012-07-17 14:05             ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=500552C9.4090107@codethink.co.uk \
    --to=ian.molton@codethink.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).