[Pdbg] [PATCH] build: update instructions for hard-float BMCs

Nicholas Piggin npiggin at gmail.com
Wed Jan 13 16:28:24 AEDT 2021


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 <npiggin at gmail.com>
---
 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 at 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 at bmc:/usr/local/bin
+```
 
 ## Usage
 
-- 
2.23.0



More information about the Pdbg mailing list