Skip to content

Commit 90a5c64

Browse files
committed
add support for linux_arm_6:
compile with the right cross-toolchain and intall libusb inside the container the `make install` places `libusb.a` in `/usr/local/include/libusb-1.0` while the `.h` file in `/usr/local/lib/`
1 parent 3d11436 commit 90a5c64

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

DistTasks.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,20 @@ tasks:
147147
docker run -v `pwd`/..:/home/build -w /home/build \
148148
-e CGO_ENABLED=1 \
149149
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
150-
--build-cmd "{{.BUILD_COMMAND}}" \
150+
--build-cmd "{{.BUILD_LIBUSB}}{{.BUILD_COMMAND}}" \
151151
-p "{{.BUILD_PLATFORM}}"
152152
153153
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
154154
155155
vars:
156156
PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_6"
157+
BUILD_LIBUSB: >
158+
curl -L https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2 | tar xj &&
159+
cd libusb-1.0.26/ &&
160+
./configure --with-pic --disable-udev --enable-static --disable-shared --host=arm-linux-gnueabi &&
161+
make -j"$(nproc)" &&
162+
make install &&
163+
cd .. &&
157164
BUILD_COMMAND: "go build -o {{.DIST_DIR}}/{{.PLATFORM_DIR}}/{{.PROJECT_NAME}} {{.LDFLAGS}}"
158165
BUILD_PLATFORM: "linux/armv6"
159166
CONTAINER_TAG: "{{.GO_VERSION}}-armel-debian9"

0 commit comments

Comments
 (0)