summaryrefslogtreecommitdiff
path: root/mk/kernel-ver.mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-08-03 13:45:08 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2015-08-03 14:13:17 +0200
commitc6a72670b54e13d3ab3a6056d7c4f4c503cf0d78 (patch)
tree51c776165e7abb4f1336a93edc519461786496fe /mk/kernel-ver.mk
parent6debfdc194f5192706120783d133fbb99271eccc (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 'mk/kernel-ver.mk')
-rw-r--r--mk/kernel-ver.mk48
1 files changed, 30 insertions, 18 deletions
diff --git a/mk/kernel-ver.mk b/mk/kernel-ver.mk
index cd2f2acfe..cda9f1014 100644
--- a/mk/kernel-ver.mk
+++ b/mk/kernel-ver.mk
@@ -1,53 +1,65 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+#
+# On the various kernel version variables:
+#
+# KERNEL_FILE_VER: version numbering used for tarball and contained top level
+# directory (e.g. linux-4.1.2.tar.bz2 -> linux-4.1.2) (not
+# necessary equal to kernel's version, e.g. linux-3.19
+# contains kernel version 3.19.0)
+# KERNEL_RELEASE: OpenADK internal versioning
+# KERNEL_VERSION: final kernel version how we want to identify a specific kernel
+
ifeq ($(ADK_KERNEL_VERSION_GIT),y)
-KERNEL_VERSION:= $(ADK_KERNEL_HASH)
-KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
+KERNEL_FILE_VER:= $(ADK_KERNEL_HASH)
KERNEL_RELEASE:= 1
+KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
endif
ifeq ($(ADK_KERNEL_VERSION_4_1_3),y)
-KERNEL_VERSION:= 4.1.3
-KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
+KERNEL_FILE_VER:= 4.1.3
KERNEL_RELEASE:= 1
+KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
KERNEL_HASH:= 96dd2c30984408a8a2211463618c3564514239f1e4335f6bc461c4b9a9bae30b
endif
ifeq ($(ADK_KERNEL_VERSION_3_18_16),y)
-KERNEL_VERSION:= 3.18.16
-KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
+KERNEL_FILE_VER:= 3.18.16
KERNEL_RELEASE:= 1
+KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
KERNEL_HASH:= d98e8dc54cdb0d0cdf42533413f4079c983899a5dbd5a46c4c62ea5715184530
endif
ifeq ($(ADK_KERNEL_VERSION_3_14_45),y)
-KERNEL_VERSION:= 3.14.45
-KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
+KERNEL_FILE_VER:= 3.14.45
KERNEL_RELEASE:= 1
+KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
KERNEL_HASH:= 8c745b47b3ae0631b2e59423dc255dccbc64d599f9183b390b442dd500e5cb49
endif
ifeq ($(ADK_KERNEL_VERSION_3_12_44),y)
-KERNEL_VERSION:= 3.12.44
-KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
+KERNEL_FILE_VER:= 3.12.44
KERNEL_RELEASE:= 1
+KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
KERNEL_HASH:= 08a64346a8dcb7e938b2a8a34fc94ac0207b8e2ab5884e761458c6151359de15
endif
ifeq ($(ADK_KERNEL_VERSION_3_10_81),y)
-KERNEL_VERSION:= 3.10.81
-KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
+KERNEL_FILE_VER:= 3.10.81
KERNEL_RELEASE:= 1
+KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
KERNEL_HASH:= cf8e4c6e67783aa65ab52eda043054945f4d0da0cf739ad90841f4e4354fea43
endif
ifeq ($(ADK_KERNEL_VERSION_3_4_108),y)
-KERNEL_VERSION:= 3.4.108
-KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
+KERNEL_FILE_VER:= 3.4.108
KERNEL_RELEASE:= 1
+KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
KERNEL_HASH:= 55c65bc82a6168625ffc8145a644515e77047684f30f7382456948619763be75
endif
ifeq ($(ADK_KERNEL_VERSION_3_2_69),y)
-KERNEL_VERSION:= 3.2.69
-KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
+KERNEL_FILE_VER:= 3.2.69
KERNEL_RELEASE:= 1
+KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
KERNEL_HASH:= a331bf981114f0959a543c47210dd455c47971017d3ee74fa72d14bb8754473b
endif
ifeq ($(ADK_KERNEL_VERSION_2_6_32_67),y)
-KERNEL_VERSION:= 2.6.32.67
-KERNEL_MOD_VERSION:= $(KERNEL_VERSION)
+KERNEL_FILE_VER:= 2.6.32.67
KERNEL_RELEASE:= 1
+KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE)
KERNEL_HASH:= b472eb8758404dcbbcdb0fdce60b98e60aadcb4408c485faef5ab7a29cf994b0
endif