5

I am trying to flash compute module using a RPI 2 from this manual: I did the following:

Clone the usbboot tool repository:

git clone --depth=1 https://github.com/raspberrypi/tools
cd tools/usbboot

libusb must be installed. If you are using Cygwin, please make sure libusb is installed as previously described. On the Raspberry Pi or other Debian-based Linux enter the following command:

sudo apt-get install libusb-1.0-0-dev

Now build and install the usbboot tool:

make
sudo make install

I get the following errors:

pi@raspberrypi ~/tools/usbboot $ make
cc -g -o rpiboot main.c -lusb-1.0
main.c: In function ‘main’:
main.c:262:34: error: ‘LIBUSB_LOG_LEVEL_WARNING’ undeclared (first use in   this function)
main.c:262:34: note: each undeclared identifier is reported only once for each function it appears in
Makefile:2: recipe for target 'rpiboot' failed
make: *** [rpiboot] Error 1

How to patch?

5
  • looks like the source file is broken. a variable is undeclared. What brach of code did you get this from?
    – Piotr Kula
    Jul 27, 2016 at 14:27
  • "What brach of code did you get this from?" - sorry i dont understand
    – Thommy
    Jul 27, 2016 at 14:32
  • what did you do before build install. get the code from github? a tarball? a random zip? There are some bugs in the source code
    – Piotr Kula
    Jul 27, 2016 at 14:33
  • above i added the steps i did before. got it from git github.com/raspberrypi/tools
    – Thommy
    Jul 27, 2016 at 14:40
  • 1
    have you tried without the depth bit... i know you dont want the entire repository but there may be something needed deeper in the repository that isnt pulled. maybe rebooting or rehashing is required because it seems like it cant find that variable for some reason
    – Piotr Kula
    Jul 27, 2016 at 17:56

1 Answer 1

1

You can patch this by removing the line libusb_set_debug(ctx, verbose ? LIBUSB_LOG_LEVEL_WARNING : 0); from the C main.c file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.