[U-Boot] I found an error

Sun, Peng 2 Peng2.Sun at sonyericsson.com
Wed Sep 16 09:44:34 CEST 2009


Hi,
I use ubuntu 9.04 system. 
The shell is bash version is : GNU bash, version 3.2.48(1)-release (i486-pc-linux-gnu) 
The make version is: GNU Make 3.81
The step I take to compile the u-boot is :
	make smdk6400_config
	make all
below is the some message from compiling:
	arm-linux-objcopy --gap-fill=0xff -O binary /root/u-boot-2009.06/nand_spl/u-boot-spl /root/u-boot-2009.06/nand_spl/u-boot-spl.bin
	arm-linux-objcopy --gap-fill=0xff --pad-to= -O binary /root/u-boot-2009.06/nand_spl/u-boot-spl /root/u-boot-2009.06/nand_spl/u-boot-spl-16k.bin
	make[1]: Leaving directory `/root/u-boot-2009.06/nand_spl/board/samsung/smdk6400'
	cat nand_spl/u-boot-spl-16k.bin u-boot.bin > u-boot-nand.bin

list the files give out the result below:
-rwxr-xr-x 1 root root  2884 2009-09-16 23:32 u-boot-spl-16k.bin
-rwxr-xr-x 1 root root  2884 2009-09-16 23:32 u-boot-spl.bin


You can notice that the PAD_TO is empty during build, and the final size of the two file is the same.
Do you think that is the difference of bash or make between yours and mine cause the issue ?
-----Original Message-----
From: Minkyu Kang [mailto:promsoft at gmail.com] 
Sent: Wednesday, September 16, 2009 9:44 AM
To: Wolfgang Denk
Cc: Minkyu Kang; u-boot at lists.denx.de; sun peng
Subject: Re: [U-Boot] I found an error

Dear sun peng

2009/9/16 Wolfgang Denk <wd at denx.de>:
> Dear Minkyu Kang,
>
> In message <3fa5fd300909100724x18b2a8bdve0bd6e9fb719479a at mail.gmail.com> Sun Peng wrote:
>>
>> Recently I'm playing with u-boot and want it be able to boot from nand.
>> When I config u-boot to smdk6400, I found I can't  get nand_spl with proper
>> size. It need to be pad to 4k to fit into the steping stone.
>> The final size of nand_spl is  depend on the variable "PAD_TO":
>>
>>              # PAD_TO used to generate a 4kByte binary needed for the
>> combined image
>>              # -> PAD_TO = TEXT_BASE + 4096
>>              PAD_TO  := $(shell expr $$[$(TEXT_BASE) + 4096])
>> The lines above is in file:
>>             u-boot-xxx/nand_spl//board/samsung/smdk6400/config.mk
>> Unfortunately the PAD_TO can not evaluate to the proper value when I run the
>> makefile.
>> I change the the line to below:
>>    PAD_TO    := $(shell expr $(TEXT_BASE) + 4096)
>> then the whole build works OK.
>>
>> Is there any body think this is an issue ?
>
> Could you please be so kind and have a look at this?
>
> Thanks in advance.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> "IBM uses what I like to call the 'hole-in-the-ground  technique'  to
> destroy  the  competition.....  IBM digs a big HOLE in the ground and
> covers it with leaves. It then puts a big POT OF GOLD nearby. Then it
> gives the call, 'Hey, look at all this gold, get over here fast.'  As
> soon  as  the competitor approaches the pot, he falls into the pit"
>                                                     - John C. Dvorak
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

I saw correct PAD_TO value without modification.

ccache /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-objcopy
--gap-fill=0xff --pad-to=4096 -O binary
/home/share/Work/u-boot-work/nand_spl/u-boot-spl
/home/share/Work/u-boot-work/nand_spl/u-boot-spl-16k.bin

and I've got 4Kbyte binary also.

-rwxr-xr-x  1 prom prom  4096 2009-09-16 10:21 u-boot-spl-16k.bin

I think there have no problem.
If it's not your problem, please explain in more detail.

Thanks.
Minkyu Kang
-- 
from. prom.
www.promsoft.net


More information about the U-Boot mailing list