Building boot2 under arm?
Stanislav Sedov
stas at FreeBSD.org
Thu May 14 17:26:22 UTC 2009
On Thu, 14 May 2009 09:28:07 -0500
Jon Loeliger <jdl at 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 at FreeBSD.org>
> Cc: freebsd-current at freebsd.org
> In-reply-to: <20090513175000.GA2635 at citylink.fud.org.nz>
> Date: Wed, 13 May 2009 17:02:04 -0500
> From: Jon Loeliger <jdl at jdl.com>
> Message-Id: <E1M4MWa-0007qE-6m at 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!
More information about the freebsd-arm
mailing list