From owner-freebsd-arm@FreeBSD.ORG Wed Aug 15 19:27:20 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E15E106564A for ; Wed, 15 Aug 2012 19:27:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1D0AF8FC12 for ; Wed, 15 Aug 2012 19:27:19 +0000 (UTC) Received: by yenl7 with SMTP id l7so2655292yen.13 for ; Wed, 15 Aug 2012 12:27:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=MzYPPWziBV4IEY8kc4SlUpTmIKZR+UkdKvBKAZROMN8=; b=Tsp2po9gjFx5A4okpgwWZ+cp7eeOQNLIT+Za6Pl/eFbcxRWjtta0LkE4DqYCDaPQgO IQBX/8oi2I8sKomTDLeBTZ1D1nCN82TddHYIyZnL+o0AyssVsA/dVUo+jWpyp2Yqam4A 8yxyxaWxRtEcZhfSY2KVy/BTX5WM/TfHV5H3pJEFqVNg+spzqphnf6vqYtGsUWyB0mA0 DWD2TymoVJSuNQpxiFaxojQ5W46LzlWadymrDckK+gUte5PgodWpfJuJtAB6GN2nLh4W IhlmifTJG1umurbaAqaj8HeDUGrVGLVagDuJ9r/LG+y9tfCvWUxMz1BcUIhUiNWTWQiG XJYw== Received: by 10.236.117.97 with SMTP id i61mr21184235yhh.73.1345058839024; Wed, 15 Aug 2012 12:27:19 -0700 (PDT) Received: from [10.30.101.53] ([209.117.142.2]) by mx.google.com with ESMTPS id t16sm2189857anj.21.2012.08.15.12.27.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Aug 2012 12:27:18 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <502BEAA9.9080802@gmail.com> Date: Wed, 15 Aug 2012 13:27:13 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <1EB213FA-1B3D-467E-B733-064938E7D96F@bsdimp.com> References: <5008728C.5040100@jetcafe.org> <1343846511.1128.34.camel@revolution.hippie.lan> <501B0E04.5040901@jetcafe.org> <1343951251.1128.53.camel@revolution.hippie.lan> <502AEC99.70708@jetcafe.org> <48664E9B-0BBB-4C78-B720-9920083E661A@bsdimp.com> <1345039837.27688.14.camel@revolution.hippie.lan> <502BEAA9.9080802@gmail.com> To: mattia.rossi.mate@gmail.com X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQlRrDAXMq284pGdUrBdC8d0kqQ3qX/82aN8+NufkDEoQl0xYrgQT3LhfpdjXJXwfNptWRFo Cc: freebsd-arm@freebsd.org Subject: Re: Building ARM ports (was Re: Globalscale Dreamplug and 8.3 RELEASE) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2012 19:27:20 -0000 On Aug 15, 2012, at 12:30 PM, Mattia Rossi wrote: >=20 >> The biggest problem we have is build versus run dependencies. When = crossbuilding port foo to run on arm, that port decides it needs the = compile_a_foo port to build the code, so it goes off and cross-builds = compile_a_foo, then wants to run the resulting arm binaries on the x86 = host. The only way I know of to fix that is to tediously identify and = pre-build all the build-time requirements needed by any port you intend = to cross-build. Ports that have their own build systems and custom tools = are essentially impossible to work with. >=20 > Those are exactly the issues I've run into when attempting to cross = build. See my story here: >=20 > = http://matrossi.blogspot.it/2011/08/cross-compiling-ports-for-arm-under.ht= ml Yes. That's why you need something more than the hackish thing that I = did that groks BUILD vs RUN depends and builds the BUILD depends native = and the RUN depends cross. I looked at this back in the day and found = it was easier to do the following hackish thing: (1) Create a chroot for building (we were doing this anyway) (2) Create a port that described all the build depends. Build and = install it in the chroot. (3) Then build the runtime ports with the cross compilers in the same = chroot, but I needed hacks to install the packages into a different = place, that was groked for chained dependencies and such. A bit of a PITA, and I never filed the rough edges off of this enough to = even commit it to the TSC tree. It is a very time-intensive = investigation to look into this stuff too, but maybe machines are fast = enough that it isn't too horrible for the general case. > My Qemu experience: >=20 > = http://matrossi.blogspot.it/2011/09/freebsd-arm-on-qemu-in-virtualbox.html= >=20 > but it didn't prove useful for building ports as there wasn't enough = virtual memory to build them, because it fully emulates the 32M of RAM = of a gumstix board as well.. There's hacks that make qemu emulate the boards with 2GB of RAM floating = about... Warner