From patchwork Wed Oct 3 12:56:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 188759 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id F3B292C0095 for ; Wed, 3 Oct 2012 22:56:50 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1873280CA; Wed, 3 Oct 2012 14:56:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MuxraG28Yb7i; Wed, 3 Oct 2012 14:56:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E7C00280CB; Wed, 3 Oct 2012 14:56:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4FE6D280CB for ; Wed, 3 Oct 2012 14:56:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5Wf4kP2Nf5FZ for ; Wed, 3 Oct 2012 14:56:40 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from atrey.karlin.mff.cuni.cz (atrey.karlin.mff.cuni.cz [195.113.26.193]) by theia.denx.de (Postfix) with ESMTP id 09EFC280CA for ; Wed, 3 Oct 2012 14:56:38 +0200 (CEST) Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 9087CF06BF; Wed, 3 Oct 2012 14:56:37 +0200 (CEST) Date: Wed, 3 Oct 2012 14:56:36 +0200 From: Pavel Machek To: Albert ARIBAUD Message-ID: <20121003125635.GA25959@elf.ucw.cz> References: <1349217924-3792-1-git-send-email-dinguyen@altera.com> <20121002223310.GH30129@bill-the-cat> <20121003135900.302c0944@lilith> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20121003135900.302c0944@lilith> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.21 (2010-09-15) Cc: dinh.linux@gmail.com, Chin Liang See , u-boot@lists.denx.de, Tom Rini , Stefan Roese Subject: Re: [U-Boot] [PATCHv5] ARM: Add Altera SOCFPGA Cyclone5 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Hi! > > > From: Dinh Nguyen > > > > > > Add minimal support for Altera's SOCFPGA Cyclone 5 hardware. > > > > > > Signed-off-by: Dinh Nguyen > > > Signed-off-by: Chin Liang See > > > Signed-off-by: Pavel Machek > > > Reviewed-by: Marek Vasut > > > Cc: Tom Trini > > > Cc: Wolfgang Denx > > > Cc: Albert Aribaud > > > Cc: Stefan Roese > > > > Acked-by: Tom Rini > > > > 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@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@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@amd:~/mainline-altera/u-boot$ pavel@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 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