[U-Boot] [PATCH] 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
Signed-off-by: Kim Phillips kim.phillips@freescale.com --- 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(-)
diff --git a/nand_spl/board/sheldon/simpc8313/Makefile b/nand_spl/board/sheldon/simpc8313/Makefile index b0967a3..416e176 100644 --- a/nand_spl/board/sheldon/simpc8313/Makefile +++ b/nand_spl/board/sheldon/simpc8313/Makefile @@ -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 $<

Dear Kim Phillips,
In message 20090127160353.ec184554.kim.phillips@freescale.com 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
Signed-off-by: Kim Phillips kim.phillips@freescale.com
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

--- On Wed, 1/28/09, Wolfgang Denk wd@denx.de wrote:
From: Wolfgang Denk wd@denx.de Subject: Re: [U-Boot] [PATCH] mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build To: "Kim Phillips" kim.phillips@freescale.com Cc: u-boot@lists.denx.de, "Ron Madrid" ron_madrid@sbcglobal.net Date: Wednesday, January 28, 2009, 1:01 AM Dear Kim Phillips,
In message 20090127160353.ec184554.kim.phillips@freescale.com 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
Signed-off-by: Kim Phillips
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.
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

Dear Ron Madrid,
In message 107578.37644.qm@web83507.mail.sp1.yahoo.com you wrote:
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.
./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

--- On Wed, 1/28/09, Wolfgang Denk wd@denx.de wrote:
From: Wolfgang Denk wd@denx.de Subject: Re: [U-Boot] [PATCH] mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build To: ron_madrid@sbcglobal.net Cc: "Kim Phillips" kim.phillips@freescale.com, u-boot@lists.denx.de Date: Wednesday, January 28, 2009, 11:18 AM Dear Ron Madrid,
In message 107578.37644.qm@web83507.mail.sp1.yahoo.com you wrote:
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.
./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:
Mine fails the same way. I pasted the wrong lines.
I'm looking into this right now.
Ron

Wolfgang Denk wrote:
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

--- On Wed, 1/28/09, Scott Wood scottwood@freescale.com wrote:
From: Scott Wood scottwood@freescale.com Subject: Re: [U-Boot] [PATCH] mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build To: "Wolfgang Denk" wd@denx.de Cc: ron_madrid@sbcglobal.net, u-boot@lists.denx.de, "Kim Phillips" kim.phillips@freescale.com Date: Wednesday, January 28, 2009, 12:24 PM Wolfgang Denk wrote:
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.
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

Ron Madrid wrote:
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

--- On Wed, 1/28/09, Scott Wood scottwood@freescale.com wrote:
From: Scott Wood scottwood@freescale.com Subject: Re: [U-Boot] [PATCH] mpc83xx: fix undefined reference to `flush_cache' error in simpc8313 build To: ron_madrid@sbcglobal.net Cc: "Wolfgang Denk" wd@denx.de, u-boot@lists.denx.de, "Kim Phillips" kim.phillips@freescale.com Date: Wednesday, January 28, 2009, 2:26 PM Ron Madrid wrote:
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.
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
-Scott
participants (4)
-
Kim Phillips
-
Ron Madrid
-
Scott Wood
-
Wolfgang Denk