Yocto Boot Problem - Custom Device Tree

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yocto Boot Problem - Custom Device Tree

Jump to solution
1,985 Views
PaulDeMetrotion
Senior Contributor I

I am developing a Yocto Linux kernel for a custom SBC based on the I.MX6Q. I have generated a device tree for the SBC and am executing 'bitbake core-image-base'. Everything appears to be good, but when I boot the image, it stops at the 'Starting kernel ...' message.

I have traced the issue to the early_init_dt_scan function call. The parameter being passed when the function is called does not point to my device tree but appears to be pointing at u-boot parameters instead. The device tree does build and looks correct.

Here are the contents being passed to the function:

yocto.png

When the code checks for the proper DTS signature, it fails because the value is 5 instead of OF_DT_HEADER. Any idea why the data being passed is not the DTB file?

Is there a customization step I am missing when adding a custom device tree?

0 Kudos
1 Solution
1,190 Views
PaulDeMetrotion
Senior Contributor I

This issue is resolved.

Was not using bootz or passing the device tree blob file. The following environment variables fixed the problem:

"bootcmd_mmc=run bootargs_mmc; "   \

    "fatload mmc 0:1 ${loadaddr} ${kernel}; " \

    "fatload mmc 0:1 ${fdt_addr} ${fdt_file}; " \

    "bootz ${loadaddr} - ${fdt_addr};\0" \

View solution in original post

0 Kudos
3 Replies
1,191 Views
PaulDeMetrotion
Senior Contributor I

This issue is resolved.

Was not using bootz or passing the device tree blob file. The following environment variables fixed the problem:

"bootcmd_mmc=run bootargs_mmc; "   \

    "fatload mmc 0:1 ${loadaddr} ${kernel}; " \

    "fatload mmc 0:1 ${fdt_addr} ${fdt_file}; " \

    "bootz ${loadaddr} - ${fdt_addr};\0" \

0 Kudos
1,190 Views
PaulDeMetrotion
Senior Contributor I

I really could use some help. Still have not resolved this issue. Somebody must have some experience customizing Yocto for a device that is not included by Freescale. Any advice is appreciated

I added my device tree file to the arch/arm/boot/dts directory and added this dtb file to the Makefile in the same directory. In my conf file I have the following:

#@TYPE: Machine

#@NAME: i.MX6Q SBC35-C398

#@SOC: i.MX6Q

#@DESCRIPTION: Machine configuration for i.MX6Q SBC35-C398

#@MAINTAINER: Paul DeMetrotion <pdemetrotion@winsystems.com>

require conf/machine/include/imx-base.inc

require conf/machine/include/tune-cortexa9.inc

SOC_FAMILY = "mx6:mx6q"

KERNEL_DEVICETREE = "imx6q-c398.dtb"

UBOOT_CONFIG ??= "sd"

UBOOT_CONFIG[sd] = "mx6qc398_config,sdcard"

UBOOT_CONFIG[sata] = "mx6qc398_sata_config"

UBOOT_CONFIG[mfgtool] = "mx6qc398_config"

SERIAL_CONSOLE = "115200 ttymxc0"

Am I missing something?

0 Kudos
1,190 Views
jimmychan
NXP TechSupport
NXP TechSupport

There is a document "i.MX_6_BSP_Porting_Guide.pdf" in the Linux BSP bundle. You may read it for reference.

0 Kudos