Building a custom package for a live image
Hi all,
I’m using Debian Live to build an OS image for an embedded system. I am fairly new to Debian Live and to building Debian packages generally.
The vendor for hardware I’m using provides sources for a loadable kernel module that I would like to build and include in my image. It is not provided as a Debian package, just a source tarball with a Makefile.
Here are some ways I can think of to install this package:
1. Create a package for the vendor’s code and put it inside packages.chroot.
I don’t know if I can put a source package in this directory, so it sounds like it would have to be a built package.
This means the package has to be built separately from the lb build process. I would need to know in advance which kernel version lb will install so I can build against the correct headers and install to the right directory of /lib/modules.
It’s also not ideal to put a binary blob into git (as the manual points out).
2. Put the sources inside includes.chroot and use a build-time hook to compile them and finally delete the sources.
This means that the chroot environment (and hence final image) needs to have the build dependencies installed.
I think (2) sounds better, but perhaps there is another option, or other downsides I am not thinking of.
Thanks,
Ryan
Reply to: