From owner-freebsd-current@FreeBSD.ORG Wed Nov 23 20:34:15 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9FF1106566C for ; Wed, 23 Nov 2011 20:34:15 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 677008FC12 for ; Wed, 23 Nov 2011 20:34:14 +0000 (UTC) Received: by bkbzs8 with SMTP id zs8so2685212bkb.13 for ; Wed, 23 Nov 2011 12:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=w+1Nqiuley++3ELd8fP1U+zErHRYZbJ6R0C4kQkO2Ag=; b=h6tK8EBom0b+BT9E8oYtNjJswNY1fhCd1DP6letokIJUwHV2xWZYFHD0YRV2xIaZj/ e9qUvlhzOphX6TV+NrawzjFZ8Gt/ksJLpcaTb8Pt8p7E2OQT3ilO2+S3lNwmY2hZV/8V Hr/cj+7vxSoYVcl/MZHi6z56rDTHVxpp/4dSw= MIME-Version: 1.0 Received: by 10.205.128.138 with SMTP id he10mr25316051bkc.13.1322080454101; Wed, 23 Nov 2011 12:34:14 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.204.37.141 with HTTP; Wed, 23 Nov 2011 12:34:14 -0800 (PST) In-Reply-To: <008b01cca9ed$735deb60$5a19c220$@org> References: <008b01cca9ed$735deb60$5a19c220$@org> Date: Wed, 23 Nov 2011 12:34:14 -0800 X-Google-Sender-Auth: u1axO2WUEFEh2yLru_rTEHarfrs Message-ID: From: Craig Rodrigues To: jan@dusatko.org Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: Cross-architecture compiling X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2011 20:34:16 -0000 2011/11/23 Jan Du=B9=E1tko : > 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