All of lore.kernel.org
 help / color / mirror / Atom feed
* How to use .dts file for Kernel Image Compilation
@ 2014-01-22 10:11 sanchayan maity
  2014-01-23  6:46 ` Prabhakar Lad
  0 siblings, 1 reply; 4+ messages in thread
From: sanchayan maity @ 2014-01-22 10:11 UTC (permalink / raw)
  To: kernelnewbies

Hello Everyone,

I am compiling kernel image for a Toradex Colibri module which uses the
NVidia Tegra2 processor.
The device tree support and files are supplied, which i can see on the
below link.
http://lxr.free-electrons.com/source/arch/arm/boot/dts/?a=arm

The file name is tegra20-iris-512.dts which then includes
tegra20-colibri-512.dtsi.

I want to know how can i link this while doing "make" for kernel image
compilation. This is required as board config file is not present and the
device tree has to be used.

Based on my current findings, if the file name is for example exynos4.dts,
this will be specified in the config file with CONFIG_MACH_EXYNOS4_DT=y.

I want to know if this is the correct way of specifying a device tree file
for which .dtb has been generated?

The kernel version for which i am trying to do this is 3.12.6.

Thanks & Regards,
Sanchayan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140122/29597031/attachment.html 

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

* How to use .dts file for Kernel Image Compilation
  2014-01-22 10:11 How to use .dts file for Kernel Image Compilation sanchayan maity
@ 2014-01-23  6:46 ` Prabhakar Lad
  2014-01-23 15:45   ` Adrian Perez de Castro
  0 siblings, 1 reply; 4+ messages in thread
From: Prabhakar Lad @ 2014-01-23  6:46 UTC (permalink / raw)
  To: kernelnewbies

Hi,

On Wed, Jan 22, 2014 at 3:41 PM, sanchayan maity
<victorascroft@gmail.com> wrote:
> Hello Everyone,
>
> I am compiling kernel image for a Toradex Colibri module which uses the
> NVidia Tegra2 processor.
> The device tree support and files are supplied, which i can see on the below
> link.
> http://lxr.free-electrons.com/source/arch/arm/boot/dts/?a=arm
>
> The file name is tegra20-iris-512.dts which then includes
> tegra20-colibri-512.dtsi.
>
> I want to know how can i link this while doing "make" for kernel image
> compilation. This is required as board config file is not present and the
> device tree has to be used.
>
> Based on my current findings, if the file name is for example exynos4.dts,
> this will be specified in the config file with CONFIG_MACH_EXYNOS4_DT=y.
>
> I want to know if this is the correct way of specifying a device tree file
> for which .dtb has been generated?
>
> The kernel version for which i am trying to do this is 3.12.6.
>
If your configuration supports (defconfig) DT booting for your platform you
can build .dtb by just replacing the "uImage" to "dtbs" in the command what you
used for building the uImage.

Note:- For DT booting there should be also support in the U-Boot.

Regards,
--Prabhakar Lad
http://in.linkedin.com/in/prabhakarlad

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

* How to use .dts file for Kernel Image Compilation
  2014-01-23  6:46 ` Prabhakar Lad
@ 2014-01-23 15:45   ` Adrian Perez de Castro
  2014-01-28 18:08     ` sanchayan maity
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Perez de Castro @ 2014-01-23 15:45 UTC (permalink / raw)
  To: kernelnewbies


Hello,

Prabhakar Lad <prabhakar.csengg@gmail.com> writes:

> On Wed, Jan 22, 2014 at 3:41 PM, sanchayan maity
> <victorascroft@gmail.com> wrote:
>>
>> I want to know if this is the correct way of specifying a device tree file
>> for which .dtb has been generated?
>>
>> The kernel version for which i am trying to do this is 3.12.6.
>>
> If your configuration supports (defconfig) DT booting for your platform you
> can build .dtb by just replacing the "uImage" to "dtbs" in the command what you
> used for building the uImage.
>
> Note:- For DT booting there should be also support in the U-Boot.

Alternatively, if your U-Boot does not support loading a DT, you can
enable the ARM_APPENDED_DTB option in the kernel, and append the .dtb
file to your kernel image, like this:

  cat path/to/zImage path/to/board.dtb > zImageWithDT

The resulting file can be passed to U-Boot's ?mkimage? as a normal
kernel. With this options, if the kernel detects that a DT has
already been loaded by the bootloader, it will use it, otherwise
it will try to read the .dtb file that has been appended to it.

Cheers,


-Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140123/fc4e7bd7/attachment.bin 

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

* How to use .dts file for Kernel Image Compilation
  2014-01-23 15:45   ` Adrian Perez de Castro
@ 2014-01-28 18:08     ` sanchayan maity
  0 siblings, 0 replies; 4+ messages in thread
From: sanchayan maity @ 2014-01-28 18:08 UTC (permalink / raw)
  To: kernelnewbies

Hello,

Thanks everyone for helping. Of the two options, of either using device
tree with uboot or using it with the kernel, i have been trying the latter.

In the config file, i am setting,

1. CONFIG_ARM_APPENDED_DTB
2. ARM_ATAG_DTB_COMPAT
3. ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER
4. CONFIG_USE_OF
5. CONFIG_MACH_TEGRA20-IRIS-512_DT

I am appending the .dtb for my board file to the zImage generated and then
using mkimage to get the uImage. The booting stops at the line
"Starting Kernel....". As a result of this, i cannot figure out the exact
point of my error. As far as the config file is concerned, i have use the
first
option by itself and then tried separately in conjunction with the second
and third option as well. I get the same result in each case.

My reason for trying it with the 2nd and 3rd options, was because of
the explanation given in Kconfig file at the below link.
*http://lxr.free-electrons.com/source/arch/arm/Kconfig
<http://lxr.free-electrons.com/source/arch/arm/Kconfig>*

It might as well be of the kernel booting silently without any debug
console output. but, i have not been able to trace this.

Any suggestions will be helpful.

Thanks & Regards,
Sanchayan.

*My original post:*
I am compiling kernel image for a Toradex Colibri module which uses
the NVidia Tegra2 processor.
The device tree support and files are supplied, which i can see on the
below link.
http://lxr.free-electrons.com/source/arch/arm/boot/dts/?a=arm

The file name is tegra20-iris-512.dts which then includes
tegra20-colibri-512.dtsi.

I want to know how can i link this while doing "make" for
kernel image compilation. This is required as board config file is not
present and the device tree has to be used.

Based on my
current findings, if the file name is for example exynos4.dts, this will
 be specified in the config file with CONFIG_MACH_EXYNOS4_DT=y.

I want to know if this is the correct way of specifying a device tree
file for which .dtb has been generated?

The kernel version for which i am trying to do this is 3.12.6.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140128/5a40a049/attachment.html 

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

end of thread, other threads:[~2014-01-28 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 10:11 How to use .dts file for Kernel Image Compilation sanchayan maity
2014-01-23  6:46 ` Prabhakar Lad
2014-01-23 15:45   ` Adrian Perez de Castro
2014-01-28 18:08     ` sanchayan maity

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.