I want to work with usb serial converter that uses driver ch341 and depends on usbserial module. In desktop linux it is present in /lib/modules/4.10.0-28-generic/kernel/drivers/usb/serial/. However in ResinOS 2.2.0 the folder does not exist. That I assume is that by choice those modules were not built in into kernel. What is the idea on how to add them / load them into kernel? Of course to load them correctly they should be compiled with the kernel version of ResinOS.
Hi @llap, there’s an experimental project to show how to add your custom kernel modules. It’s very work in progress, and feedback is appreciated.
We are also working on a quite different approach to add kernel modules, will keep everyone posted here in the forums, that should fix a lot of these more complicated issues by a much more powerful solution.
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
Hey, looks like that is might be an library linking issue, the fixdep tool is looking for /lib/ld-linux-x86-64.so.2 but that should be symlinked to /lib64/ld-linux-x86-64.so.2, and it’s not. Since it doesn’t find the relevant library, it cannot run. It’s fixed up by having this line somewhere in your Dockerfile before the build step.
RUN ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2
I’ve tried it out, and the module seems to be building fine with that. The rest of the changes you made seem to be spot on. Hope this will help!
Will be following up with this issue to see what’s up with those libraries.
@llap we are adding support for host apps, these will allow you to customise the host using the same Dockerfile + git push solution we provide for user apps. The feature is currently in for review.
@llap actually i have the same issue with a Pi 3. Have you a more recent working solution?
The RUN of build.sh for some reason doesnt have enough permissions. And if i try to use ‘sudo’ the command is not found.
But im in a different case, because im using a docker-compose and then ive to modify the Dockerfile.
Ill post a little bit of structure
Hello @patonz91, you likely need to make your sh file executable by adding a line like “RUN chmod +x /usr/src/app/build.sh” in your Dockerfile after the initial COPY.
Thank you @alanb128 seems to work (the build). they both posted the solutions without this command before the run, i think the docker-compose works different.
Btw, the module now use the serial and its loaded but my app (johnny-five app) cant comunicate with the board as the module wont exist in the container or something like that.
For a faster debugging im opening to support access if u want. but simply for now the script work until e load of the module, the npm start didnt show up @CameronDiver