Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Nov 2011 12:34:14 -0800
From:      Craig Rodrigues <rodrigc@crodrigues.org>
To:        jan@dusatko.org
Cc:        freebsd-current@freebsd.org
Subject:   Re: Cross-architecture compiling
Message-ID:  <CAG=rPVdXf1RbkdxM4B%2BcCHez=U=DtUJejmaGoe--SHE-LXaZ1Q@mail.gmail.com>
In-Reply-To: <008b01cca9ed$735deb60$5a19c220$@org>
References:  <008b01cca9ed$735deb60$5a19c220$@org>

next in thread | previous in thread | raw e-mail | index | archive | help
2011/11/23 Jan Du=B9=E1tko <jan@dusatko.org>:
> Hi,
>
> I would like to ask people in this conference for advice regards
> cross-architecture compiling.
> Right now I have 32-bit system, where I need to boot over TFTP/NFS diferr=
ent
> architectures (i386/AMD64). I need to populate appropriate directory
> structure using some "generalized" kernel configuration, each platform ha=
ve
> thein own kernel.conf.
>
> I did those steps bellow, but this not work. Can someone help me?
>
> Regards
>
> Jan
>
>
> #!bin/sh
> export CC=3D"/usr/cross/usr/bin/gcc"
> =A0export AS=3D"/usr/cross/usr/bin/as"
> =A0export NM=3D"/usr/cross/usr/bin/nm"
> =A0export RANLIB=3D/usr/cross/usr/bin/ranlib"
> =A0export LD=3D"/usr/cross/usr/bin/ld"
> =A0export OBJCOPY=3D"/usr/cross/usr/bin/objcopy"
> =A0export SIZE=3D"/usr/cross/usr/bin/size"
> =A0export CPUTYPE=3D"native"
> =A0export KERNCONF=3D""
> =A0for TARGET_ARCH in i386 amd64
> =A0do
> =A0 =A0 =A0export MACHINE=3D${TARGET_ARCH}
> =A0 =A0 =A0export MACHINE_ARCH=3D${TARGET_ARCH}
> =A0 =A0 =A0export DESTDIR=3D"/pxeboot/diskless/${TARGET_ARCH}"
> =A0 =A0 =A0mkdir $DESTDIR
> =A0 =A0 =A0mkdir -p ${DESTDIR}usr/bin
> =A0 =A0 =A0mkdir -p ${DESTDIR}usr/lib
> =A0 =A0 =A0mkdir -p ${DESTDIR}usr/include
> =A0 =A0 =A0mkdir -p ${DESTDIR}usr/share/man/man1
> =A0 =A0 =A0mkdir -p ${DESTDIR}usr/share/info
> =A0 =A0 =A0mkdir -p ${DESTDIR}usr/libdata/ldscripts
> =A0 =A0 =A0mkdir -p ${DESTDIR}usr/libexec
> =A0 =A0 =A0cd /usr/obj
> =A0 =A0 =A0rm -rf usr
> =A0 =A0 =A0cd /usr/src
> =A0 =A0 =A0make world TARGET_ARCH=3D$TARGET_ARCH TOOLS_PREFIX=3D$DESTDIR
> DESTDIR=3D$DESTDIR install
> =A0 =A0 =A0make kernel TARGET_ARCH=3D$TARGET_ARCH TOOLS_PREFIX=3D$DESTDIR
> DESTDIR=3D$DESTDIR install
> =A0 =A0 =A0cd etc
> =A0 =A0 =A0make distribution
> =A0 =A0 =A0mkdir $DESTDIR/boot
> =A0 =A0 =A0cp /boot/device.hints $DESTDIR/boot
> =A0done
> =A0mkdir -p /pxeboot/diskless/conf/default/etc
> =A0ln -s /pxeboot/diskless/conf/default /pxeboot/diskless/i386/conf/defau=
lt
> =A0ln -s /pxeboot/diskless/conf/default /pxeboot/diskless/amd64/conf/defa=
ult


Hi,

I don't have experience setting up a cross-build environment for
FreeBSD, but you may want to read this:

http://bsdimp.blogspot.com/2006/09/cross-building-freebsd.html

However, I have more experience setting up PXE (TFTP + NFS) booting
systems of FreeBSD.  You should read this
document which I wrote:

http://www.freebsd.org/doc/handbook/network-pxe-nfs.html

--=20
Craig Rodrigues
rodrigc@crodrigues.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVdXf1RbkdxM4B%2BcCHez=U=DtUJejmaGoe--SHE-LXaZ1Q>