Subject: Re: kernel build fails on 1.5.2
To: Steven M. Bellovin <smb@research.att.com>
From: Ron Roskens <roskens@elfin.net>
List: current-users
Date: 09/20/2001 15:52:37
On Thu, 20 Sep 2001, Steven M. Bellovin wrote:

> In message <20010920215810.G19220@Xtrmntr.org>, salo writes:
> >hi,
> >
> >On Thu, Sep 20, 2001 at 07:52:44PM +0000, mel kravitz wrote:
> >> Trying to build a custom kernel on an i386 , running 1.5.2 fails at
> >> ../../../../arch/i386/isa/npx.c
> >> /tmp/cc07wnmas: Assembler messages:
> >> /tmp/cc07wnmas:314:   no such instruction 'fxsave'
> >> ***Error Code 1
> >> Stop
> >> How  to fix?
> >
> >from src/UPDATING:
> >
> >20010803:
> >        (i386 only): i386 kernel now uses new instructions like fxsave which
> >        old gas doesn't understand.  To build the kernel successfuly, you
> >        need to build and install new gas (gnu/usr.bin/gas.new).
>
> Right, I ran into this, too -- I had to install the 1.5.2 userland
> before I could compile from the 1.5.2 kernel source.

An alternative to installing over your current userland is to use the
new TOOLCHAIN setup.

Setup /etc/mk.conf for this by adding:
TOOLDIR=/usr/obj/tools
.if ! defined(TOOLCHAIN_CONF)
TOOLCHAIN_CONF= ${BSDSRCDIR}/tools/Makefile.tools
.sinclude "${TOOLCHAIN_CONF}"
.endif

Build the tools by:
# cd /usr/src/tools
# make build

The only problem that I had to get around first, was that bsd.own.mk
doesn't know about MACHINE_GNU_ARCH, so you'll have to copy one from
sharesrc.

Now when you compile a kernel, it will use the toolchain utilities.

Elfin