Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2009 21:26:47 +0400
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        Jon Loeliger <jdl@jdl.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Building boot2 under arm?
Message-ID:  <20090514212647.d79860a2.stas@FreeBSD.org>
In-Reply-To: <E1M4bup-00015Z-Hm@jdl.com>
References:  <E1M4bup-00015Z-Hm@jdl.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 May 2009 09:28:07 -0500
Jon Loeliger <jdl@jdl.com> mentioned:

> 
> [ Forwarded from -current as I am still trying to resolve
>   this problem of building boot2 for the avila board. -- jdl ]
> 
> ------- Forwarded Message
> 
> To: Andrew Thompson <thompsa@FreeBSD.org>
> Cc: freebsd-current@freebsd.org
> In-reply-to: <20090513175000.GA2635@citylink.fud.org.nz> 
> Date: Wed, 13 May 2009 17:02:04 -0500
> From: Jon Loeliger <jdl@jdl.com>
> Message-Id: <E1M4MWa-0007qE-6m@jdl.com>
> Subject: Re: Building boot2 for ixp425 
> 
> > The buildenv command is the one that spawns a new shell with all the
> > correct paths to use the new compiler. just do the kernel-toolchain
> > before it, as in.
> > 
> > make TARGET_ARCH=arm TARGET_CPUTYPE=xscale \                                 
> > 	TARGET_BIG_ENDIAN=true kernel-toolchain                                
> >                                                
> > make TARGET_ARCH=arm TARGET_CPUTYPE=xscale \                                 
> > 	TARGET_BIG_ENDIAN=true buildenv                                        
> >                                        
> > cd sys/boot/arm/ixp425/boot2/
> > make   
> > 
> > That should work :)
> 
> But alas, it did not.
> 
> So I ran the first two make commands as above but with
> my KERNCONF=BOOT2 in the mix as well.  Built a toolchain
> and all just fine.  And switched into a "buildenv" as well.
> 
> However:
> 
>     # make
>     Warning: Object directory not changed from original /usr/src/sys/boot/arm/ixp425/boot2
>     cc -O -pipe -mbig-endian -march=armv5te -D__XSCALE__ -DBOOT_STACK=0x200000-4  -I/usr/src/sys/boot/arm/ixp425/boot2/../../../common  -I/usr/src/sys/boot/arm/ixp425/boot2 -DFIXUP_BOOT_DRV -Os -ffreestanding  -I/usr/src/sys/boot/arm/ixp425/boot2/../../../..  -I/usr/src/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  -c arm_init.S
>     arm_init.S:27:25: error: machine/asm.h: No such file or directory
>     arm_init.S: Assembler messages:
>     arm_init.S:29: Error: bad instruction `asentry_np(start)'
>     arm_init.S:52: Error: bad instruction `entry(cpu_id)'
>     arm_init.S:54: Error: bad instruction `ret'
>     *** Error code 1
> 
> *sigh*
> 
> Trying to simply build a kernel in this "buildenv" didn't work.
> Same results from either:
> 
>     # make KERNCONF=BOOT2 buildkernel
> or
>     # make TARGET_ARCH=arm TARGET_CPUTYPE=xscale TARGET_BIG_ENDIAN=true KERNCONF=BOOT2 buildkernel
> 
> Like this:
> 
>     # make TARGET_ARCH=arm TARGET_CPUTYPE=xscale TARGET_BIG_ENDIAN=true KERNCONF=BOOT2 buildenv
>     Entering world for arm:arm
>     # cd /usr/src/sys/boot/arm/ixp425/boot2
>     # make
>     Warning: Object directory not changed from original /usr/src/sys/boot/arm/ixp425/boot2
>     cc -O -pipe -mbig-endian -march=armv5te -D__XSCALE__ -DBOOT_STACK=0x200000-4  -I/usr/src/sys/boot/arm/ixp425/boot2/../../../common  -I/usr/src/sys/boot/arm/ixp425/boot2 -DFIXUP_BOOT_DRV -Os -ffreestanding  -I/usr/src/sys/boot/arm/ixp425/boot2/../../../..  -I/usr/src/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  -c arm_init.S
>     arm_init.S:27:25: error: machine/asm.h: No such file or directory
>     arm_init.S: Assembler messages:
>     arm_init.S:29: Error: bad instruction `asentry_np(start)'
>     arm_init.S:52: Error: bad instruction `entry(cpu_id)'
>     arm_init.S:54: Error: bad instruction `ret'
>     *** Error code 1
> 
>     Stop in /usr/src/sys/boot/arm/ixp425/boot2.
> 
> So I tried to construct the tree as it would be after a buildkernel,
> but that didn't go well at all.
> 
> Should it be trying to find the file /usr/src/sys/arm/include/asm.h ?

Have you tried building the world first?

-- 
Stanislav Sedov
ST4096-RIPE

!DSPAM:4a0c543b994291766630182!





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090514212647.d79860a2.stas>