Hello,
I am trying to build new kernel for iMX8QXP. I have succeed with older version 4.14 and because there is new BSP 5 available, I wanted to be updated.
I followed instructions same as before but kernel will not boot (hang in Starting kernel).
First of all I realized that U-Boot update may be required, so i flashed Torzion with newer U-Boot (current version of U-Boot is U-Boot 2020.04-5.1.0-devel+git.5ac61784dd4c). This is first question, because in instructions the required git branch is toradex_imx_v2020.04_5.4.24_2.1.0:
(1) is it OK to use the one which comes with Torizon image?
I’m trying to avoid building my own U-Boot and I want use everything possible from Toradex.
Following instructions I downloaded compiler for arm64, set environment variables, cloned git repo with branch toradex_5.4-2.1.x-imx, made defconfig, build image and device tree imx8qxp-colibri-eval-v3.dtb.
id="-rs4-imx8-5.4-2.1-v0-defconfig"
export ARCH=arm64
export DTC_FLAGS="-@"
export PATH=/opt/imx8/gcc/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/:$PATH
export CROSS_COMPILE=aarch64-linux-gnu-
export LOCALVERSION="${id}"
export VERSION=`make kernelversion`
export ID="${VERSION}${LOCALVERSION}"
test -d var/${ID} && echo "${ID} already exists!" || mkdir -vp var/${ID}/boot
make defconfig
make -j10 Image 2>&1 | tee var/${ID}/build.log
make DTC_FLAGS="-@" freescale/imx8qxp-colibri-eval-v3.dtb
cp -v arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dtb var/${ID}/boot/
cp -v arch/arm64/boot/Image var/${ID}/boot/
I am booting from SD Card, on first partition there is boot.scr, imx8qxp-colibri-eval-v3.dtb and Image.
My U-Boot script:
# config
test -n ${kernel_image} || env set kernel_image Image
# set dtb file
env set fdt_file 'imx8qxp-colibri-eval-v3.dtb'
test -n ${kernel_image} || env set kernel_image ${boot_file}
echo Loading dtb
# load dtb
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdt_file}
# get uuid
part uuid ${devtype} ${devnum}:2 uuid
# emmc args
#env set console ttyLP3,115200 uart_from_osc
env set console ttyLP3,115200 earlycon=lpuart32,0x5a090000,115200
env set emmcargs root=PARTUUID=${uuid} ro rootfstype=ext4 rootwait console=${console}
# boot args
env set bootargs ${defargs} ${emmcargs} ${setupargs} ${vidargs} ${tdxargs}
#bootcmd_kernel
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${kernel_image}
# Run A7 - boot image
echo emmcargs ${emmcargs}
echo bootargs ${bootargs}
echo kernel_image ${kernel_image}
echo kernel_addr_r ${kernel_addr_r}
echo fdt_addr_r ${fdt_addr_r}
echo booti ${kernel_addr_r} - ${fdt_addr_r}
booti ${kernel_addr_r} - ${fdt_addr_r}
Output from LPUART3 is following:
U-Boot 2020.04-5.1.0-devel+git.5ac61784dd4c (Jan 01 1970 - 00:00:00 +0000)
CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 20C
DRAM: 2 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Model: Toradex Colibri iMX8 QuadXPlus 2GB Wi-Fi / BT IT V1.0B, Serial# 06494192
BuildInfo:
- SCFW 732e719a, SECO-FW 376e3c15, IMX-MKIMAGE 6745ccdc, ATF
- U-Boot 2020.04-5.1.0-devel+git.5ac61784dd4c
flash target is MMC:0
Net: eth0: ethernet@5b040000 [PRIME]
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
1059 bytes read in 16 ms (64.5 KiB/s)
## Executing script at 83200000
Loading dtb
122607 bytes read in 26 ms (4.5 MiB/s)
23656960 bytes read in 1216 ms (18.6 MiB/s)
emmcargs root=PARTUUID=a8971233-02 ro rootfstype=ext4 rootwait console=ttyLP3,115200 earlycon=lpuart32,0x5a090000,115200
bootargs root=PARTUUID=a8971233-02 ro rootfstype=ext4 rootwait console=ttyLP3,115200 earlycon=lpuart32,0x5a090000,115200 video=imxdpufb5:off video=imxdpufb6:off video=imxdpufb7:off
kernel_image Image
kernel_addr_r 0x80280000
fdt_addr_r 0x83100000
booti 0x80280000 - 0x83100000
## Flattened Device Tree blob at 83100000
Booting using the fdt blob at 0x83100000
Loading Device Tree to 00000000fd655000, end 00000000fd675eee ... OK
Starting kernel ...
[HANGS]
Am I missing something or do You see something wrong?
Thanks for advice.