I am trying to connect it all (by the way I am trying to build module that in standard is in kernel tree, wouldnt it be easier for me just to compile the exact same kernel as I am using intel? Can you provide the link to the kernel you are using?).
- I have cloned mentioned repository (kernel-module-build)
- I have checked version of kernel for 2.2.0.dev which is 4.8.17
- I have downloaded file ch431.c from kernel version from source code
https://github.com/torvalds/linux/tree/v4.8/drivers/usb/serial
- I have changed Makefiles and Dockerfile
[[Dockerfile]]
FROM resin/intel-nuc-debian
RUN apt-get update && apt-get install -y curl wget build-essential
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN ./build.sh intel-nuc '2.2.0+rev1.dev' ch341
CMD ./run.sh
[[Makefile]]
KERNEL_TREE_PATH?=/lib/modules/$(shell uname -r)/build
EXTRA_CFLAGS="-DDEBUG"
obj-m+=ch341.o
all: ch341.ko
ch341.ko: ch341.c
make -C $(KERNEL_TREE_PATH) M=$(PWD) modules
clean:
make -C $(KERNEL_TREE_PATH) M=$(PWD) clean
.PHONY: all clean
I get the result
Step 5/6 : RUN ./build.sh intel-nuc '2.2.0+rev1.dev' ch341
---> Running in 4b0607a3ef86
Building images/intel-nuc/2.2.0+rev1.dev/kernel_modules_headers.tar.gz...
--2017-08-05 16:26:35-- https://files.resin.io/images/intel-nuc/2.2.0%2Brev1.dev/kernel_modules_headers.tar.gz
Resolving files.resin.io (files.resin.io)... 34.226.173.211, 54.152.194.198
Connecting to files.resin.io (files.resin.io)|34.226.173.211|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9883956 (9.4M) [application/x-tar]
Saving to: ‘kernel_modules_headers.tar.gz’
0K .......... .......... .......... .......... .......... 0% 201K 48s
9650K .. 100% 4388G=4.6s
2017-08-05 16:26:40 (2.05 MB/s) - ‘kernel_modules_headers.tar.gz’ saved [9883956/9883956]
make: Entering directory '/tmp/tmp.zmkPme4h3t'
CC [M] /usr/src/app/ch341_intel-nuc_2.2.0+rev1.dev/ch341.o
/bin/sh: 1: scripts/basic/fixdep: not found
scripts/Makefile.build:295: recipe for target '/usr/src/app/ch341_intel-nuc_2.2.0+rev1.dev/ch341.o' failed
make[1]: *** [/usr/src/app/ch341_intel-nuc_2.2.0+rev1.dev/ch341.o] Error 127
Makefile:1473: recipe for target '_module_/usr/src/app/ch341_intel-nuc_2.2.0+rev1.dev' failed
make: Leaving directory '/tmp/tmp.zmkPme4h3t'
make: *** [_module_/usr/src/app/ch341_intel-nuc_2.2.0+rev1.dev] Error 2
---> f598afc579b1