All of lore.kernel.org
 help / color / mirror / Atom feed
* passing FDT(flattened device tree) to kernel during booting
@ 2020-10-24  1:32 김찬
  2020-10-24  2:51 ` linux lover
  2020-10-24  9:41 ` Martin Kaiser
  0 siblings, 2 replies; 3+ messages in thread
From: 김찬 @ 2020-10-24  1:32 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 625 bytes --]

Hello all,
I read here (https://www.kernel.org/doc/Documentation/arm64/booting.txt https://www.kernel.org/doc/Documentation/arm64/booting.txt) the device tree blob location should be passed to the kernel during  arm64 booting through x0 register. But  I see many .dts files under arch/arm64/boot/dts for many commercial boards. Does this mean that 1) we are supposed to use one of these files in the bootloader program to setup the device tree and pass it to kernel? or 2) we can embed the device tree inside the kernel during kernel building and just use it during the boot?
Any help will be appreciated.
Chan Kim

[-- Attachment #1.2: Type: text/html, Size: 1225 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: passing FDT(flattened device tree) to kernel during booting
  2020-10-24  1:32 passing FDT(flattened device tree) to kernel during booting 김찬
@ 2020-10-24  2:51 ` linux lover
  2020-10-24  9:41 ` Martin Kaiser
  1 sibling, 0 replies; 3+ messages in thread
From: linux lover @ 2020-10-24  2:51 UTC (permalink / raw)
  To: 김찬; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 865 bytes --]

Thank you very much!

Sent from my iPhone

> On Oct 24, 2020, at 9:32 AM, 김찬 <ckim@etri.re.kr> wrote:
> 
> Hello all,
> I read here (https://www.kernel.org/doc/Documentation/arm64/booting.txt) the device tree blob location should be passed to the kernel during  arm64 booting through x0 register. But  I see many .dts files under arch/arm64/boot/dts for many commercial boards. Does this mean that 1) we are supposed to use one of these files in the bootloader program to setup the device tree and pass it to kernel? or 2) we can embed the device tree inside the kernel during kernel building and just use it during the boot?
> Any help will be appreciated.
> Chan Kim
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[-- Attachment #1.2: Type: text/html, Size: 2024 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: passing FDT(flattened device tree) to kernel during booting
  2020-10-24  1:32 passing FDT(flattened device tree) to kernel during booting 김찬
  2020-10-24  2:51 ` linux lover
@ 2020-10-24  9:41 ` Martin Kaiser
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Kaiser @ 2020-10-24  9:41 UTC (permalink / raw)
  To: kernelnewbies

Thus wrote 김찬 (ckim@etri.re.kr):

> I read here
> (https://www.kernel.org/doc/Documentation/arm64/booting.txt
> https://www.kernel.org/doc/Documentation/arm64/booting.txt) the device
> tree blob location should be passed to the kernel during &nbsp;arm64
> booting through x0 register. But &nbsp;I see many .dts files under
> arch/arm64/boot/dts for many commercial boards. Does this mean that 1)
> we are supposed to use one of these files in the bootloader program to
> setup the device tree and pass it to kernel?

That depends on your specific hardware.

If your board is already supported, you can use the device tree that
comes with the kernel sources.

If you built your own hardware, you have to write a device tree for it
that describes all the components on your board.

> or 2) we can embed the device tree inside the kernel during kernel
> building and just use it during the boot? 

Usually, the bootloader will load kernel and device tree into ram and
set everything up for the kernel to run and to use the device tree.

If your bootloader can't do this or if you use no bootloader at all,
it's possible to append the device tree directly to the kernel image.
Search for "config ARM_APPENDED_DTB" in arch/arm/Kconfig for details
about this.

Best regards,
Martin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-24  9:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-24  1:32 passing FDT(flattened device tree) to kernel during booting 김찬
2020-10-24  2:51 ` linux lover
2020-10-24  9:41 ` Martin Kaiser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.