Patchwork Compiling from source on Chromebook:GalliumOS - can't get libusb?

login
register
about
Submitter Nico Huber
Date 2017-10-31 21:44:56
Message ID <6e1931f6-d44c-bbd6-fa23-4e296e5d58a6@gmx.de>
Download mbox | patch
Permalink /patch/4512/
State New
Headers show

Comments

Nico Huber - 2017-10-31 21:44:56
Hi Anders,

On 31.10.2017 01:18, Anders Nelson wrote:
> Hi guys,
> 
> I'm trying to compile the latest stable source on my Ubuntu-based GalliumOS
> system running on a recent x86_64 Chromebook.
> 
> I get the error:
> 
> ichspi.o: In function `ich_init_spi':
> ichspi.c:(.text+0x26b2): undefined reference to
> `read_ich_descriptors_via_fdo'

looking at the code, there seem to be different ways used to decide if
we build for x86. So some code for x86 gets built in but some other
piece is missing. As you only need FTDI support, you can just try to
build without the internal programmers (e.g. `make CONFIG_INTERNAL=no`).
If you know how to apply it, please also try the patch attached and
report back if it helps.

> 
> I've installed all the packages noted in the README even though I'm only
> interested in supporting the FTDI 2232H chip on the breakout board sold by
> SeeedStudio.
> 
> Any suggestions I can try to get this built? I'm relatively new to Linux so
> I apologize in advance for any gaps in knowledge.

Nothing to apologize for. That error is very unexpected.

Nico

Patch

diff --git a/ich_descriptors.c b/ich_descriptors.c
index 69fcd75d..86aab29d 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -1064,7 +1064,7 @@  int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors
 }
 
 /* Only used by ichspi.c */
-#if CONFIG_INTERNAL == 1 && (defined(__i386__) || defined(__x86_64__))
+#if CONFIG_INTERNAL == 1 && (defined(__i386__) || defined(__x86_64__) || defined(__amd64__))
 static uint32_t read_descriptor_reg(enum ich_chipset cs, uint8_t section, uint16_t offset, void *spibar)
 {
 	uint32_t control = 0;