-
Notifications
You must be signed in to change notification settings - Fork 12
Adding new kernel drivers
Jakov Petrina edited this page Jun 11, 2021
·
1 revision
There are currently two methods for adding new drivers to the Replica.one project: either (1) via the overlay mechanism, or (2) by forking the Linux kernel and modifying the target kernel remote URL.
NOTE: Although Portage supports patching, one of Replica.one design goals has been to avoid introducing patch files for the kernel in the repository tree (or any other patches for that matter); instead, we aim to upstream all patches before building production images.
NOTE: For development efforts, Sartura maintains a fork of the Linux kernel repository to build development images and as a staging area for the upstreaming process.
- Start by pre-compiling out-of-tree kernel modules for the target Linux kernel version.
- Add them as kernel shared objects (
.ko
files) to the Replica.one file system overlay mechanism.
- Fork the upstream Linux kernel repository.
- Once you have made the desired changes to the fork, navigate to the
replica/targets
directory. - Open the target definition for the desired supported device and modify the target kernel remote repository URL by changing the second argument of the
setdef(`__kernel_remote__', `<URL>')dnl
macro. For example, to change the kernel remote repository URL for therpi4
target, modify thehttps://github.com/raspberrypi/linux.git
URL in the target definition file.