[U-Boot] I found an error

Minkyu Kang promsoft at gmail.com
Wed Sep 16 03:44:04 CEST 2009


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