From patchwork Tue Oct 2 13:57:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronny Meeus X-Patchwork-Id: 188525 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 910D32C00A9 for ; Tue, 2 Oct 2012 23:58:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BFC4E101B93; Tue, 2 Oct 2012 13:57:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bP8W22DyOU3k; Tue, 2 Oct 2012 13:57:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8DDC1101FCC; Tue, 2 Oct 2012 13:57:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 8C30D8F74A for ; Tue, 2 Oct 2012 13:57:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3C3DD85015 for ; Tue, 2 Oct 2012 13:57:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QyXoOK2cJrDb for ; Tue, 2 Oct 2012 13:57:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-oa0-f43.google.com (mail-oa0-f43.google.com [209.85.219.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8B86A8A003 for ; Tue, 2 Oct 2012 13:57:44 +0000 (UTC) Received: by oagk1 with SMTP id k1so14558162oag.16 for ; Tue, 02 Oct 2012 06:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=X5OCoBQl8cIKohutWzb15TmfR9tqzd0KBxb1WakRoC8=; b=AKxBqHg3KqdN5IaM08D8qog0zrSXYQlEubOO0Mlvgs2gVsObkybJ8YODRk2wxQNP1r Nhu5Jb51uMnB49rdClZfWIgYrlkk02u0ZzjwaT7v5COxN2mS4AFx8V4v15GFOATopYno WtUd70RVK0qWeKS9JKb84PJYw5J2yxXbisrY3DogGsSmigH8ax8BRslywrQHfB2D+sy1 dxSLlCVFh5rUF2eNEKbE52Xi0YcEf7JMZBBYQVPbPlGcOUOw7k59Q3IoTnxuoTR0RAhL NDWuC/OjkHJz4G1097hc3eugR3Jx6tYp1euYtChtyNprbg5jSufKchDS3K1hEJZ8PRAQ kxmw== MIME-Version: 1.0 Received: by 10.182.8.6 with SMTP id n6mr14119699oba.39.1349186263586; Tue, 02 Oct 2012 06:57:43 -0700 (PDT) Received: by 10.60.66.4 with HTTP; Tue, 2 Oct 2012 06:57:43 -0700 (PDT) Date: Tue, 2 Oct 2012 15:57:43 +0200 Message-ID: From: Ronny Meeus To: buildroot@busybox.net Subject: [Buildroot] Question about 64Bit kernel and 32Bit applications X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Hello I'm using buildroot to build an environment for MIPS (Cavium). For this I use a 64 bit toolchain provided by Cavium. My buildroot configuration is as follows: * Buildroot 2012.05 * Target Architecture: MIPS (big endian) * Target Architecture Variant: mips 64 * Target ABI: n64 * glibc Building and deploying the kernel / busybox in this configuration works without issues. I want to deploy on this configuration "legacy" applications that need to run in 32 bit mode. So in fact I want to have a mixture of 32 and 64 bit (busybox,dropbear,...) applications to be present on the board. Is this supported in buildroot? If it is, how can this be configured? What I already did is changing the .mk files in the package directory to pass the correct options to build 32 bit variants to the individual libraries (libUIO / xenomai-forge / libfuse) I want to use. This works, but I consider it as a workaround since I only have 32 bit variants of these libraries. To be correct, I should have both a 32 and a 64 bit version of each of these libraries. I also need to adapt all the packages I want to include, which is something I would like to configure at buildroot level. This is what I changed for libfuse for example: On the short term, it would also be fine to have user-land compiled completely in 32 bit mode while the kernel is compiled in 64 bit mode. If this is supported in some way, I would be fine for the moment but in the future we want to run a mixture of both 32 and 64 bit apps. --- Ronny diff --git a/package/libfuse/libfuse.mk b/package/libfuse/libfuse.mk --- a/package/libfuse/libfuse.mk +++ b/package/libfuse/libfuse.mk @@ -13,7 +13,8 @@ LIBFUSE_CONF_OPT= --disable-nls \ --disable-example \ --disable-kernel-module \ --enable-lib \ - --enable-util + --enable-util \ + CFLAGS="-mabi=n32 -march=octeon2" LDFLAGS="-Wl,-melf32btsmipn32" CPPFLAGS="-mabi=n32 -march=octeon2"