From owner-freebsd-arm@freebsd.org Sat Jul 18 18:38:11 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5248F9A5C77 for ; Sat, 18 Jul 2015 18:38:11 +0000 (UTC) (envelope-from bpurgar@gmail.com) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E02BF1A8B for ; Sat, 18 Jul 2015 18:38:10 +0000 (UTC) (envelope-from bpurgar@gmail.com) Received: by wibxm9 with SMTP id xm9so61632821wib.0 for ; Sat, 18 Jul 2015 11:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uz7Txwn5FXghBEa1WdyH+xLKTlAjkSbiKCHYYbqUZSc=; b=NFVyQesHLZpeiLSQLYKy9skgyvhu/EO0HMngD7FS4bNT/c4TOLD+mG/SBvlDOaCgkR z2FMCdOK3fOrVP4OJ1YuF/3ewns5ZH4fb06+W/XkvmsUQM0eQiaUKch+1dXeKBHc7hs9 dylKNlWUW/ZI2kp84U53P7+H1dVIarJebXtOx3uSj6e5Vs30YI9heARtz2h+SA48fAD6 jkWhPw2TnmLakCJ0eGlMrtal5Q6Wwcnnt/ijDwxgysQVHiIEqkCsrE6s2nTMR5XPHzYs L3H2ziOXIdDq3ZLzZGOyavTd/Jt0Mqa3V1lXNTMisNRNGplatGvjozbRomIN861qxL5O plAw== MIME-Version: 1.0 X-Received: by 10.194.189.80 with SMTP id gg16mr41447138wjc.9.1437244689313; Sat, 18 Jul 2015 11:38:09 -0700 (PDT) Received: by 10.28.98.133 with HTTP; Sat, 18 Jul 2015 11:38:09 -0700 (PDT) In-Reply-To: <20150718183218.GI8523@funkthat.com> References: <20150718183218.GI8523@funkthat.com> Date: Sat, 18 Jul 2015 20:38:09 +0200 Message-ID: Subject: Re: avila boot2 problem ? From: Berislav Purgar To: John-Mark Gurney Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2015 18:38:11 -0000 tnx for patch .. it fix this problem but now i got error on boot2.c : cc -O -pipe -march=armv5te -D__XSCALE__ -DBOOT_STACK=0x200000-4 -I/root/avila/sys/boot/arm/ixp425/boot2/../../../common -I/root/avila/sys/boot/arm/ixp425/boot2 -DFIXUP_BOOT_DRV -Os -ffreestanding -I/root/avila/sys/boot/arm/ixp425/boot2/../../../.. -I/root/avila/sys/boot/arm/ixp425/boot2/../../../../arm -DCPU_XSCALE_IXP425 -Wall -Waggregate-return -Werror -Wnested-externs -Wpointer-arith -Wshadow -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -DBOOT_IXP425 -std=gnu99 -Qunused-arguments -c boot2.c -o boot2.o boot2.c:156:1: error: no previous prototype for function 'main' [-Werror,-Wmissing-prototypes] main(void) ^ 1 error generated. *** Error code 1 and just to test rest of source (remove boot2.c from Makefile) it stops on : cc -O -pipe -march=armv5te -D__XSCALE__ -DBOOT_STACK=0x200000-4 -I/root/avila/sys/boot/arm/ixp425/boot2/../../../common -I/root/avila/sys/boot/arm/ixp425/boot2 -DFIXUP_BOOT_DRV -Os -ffreestanding -I/root/avila/sys/boot/arm/ixp425/boot2/../../../.. -I/root/avila/sys/boot/arm/ixp425/boot2/../../../../arm -DCPU_XSCALE_IXP425 -Wall -Waggregate-return -Werror -Wnested-externs -Wpointer-arith -Wshadow -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -DBOOT_IXP425 -std=gnu99 -Qunused-arguments -c ixp425_board.c -o ixp425_board.o ixp425_board.c:77:12: error: implicit declaration of function 'cpu_ident' is invalid in C99 [-Werror,-Wimplicit-function-declaration] cputype = cpu_ident() & CPU_ID_CPU_MASK; ^ ixp425_board.c:77:12: note: did you mean 'cpu_id'? /root/avila/sys/boot/arm/ixp425/boot2/lib.h:63:7: note: 'cpu_id' declared here u_int cpu_id(void); other files compile OK .. tnx On Sat, Jul 18, 2015 at 8:32 PM, John-Mark Gurney wrote: > Berislav Purgar wrote this message on Sat, Jul 18, 2015 at 18:51 +0200: > > i got this when trying to compile boot2 for avila board : > > Hmm.. maybe it's been a while since I built for arm, but this should > be easy to fix... Looks like the proper END is missing... > > Can you try to see if this patch fixes things? If it does, I'll commit > it... > > Thanks for the report... > > diff --git a/sys/boot/arm/ixp425/boot2/arm_init.S > b/sys/boot/arm/ixp425/boot2/arm_init.S > index 9ede9fc..15e1e6c 100644 > --- a/sys/boot/arm/ixp425/boot2/arm_init.S > +++ b/sys/boot/arm/ixp425/boot2/arm_init.S > @@ -43,6 +43,7 @@ ASENTRY_NP(start) > /* main should not return. If it does, spin forever */ > infiniteLoop: > b infiniteLoop > +END(start) > > .Lstart: > .word _edata > @@ -52,5 +53,6 @@ infiniteLoop: > ENTRY(cpu_id) > mrc p15, 0, r0, c0, c0, 0 > RET > +END(cpu_id) > > /* End */ > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." >