diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-08-03 13:45:08 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-08-03 14:13:17 +0200 |
commit | c6a72670b54e13d3ab3a6056d7c4f4c503cf0d78 (patch) | |
tree | 51c776165e7abb4f1336a93edc519461786496fe /docs | |
parent | 6debfdc194f5192706120783d133fbb99271eccc (diff) |
rework kernel module infrastructure
Instead of maintaining mk/modules.mk which defines compilations of
related kernel modules to pack together into a single package, follow an
automatic approach: For every kernel module found in the modules
installation directory, create a single package.
There are a few caveats to cover:
=== Module Loading Order ===
Upon bootup, module loading is ordered based on the number-prefixed
files in /etc/modules.d/. The correct number was previously managed in
mk/modules.mk on a per-collection basis. The new approach is to have
levels which modules are to be assigned to. Level 0 contains modules
with no dependencies at all. Level 1 contains modules which have only
level 0 dependencies, and so on. This information is determined at
compile-time by make-module-ipkgs.sh.
=== Module Installation to Target RootFS ===
Since module packages are created automatically from the modules the
script finds, ADK build system has no knowledge about the connection
between what the user has selected in menuconfig and the actual module
packages. Therefore the earlier approach to install selected packages
into rootfs does not hold anymore. Instead, use wildcards to find all
packages in firmware directory prefixed by 'kmod-' and install them all
(hopefully doing the right thing).
=== Kernel Version ===
KERNEL_VERSION now contains KERNEL_RELEASE already
By creating a localversion file, make KERNEL_RELEASE part of the
kernel's version number (so KERNEL_VERSION is correct in most
situations)
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/adding-boards.txt | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/docs/adding-boards.txt b/docs/adding-boards.txt index 2c2e80f23..b04552fb5 100644 --- a/docs/adding-boards.txt +++ b/docs/adding-boards.txt @@ -122,21 +122,7 @@ config ADK_KERNEL_MMC_BCM2835 ------------------------ We use the symbol prefix ADK_KERNEL instead of CONFIG. Otherwise the symbols are -matching the kernel symbol names. +matching the kernel symbol names. Get again into the menu based system, enable the driver you added and recompile. -If your driver is available as kernel module use tristate and add an entry to -mk/modules.mk. - -An entry might look like this: ------------------------- -$(eval $(call KMOD_template,SND_BCM2708_SOC_I2S,snd-bcm2708-soc-i2s,\ - $(MODULES_DIR)/kernel/sound/soc/bcm/snd-soc-bcm2708-i2s \ -,60, kmod-snd-soc)) ------------------------- - -If the user choose the I2S driver for Raspberry PI 2, it creates a kmod package -containing the file kernel/sound/soc/bcm/snd-soc-bcm2708-i2s.ko and generate -a dependency to kmod-snd-soc when a package management (ipkg/opkg) is used. -Furthermore a file with load instructions is created in /etc/modules.d/snd-bcm2708-soc-i2s -on the target. +If your driver is available as kernel module use tristate. |