From df27ddd93777d31ac4adb6f1b6689db2d4093792 Mon Sep 17 00:00:00 2001 From: Phil Elwell <8911409+pelwell@users.noreply.github.com> Date: Fri, 16 Dec 2022 15:29:45 +0000 Subject: [PATCH] Update instructions for ARM-based Macs See https://github.com/raspberrypi/usbboot/issues/176. --- Readme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Readme.md b/Readme.md index f2cf52e..2a7161a 100644 --- a/Readme.md +++ b/Readme.md @@ -57,6 +57,17 @@ sudo ./rpiboot If the build is unable to find the header file `libusb.h` then most likely the `PKG_CONFIG_PATH` is not set properly. This should be set via `export PKG_CONFIG_PATH="$(brew --prefix libusb)/lib/pkgconfig"`. +If the build fails on an ARM-based Mac with a linker error such as `ld: warning: ignoring file /usr/local/Cellar/libusb/1.0.26/lib/libusb-1.0.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64` then you may need to build and install `libusb-1.0` yourself: +``` +$ wget https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2 +$ tar -xf libusb-1.0.26.tar.bz2 +$ cd libusb-1.0.26 +$ ./configure +$ make +$ make check +$ sudo make install +``` +Running `make` again should now succeed. ## Running