From owner-freebsd-questions@FreeBSD.ORG Sun Jan 12 19:23:03 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B9A4AD9; Sun, 12 Jan 2014 19:23:03 +0000 (UTC) Received: from mail-qe0-x22b.google.com (mail-qe0-x22b.google.com [IPv6:2607:f8b0:400d:c02::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC4FB19D9; Sun, 12 Jan 2014 19:23:02 +0000 (UTC) Received: by mail-qe0-f43.google.com with SMTP id jy17so6244165qeb.2 for ; Sun, 12 Jan 2014 11:23:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=2mYvoK+iLUBT8++7tgc5oDAXyNFZ3TEiplnDQKwdP2Q=; b=DB3cUOqln8cN96Hj+b8TrXgt8za0Z49SUVvtnjMQBZkWOQphhoiuDTeziSKvyiXGcQ nHOSfyw144vAuzRevvLfkjjj+vU6as92TitCrSX9GsZdfxWhu6pRXRD5eQ7IpGyUhHEX MDUewxJ4/j8t9LAvfFS17+LL6x1yK8i56i0yry3dbC6h4Rhmuz3HKZM8fYc+M5fU8eel WR6WNXuBE7tHbBWSFxRT6/rfLesZaAwZKbWBYgPNCiLZNj/ulGRkBTs2vpWAxm0zU3qp an5IcjpRj1Wn7+XQ65iitsGxqYxPCL2OumPKsGDj1xsr0CYFi/ZHYpwUPskygmAXMVz7 n4hw== MIME-Version: 1.0 X-Received: by 10.49.48.11 with SMTP id h11mr2746540qen.41.1389554581936; Sun, 12 Jan 2014 11:23:01 -0800 (PST) Sender: tomek.cedro@gmail.com Received: by 10.229.151.73 with HTTP; Sun, 12 Jan 2014 11:23:01 -0800 (PST) In-Reply-To: <20140112185955.GA29733@frozen.localdomain> References: <20140112185955.GA29733@frozen.localdomain> Date: Sun, 12 Jan 2014 20:23:01 +0100 X-Google-Sender-Auth: ixJ4lDD3c1tyAoMvU6G-dBJxCKI Message-ID: Subject: Re: cross-building ARM world on amd64 From: CeDeROM To: Timo Buhrmester Content-Type: text/plain; charset=UTF-8 Cc: Tim Kientzle , FreeBSD Questions Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jan 2014 19:23:03 -0000 On Sun, Jan 12, 2014 at 7:59 PM, Timo Buhrmester wrote: > I've been following this guide (https://wiki.freebsd.org/A_Brief_Guide_To_Cross_Compiling_FreeBSD) in an attempt to build an armv6 world on my amd64 host running 10.0-RC4. > Using this command (inside /usr/src) >> # make TARGET="arm" TARGET_ARCH="armv6" MAKEOBJDIRPREFIX=/usr/cross/obj buildworld > It eventually fails with: >> ./make_keys keys.list > init_keytry.h >> ./make_keys: Exec format error >> *** Error code 126 >> Stop. >> make[4]: stopped in /usr/src/lib/ncurses/ncurses > Looking at the file in question, make_keys is an ARM binary, which obviously won't run on amd64, yet it is being executed. > I wonder what I'm missing here. > Also not quite sure what information would be helpful, but here's the host's uname -a output: > # uname -a > FreeBSD flap 10.0-RC4 FreeBSD 10.0-RC4 #0 r260130: Tue Dec 31 17:10:01 UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > Thanks for any help, > Timo Make sure you are using arm-eabi-gcc and arm-eabi-binutils, otherwise file format and compiler switches for target are invalid as you probably use host toolchain (not the target toolchain). At the moment there is a conflict between host binutils and arm-eabi-binutils packages (some localization files related conflict), so I also wait for this to get resolved :-) When you use proper compiler and utils it will work and switches become available for that target :-) Best regards :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info