i.MX233 mfgtool firmware/kernel does'nt boot

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

i.MX233 mfgtool firmware/kernel does'nt boot

Jump to solution
2,121 Views
tobiasdiendorfe
Contributor III

Dear community.

 

We are currently developing an custom i.MX233 board based on the evk board schematic.

On the prototype board we have assembled an MicroSD holder, which should be removed in upcomming hardware versions.

The firmware of the board should be flashed over USB/mfgtool on the onboard nand flash.

From MicroSD, a self built GNU kernel 4.2 is booting fine and runs stable for several days!

 

Our issue is that the mfg firmware wont boot on our custom board.

We have tried teh following:

 

  • version mfgtool for windows (USB 3.0 issue):
    All mfgtools < 1.6.2.055 crashed when selecting "Options -> Configuration -> USB ports tab"
    Thats a known USB 3.0 issue, so from now we are using "1.6.2.055" -> problem solved.

 

  • Data Abortr14_ or Undefined Instruction

          When trying to boot the prebuilt mfg firmware (profile: MX23 Linux Update) from mfg tool "1.6.2.004" with "1.6.2.055" we are getting the following errors in the bootlets:

 

               Data Abortr14_ or Undefined Instruction

 

          The uboot/kernel does'nt get loaded at all.

          See attached "DataAbort.log" for a full log.

 

  • done, booting the kernel.

          So we have moved to a newer version of the mfg firmware.
          When trying to boot the prebuilt mfg firmware (profile: MX23 Linux Update) from mfg tool "1.6.2.048" with "1.6.2.055" the kernel gets uncompressed but doesnt boot.

          The last messages are:

 

               Uncompressing Linux...................................................................................... done, booting the kernel.

 

          After looking at the kernel source i could say the above messages are not from bootlets/uboot, they are from kernel.

          So i'll assume the kernel was loaded over USB into the ram, gets called, it uncompressing itself and stuck on calling the uncompressed kernel image.

 

          See attached "done, booting the kernel.log" for a full log.

          I have also built the mfg firmware with LTIB myself from the latest available kernel/ltib 2.6.31 source for i.mx233.
          The result is the same!

 

 

So here are my questions:

 

  • Any hint on why the "old" 2.6.31 kernel wont boot?
  • Could we use our 4.2 kernel as a mfg firmware? Are there any binarys which must run in the mfg firmware (ex. to communicate with the mfg tool to flash the firmware to nand?)

 

Our production should will start soon, please help.

 

Thank you

Tobias

Original Attachment has been moved to: DataAbort.log.zip

Original Attachment has been moved to: done-booting-the-kernel.log.zip

Labels (1)
0 Kudos
1 Solution
1,493 Views
tobiasdiendorfe
Contributor III

Dear igor.

The kernel from imx53 BSP "L2.6.35_11.09.01_ER_source_bundle.tar.gz" is booting after building it for imx23_evk.

I have also apllied the 5v only patches you mentioned above.

Next step is to access the SPI flash "S25FL256SAGMFIR01" which is connected to SSP2.

thx

Tobias

View solution in original post

0 Kudos
9 Replies
1,494 Views
tobiasdiendorfe
Contributor III

Dear igor.

The kernel from imx53 BSP "L2.6.35_11.09.01_ER_source_bundle.tar.gz" is booting after building it for imx23_evk.

I have also apllied the 5v only patches you mentioned above.

Next step is to access the SPI flash "S25FL256SAGMFIR01" which is connected to SSP2.

thx

Tobias

0 Kudos
1,493 Views
tobiasdiendorfe
Contributor III

I'll now have found the patch lines which caused the previous issue.

From file "0003-MX28-imx-bootlets-5V-only-configuration-bug-fixes-and-improvement.patch" at line:

@@ -702,11 +698,11 @@ void PowerPrep_Enable4p2( void )

  BM_POWER_VDDDCTRL_PWDN_BRNOUT);

  HW_POWER_VDDACTRL_SET(BM_POWER_VDDACTRL_DISABLE_FET |

- BM_POWER_VDDDCTRL_ENABLE_LINREG |

- BM_POWER_VDDDCTRL_PWDN_BRNOUT);

+ BM_POWER_VDDACTRL_ENABLE_LINREG |

+ BM_POWER_VDDACTRL_PWDN_BRNOUT);

  HW_POWER_VDDIOCTRL_SET(BM_POWER_VDDIOCTRL_DISABLE_FET |

- BM_POWER_VDDDCTRL_PWDN_BRNOUT);

+ BM_POWER_VDDIOCTRL_PWDN_BRNOUT);

  PowerPrep_Init4p2Parameters();

When i dont patch these lines (which has todo with power control of linear voltage regulator) the bootlet is working again.

My current state is that i have merged all 4 patches (except above lines) from imx28 2.6.35 kernel patch you provided, but it does stuck again at function call:

     local_irq_enable();

Any other hints how to solve my issue?

We just want to get the mfg firmware up and running because we need it for production programming of the units.

I have spent too much time in debugging the issue and dont want to waste more time in JUST get an NAND flashing tool up and running!!!!!

Production of the unit is comming closer and closer......

Please help!!!!!

Why are'nt such patches merged into the source kernel/ltib file on your homepage?

It's such an waste of time for developers to debug issues like mine.

For you (as time of writing an patch) its not a hassle to upload a new complete patched BSP ZIP file again!!!

