From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 25 00:35:09 2014 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9668F80F for ; Thu, 25 Dec 2014 00:35:09 +0000 (UTC) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C4541B32 for ; Thu, 25 Dec 2014 00:35:08 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id 10so7295232lbg.19 for ; Wed, 24 Dec 2014 16:35:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=ND1h2Uep76y0fibZa7vMzY8xGnanRp0SmFuvhwYGktQ=; b=BMUPWmc24JLfN5CteH3S/yX4Lwi428tlzrue0ohyF+6GlIEUDkjawCurTphxvDUY1C gLWk/6J8cy+WE8XfAjnz/x+tKeQvRtrB/kPMK02jbTCwBisgdhkt32uyx4W8GkIEXAK+ oDhyh4YQdEgfRtHH++CuuhOb4blncU+A7Y/18CvtVWlHypx2lX3vApgfD5ZYIW/LSp3S QWpM8zHP0dvxvMb4BcD8Rrw0nQnCyaj3TgMUhRTX6f84Npu2MvZriBaUS0GI71erIbN+ TQofx4duQpxh8zLdN1pPOvpbvmgbxu+hvHUkaAQ41luzo5uxftIQjwfzd2HH5oDpnM5L FvNg== X-Gm-Message-State: ALoCoQmJgmno7O8OD/660oy2ufcDdoHDuxo4khzw28HD3G8JcXinOmsmtxcefgkewnYErriWZ+Z7 X-Received: by 10.152.3.100 with SMTP id b4mr35037391lab.68.1419467701454; Wed, 24 Dec 2014 16:35:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.142.198 with HTTP; Wed, 24 Dec 2014 16:34:21 -0800 (PST) X-Originating-IP: [74.60.193.70] From: Jeremy Brown Date: Wed, 24 Dec 2014 19:34:21 -0500 Message-ID: Subject: Help Compiling armv6 Ports from x64 To: freebsd-embedded@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 00:35:09 -0000 I have a VM running FreeBSD 10.1 x64 that I'm trying to use to create an image that will run on a Raspberry Pi. I've managed to get the base system working, but I can't figure out how to compile ports for the image. I know my cross-compilation toolchain is working, as I can build the kernel and world without issue. For sake of example, say my arm root is at /tmp/rootfs, my toolchain is at /usr/armv6-freebsd/usr/bin and some other assorted cross-compilation items are at /usr/obj/armv6-freebsd. Some of the commands I have tried to build a port are: PATH=/path/to/toolchain:${PATH} make TARGET=arm TARGET_ARCH=armv6 install (this typically fails during compilation) PATH=/path/to/toolchain:${PATH} make TARGET=arm TARGET_ARCH=armv6 configure install (this typically fails during configuration, the error I get is something along the lines of "cannot read C-compiled file"; in addition the configure script never notices that I am trying to cross-compile) PATH=/path/to/toolchain:${PATH} make CONFIGURE_ARGS="--host=armv6-freebsd" configure install (this typically fails during compilation for varying reasons, but at least it'll recognize that I'm cross-compiling; including TARGET and TARGET_ARCH makes no difference) make TARGET=arm TARGET_ARCH=armv6 DESTDIR=/tmp/rootfs install (this was what I originally tried, when the chroot kicked in it would try to run the ARM version of /bin/sh; as the VM is x64 this would always give an exec format error before failing) make TARGET=arm TARGET_ARCH=armv6 DESTDIR=/tmp/rootfs CHROOTED=no install (this would seem to work, but would install the port to the VM instead of the filesystem for the image, and in addition would be compiled x64 instead of armv6) There are others, but these are the ones I can remember the best right now. I understand there won't be any precompiled ports, and I don't want to have to build my desired ports on the Pi itself (despite the fact that doing so would be agonizingly slow, the space required to store the ports tree and compile what I need would explode the size of the image from ~400MB to >2GB). I've tried many different websites (see here , here , here , here , here ), but none of their methods have resulted in a successful compilation. Do you know of a method to compile armv6 ports on an x64 machine, or can you direct me to someone who might? -Jeremy