2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/kernel.mk
10 PKG_NAME=kernel-headers
11 PKG_VERSION=$(LINUX_VERSION)
13 PKG_SOURCE=$(LINUX_SOURCE)
14 PKG_SOURCE_URL=$(LINUX_SITE)
16 PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/linux-$(PKG_VERSION)
18 include $(INCLUDE_DIR)/host-build.mk
21 mkdir -p $(TOOLCHAIN_BUILD_DIR)
22 bzcat $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(TOOLCHAIN_BUILD_DIR) $(TAR_OPTIONS)
23 $(PATCH) $(PKG_BUILD_DIR) $(TOPDIR)/target/linux/generic-$(KERNEL)/patches
24 $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
25 ln -sf $(PKG_BUILD_DIR) $(LINUX_HEADERS_DIR)
28 define Build/Configure
29 -$(CP) ./files/config.$(LINUX_KARCH) $(PKG_BUILD_DIR)/.config
30 $(MAKE) -C $(PKG_BUILD_DIR) \
32 CONFIG_SHELL=$(shell which bash) \
33 defconfig include/linux/version.h
42 $(eval $(call HostBuild))