booting u-boot from NAND on iMX28EVK

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

booting u-boot from NAND on iMX28EVK

1,918 Views
x10
Contributor V

Hi, All

Are there any patch for u-boot-2009.08, which support booting the u-boot from NAND on imx28evk?

The u-boot source code(u-boot-2009.08) comes from L2.6.31_10.05.02_source.tar.gz -> u-boot-2009.08.tar.bz2 with patch u-boot-v2009.08-imx_10.05.02.tar.bz2. Please let me know if any body is doing similar work of nand booting of u-boot on mx28evk. Thanks!

BR

Cheng Shi

emtronix

Labels (1)
0 Kudos
Reply
8 Replies

1,084 Views
x10
Contributor V

Hi Wolfgang

This is the first time for me to use git:

(1) git clone git://git.denx.de/u-boot-imx.git u-boot-imx

(2) modifiy Makefile, setup CROSS_COMPILE = arm-none-linux-gnueabi-, and export it

(3) make mx28evk_config

(4) make -> build is OK

All the steps are allright? another question: how to get new patch in future? Thanks

BR

Cheng Shi



Wolfgang F. Gaerber said:

Hi Cheng,

I would highly recommend to use an actual uboot from denx page.

Configuring and building is straight forward.

.. support for ubi(fs) mount usb, spi flashes ... and so on.

rgds.

0 Kudos
Reply

1,084 Views
x10
Contributor V

Hi Wolfgang

Thanks for your suggestion. I just dowloaded u-boot-2012.04.tar.bz2. Is it the latest one? I'm beginner to linux community.

BR

Cheng Shi



Wolfgang F. Gaerber said:

Hi Cheng,

I would highly recommend to use an actual uboot from denx page.

Configuring and building is straight forward.

.. support for ubi(fs) mount usb, spi flashes ... and so on.

rgds.

0 Kudos
Reply

1,084 Views
x10
Contributor V

Hi Rodrigue

Actually I got confused with "$ flash_eraseall /dev/mtd0" as no partition at all before programming u-boot. I used u-boot-1.3.4 in a project a few years ago. no partition issue in that u-boot.  Before I started linux project, I have just finished CE6.0 on my imx28 based board, so I just use the same way to program uboot_ivt.sb just like eboot_ivt.sb, it works. With this way, at least I know where the sb is programmed in, but I can not figure out where ROM load u-boot in SDRAM.

BR

 



Rodrigue said:

Hi Cheng,

in your xml file do like this:

 <CMD type="push" body="$ flash_eraseall /dev/mtd0">Erasing rootfs partition 0</CMD>
    <CMD type="push" body="$ flash_eraseall /dev/mtd1">Erasing rootfs partition 1</CMD>
    <CMD type="push" body="send" file="files/imx28_ivt_uboot.sb" >Sending Firmware</CMD>
    <CMD type="push" body="$ kobs-ng init $FILE">Flashing firmware</CMD>

keep in mind that you need kobs-ng to flash uboot (as sb format) in the nand.

I just did it and it works.

0 Kudos
Reply

1,084 Views
wolfgang_gaerbe
Contributor II

Hi Cheng,

I would highly recommend to use an actual uboot from denx page.

Configuring and building is straight forward.

.. support for ubi(fs) mount usb, spi flashes ... and so on.

rgds.

0 Kudos
Reply

1,084 Views
Rodrigue
NXP Employee
NXP Employee

Hi Cheng,

in your xml file do like this:

 <CMD type="push" body="$ flash_eraseall /dev/mtd0">Erasing rootfs partition 0</CMD>
    <CMD type="push" body="$ flash_eraseall /dev/mtd1">Erasing rootfs partition 1</CMD>
    <CMD type="push" body="send" file="files/imx28_ivt_uboot.sb" >Sending Firmware</CMD>
    <CMD type="push" body="$ kobs-ng init $FILE">Flashing firmware</CMD>

keep in mind that you need kobs-ng to flash uboot (as sb format) in the nand.

I just did it and it works.

0 Kudos
Reply

1,084 Views
x10
Contributor V

Hi Rodrigue,

Thanks for your reply. I did use this L2.6.35_10.12.01_SDK_source_bundle.tar, and I modified the config setting in mx28_evk.h, but I don't know how to ucl.xml of MfgTool, the original ucl.xml is for linux_ivt.sb only. Are there any doc available?

BTW uboot.bd:

sources {
power_prep="./power_prep/power_prep";
sdram_prep="./boot_prep/boot_prep";
u_boot = "./u-boot";
}

section (0) {

//----------------------------------------------------------
// Power Supply initialization
//----------------------------------------------------------

load power_prep;
call power_prep;

//----------------------------------------------------------
// SDRAM initialization
//----------------------------------------------------------

load sdram_prep;
call sdram_prep;

//----------------------------------------------------------
// Load and call u_boot - ELF ARM image
//----------------------------------------------------------

load u_boot;
call u_boot;
}

Why "call u_boot" instead of jump? As no address is include, how can I know the SDRAM address that u-boot loaded by ROM?

In CE6.0, there are always SDRAM addresses included in sb file, for example

#
# Copyright (C) 2010, Freescale Semiconductor, Inc. All Rights Reserved.
# THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
# AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT
#
options {
driveTag = 0x00;
flags = 0x01;
}

constants {
xldr_addr = 0x00000004;
eboot_addr = 0x40050000;
bmp_addr = 0x40094000;
}

sources {
xldr = "xldr.nb0";
eboot = "eboot.nb0";
bmp = "splash_eboot.bmp";
}

section (0) {
load xldr > xldr_addr;
call xldr_addr;

load bmp > bmp_addr;

load eboot > eboot_addr;
jump eboot_addr;
}

0 Kudos
Reply

1,084 Views
Rodrigue
NXP Employee
NXP Employee

Hi Cheng,

Why don't you use the latest SDK based on 2.6.35

I did boot from NAND with uboot on this release and it works fine on the EVK.

0 Kudos
Reply

1,084 Views
sergiom_giordan
Contributor I

Hi Rodrigue,

can you please post your mx28_evk.h config file to compile u-boot for NAND support?

I'm facing compiling error regarding MMC ...that I disabled in order to save environment vars into nand!

Sergio

0 Kudos
Reply