Skip to contentSkip to conversation

mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

PATCH New Kim Phillips 4 participants 9 messages Jan 27, 2009 – Jan 28, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

extend commit c70564e6b1bd08f3230182392238907f3531a87e
"NAND: Fix cache and memory inconsistency issue" to add the cache.o dependency to the simpc8313 build and fix this:

...Large Page NAND...Configuring for SIMPC8313 board...
nand_boot_fsl_elbc.o: In function `nand_boot':
nand_spl/board/sheldon/simpc8313/nand_boot_fsl_elbc.c:150: undefined reference to `flush_cache' make[1]: *** [/home/r1aaha/git/u-boot-mpc83xx/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2

---
Ron, if you ack/confirm this doesn't break your board, I'll apply this to u-boot-mpc83xx.

Thanks, Kim

 nand_spl/board/sheldon/simpc8313/Makefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
nand_spl/board/sheldon/simpc8313/Makefile +5 -1
index b0967a3..416e176 100644
@@ -34,7 +34,8 @@ AFLAGS	+= -DCONFIG_NAND_SPL
 CFLAGS	+= -DCONFIG_NAND_SPL
 
 SOBJS	= start.o ticks.o
-COBJS	= nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o nand_init.o time.o
+COBJS	= nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o nand_init.o \
+	  time.o cache.o
 
 SRCS	:= $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
@@ -78,6 +79,9 @@ $(obj)ns16550.c:
 $(obj)nand_init.c:
 	ln -sf $(SRCTREE)/cpu/mpc83xx/nand_init.c $<
 
+$(obj)cache.c:
+	ln -sf $(SRCTREE)/lib_ppc/cache.c $<
+
 $(obj)time.c:
 	ln -sf $(SRCTREE)/lib_ppc/time.c $<
 
Signature · 1 line
1.6.1
#1 lore raw

PATCH 1/1 mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

Dear Kim Phillips,

Quoted 10 lines · In message <[email protected]> you wrote:

extend commit c70564e6b1bd08f3230182392238907f3531a87e
"NAND: Fix cache and memory inconsistency issue" to add the cache.o dependency to the simpc8313 build and fix this:

...Large Page NAND...Configuring for SIMPC8313 board...
nand_boot_fsl_elbc.o: In function `nand_boot':
nand_spl/board/sheldon/simpc8313/nand_boot_fsl_elbc.c:150: undefined reference to `flush_cache' make[1]: *** [/home/r1aaha/git/u-boot-mpc83xx/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2

Quoted 4 lines

---
Ron, if you ack/confirm this doesn't break your board, I'll apply this to u-boot-mpc83xx.

I went ahead and applied this to fix the build issue. Please complain if it doesn't work.

Best regards,

Wolfgang Denk

Signature · 8 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
In the beginning, I was made. I didn't ask to be made. No one consul-
ted with me or considered my feelings  in  this  matter.  But  if  it
brought  some  passing fancy to some lowly humans as they haphazardly
pranced their way through life's mournful jungle, then so be it.
- Marvin the Paranoid Android
#2 lore raw

PATCH 1/1 mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

Quoted 28 lines · Wolfgang Denk

From: Wolfgang Denk <[email protected]>
Subject: Re: [U-Boot] [PATCH] mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build
To: "Kim Phillips" <[email protected]>
Cc: u-boot at lists.denx.de, "Ron Madrid" <[email protected]>
Date: Wednesday, January 28, 2009, 1:01 AM
Dear Kim Phillips,

In message <[email protected]>

Quoted 2 lines · you

extend commit c70564e6b1bd08f3230182392238907f3531a87e "NAND: Fix cache and memory inconsistency

issue" to add the cache.o dependency

Quoted 3 lines

to the simpc8313 build and fix this:

...Large Page NAND...Configuring for SIMPC8313

board...

Quoted 2 lines

nand_boot_fsl_elbc.o: In function `nand_boot':

nand_spl/board/sheldon/simpc8313/nand_boot_fsl_elbc.c:150:
undefined reference to `flush_cache'

Quoted 1 line

make[1]: ***

[/home/r1aaha/git/u-boot-mpc83xx/nand_spl/u-boot-spl] Error 1

Quoted 3 lines

make: *** [nand_spl] Error 2

Signed-off-by Kim Phillips

<[email protected]>

Quoted 8 lines
Quoted 2 lines

---
Ron, if you ack/confirm this doesn't break your

board, I'll apply this

Quoted 1 line

to u-boot-mpc83xx.

I went ahead and applied this to fix the build issue. Please complain
if it doesn't work.

So I take it that the build worked for you? My build failed.

