From patchwork Wed Jan 13 05:28:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1425607 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DFww96z0Jz9sWC for ; Wed, 13 Jan 2021 16:28:41 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Kb9kbWbd; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4DFww93JKhzDqgV for ; Wed, 13 Jan 2021 16:28:41 +1100 (AEDT) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::433; helo=mail-pf1-x433.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Kb9kbWbd; dkim-atps=neutral Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4DFww50f4FzDqWK for ; Wed, 13 Jan 2021 16:28:33 +1100 (AEDT) Received: by mail-pf1-x433.google.com with SMTP id c79so543693pfc.2 for ; Tue, 12 Jan 2021 21:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=13QQuvmtWLSmrO22XvSJCZQ6WmFc9SAQyzinUqsCMRU=; b=Kb9kbWbd+9D09t4sHmHVTfEWxNQJqUDH3SCvcedOgq4ItZ0CYsXk/yqaKcYenUi50j nBCGb+kl2dpsOWg8yHnlNzLMOSeIYnwAbuZ6sjC28+wQF0oHP+U1ANFA5OBA0kKa1zhT 51EFBraOQ47UEuLla4fTshJSfu0BNItGW3JCwyDbrwnbaPjC32tgy8XkQRbDB866g0w0 eOLjQffQxs22EEcrkxo+jgmwWiDKJQZOFz/Y4x2WeHOKT6r3EzsTbEMhFGlI2TDSmikA gdn58/CQYiS1XabYgrrI5nJ+LhDniiCP8Ntx7k8Qnp43TGv6Ap2ctmikeQbwfVU26fwV Zm0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=13QQuvmtWLSmrO22XvSJCZQ6WmFc9SAQyzinUqsCMRU=; b=H9OJHOl6spagS3fmx7L0oBhjdUiiTut40eqJ58fTgkI4szJAAt5hmvC3kHEDbMZ3/J FnPSMsFb8Cp0UzsQ2Toy9tMpW6A7T0WNYBD8j7szlPJgLg18ICA3LCFXmy51Uwb1YpFJ O7h69w+2SRv8q96tO7NihCaaQLYbG1bvZCw3v4aXFYg68ulOtP6rcFloMZWJcSBD956K XtO8WZhroPSRQa83xyabU8ZpO0pW2xq0a3X7OyFf4QXsoXjAk+wuFwG0EIxFx+wNyI8H n8iTixQyhk8/0J2Qjx23Sjqag3u3BJJK0+LAg7MXs3DW5ZDbaakyUQ4nW4uIre0Oebf6 9L9A== X-Gm-Message-State: AOAM530xAgr6pJUUfpXm4gS0gdYi42WmutIUwDjBz+xR9t0Kij/FzBka kLiurZ4gs/msum2lQyzVnroiiWINjhU= X-Google-Smtp-Source: ABdhPJxUnxtJ1j1oYx4Y4iv/KEE76taAjjJdrlHKNaBUZEK6lGgmwabUUQRQdzEDG9BNfiSVZidiCA== X-Received: by 2002:a65:51c8:: with SMTP id i8mr485857pgq.81.1610515709970; Tue, 12 Jan 2021 21:28:29 -0800 (PST) Received: from bobo.ibm.com ([124.170.13.62]) by smtp.gmail.com with ESMTPSA id t7sm928685pfe.179.2021.01.12.21.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 21:28:29 -0800 (PST) From: Nicholas Piggin To: pdbg@lists.ozlabs.org Date: Wed, 13 Jan 2021 15:28:24 +1000 Message-Id: <20210113052824.444674-1-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Pdbg] [PATCH] build: update instructions for hard-float BMCs X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" The previous patch was papering over the issue, badly. The cause of the problem is that some OpenBMC builds have started to use hard float. I didn't look hard enough and my ignorance of the ARM environment (and the fact it "worked") made me think this was a more benign configuration issue. So update the build instructions to select the hard-float toolchain when necessary. Confirmed this works on Debian. Signed-off-by: Nicholas Piggin Reviewed-by: Joel Stanley --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7892a8d..e0f4842 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,11 @@ top level directory. Static linking is supported and can be performed by adding ### Cross compiling for BMC (ARM) +First, work out if your BMC is using the hard or soft float ABI. If the +file /lib/ld-linux.so.3 exists, soft-float. If /lib/ld-linux-armhf.so.3 +exists, hard-float. + +To build for soft-float: ``` apt-get install gcc-arm-linux-gnueabi ./bootstrap.sh @@ -25,11 +30,14 @@ make rsync pdbg root@bmc:/usr/local/bin ``` -Depending on your cross compile environment, you may get a message like -`pdbg: No such file or directory` when execting the binary on the BMC, -which may be fixable by correcting loader location: - -`patchelf --set-interpreter /lib/ld-linux-armhf.so.3 pdbg` +For hard-float: +``` +apt-get install gcc-arm-linux-gnueabihf +./bootstrap.sh +./configure --host=arm-linux-gnueabihf CFLAGS="-static" +make +rsync pdbg root@bmc:/usr/local/bin +``` ## Usage