U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv5] ARM: Add Altera SOCFPGA Cyclone5
Date: Wed, 3 Oct 2012 14:56:36 +0200	[thread overview]
Message-ID: <20121003125635.GA25959@elf.ucw.cz> (raw)
In-Reply-To: <20121003135900.302c0944@lilith>

Hi!

> > > From: Dinh Nguyen <dinguyen@altera.com>
> > > 
> > > Add minimal support for Altera's SOCFPGA Cyclone 5 hardware.
> > > 
> > > Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> > > Signed-off-by: Chin Liang See <clsee@altera.com>
> > > Signed-off-by: Pavel Machek <pavel@denx.de>
> > > Reviewed-by: Marek Vasut <marex@denx.de>
> > > Cc: Tom Trini <trini@ti.com>
> > > Cc: Wolfgang Denx <wd@denx.de>
> > > Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> > > Cc: Stefan Roese <sr@denx.de>
> > 
> > Acked-by: Tom Rini <trini@ti.com>
> > 
> > Albert, as I had promised that if they rebased on my SPL series and
> > since it was close to after the merge window closed they could get this
> > in, please take this for the next pull request (assuming you have no
> > comments), thanks!
> 
> gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) gives:
> 
> albert at lilith:~/src/u-boot-arm$ LANG=C ./MAKEALL socfpga_cyclone5
> Configuring for socfpga_cyclone5 board...
> socfpga_cyclone5.c:26:6: error: expected identifier or '(' before 'do'
> socfpga_cyclone5.c:26:6: error: expected identifier or '(' before 'while'
> make[2]: ***
> > > [/home/albert/src/u-boot-arm/spl/board/altera/socfpga_cyclone5/soc

I tried:

pavel at amd:~/mainline-altera/u-boot$ LANG=C
CROSS_COMPILE=arm-linux-gnueabi- ./MAKEALL socfpga_cyclone5
Configuring for socfpga_cyclone5 board...
   text	       data		     bss	    dec	    hex
   filename
 160875	   3584	 213264	 377723	  5c37b	./u-boot
   1918	       152	      52     2122	    84a
   ./spl/u-boot-spl

--------------------- SUMMARY ----------------------------
Boards compiled: 1
----------------------------------------------------------
pavel at amd:~/mainline-altera/u-boot$ 

pavel at amd:~/mainline-altera/u-boot$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Debian 4.3.5-4) 4.3.5
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

> make: *** [spl/u-boot-spl.bin] Error 2
> arm-linux-gnueabi-size: './u-boot': No such file
> spl.c: In function 'board_init_f':
> spl.c:45:38: warning: taking address of expression of type 'void' [enabled by default]

Guilty as charged. We did not want to specify type of stack and malloc
pools. Patch below should fix it.

> socfpga_cyclone5.c:26:6: error: expected identifier or '(' before 'do'
> socfpga_cyclone5.c:26:6: error: expected identifier or '(' before 'while'
> make[2]: *** [/home/albert/src/u-boot-arm/spl/board/altera/socfpga_cyclone5/socfpga_cyclone5.o] Error 1
> make[1]: *** [/home/albert/src/u-boot-arm/spl/board/altera/socfpga_cyclone5/libsocfpga_cyclone5.o] Error 2

But this one is a mystery. Offending lines are:

#include <netdev.h>

DECLARE_GLOBAL_DATA_PTR;

[line 26:] void show_boot_progress(int progress)
{
        debug("Boot reached stage %d\n", progress);
}

Do we need direct include asm/global_data.h for
DECLARE_GLOBAL_DATA_PTR? Is something funny going on with debug()? Is
show_boot_progress() a macro in your build? Would it be enough to
check out current u-boot-arm to reproduce?

Thanks,

  	                                                            Pavel

diff --git a/arch/arm/include/asm/arch-socfpga/spl.h b/arch/arm/include/asm/arch-socfpga/spl.h
index c2014c5..efd0c06 100644
--- a/arch/arm/include/asm/arch-socfpga/spl.h
+++ b/arch/arm/include/asm/arch-socfpga/spl.h
@@ -19,7 +19,7 @@
 #define _SOCFPGA_SPL_H_
 
 /* Symbols from linker script */
-extern void __malloc_start, __malloc_end, __stack_start;
+extern char __malloc_start, __malloc_end, __stack_start;
 
 #define BOOT_DEVICE_RAM 1
 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2012-10-03 12:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 22:45 [U-Boot] [PATCHv5] ARM: Add Altera SOCFPGA Cyclone5 dinguyen at altera.com
2012-10-02 22:33 ` Tom Rini
2012-10-03 11:59   ` Albert ARIBAUD
2012-10-03 12:56     ` Pavel Machek [this message]
2012-10-03 13:11       ` Pavel Machek
2012-10-03 14:13         ` Albert ARIBAUD
2012-10-03 13:11     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121003125635.GA25959@elf.ucw.cz \
    --to=pavel@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox