Page MenuHomePureOS Tracker

Unable to build CoreBoot 4.7 due to missing kernel patch
Closed, ResolvedPublic


Building the coreboot 4.7 from source is now causing an error,

ch341a_spi.c: In function 'ch341a_spi_init':
ch341a_spi.c:447:2: error: 'libusb_set_debug' is deprecated: Use libusb_set_option instead [-Werror=deprecated-declarations]
  libusb_set_debug(NULL, 3); // Enable information, warning and error messages (only).
In file included from ch341a_spi.c:25:0:
/usr/include/libusb-1.0/libusb.h:1300:18: note: declared here
 void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
cc1: all warnings being treated as errors
Makefile:1043: recipe for target 'ch341a_spi.o' failed
make: *** [ch341a_spi.o] Error 1

the libusb-1.0-0 v1.0.22 was a recent core update, but the patch to the kernel was added on the 27th April 2018 which is yet to make its way into PureOS, so until then one cannot upgrade CoreBoot.

Event Timeline

aurovrata renamed this task from Unable to build CoreBoot 4.7 due to missing kernel path to Unable to build CoreBoot 4.7 due to missing kernel patch.May 22 2018, 03:22
aurovrata created this task.

I don't think the patch to the kernel is relevant here since coreboot has nothing to do with the linux kernel. I think the patch needed has to be on the flashrom project itself. I'll have a look and see if that was recently fixed upstream, then I'll update the flashrom we use in the build_coreboot script, and test it.

thanks for looking into this @kakaroto, the error is popping up while building the coreboot from your script, so would it not be an issue with library dependencies installed ?

Yes, it's a library dependency (libusb) while flashrom is being compiled by the script. It's unrelated to the kernel (though the kernel also uses libusb and is affected by the same issue).
It looks like this was fixed in flashrom 11 days ago and the commit is here :
I'm now testing it and I should have it fixed and the script updated within the hour.

kakaroto closed this task as Resolved.May 22 2018, 13:41
kakaroto claimed this task.

It's fixed, and tested. Make sure you delete the flashrom directory so it gets checked out cleanly (rm -rf coreboot/flashrom/) then retry, it should work now.

Yes, it works, it's now building properly. thank you very much for the soooper prompt fix!