Changeset 29686


Ignore:
Timestamp:
2012-01-08T16:23:11+01:00 (4 years ago)
Author:
jow
Message:

include: calculate md5sum over sorted kernel config symbol list and incorperate it into the kernel metapackage version, make kmods depend on this specific version.
The aim of this change is to invalidate kmods which are built against a different kernel config on the opkg metadata level. Manual copying and insmod of custom
*.ko files, e.g. for development purpose, is still possible.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/kernel-defaults.mk

    r27346 r29686  
    9090        -$(_SINGLE)$(MAKE) $(KERNEL_MAKEOPTS) oldconfig prepare scripts 
    9191        rm -rf $(KERNEL_BUILD_DIR)/modules 
     92        $(SH_FUNC) grep '=[ym]' $(LINUX_DIR)/.config | LC_ALL=C sort | md5s > $(LINUX_DIR)/.vermagic 
    9293endef 
    9394 
  • trunk/include/kernel.mk

    r29018 r29686  
    1414  BOARD?=<BOARD> 
    1515  LINUX_VERSION?=<LINUX_VERSION> 
     16  LINUX_VERMAGIC?=<LINUX_VERMAGIC> 
    1617else 
    1718  ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) 
     
    3536  KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX)) 
    3637  LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) 
     38 
     39  LINUX_VERMAGIC:=$(strip $(shell cat $(LINUX_DIR)/.vermagic 2>/dev/null)) 
     40  LINUX_VERMAGIC:=$(if $(LINUX_VERMAGIC),$(LINUX_VERMAGIC),unknown) 
    3741 
    3842  LINUX_UNAME_VERSION:=$(if $(word 3,$(subst ., ,$(KERNEL_BASE))),$(KERNEL_BASE),$(KERNEL_BASE).0) 
     
    131135    CATEGORY:=Kernel modules 
    132136    DESCRIPTION:=$(DESCRIPTION) 
    133     EXTRA_DEPENDS:=kernel (=$(LINUX_VERSION)-$(LINUX_RELEASE)) 
     137    EXTRA_DEPENDS:=kernel (=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)) 
    134138    VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),+$(PKG_VERSION))-$(if $(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE)) 
    135139    $(call KernelPackage/$(1)) 
  • trunk/package/kernel/Makefile

    r27982 r29686  
    3636  DEFAULT:=y 
    3737  TITLE:=Virtual kernel package 
    38   VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE) 
     38  VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC) 
    3939  URL:=http://www.kernel.org/ 
    4040endef 
Note: See TracChangeset for help on using the changeset viewer.