Custom ResinOS and OS update


#1

Use case:

Custom ResinOS (https://github.com/resin-os/resin-intel) with additional kernel parameters is created. This is compiled, config injected and installed on one-to-many devices.

Changes to git repo (https://github.com/resin-os/resin-intel) will produces a new custom ResinOS.

Question:

How can custom ResinOS be updated when a new custom ResinOS is available?

The dashboard supports this for Resin provided ResinOS images, but does not seem to be supported for custom ResinOS images. How can this be performed?


Application name for custom ResinOS and Dashboard
Application name for custom ResinOS and Dashboard
Application name for custom ResinOS and Dashboard
#3

Hi @aliasbits – I’m afraid we don’t support custom build OS updates through resin.io.

If the goal is to include kernel modules that are not included in our kernel build, you could use the stock image and add kernel modules using https://github.com/resin-io-playground/kernel-module-build

Hope that helps!


#4

Hi Chris

The goal is to include support for CAN bus which requires CONFIG_CAN in the kernel and can-utils. If the CAN support comes from kernel or from a loaded kernel modules does not matter.

From what I can read, the https://github.com/resin-io-playground/kernel-module-build build system will allow me to build a kernel module. This then needs to be included in a docker images and ensure that the docker image is run’ed --privileged.

Is that correctly understood?


#5

@aliasbits that is correct – a lot of the magic in this case happens in the https://github.com/resin-io-playground/kernel-module-build/blob/master/build.sh file

You could clone that, copy over the source for the CAN bus module, install the developer tools to have all compiler & make and so on, apt-get install can-utils, build the module from your Dockerfile.template, and finally modprobe the module from the bash script that starts your app – and you should be good to go!


#6

Sounds good. I will look into it.


#8

Hey @aliasbits

Here is our Dockerfile stage to compile a custom kernel module:

Change the module path in the kernel tree and you should be good to go.

Peter


#10

Hi Peter

That is pretty clever. I managed to compile kernel modules this morning, but I will for sure adapt this dockerfile to automate kernel module building into the application container.

Thanks


#11

Update:

I found that I was missing can.ko and can-raw.ko from net/can. I already got slcan from drivers/net/can

When adding these to the application image then the network is stopped by a kernel bug/panic. This kernel bug is reported for net/netlink/af_netlink.c:1315. The modules are still being compiled and runned on 2.13.1+rev1.dev resinOS image

Note: Target is unaccesable after kernel bug/panic. A re-installation is needed

From my understanding then CAN supported can only be available if can.ko (CONFIG_CAN) raw and can-raw.ko (CONFIG_CAN_RAW) are provided by the kernel and not being loaded by via kernel modules. Then it is up to resin users to compile what ever CAN driver they need. I my case slcan.

Anyone got an idea?


#12

Show the kernel issue: