iMX6ULL Kernel Paging Request

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMX6ULL Kernel Paging Request

2,501件の閲覧回数
pedropr
Contributor II

Hi! I'm having trouble booting a custom board with a imx6ull processor.

I see errors like "Unable to handle kernel paging request at virtual address 00001030" or "Kernel panic - not syncing: Attempted to kill the idle task!".

Right now I'm attempting to set the calibration parameters when building U-Boot with Yocto. Im new to Yocto so I don't fully understand where to edit.

1) First of all, I want to build an image ready to burn on a SD card. So I have this on my local.conf file.

MACHINE ??= 'imx6ull14x14evk'
DISTRO ?= 'fsl-imx-xwayland'
UBOOT_CONFIG = "emmc"
IMAGE_FSTYPES = "wic.gz"

And I build 'bitbake core-image-minimal'.

U-Boot inits ok, but when booting the system it always shows errors like "zimage: Bad magic!". SD card is not properly written or something. Is there anything that I'm doing wrong? I tried with and without UBOOT_CONFIG and IMAGE_FSTYPES settings.

2) Using a pre-built image I'm able to boot the system, but I found the kernel errors attached.

So I'm trying to build an image with ddr calibration set (I don't know if this would solve anything).

I'm able to print a message in 'clocks' command in U-Boot by editing build/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/u-boot-imx/2024.04/git/arch/arm/mach-imx/mx6/clock.c.
Just to see if Yocto is reading my changes.

 

Also set the calibration parameters for the DDR3 on "build/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/u-boot-imx/2024.04/git/board/freescale/mx6ul_14x14_evk/plugin.S".

I did this editing the values when writing MMDC_P0_BASE_ADDR + 0x83C / 0x848 / 0x850. Respectively: MPDGCTRL0MPRDDLCTLMPWRDLCTL. MPWLDECTRL0 is alsways 0x00000000.

 

Yocto builds with no errors but I can't see if the calibrations parameters were set and the system won't boot because of a said on point 1.

Im some occations I can boot the system from U-Boot, executing 'bootz ${loadaddr} - ${fdt_addr}'. But it halts on "Starting kernel ...".

 

Any help would be appreciated.
Thanks.

0 件の賞賛
返信
6 返答(返信)

2,468件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Somethings is bad in your building, you have to build a stand alone firts and see what happens, if you are porting kernel please check:

https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/72525/1/i.MX_6_BSP_Portin...

 

Regards

 

 

 

0 件の賞賛
返信

2,411件の閲覧回数
pedropr
Contributor II

Hi! Thank you for your response.

I managed to porting u-boot and the kernel using this guideline:

https://www.nxp.com/docs/en/user-guide/IMX_PORTING_GUIDE.pdf

 

I tried with the toolchain generated by

bitbake core-image-minimal -c populate_sdk

but I got an error of my device-tree-compiler being too old (although it was newer than the required version).

So I compiled u-boot and kernel from source using:

export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
export ARCH=arm

 

The branches I used:

  • u-boot
    • lf_v2022.04 (default from git clone)
    • v2017.01
  • kernel
    • lf-6.6.y (according to porting guide)

And then uploaded to an SD card using guideline:

https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf

I didn't know where to get the rootfs so I used one I found after executing:

bitbate core-image-minimal

 

I think the all process went well because I was able to boot from the SD card on my custom board.

But it halts in 'Starting kernel ...'

I changed the DDR calibration parameters in <some_path>/uboot-imx/board/freescale/mx6ullevk/imximage.cfg and I was able to read those (successfully updated) through tne md u-boot command.

The boot log is the following:

U-Boot 2022.04-dirty (Sep 17 2024 - 13:09:39 -0300)

CPU:   i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 48C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM:  512 MiB
Core:  65 devices, 18 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
[*]-Video Link 0 (480 x 272)
        [0] lcdif@21c8000, video
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:
Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.
Could not get PHY for FEC0: addr 2

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.
Could not get PHY for FEC0: addr 2
No ethernet found.

Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
switch to partitions #0, OK
mmc1 is current device
Failed to load 'boot.scr'
9419152 bytes read in 401 ms (22.4 MiB/s)
Booting from mmc ...
45482 bytes read in 5 ms (8.7 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x8fb990 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300e1a9
Modify /soc/bus@2200000/epdc@228c000 disabled

Starting kernel ...

 

I do see the message:

Modify /soc/bus@2200000/epdc@228c000 disabled

And there was some warnings about that when compiling the kernel (I don't know what is).

Is there anything I did wrong or what could I try?

Thank you for your time.

0 件の賞賛
返信

2,407件の閲覧回数
pedropr
Contributor II

Forgot to mention:

For u-boot I used:

make distclean
make mx6ull_14x14_evk_defconfig
make

 and for kernel:

make distclean
make imx_v7_defconfig
make -j 4

 

And for booting I used:

  • zImage
  • imx6ull-14x14-evk.dtb and imx6ull-14x14-evk-emmc.dtb
  • u-boot-dbt.imx
  • rootfs
0 件の賞賛
返信

2,471件の閲覧回数
pedropr
Contributor II

Update ---

The ddr calibrations parameters were not set. Checked this in U-Boot with:

  1. MPWLDECTRL0: md.l 0x021B080C 0x01
  2. MPDGCTRL0: md.l 0x021B083C 0x01
  3. MPRDDLCTL: md.l 0x021B0848 0x01
  4. MPWRDLCTL: md.l 0x021B0850 0x01
0 件の賞賛
返信

2,360件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

In this case you might try the DDR stress calibration:

https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/58620/1/i.MX6_DDR_Stress_...

 

regards

0 件の賞賛
返信

2,322件の閲覧回数
pedropr
Contributor II

Hello,

I tried the ddr stress test with 4 boards. I run it on all of them 5 times each (20 tests total).

There was 0 errors running the test at 400MHz.

I tried to run the test at 200MHz and 300MHz to see what happens, by first setting the ddr init script using i.MX 6/7 Series DDR Register Programming Aid (RPA).

Ref: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-6-7-Series-DDR-Tool-Release/ta-p/12...

But at 200MHz and 300Mhz the test always fails. I could be doing something with the DDR RPA though ...

But I think the issue is still on the u-boot and kernel compilation.

  1. For U-Boot I tried the imximage.cfg file with 3 setups:
    • Default imximage.cfg file from repo.
    • Default imximage.cfg file from repo with calibration parameters set (taken from DDR Stress Test Tool).
    • Based on DDR RPA.
  2. For Kernel I didn't make any changes.
  3. I noticed there are two .dtb files, one generated when compiling u-boot and another from kernel. I used both and no one works.

The issue is always the same, it halts on:

Starting kernel ...

I have an old image made with Yocto Project using

MACHINE=imx6ull14x14evk

and it doesn't have this "Starting kernel ..." halt issue. (It has another boot issues that I'll address later).

 What else could I try?

 

Regards.

0 件の賞賛
返信