2015-10-15 22:12:13 +00:00
|
|
|
#
|
2010-04-23 11:27:29 +00:00
|
|
|
# Copyright (C) 2006-2010 OpenWrt.org
|
2006-07-18 16:17:19 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=kernel
|
2010-10-02 03:22:56 +00:00
|
|
|
PKG_FLAGS:=hold
|
2006-07-18 16:17:19 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages
|
2022-09-27 11:39:12 +00:00
|
|
|
SUBTARGETS = $(sort $(filter-out feeds,$(notdir $(wildcard $(TOPDIR)/target/linux/* $(TOPDIR)/target/linux/feeds/*))))
|
|
|
|
SUBTARGET_MODULES = $(foreach t,$(SUBTARGETS),$(firstword $(wildcard $(TOPDIR)/target/linux/feeds/$(t)/modules.mk $(TOPDIR)/target/linux/$(t)/modules.mk)))
|
|
|
|
SCAN_DEPS=modules/*.mk $(SUBTARGET_MODULES) $(TOPDIR)/include/netfilter.mk
|
2006-11-18 15:46:09 +00:00
|
|
|
|
2018-07-06 12:31:44 +00:00
|
|
|
PKG_LICENSE:=GPL-2.0
|
2012-10-19 15:34:28 +00:00
|
|
|
PKG_LICENSE_FILES:=
|
|
|
|
|
2014-10-22 08:57:45 +00:00
|
|
|
export SHELL:=/bin/sh
|
2014-10-22 08:57:56 +00:00
|
|
|
.ONESHELL:
|
2016-09-30 20:40:06 +00:00
|
|
|
.SHELLFLAGS = -ec
|
2014-10-22 08:57:45 +00:00
|
|
|
|
2006-07-18 16:17:19 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2013-07-18 16:32:07 +00:00
|
|
|
|
2006-07-18 16:17:19 +00:00
|
|
|
ifeq ($(DUMP),)
|
2021-05-09 20:28:15 +00:00
|
|
|
STAMP_BUILT:=$(STAMP_BUILT)_$(shell $(SCRIPT_DIR)/kconfig.pl $(LINUX_DIR)/.config | $(MKHASH) md5)
|
2007-08-16 13:44:57 +00:00
|
|
|
-include $(LINUX_DIR)/.config
|
2006-07-18 16:17:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
endef
|
|
|
|
|
2006-10-17 16:13:10 +00:00
|
|
|
define Build/Configure
|
2006-07-18 16:17:19 +00:00
|
|
|
endef
|
|
|
|
|
2023-10-15 19:11:17 +00:00
|
|
|
define Build/Quilt
|
|
|
|
endef
|
|
|
|
|
2006-10-17 16:13:10 +00:00
|
|
|
define Build/Compile
|
2006-07-18 16:17:19 +00:00
|
|
|
endef
|
|
|
|
|
2013-07-18 16:32:07 +00:00
|
|
|
define KernelPackage/depends
|
|
|
|
endef
|
|
|
|
|
2006-10-19 04:35:29 +00:00
|
|
|
CONFIG_PACKAGE_kernel=y
|
|
|
|
define Package/kernel
|
|
|
|
SECTION:=sys
|
|
|
|
CATEGORY:=Kernel
|
|
|
|
DEFAULT:=y
|
|
|
|
TITLE:=Virtual kernel package
|
2012-01-08 15:23:11 +00:00
|
|
|
VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)
|
2010-04-23 11:27:29 +00:00
|
|
|
URL:=http://www.kernel.org/
|
2016-04-06 20:38:47 +00:00
|
|
|
PKG_FLAGS:=nonshared
|
2006-10-19 04:35:29 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/kernel/install
|
2023-12-04 11:09:28 +00:00
|
|
|
$(INSTALL_DIR) $(1)/$(MODULES_SUBDIR)
|
|
|
|
$(INSTALL_DATA) $(LINUX_DIR)/modules.builtin $(1)/$(MODULES_SUBDIR)
|
|
|
|
$(SED) 's,.*/,,' $(1)/$(MODULES_SUBDIR)/modules.builtin
|
2023-12-05 09:09:46 +00:00
|
|
|
strings $(LINUX_DIR)/modules.builtin.modinfo | \
|
|
|
|
grep -E -v "\.(file$(if CONFIG_MODULE_STRIPPED,|parmtype))=" | \
|
|
|
|
tr '\n' '\0' > $(1)/$(MODULES_SUBDIR)/modules.builtin.modinfo
|
2006-10-19 04:35:29 +00:00
|
|
|
endef
|
|
|
|
|
2013-07-18 10:47:00 +00:00
|
|
|
define Package/kernel/extra_provides
|
|
|
|
sed -e 's,.*/,,' $(LINUX_DIR)/modules.builtin;
|
|
|
|
endef
|
|
|
|
|
2007-04-18 12:40:20 +00:00
|
|
|
$(eval $(if $(DUMP),,$(call BuildPackage,kernel)))
|
2006-10-19 04:35:29 +00:00
|
|
|
|
2011-08-14 23:36:42 +00:00
|
|
|
include $(sort $(wildcard ./modules/*.mk))
|
2022-09-27 11:39:12 +00:00
|
|
|
-include $(SUBTARGET_MODULES)
|