How to use .dts file for Kernel Image Compilation
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
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
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
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.
participants (3)
-
Adrian Perez de Castro -
Prabhakar Lad -
sanchayan maity