Skip to contentSkip to conversation

embedding dtb file into kernel

DISCUSSION K Richard Pixley 3 participants 3 messages Feb 13, 2015 – Feb 15, 2015

lore
Share & tools
lore
#0 lore raw

I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?

Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?

If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.

Thank you in advance.

--rich

#1 lore raw
Quoted 8 lines · K Richard Pixley

I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?

Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?

If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.

Thank you in advance.

Hi,

The device tree (DTB file) is not supposed to be embedded into the kernel but loaded independently by the boot loader (for instance Uboot). Then a pointer to the device tree is handed over by Uboot to the kernel when calling the _start function.

You also have in arch/powerpc/boot/ a facility called cuboot which allows to create a ppcboot image with kernel and device tree bound together.

Christophe

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
http://www.avast.com

#2 lore raw
In reply to K Richard Pixley

Hi Richard,

Quoted 4 lines · K Richard Pixley

I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?

Quoted 8 lines

Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?

If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.

Maybe it is worth to take a look at the fitImage, which can embed pretty much anything (including DTB).

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================