AnsweredAssumed Answered

i.Mx6q kernel stuck

Question asked by Fausto Sessego on May 4, 2017
Latest reply on May 31, 2017 by Fausto Sessego

Hi,

 

I am trying to port the kernel 4.1-1.0. from sabresd to my custom board.

Everything builds without an error and I get a new zImage, as shown below.  However,  the Kernel hangs while starting up.

 


U-Boot 2016.07 (May 03 2017 - 15:26:14 +0200)

CPU: Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU: Extended Commercial temperature grade (-20C to 105C) at 26C
Reset cause: POR
Board: i.MX6Q
I2C: ready
DRAM: gd->ram_size: 1073741824
DRAM test not implemented!
1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: CPU Net Initialization Failed
No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
reading zImage
6685024 bytes read in 333 ms (19.1 MiB/s)
Booting from mmc ...
reading imx6q-custom.dtb
29482 bytes read in 19 ms (1.5 MiB/s)
Kernel image @ 0x12000000 [ 0x000000 - 0x660160 ]

Starting kernel ...

 

hang ...

 

 

My define called into custom_board.h (u-boot) are

 

#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"image=zImage\0" \
"console=" CONFIG_CONSOLE_DEV "\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
"fdt_file=imx6q-custom.dtb\0" \
"fdt_addr=0x18000000\0" \
"boot_fdt=try\0" \
"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
"mmcautodetect=yes\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
"loadbootscript=" \
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
"loadimagerror=echo Load zImage from mmc ERROR!!; \0" \
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
"bootz ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
"bootz; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \
"else " \
"bootz; " \
"fi;\0" \


#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev}; if mmc rescan; then " \
"if run loadimage; then " \
"run mmcboot; " \
"else run loadimagerror; " \
"fi; " \
"else run mmcbooterror; fi; " \

 

I compile the kernel by

#!/bin/bash
export ARCH=arm
export CROSS_COMPILE=arm-linux-
export PATH=/home/fsessego/Documents/Yocto/fsl-linaro-toolchain/bin/:$PATH
cd ../linux-fslc
make clean
make imx_v7_defconfig
make -j4 zImage imx6q-custom.dtb

 

I suspect something wrong with my zImage when I specify the load address.

 

Regards

Outcomes