NAND BOOTING Problem in i.MX28

cancel
Showing results for 
Search instead for 
Did you mean: 

NAND BOOTING Problem in i.MX28

1,883 Views
hongyuplim
Contributor I

Hello All,

 

I'm sorry for my poor English in advance.

 

My system is consist of Linux Kernel boot + UBI Root Filesystem in iMX28.

I'm using the NAND (K9F1G08U) and I downloaded kernel and UBI Root F/S into NAND with Mfgtools(v1.62)

 

It usually works OK.

But some NAND have 2 kinds of problem as below.

1. Kernel panic happen.

2. Booting Error happen.

 

 

/************ Here is writing into the NAND flash with Mfgtools like as below *****************/


flash_eraseall /dev/mtd0

flash_eraseall /dev/mtd1

flash_eraseall /dev/mtd2

 

kobs-ng init imx28_ivt_linux.sb


/usr/bin/ubiattach /dev/ubi_ctrl -m 1 -d 0

mknod class/ubi,ubi0,/dev/ubi0

/usr/bin/ubimkvol /dev/ubi0 -n 0 -N rootfs0 -m

mkdir -p /mnt/ubi0; mount -t ubifs ubi0_0 /mnt/ubi0

tar -jmxv -C /mnt/ubi0 rootfs.tar.bz2

umount /mnt/ubi0

 

/usr/bin/ubiattach /dev/ubi_ctrl -m 2

mknod class/ubi,ubi1,/dev/ubi1

/usr/bin/ubimkvol /dev/ubi1 -n 0 -N data -m

mkdir -p /mnt/ubi1; mount -t ubifs ubi1_0 /mnt/ubi

cp -f usbdisk.img /mnt/ubi1/.

umount /mnt/ubi1

/****************************************************************/

 

1. Kernel Panic

 

/*******************************************************************************************/

                      :

UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs1", error -19

VFS: Cannot open root device "ubi0:rootfs1" or unknown-block(0,0)

Please append a correct "root=" boot option; here are the available partitions:

1f00           20480 mtdblock0 (driver?)

1f01           94208 mtdblock1 (driver?)

1f02           16384 mtdblock2 (driver?)

