From owner-freebsd-current@FreeBSD.ORG Wed Nov 23 14:48:32 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 779DA1065674 for ; Wed, 23 Nov 2011 14:48:32 +0000 (UTC) (envelope-from jan@dusatko.org) Received: from mail.dusatko.org (static-84-242-66-51.net.upcbroadband.cz [84.242.66.51]) by mx1.freebsd.org (Postfix) with ESMTP id 38C6C8FC19 for ; Wed, 23 Nov 2011 14:48:32 +0000 (UTC) Received: from mail.dusatko.org (localhost [127.0.0.1]) by mail.dusatko.org (Postfix) with ESMTP id 9790C84AD0 for ; Wed, 23 Nov 2011 15:37:44 +0100 (CET) Received: from Relict (unknown [192.168.253.33]) by mail.dusatko.org (Postfix) with ESMTPA id 925A484892 for ; Wed, 23 Nov 2011 15:37:44 +0100 (CET) From: =?iso-8859-2?B?SmFuIER1ueF0a28=?= To: Date: Wed, 23 Nov 2011 15:37:39 +0100 Message-ID: <008b01cca9ed$735deb60$5a19c220$@org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acyp7XMpDN2FHrWpQ7Wd6ZL4ZJjXWg== Content-Language: cs Subject: Cross-architecture compiling X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jan@dusatko.org 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 14:48:32 -0000 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 diferrent architectures (i386/AMD64). I need to populate appropriate directory structure using some "generalized" kernel configuration, each platform have thein own kernel.conf. I did those steps bellow, but this not work. Can someone help me? Regards Jan #!bin/sh export CC="/usr/cross/usr/bin/gcc" export AS="/usr/cross/usr/bin/as" export NM="/usr/cross/usr/bin/nm" export RANLIB=/usr/cross/usr/bin/ranlib" export LD="/usr/cross/usr/bin/ld" export OBJCOPY="/usr/cross/usr/bin/objcopy" export SIZE="/usr/cross/usr/bin/size" export CPUTYPE="native" export KERNCONF="" for TARGET_ARCH in i386 amd64 do export MACHINE=${TARGET_ARCH} export MACHINE_ARCH=${TARGET_ARCH} export DESTDIR="/pxeboot/diskless/${TARGET_ARCH}" mkdir $DESTDIR mkdir -p ${DESTDIR}usr/bin mkdir -p ${DESTDIR}usr/lib mkdir -p ${DESTDIR}usr/include mkdir -p ${DESTDIR}usr/share/man/man1 mkdir -p ${DESTDIR}usr/share/info mkdir -p ${DESTDIR}usr/libdata/ldscripts mkdir -p ${DESTDIR}usr/libexec cd /usr/obj rm -rf usr cd /usr/src make world TARGET_ARCH=$TARGET_ARCH TOOLS_PREFIX=$DESTDIR DESTDIR=$DESTDIR install make kernel TARGET_ARCH=$TARGET_ARCH TOOLS_PREFIX=$DESTDIR DESTDIR=$DESTDIR install cd etc make distribution mkdir $DESTDIR/boot cp /boot/device.hints $DESTDIR/boot done mkdir -p /pxeboot/diskless/conf/default/etc ln -s /pxeboot/diskless/conf/default /pxeboot/diskless/i386/conf/default ln -s /pxeboot/diskless/conf/default /pxeboot/diskless/amd64/conf/default