thx

Tobias

0 Kudos
1,493 Views
igorpadykov
NXP Employee
NXP Employee

Hi Tobias

for urgent production needs one can apply to Freescale Professional Services:

http://www.freescale.com/webapp/sps/site/overview.jsp?code=CW_PROFESSIONAL

Best regards

igor

0 Kudos
1,493 Views
tobiasdiendorfe
Contributor III

Hi igor, thx for the info regarding prof. services.

Currently my intention is to solve it on my own.

Do you have any other hint how i can check which interrupt prevents the kernel from booting after enable the golbal ints:

     local_irq_enable();

thx

Tobias

0 Kudos
1,493 Views
tobiasdiendorfe
Contributor III

I have made progress on this but need help please.

After debugging in kernel with ASM we can say that the kernel function "start_kernel" gets loaded correctly and we just dont get console outputs from "printk" function.

asmlinkage void __init start_kernel(void)

{

...

...

...

printk(KERN_NOTICE "%s", linux_banner);

         

asm volatile ("adrr0, str_tdi2");
asm volatile ("blprintascii");
asm volatile ("str_tdi2: .asciz \"\nTrace\n\"");
asm volatile (".align");

The linux_banner doesnt gets printed out but the "Trace" gets printed out!!

So i'll think the console kernel parameter is wrong.

I have looked into the bootlets and it states: console=ttyAM0,115200

Also in 2.6.31 kernel config menu it states:  console=ttyAM0,115200

Any hints whats the right console parameter to get kernel output?

Tobias

0 Kudos
1,493 Views
igorpadykov
NXP Employee
NXP Employee

Hi Tobias

seems your board is using "5V Only mode" while i.MX23 EVK

Linux and Mfg Tools do not support this mode by default. One can

look at pacthes below for i.MX28 EVK and add it to i.MX23 MFG Tools

firmware.

Updates and Patches (9)

http://www.freescale.com/products/arm-processors/i.mx-applications-processors-based-on-arm-cores/i.m...

L2.6.35_10.12_5V_SUPPLY_PATCH

Linux patch for i.MX28 SDK 2010.12 to add the most robust support

possible for a VDD5V or DCDC_BATT only configuration.

L2.6.35_1.1.1_UPDATER_PATCH_UP

The purpose of this patch release is Fix the updater.sb boot issue

in the i.MX28 Linux BSP L2.6.35_1.1.0 release. (REV L2.6.35_1.1.1)

There is another approach, though developed for i.MX28:

3.1.5 USB Firmware Upload | www.denx-cs.de/doku

Best regards

igor

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

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

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

0 Kudos
1,493 Views
tobiasdiendorfe
Contributor III

Hi Igor.

You are right, i am using "5V only" mode.

Please look at the attached schematic snipped.

As stated before, a new 4.2 kernel boots fine, so the hardware could'nt be the issue.

Maybe the combination of hardware & software.

I have made further progress in debugging with my assembler code in the start_kernel function.

The kernel stucks at the function call:

     local_irq_enable();

After looking at the source the function is just a macro which enables the global interrupts.

If ill move the "console_init();" function call before the local_irq_enable() function, we get console output.

So my theory with the wrong kernel console parameter is wrong.

I have seen that all printk function calls (also the linux banner) buffers into log_buf[] until the console_init() was called (sorry, i am not so deep in linux kernel code, so i have to begin from start :-).

So my new theory is:

There is an interrupt (irq flag register) set and on enabling the global irqs the cpu wants to call an not initialized irq function from the vector table.

Any hints how ill can find out which interrupt is preventing the kernel from boot (without read all 200+ irq flag registers :-)?

Thanks for the hints regarding the patches of the imx28, will look into it.

Do you think this 5v only patch could cause the above described behaviour?

Before we got back to 2.6.31 (imx233 BSP) we have tried to build newer BSPs from (imx6, imx51...) but building failed for the imx233.

Is there any other newer BSP/LTIB (incl. MFG firmware) out there for the imx233?

thx

Tobias

0 Kudos
1,493 Views
igorpadykov
NXP Employee
NXP Employee

HI Tobias

new 4.2 kernel boots fine, because "5V only" mode is already implemented there.

But this mode is not supported in i.MX23 EVK mfg tools firmware and FSL 2.6.31 BSP,

only supported mode is to use battery.

Best regards

igor

0 Kudos
1,493 Views
tobiasdiendorfe
Contributor III

Hi Igor.

thx for the info.

I have tried to apply the patches (also port the code from mach mx28 to mx23 in file hw_power.c ...).

Now ill run into the issue that the bootlets prints the following:

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFC

PowerPrep start initialize power...

Configured for 5v only power source.            Battery powered oper0x8020a014

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFC

PowerPrep start initialize power...

Configured for 5v only power source.            Battery powered oper0x8020a014

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFC

PowerPrep start initialize power...

Configured for 5v only power source.            Battery powered oper0x8020a014

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFC

PowerPrep start initialize power...

Configured for 5v only power source.            Battery powered oper0x8020a014

ø0x8020a014

It restarts in power_prep.c at line 362:

printf("\r\nConfigured for 5v only power source.\
Battery powered operation disabled.\r\n");

Any hints?

Is there an newer BSP/LTIB with 5v only operation which is build-/runable on the imx233?

thx

Tobias

0 Kudos