./MAKEALL SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313 board... ppc_6xx-ld:/home/ron/develop/u-boot-mpc83xx/nand_spl/board/sheldon/simpc8313/u-boot.lds:51: parse error make[1]: *** [/home/ron/develop/u-boot-mpc83xx/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....
ppc_6xx-size: './u-boot': No such file

Ron

#3 lore raw

PATCH 1/1 mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

Dear Ron Madrid,

Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 4 lines

I went ahead and applied this to fix the build issue. Please complain
if it doesn't work.

So I take it that the build worked for you? My build failed.

I didn;t re-test yet.

Quoted 7 lines

./MAKEALL SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313 board... ppc_6xx-ld:/home/ron/develop/u-boot-mpc83xx/nand_spl/board/sheldon/simpc8313/u-boot.lds:51: parse error make[1]: *** [/home/ron/develop/u-boot-mpc83xx/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....
ppc_6xx-size: './u-boot': No such file

It fails for me, too, but differently:

-> ./MAKEALL SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313 board...
ppc_5xx-ld: NAND bootstrap too big
ppc_5xx-ld: NAND bootstrap too big
make[1]: *** [/home/wd/git/u-boot/work/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....

Best regards,

Wolfgang Denk

Signature · 5 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
The price one pays for pursuing any profession,  or  calling,  is  an
intimate knowledge of its ugly side.                  - James Baldwin
#4 lore raw

PATCH 1/1 mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

Quoted 27 lines · Wolfgang Denk

From: Wolfgang Denk <[email protected]>
Subject: Re: [U-Boot] [PATCH] mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build
To: ron_madrid at sbcglobal.net
Cc: "Kim Phillips" <[email protected]>, u-boot at lists.denx.de
Date: Wednesday, January 28, 2009, 11:18 AM
Dear Ron Madrid,

In message
<[email protected]> you

Quoted 2 lines · wrote:
Quoted 2 lines

I went ahead and applied this to fix the build

issue.

Quoted 4 lines
Quoted 2 lines

Please complain
if it doesn't work.

So I take it that the build worked for you? My build

failed.

I didn;t re-test yet.

Quoted 2 lines

./MAKEALL SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313

board...

Quoted 1 line

ppc_6xx-ld:/home/ron/develop/u-boot-mpc83xx/nand_spl/board/sheldon/simpc8313/u-boot.lds:51:
parse error

Quoted 8 lines
Quoted 1 line

make[1]: ***

[/home/ron/develop/u-boot-mpc83xx/nand_spl/u-boot-spl] Error 1

Quoted 3 lines

make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....
ppc_6xx-size: './u-boot': No such file

It fails for me, too, but differently:

Mine fails the same way. I pasted the wrong lines.

I'm looking into this right now.

Ron

#5 lore raw

PATCH 1/1 mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

In reply to Wolfgang Denk
Quoted 9 lines · Wolfgang Denk

It fails for me, too, but differently:

-> ./MAKEALL SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313 board...
ppc_5xx-ld: NAND bootstrap too big
ppc_5xx-ld: NAND bootstrap too big
make[1]: *** [/home/wd/git/u-boot/work/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....

We could cut out some bytes by making the large/small page distinction at compile-time rather than runtime. Also, some of the strings could be cut down in size, and we could use raw accessors plus explicit barriers.

-Scott

#6 lore raw

PATCH 1/1 mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

Quoted 14 lines · Scott Wood

From: Scott Wood <[email protected]>
Subject: Re: [U-Boot] [PATCH] mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build
To: "Wolfgang Denk" <[email protected]>
Cc: ron_madrid at sbcglobal.net, u-boot at lists.denx.de, "Kim Phillips" <[email protected]>
Date: Wednesday, January 28, 2009, 12:24 PM

Quoted 4 lines · Wolfgang Denk

It fails for me, too, but differently:

-> ./MAKEALL SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313

board...

Quoted 3 lines

ppc_5xx-ld: NAND bootstrap too big
ppc_5xx-ld: NAND bootstrap too big
make[1]: ***

Quoted 8 lines

[/home/wd/git/u-boot/work/nand_spl/u-boot-spl] Error 1

Quoted 2 lines

make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....

We could cut out some bytes by making the large/small page distinction at compile-time rather than runtime. Also, some of the strings could be cut down in size, and we could use raw accessors plus explicit barriers.

It would seem that the drivers/serial/ns16550.c file currently being
included in my project has a few functions that are completely unused
by my board. Is it allowable to duplicate the two functions I do use
(NS16550_putc and NS16550_init) in my code within a #ifdef CONFIG_NAND_SPL? This saves about 120 (decimal) bytes in the bootstrap image.

Ron

#7 lore raw

PATCH 1/1 mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

Quoted 4 lines · Ron Madrid

It would seem that the drivers/serial/ns16550.c file currently being
included in my project has a few functions that are completely unused
by my board. Is it allowable to duplicate the two functions I do use
(NS16550_putc and NS16550_init) in my code within a #ifdef CONFIG_NAND_SPL? This saves about 120 (decimal) bytes in the bootstrap image.

Maybe just put #ifndef CONFIG_NAND_SPL in the existing file? I'm assuming that none of the other boards are going to need anything other than init and putc in their NAND loaders.

-Scott

#8 lore raw

PATCH 1/1 mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build

Quoted 12 lines · Scott Wood

From: Scott Wood <[email protected]>
Subject: Re: [U-Boot] [PATCH] mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build
To: ron_madrid at sbcglobal.net
Cc: "Wolfgang Denk" <[email protected]>, u-boot at lists.denx.de, "Kim Phillips" <[email protected]>
Date: Wednesday, January 28, 2009, 2:26 PM

Quoted 1 line · Ron Madrid

It would seem that the drivers/serial/ns16550.c file

currently being

Quoted 1 line

included in my project has a few functions that are

completely unused

Quoted 1 line

by my board. Is it allowable to duplicate the two

functions I do use

Quoted 8 lines
Quoted 1 line

(NS16550_putc and NS16550_init) in my code within a

#ifdef CONFIG_NAND_SPL? This saves about 120 (decimal) bytes in the bootstrap image.

Maybe just put #ifndef CONFIG_NAND_SPL in the existing file? I'm assuming that none of the other boards are going to need anything other than init and putc in their NAND loaders.

It would appear that within the nand_spl directory the mpc8313erdb and the simpc8313 are the only two board that include the file ns16550.c in the build. These changes work for my board (with the patch that Kim sent out earlier) and at this time I am running the MAKEALL. After that succeeds I will send the patch.

Ron

Quoted 2 lines

-Scott