Skip to contentSkip to conversation

I found an error

U-Boot sun peng 4 participants 5 messages Sep 10, 2009 – Sep 17, 2009

lore
Share & tools
lore

sun peng

author
#0 lore raw

Hi there:
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 ?

BRs/Sunpeng from Beijing China
10/09/2009

#1 lore raw

Dear Minkyu Kang,

Quoted 16 lines · In message <[email protected]> Sun…

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)
Quoted 3 lines

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

Signature · 9 lines
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
#2 lore raw

Dear sun peng

2009/9/16 Wolfgang Denk <[email protected]>:

Quoted 31 lines

Dear Minkyu Kang,

Quoted 18 lines · In message <[email protected]> Sun…

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.

Quoted 1 line

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

Quoted 15 lines

--
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

Signature · 2 lines
from. prom.
www.promsoft.net
#3 lore raw

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 <[email protected]>:

Quoted 31 lines

Dear Minkyu Kang,

Quoted 18 lines · In message <[email protected]> Sun…

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.

Quoted 1 line

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

Quoted 15 lines

--
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

Signature · 2 lines
from. prom.
www.promsoft.net
#4 lore raw

Dear Sun, Peng

2009/9/16 Sun, Peng 2 <[email protected]>:

Quoted 88 lines

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:

(quoted diff) +0 -2
-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 <[email protected]>:

Quoted 31 lines

Dear Minkyu Kang,

Quoted 18 lines · In message <[email protected]> Sun…

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.

Quoted 1 line

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

Quoted 15 lines

--
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

Quoted 9 lines

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

I think we use similar system.
And I saw same problem at my co-worker's system.
but I don't know the cause.

This problem is seems to be occurred at particular system. and If your modification have no problem, then we can fix it. so, please send the patch.
and then many people will test it.

+
please do not top-post.

Thanks
Minkyu Kang

Signature · 2 lines
from. prom.
www.promsoft.net