mirror of https://github.com/hak5/openwrt-owl.git
install externally compiled kernel-specific packages into the kernel-specific root
SVN-Revision: 1459owl
parent
0be45c47c0
commit
790d22d882
|
@ -38,11 +38,19 @@ TARGET_MODULES_DIR := $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)
|
||||||
IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_TARGET_DIR) IPKG_CONF_DIR=$(LINUX_BUILD_DIR) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
|
IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_TARGET_DIR) IPKG_CONF_DIR=$(LINUX_BUILD_DIR) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
|
PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
|
||||||
PKG_RELEASE := 1
|
PKG_RELEASE := 2
|
||||||
|
|
||||||
KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel-$(LINUX_VERSION)-$(BOARD)_$(PKG_RELEASE)_$(ARCH).ipk
|
KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel-$(LINUX_VERSION)-$(BOARD)_$(PKG_RELEASE)_$(ARCH).ipk
|
||||||
KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg
|
KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg
|
||||||
|
|
||||||
|
PKG_MAKEOPTS:= IPKG="$(IPKG_KERNEL)" \
|
||||||
|
BOARD="$(BOARD)" \
|
||||||
|
TARGET_DIR="$(LINUX_TARGET_DIR)" \
|
||||||
|
BUILD_DIR="$(LINUX_BUILD_DIR)" \
|
||||||
|
KERNEL_DIR="$(LINUX_SOURCE_DIR)" \
|
||||||
|
LINUX_VERSION="$(LINUX_VERSION)" \
|
||||||
|
KERNEL_RELEASE="$(PKG_RELEASE)"
|
||||||
|
|
||||||
include $(LINUX_KCONFIG)
|
include $(LINUX_KCONFIG)
|
||||||
|
|
||||||
INSTALL_TARGETS := $(KERNEL_IPKG)
|
INSTALL_TARGETS := $(KERNEL_IPKG)
|
||||||
|
@ -159,7 +167,7 @@ $(eval $(call KMOD_template,TUN,tun,\
|
||||||
,CONFIG_TUN,,20,tun))
|
,CONFIG_TUN,,20,tun))
|
||||||
$(eval $(call KMOD_template,GRE,gre,\
|
$(eval $(call KMOD_template,GRE,gre,\
|
||||||
$(MODULES_DIR)/kernel/net/ipv4/ip_gre.o \
|
$(MODULES_DIR)/kernel/net/ipv4/ip_gre.o \
|
||||||
,CONFIG_NET_IPGRE,,30,ip_gre))
|
,CONFIG_NET_IPGRE))
|
||||||
$(eval $(call KMOD_template,SCHED,sched,\
|
$(eval $(call KMOD_template,SCHED,sched,\
|
||||||
$(MODULES_DIR)/kernel/net/sched/*.o \
|
$(MODULES_DIR)/kernel/net/sched/*.o \
|
||||||
))
|
))
|
||||||
|
@ -230,18 +238,17 @@ prepare: $(LINUX_DIR)/.configured
|
||||||
compile: $(LINUX_DIR)/.modules_done $(TARGETS)
|
compile: $(LINUX_DIR)/.modules_done $(TARGETS)
|
||||||
ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
|
ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
|
||||||
$(MAKE) -C $(TOPDIR)/target/linux/package \
|
$(MAKE) -C $(TOPDIR)/target/linux/package \
|
||||||
BOARD="$(BOARD)" \
|
$(PKG_MAKEOPTS) \
|
||||||
TARGET_DIR="$(LINUX_TARGET_DIR)" \
|
compile
|
||||||
BUILD_DIR="$(LINUX_BUILD_DIR)" \
|
|
||||||
KERNEL_DIR="$(LINUX_SOURCE_DIR)" \
|
|
||||||
LINUX_VERSION="$(LINUX_VERSION)" \
|
|
||||||
KERNEL_RELEASE="$(PKG_RELEASE)"
|
|
||||||
|
|
||||||
install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
|
install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
|
||||||
rm -rf $(LINUX_BUILD_DIR)/root*
|
rm -rf $(LINUX_BUILD_DIR)/root*
|
||||||
cp -a $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
|
cp -a $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
|
||||||
echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
|
echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
|
||||||
[ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true
|
[ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true
|
||||||
|
$(MAKE) -C $(TOPDIR)/target/linux/package \
|
||||||
|
$(PKG_MAKEOPTS) \
|
||||||
|
install
|
||||||
|
|
||||||
mostlyclean:
|
mostlyclean:
|
||||||
rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.{drivers-unpacked,modules_done}
|
rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.{drivers-unpacked,modules_done}
|
||||||
|
|
|
@ -14,6 +14,7 @@ compile: $(patsubst %,%-compile,$(package-y) $(package-m))
|
||||||
install: $(patsubst %,%-install,$(package-y))
|
install: $(patsubst %,%-install,$(package-y))
|
||||||
|
|
||||||
MAKEOPTS:= BOARD="$(BOARD)" \
|
MAKEOPTS:= BOARD="$(BOARD)" \
|
||||||
|
IPKG="$(IPKG)" \
|
||||||
TARGET_DIR="$(TARGET_DIR)" \
|
TARGET_DIR="$(TARGET_DIR)" \
|
||||||
BUILD_DIR="$(BUILD_DIR)" \
|
BUILD_DIR="$(BUILD_DIR)" \
|
||||||
KERNEL_DIR="$(KERNEL_DIR)" \
|
KERNEL_DIR="$(KERNEL_DIR)" \
|
||||||
|
|
Loading…
Reference in New Issue