[U-Boot] working with loadb & bootm on u-boot-v2 for imx27ads Board

Lejin K Joy lejin at spacomp.com
Thu Sep 25 15:04:36 CEST 2008


-----Original Message-----
From: Nishanth Menon [mailto:menon.nishanth at gmail.com] 
Sent: Thursday, September 25, 2008 4:33 PM
To: Lejin K Joy
Cc: 'Robert Schwebel'; 'Sascha Hauer'; wd at denx.de; u-boot at lists.denx.de
Subject: Re: [U-Boot]working with loadb & bootm on u-boot-v2 for imx27ads
Board

Lejin K Joy said the following on 09/25/2008 05:06 AM:
> I want to load the Linux Kernel Zimage on to RAM. As per the documentation
> we have used the following command to load zImage using Kermit protocol.
>
> " U-boot-v2> loadb -c zImage "
>
> (Also tried " U-boot-v2> loadb -f zImage ")
>
> Which successfully downloads zimage to the file with default offset set as
> 0x00000000.....
>   
U-Boot V2 uses a filesystem. when you did loadb -c -f zImage, it
downloaded the image to the file called zImage. zImage is stored within
the ramfs filesystem. (the concepts are very similar to an OS with
restrictions). This is slightly different from what you want to achieve
I think.
> a) But I am not able to understand to which location in RAM this image is
> written to? b) Please let me know how exactly to load kernel image to
> specific location on RAM?
>   
Look for the device node which shows the RAM/NOR/NAND you need. this
might be /dev/mem or (in my OMAP3430 case) /dev/ram0 - also see "help
loadb". Loadb takes the following options:
-f file - where to download to
-o offset - what offset to download - defaults to 0
-b baud - baudrate at which to download - defaults to console baudrate
-c - Create file if it is not present - default disabled
In your case, lets say: your ram starts at 0x80000000 and is denoted by
/dev/ram0. If you want to download to offset 0x3000 in ram, you can do
loadb -f /dev/ram0 -o 0x3000. this will essentially download to 0x80003000.

+ you now have the flexibility of downloading straight to NOR, NAND or
to even a file within u-boot v2's ramfs!! - so you can store and share
commonly used scripts modules etc.. tons of similar flexibility exists.
> c) Also how we can change the default location since the user is not given
> an option to mention the address.
>   
as explained above.
> d) How to load the file " zImage" to RAM?
>   
if you want to copy a file from ramfs to a "specific location" just do
the cp command!
> I was intending to do the following steps :
>
> 	>> loadb 0x100000 zimage
> 	>> loadb 0x1000000 ramdisk.gz 
> 	>> bootm 0x100000 0x1000000
>
> Please help me out as I am using U-boot-V2 for the first time.
>   
Does the above explanation help? in u-boot-v2, you can infact run "help
<command name>" or do a make docs And if you have graphviz latex etc
installed, you will get a html documentation in Documentation/html.

Note: I created a few useful platform independent tools for U-boot
(should work for both U-boot v2 and V1). they are available in [1].
>
> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
On
> Behalf Of Lejin K Joy
> Sent: Tuesday, September 23, 2008 9:49 PM
> To: 'Robert Schwebel'; 'Sascha Hauer'
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] u-boot-v2 for imx27 Board
>   
Try not to top post. see [2] and mailing list ettiquette.
Regards,
Nishanth Menon

[1] http://code.google.com/p/omap-u-boot-utils/
[2] http://en.wikipedia.org/wiki/Posting_style

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

Hi Nishanth,

Thanks for your inputs. 

Still I am one step behind. I was successfully able to download the Zimage
by following command; but I am failing at the command to execute the image
loaded to RAM which has base address 0xc0000000. The "go" command displays
"## Starting application at 0xA0100000 ..." and hang up.

---------------
uboot:/ loadb -f /dev/ram0 -o 0x100000
## Ready for binary (kermit) download to 0x00100000 offset on /dev/ram0
device a
t 115200 bps...
## Total Size      = 0x0014deb9 = 1367737 Bytes

uboot:/ go 0xa0100000
## Starting application at 0xA0100000 ...

-----------

Please find the detailed boot log below : I cant correctly execute the  the
"bootm" command as well. Please guide : 

------------
U-Boot 2.0.0-rc5-git (Sep 25 2008 - 16:57:32)

Board: Freescale i.MX27 ADS
mpll:     265999329 Hz
spll:     239999725 Hz
arm:      177332886 Hz
perclk1:    8866644 Hz
perclk2:   17733288 Hz
perclk3:   44333221 Hz
perclk4:   17733288 Hz
clkin26:   26000000 Hz
ahb:       44333221 Hz
ipg:       22166610 Hz
Stack space : 0xa7af8000 -> 0xa7b00000 (size 32 kB)
Open /dev/env0 No such file or directory
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...
set parameter: No such device
set parameter: No such device
set parameter: No such device
set parameter: No such device
no such device: /dev/nor0

Hit any key to stop autoboot:  0
set parameter: No such device
set parameter: No such device
set parameter: No such device
set parameter: No such device
Current ethernet device not set!
Current ethernet device not set!
Bad Magic Number
uboot:/ printenv
locals:
kernel=net
root=net
ip=dhcp
uimage=uImage-mx27ads
jffs2=root-mx27ads.jffs2
autoboot_timeout=3
nfsroot=/tmp/imx27ads
bootargs=console=ttymxc0,115200
mtdparts=128k(uboot)ro,128k(ubootenv),1536k(kernel),-(root)
rootpart=/dev/mtdblock3
globals:
PATH=/env/bin

uboot:/ loadb -f /dev/ram0 -o 0x100000
## Ready for binary (kermit) download to 0x00100000 offset on /dev/ram0
device a
t 115200 bps...
## Total Size      = 0x0014deb9 = 1367737 Bytes

uboot:/ bootm
Usage:
boot application image

uboot:/ bootm -h
bootm advanced options:
 -r <initrd>    specify an initrd image
 -a <arch>      use architecture number <arch>

uboot:/ bootm -a ARM 2 -r /dev/ram0
use initrd /dev/ram0
Bad Magic Number

uboot:/ go 0xA0100000
## Starting application at 0xA0100000 ...
--------------

Please guide.

Thanks for your support,
Lejin





More information about the U-Boot mailing list