fe00           89528 ubiblka (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Backtrace:

[<c00324a8>] (dump_backtrace+0x0/0x114) from [<c03ca9f4>] (dump_stack+0x18/0x1c)

r7:c0029a24 r6:00008000 r5:c3048000 r4:c0740bb8

[<c03ca9dc>] (dump_stack+0x0/0x1c) from [<c03caa70>] (panic+0x78/0xf4)

[<c03ca9f8>] (panic+0x0/0xf4) from [<c000902c>] (mount_block_root+0x1d8/0x218)

r3:00000000 r2:00000001 r1:c3c23f78 r0:c047e0a5

[<c0008e54>] (mount_block_root+0x0/0x218) from [<c00091fc>] (prepare_namespace+0x94/0x1c4)

[<c0009168>] (prepare_namespace+0x0/0x1c4) from [<c00084f8>] (kernel_init+0x128/0x170)

r5:c00280c8 r4:c073fd00

[<c00083d0>] (kernel_init+0x0/0x170) from [<c004e570>] (do_exit+0x0/0x6dc)

r5:c00083d0 r4:00000000

/*******************************************************************************************/

 

I attached this kernel panic log( NandWritingUsingMfgtools_1.txt, Kernel_panic.txt)(nand_problem.zip)

NandWritingUsingMfgtools_1.txt : This is log when writing Kernel + UBI F/S in NAND using Mfgtools

Kernel_panic.txt : This is Kernel panic log.

 

 

2. BOOTING ERROR

 

/*******************************************************************************************/

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC

PowerPrep start initialize power...

 

Configured for 5v only power source.            Battery powered operation disabled 

LLLCFeb 7 201416:51:56

FRAC 0x92925552

memory type is DDR2

                   Wait for ddr ready 1power 0x00820710

Frac 0x92925552

start change cpu freq

hbus 0x00000003

cpu 0x00010001

LLLLLLLFLCL0x8050100b

/*******************************************************************************************/


 

 

I attached this kernel panic log( NandWritingUsingMfgtools_2.txt, Booting_Error.txt)(nand_problem.zip)

NandWritingUsingMfgtools_2.txt : This is log when writing Kernel + UBI F/S in NAND using Mfgtools

Booting_Error.txt : This is Booting Error log.


Please help and give me any advices for this problems.


Thanks.

 

 

Original Attachment has been moved to: nand_problem.zip

0 Kudos
10 Replies

168 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi hongyup

from logs seems errors are no caused by NAND, but

poor power board design or DDR errors

You shoild modify power_prep sources (change brown-out levels)

to avoid 2. BOOTING ERROR. You can run with jtag to find

where exception occurs.

For NAND one can recheck below

Adding Support For a New NAND with i.MX28–NAND Analysis

Also it is highly recommended to check DDR with below tests

https://community.freescale.com/message/321913#321913

https://community.freescale.com/docs/DOC-1455

Best regards

chip

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

168 Views
hongyuplim
Contributor I

Thanks for your help.

I modified the brown-out levels in power_prep.c and DDR seting in init-mx28.c according to your recommend.
But I have still problems(2. BOOTING ERROR).

I downloaded small size file(imx28_ivt_uboot.sb, 142KB). It is OK.
//////////////////////////////////////////////////////////////////////////////////////////////////////
0x80501003

PowerPrep start initialize power...

Configured for 5v only power source.            Battery powered operation disabled.
Feb  7 201416:51:56
FRAC 0x92925552
memory type is DDR2
                   Wait for ddr ready 1power 0x00820710
Frac 0x92925552
start change cpu freq
hbus 0x00000003
cpu 0x00010001


U-Boot 2009.08 (Jan 16 2014 - 18:01:24)

Freescale i.MX28 family
CPU:   454 MHz
BUS:   151 MHz
EMI:   205 MHz
GPMI:   24 MHz
DRAM:  128 MB
MMC:   IMX_SSP_MMC: 0, IMX_SSP_MMC: 1
MMC0: No card detected!
MMC init failed
In:    serial
Out:   serial
Err:   serial
Net:   got MAC address from IIM: 00:04:00:00:00:00
FEC0
MX28 U-Boot >

//////////////////////////////////////////////////////////////////////////////////////////////////////////

Error Kernel boot(imx28_ivt_linux.sb, 2.5MB or 4.1MB).

I use bootles-5V-only and patched with L2.6.35_10.12_SDK_5V_SUPPLY_PATCH.tar.gz


Actuall I don't know what  I change the brown-out levels?
Could you let me know more detail?

Thanks.

0 Kudos

168 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi hongyup

brownout is described in Chapter 11 i.MX28 RM.

You can know where exception occurs adding printfs to power_prep code

or running it with jtag.

For "Error Kernel boot" one can replace NAND chip

(may be they are weared out) or look at link below

Adding Support For a New NAND with i.MX28–NAND Analysis

Best regards

chip

168 Views
hongyuplim
Contributor I

Hi Chip

Thanks for your help.

Now I'm test with the NAND many things. But it have still problem.

Most of NAND works well. But it hapen some NAND.

And I move the problem NAND to another linux platform(mini2440 Board + uboot + linux) then It works.

Anyway, One of test is as below.

========================================

on Windows PC

>sb_loader -f imx28_ivt_linux.sb

...............................................................................Done.

  waiting for Device Removal for 10seconds...

   Device Removal event

========================================

It works.

Here is log when run sb_loader

======================================================================

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC
hylim 0 _start : HW_RTC_PERSISTENT1_RD = [0x00000000]
.
PowerPrep start initialize power...
...
hylim 0 PowerPrep_ConfigurePowerSource : HW_RTC_PERSISTENT1_RD = [0x00000000]

hylim >> Configured for 5v only power source.          Battery powered operation disabled.
..........
hylim 0-2 PowerPrep_ConfigurePowerSource : HW_RTC_PERSISTENT1_RD = [0x00000800]

hylim 1 PowerPrep_ConfigurePowerSource : HW_RTC_PERSISTENT1_RD = [0x00000800]
..LLLCMay 28 201416:16:17
FRAC 0x92925552
memory type is W9751G6JB DDR2
                             Wait for ddr ready 1power 0x00820710
Frac 0x92925552
start change cpu freq
hbus 0x00000003
cpu 0x00010001
LLLLLLLFLCLLJUncompressing Linux... done, booting the kernel.
Linux version 2.6.35.3-670-g914558e (hylim@hylim-virtual-machine) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #1024 PREEMPT Tue May 13 12:08:09 KST 2014
============================================================================

But next is Nand booting error log

============================================================================

0x80501003
HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC
hylim 0 _start : HW_RTC_PERSISTENT1_RD = [0x00000002]
.
PowerPrep start initialize power...
...
hylim 0 PowerPrep_ConfigurePowerSource : HW_RTC_PERSISTENT1_RD = [0x00000002]

hylim >> Configured for 5v only power source.          Battery powered operation disabled.
..........
hylim 0-2 PowerPrep_ConfigurePowerSource : HW_RTC_PERSISTENT1_RD = [0x00000802]

hylim 1 PowerPrep_ConfigurePowerSource : HW_RTC_PERSISTENT1_RD = [0x00000802]
..LLLCMay 28 201416:16:17
FRAC 0x92925552
memory type is W9751G6JB DDR2
                             Wait for ddr ready 1power 0x00820710
Frac 0x92925552
start change cpu freq
hbus 0x00000003
cpu 0x00010001
LLLLLLLFLCL0x8050100b

============================================================================

I read HW_RTC_PERSISTENT1_RD()  in pwer_prep.c

============================================================================

pwer_prep.c

int _start( void )
{
int iRtn = SUCCESS;

printf("\r\n hylim 0 _start : HW_RTC_PERSISTENT1_RD = [0x%X]\x0d\x0a",HW_RTC_PERSISTENT1_RD());

#ifndef mx28
HW_DIGCTL_CTRL_SET(BM_DIGCTL_CTRL_USE_SERIAL_JTAG);
#else

#define SSP0_PIN_DRIVE_12mA 0x2

                              :

============================================================================

But both of them are different.

HW_RTC_PERSISTENT1_RD()

ERROR : 0x00000002

OK :  0x00000000

HW_RTC_PERSISTENT1_RD value is used  in setup_cmdline_tag() function in /linux_prep/core/setup.c as " adding one to the rootfs partition number".

I know it is also related to  1.Kernel Panic problem.

And when I turn power on, I can see 0x80501003  before "HTLLLLLLL....."

It  is also weird.

And unfortunately I couldn't use JTAG.

Please let me know any idea or advice.

Thanks,

0 Kudos

168 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi hongyup

error 0x80501003 means

//! The file signature or file version is incorrect.

So NAND is read incorrectly. Probably smth wrong

in power design, please find attached schematic for 5V only configuration.

You should follow it exactly, all capacitors values, Battery, DCDC_BATT

resistors should be placed as in attached schematic.

HW_RTC_PERSISTENT1_RD value shows PMU power state machine

(codes for each internal state): this also points that smth wrong with power-up.

I would suggest recheck with appnote below whole board power design

AN4199

Using the i.MX28 Power Management Unit and Battery Charger: Getting Started with Power Supply

Also these errors may be caused by fact that you are powering on board when not its power

supplies (power capacitors) are fully discharged (<0.2V), if you are doing OFF-ON test many times.

Best regards

chip

0 Kudos

168 Views
hongyuplim
Contributor I

Hi Chip,

Thanks for your quick reply.

I will check related to Power with H/W team.

I attached Power part of our h/w design.

Could you let me know what is suspect ?

Thanks,

0 Kudos

168 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi hongyup

schematic seems as correct.

These errors may be caused by fact that you are powering on board when not its power

supplies (power capacitors) are fully discharged (<0.2V), if you are doing OFF-ON test many times.

You should verify that VDD5V < 0.2V before chip will power-up again.

Best regards

chip

0 Kudos

168 Views
hongyuplim
Contributor I

Hi Chip,

Thanks your kind reply.

I checked VDD5V < 0.2V before system power up.

But It is same(not work)

I'll check Power module again.

Anyway, Could you please let me know about "HW_RTC_PERSISTENT1_RD = [0x00000002]" in details?

How can HW_RTC_PERSISTENT1 register is changed by H/W or  S/W?

Thanks agian,

hongyup

0 Kudos

168 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi hongyup

I think you should create new Community

thread for this question.

Best regards

chip

0 Kudos

168 Views
Wlodek_D_
Senior Contributor II

Hello,

Thank you for your post, however please consider moving it to the right community place (e.g. i.MX Community ) to get it visible for active members.

For details please see general advice Where to post a Discussion? (https://community.freescale.com/docs/DOC-99909 )

Thank you for using Freescale Community.

0 Kudos