avila boot2 problem ?

Berislav Purgar bpurgar at gmail.com
Sat Jul 18 18:38:11 UTC 2015


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 <jmg at funkthat.com> 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."
>


More information about the freebsd-arm mailing list