source: branches/contrib/openwrt/patches/attitude_adjustment/021_install_kernel_modules_and_merge_debwrt_config @ 477

Last change on this file since 477 was 477, checked in by ehem, 7 years ago

Add config option for OpenWRT: "Attitude Adjustment". Copy appropriate patches
from trunk. Branch happened at 33624:33625.

File size: 2.1 KB
Line 
1--- openwrt/include/kernel-defaults.mk  2012-09-30 00:14:28.601162927 +0200
2+++ openwrt/include/kernel-defaults.mk.new      2012-09-30 00:14:17.834676182 +0200
3@@ -96,9 +96,11 @@
4 endif
5 
6 define Kernel/Configure/Default
7-       $(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target
8+       $(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target.default
9 # copy CONFIG_KERNEL_* settings over to .config.target
10-       awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(TOPDIR)/.config >> $(LINUX_DIR)/.config.target
11+       awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(TOPDIR)/.config >> $(LINUX_DIR)/.config.target.default
12+# DebWrt: merge our custom config
13+       $(SCRIPT_DIR)/kconfig.pl + $(LINUX_DIR)/.config.target.default $(TOPDIR)/.config.debwrt > $(LINUX_DIR)/.config.target
14        echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target
15        echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
16        echo "# CONFIG_KPROBES is not set" >> $(LINUX_DIR)/.config.target
17@@ -106,13 +108,20 @@
18        $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config
19        $(call Kernel/SetInitramfs)
20        rm -rf $(KERNEL_BUILD_DIR)/modules
21+# DebWrt: merge new kernel config, say no to anything new
22+       +$(MAKE) $(KERNEL_MAKEOPTS) oldnoconfig
23        [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) $(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
24        $(SH_FUNC) grep '=[ym]' $(LINUX_DIR)/.config | LC_ALL=C sort | md5s > $(LINUX_DIR)/.vermagic
25 endef
26 
27 define Kernel/CompileModules/Default
28        rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
29-       +$(MAKE) $(KERNEL_MAKEOPTS) modules
30+       # DebWrt make modules install
31+       -mkdir -p $(TMP_DIR)/modules
32+       +$(MAKE) $(KERNEL_MAKEOPTS) modules modules_install INSTALL_MOD_PATH=$(TMP_DIR)/modules
33+       echo "OPENWRT_LINUX_VERSION=$(LINUX_VERSION)" >> $(TOPDIR)/.openwrt_env
34+       echo "OPENWRT_LINUX_UNAME_VERSION=$(LINUX_UNAME_VERSION)" >> $(TOPDIR)/.openwrt_env
35+       echo "OPENWRT_LINUX_DIR=$(LINUX_DIR)" >> $(TOPDIR)/.openwrt_env
36 endef
37 
38 OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
Note: See TracBrowser for help on using the repository browser.