uboot ram init

cancel
Showing results for 
Search instead for 
Did you mean: 

uboot ram init

Jump to solution
1,453 Views
adogan
Contributor II


Hello,

I am building my custom imx28 based board with nand flash without battery. My board has not sd card input so i am planning to write a kernel and filesystem to nand with uboot.

I edited imx-bootlets-src-10.12.01 for no battery (uncomment //#define NO_DCDC_BATT_SOURCE in /power_prep/power_prep.c)

I found some other u-boot named like uboot-imx, u-boot, u-boot-fslc (i tried all) and built with imx28evk_nand_defconfig config.

log is here after load sb file.

>> TS-BOOTROM - built Jul 16 2016 15:07:59

>> Copyright (c) 2013, Technologic Systems

U-Boot 2015.10-00059-g8ee67c1 (Jul 16 2016 - 15:05:09 +0300)

CPU:   Freescale i.MX28 rev1.2 at 454 MHz

BOOT:  ğŸåğŸåğŸåğŸåğŸåğŸå

SPI:   ready

DRAM:

It stucks before displaying dram size as if it were in a while loop and boot mode displays unknown characters.

How can i fix this error?

Labels (1)
Tags (2)
1 Solution
468 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Ahmet

this may be caused by ddr errors or brownout exceptions, so one can try

adjust it with ddr tools:

Board Bring-up and DDR Initialization Tools | NXP Community

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

and add debug printfs in bootlets power_prep.c to find which instruction

caused brownout (can be adjusted with HW_POWER_VDDDCTRL[BO_OFFSET])

Just for test may be recommended to run latest nxp bsp:

Board Support Packages (5)

i.MX28 Linux 2.6.35 Source Code Files and documentation (REV L2.6.35_1.1.0)

http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i....

Best regards

igor

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

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

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

View solution in original post

6 Replies
468 Views
igorpadykov
NXP TechSupport
NXP TechSupport

it may stuck due to brownouts (can be adjusted with BO_OFFSET settings),

one can debug with jtag or add printfs to find which instruction caused that.

~igor

468 Views
adogan
Contributor II

I run mem_test in https://community.nxp.com/message/375692#comment-375692​ with no battery patch. I will attach sb file, perhaps may be necessary for someone.

mem_test logs;

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

PowerPrep start initialize power...

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

start

simple test

Actual CPU frequency (MHz): 480

Actual EMI frequency (MHz): 196

  DDR test passed

t0: memcpy11 SSN test

CSD0

Program the source memory

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

Cpu is restarting before "DDR test passed" and stucks, I heard usb plug out sound.

My settings:

#define CSD0_BASE_ADDR                 0x40000000

U32 dram_density = 0x8000000, num_cs = 1;

Where may the error be?

0 Kudos
469 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Ahmet

this may be caused by ddr errors or brownout exceptions, so one can try

adjust it with ddr tools:

Board Bring-up and DDR Initialization Tools | NXP Community

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

and add debug printfs in bootlets power_prep.c to find which instruction

caused brownout (can be adjusted with HW_POWER_VDDDCTRL[BO_OFFSET])

Just for test may be recommended to run latest nxp bsp:

Board Support Packages (5)

i.MX28 Linux 2.6.35 Source Code Files and documentation (REV L2.6.35_1.1.0)

http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i....

Best regards

igor

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

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

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

View solution in original post

468 Views
adogan
Contributor II

I could not do with ltib so i built bootlets and uboot from source.

My current logs,

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

PowerPrep start initialize power...

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

DRAM prep starting

MEM_MDDR = FALSE

Jul 18 201613:50:11

FRAC 0x92925552

memory type is DDR2

                   Wait for ddr ready 1power 0x00820616

Frac 0x92925552

start change cpu freq

hbus 0x00000003

cpu 0x00010001

start test memory accress

ddr2 0x40000000

finish simple test

U-Boot 2011.09-01112-g8c6b5d0 (Jul 18 2016 - 13:48:50)

Freescale i.MX28 family

I2C:   ready

DRAM:  0 Bytes

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

It stucks after then. Currently memory test between 0 - 1000, when i change memory test to between 32 * 1024  * 1024 - 48 * 1024 * 1024, dram says 32mb and uboot starts succesfully. Where may the error be?

0 Kudos
468 Views
adogan
Contributor II

I am going to try with "i.MX28 Linux 2.6.35 Source Code Files and documentation (REV L2.6.35_1.1.0)" files but I couldnt find bootlets in this folder, how can i download bootlets source code in nxp?

When I try to run ltib (with perl5), it says;

Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(%{ <-- HERE ?([^}]+)}?)/ at /home/ard/Desktop/L2.6.35_1.1.0_130130_source/ltib/ltib/bin/Ltibutils.pm line 237.

Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /home/ard/Desktop/L2.6.35_1.1.0_130130_source/ltib/ltib/bin/Ltibutils.pm line 362.

Compilation failed in require at ./ltib line 39.

BEGIN failed--compilation aborted at ./ltib line 39.

How can I fix this errors?

0 Kudos
468 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Ahmet

first build ltib then prepare bootlets sources (in ltib/RPM/Build):

./ltib -m prep -p boot_stream.spec

Best regards

igor