Kernel is not loading through NAND boot with IMX6ULL

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

Kernel is not loading through NAND boot with IMX6ULL

Jump to solution
1,852 Views
kmagi
Contributor III

Hello All,

I am looking for some help as I am facing issue in loading kernel through nand boot. The nand boot is stuck after the last log message "Starting kernel ..."

Please find the logs below,

U-Boot 2020.04-imx_v2020.04_5.4.24_2.1.0+g4979a99482 (Mar 15 2021 - 13:08:31 +0000)

CPU: i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 36C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM: 256 MiB
NAND: 512 MiB
MMC: FSL_SDHC: 0
Loading Environment from NAND... OK
Display: XXXXXXX-QVGA (480x320)
Video: 480x320x24
Error: no valid bmp image at 8c000000
In: serial
Out: serial
Err: serial
Net:
Warning: ethernet@2188000 (eth0) using random MAC address - 46:11:08:1d:40:fc
eth0: ethernet@2188000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
Booting from NAND ...
ubi0: attaching mtd2
ubi0: scanning is finished
ubi0: attached mtd2 (name "ubi-part", size 504 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
ubi0: good PEBs: 2016, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1262705227
ubi0: available PEBs: 0, total reserved PEBs: 2016, PEBs reserved for bad PEB handling: 40
Loading file 'zImage-imx6ull.bin' to addr 0x80800000...
Done
Loading file 'imx6ull-14x14.dtb' to addr 0x83000000...
Done
Kernel image @ 0x80800000 [ 0x000000 - 0x5db0c0 ]
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300abb0
Modify /soc/aips-bus@02200000/epdc@0228c000:status disabled
ft_system_setup for mx6

Starting kernel ...

 

 

Same images when I do netboot, works well,

=> run netboot
Booting from net ...
Using ethernet@2188000 device
TFTP from server 192.168.1.7; our IP address is 192.168.1.2
Filename 'zImage-imx6ull-everett-p1.bin'.
Load address: 0x80800000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#############################
854.5 KiB/s
done
Bytes transferred = 6140096 (5db0c0 hex)
Using ethernet@2188000 device
TFTP from server 192.168.1.7; our IP address is 192.168.1.2
Filename 'imx6ull-14x14-everett.dtb'.
Load address: 0x83000000
Loading: ###
702.1 KiB/s
done
Bytes transferred = 31665 (7bb1 hex)
Kernel image @ 0x80800000 [ 0x000000 - 0x5db0c0 ]
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300abb0
Modify /soc/aips-bus@02200000/epdc@0228c000:status disabled
ft_system_setup for mx6

Starting kernel ...


Booting Linux on physical CPU 0x0
Linux version 4.14.98-imx+g1175b5961153 (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Wed Mar 10 00:24:42 UTC 2021
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Freescale i.MX6 ULL 14x14 Everett Board
Memory policy: Data cache writealloc
Reserved memory: created CMA memory pool at 0x8c000000, size 64 MiB
OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
percpu: Embedded 15 pages/cpu @8bdb2000 s31436 r8192 d21812 u61440
Built 1 zonelists, mobility grouping on. Total pages: 65024
Kernel command line: console=ttymxc1 cmdlinepart.mtdparts=gpmi-nand:4m(u-boot),504m(ubi-part),2m(life-data),-(mfg) root=/dev/nfs ip=dhcp nfsroot=192.168.1.7:/nfsroot,v3,tcp

 

 

Below are some environment variable details I am sharing,

bootargs=console=ttymxc1,115200 rdinit=/linuxrc clk_ignore_unused
bootcmd=echo Booting from NAND ...;run mybootargs-1; ubi part ubi-part && ubifsmount ubi0:kernel1 && ubifsload ${loadaddr} ${image} && ubifsload ${fdt_addr} ${fdt_file}; bootz ${loadaddr} - ${fdt_addr};

mtdparts=mtdparts=gpmi-nand:4m(u-boot),504m(ubi-part),2m(life-data),-(mfg)
mybootargs-1=setenv bootargs console=${console} cmdlinepart.${mtdparts} ${optargs} mem=512M rootwait=1 ro ubi.mtd=ubi-part ubi.block=0,1 rootfstype=squashfs root=/dev/ubiblock0_1 ip=none

 

Please suggest.

 

Regards,

Kiran

0 Kudos
Reply
1 Solution
1,818 Views
kmagi
Contributor III

Sorted out the problem

My boot args were wrong

mybootargs-1=setenv bootargs console=${console} cmdlinepart.${mtdparts} ${optargs} mem=512M rootwait=1 ro ubi.mtd=ubi-part ubi.block=0,1 rootfstype=squashfs root=/dev/ubiblock0_1 ip=none

The mem size set was 512M whereas, my DRAM size is just 256M.

View solution in original post

0 Kudos
Reply
4 Replies
1,819 Views
kmagi
Contributor III

Sorted out the problem

My boot args were wrong

mybootargs-1=setenv bootargs console=${console} cmdlinepart.${mtdparts} ${optargs} mem=512M rootwait=1 ro ubi.mtd=ubi-part ubi.block=0,1 rootfstype=squashfs root=/dev/ubiblock0_1 ip=none

The mem size set was 512M whereas, my DRAM size is just 256M.

0 Kudos
Reply
1,848 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kiran

 

one can try to run ddr test

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-6-7-DDR-Stress-Test-Tool/ta-p/11082...

and update uboot dcd header with new ddr coefficients found from test

https://source.codeaurora.org/external/imx/uboot-imx/tree/board/freescale/mx6ullevk/imximage.cfg?h=i...

then program image to nand using uuu tool

https://github.com/NXPmicro/mfgtools

https://community.nxp.com/t5/Technology-Days-Training/i-MX-8-Universal-Update-Utility-UUU-Tools-and-...

Also from log : U-Boot 2020.04-imx_v2020.04_5.4.24_2.1.0 - for that uboot recommended to use L5.4.24_2.1.0, not

Linux version 4.14.98.

 

Best regards
igor

0 Kudos
Reply
1,841 Views
kmagi
Contributor III

Hi @igorpadykov ,

 

I have the ddr coefficients already updated once during DRAM bring-up.

And I see for net-boot is booting fine with the same addresses set as for the NAND boot for kernel and dtb files as below,

Loading file 'zImage-imx6ull.bin' to addr 0x80800000...
Done
Loading file 'imx6ull-14x14' to addr 0x83000000...
Done

What impact that could have on different kind of booting methods?

Do you see any other relevant area to review?

-Kiran

 

0 Kudos
Reply
1,836 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kiran

 

in general for each linux release one can look at Linux Guide document, for example

Table 1. Image layout, Table 53. Board-specific default values

i.MX Linux User’s Guide​

 

Best regards
igor

0 Kudos
Reply