X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/4c66f72328d338b0e6f01c9cadc3cc0fe26ae2e0..66ba7ac042972065d06ce3bdb09bbe3b42368057:/include/kernel-build.mk diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 0ef00de35..6aefe0b89 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -17,6 +17,15 @@ KERNEL_IPKG:=$(KERNEL_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEAS TARGETS += $(KERNEL_IPKG) INSTALL_TARGETS += $(KERNEL_IPKG) +LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ + -e 's/mipsel/mips/' \ + -e 's/mipseb/mips/' \ + -e 's/powerpc/ppc/' \ + -e 's/sh[234]/sh/' \ + -e 's/armeb/arm/' \ +) + + $(TARGETS): $(PACKAGE_DIR) $(PACKAGE_DIR): @@ -57,7 +66,6 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config mkdir -p $(BUILD_DIR)/root/etc/init.d $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ - $(CP) ../generic-2.6/files/postinit $(BUILD_DIR)/root/ else rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config @@ -83,7 +91,6 @@ $(LINUX_DIR)/.linux-compile: @rm -f $(BUILD_DIR)/linux ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux @$(MAKE) modules - @$(MAKE) packages touch $@ $(KERNEL_IPKG): @@ -100,6 +107,7 @@ $(TOPDIR)/.kernel.mk: $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL)/Makefile echo "CONFIG_KERNEL:=$(KERNEL)" >> $@ echo "CONFIG_LINUX_VERSION:=$(LINUX_VERSION)" >> $@ echo "CONFIG_LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ + echo "CONFIG_LINUX_KARCH:=$(LINUX_KARCH)" >> $@ pkg-install: FORCE @for pkg in $(INSTALL_TARGETS); do \ @@ -111,6 +119,7 @@ prepare: $(LINUX_DIR)/.configured @mkdir -p $(LINUX_DIR) $(PACKAGE_DIR) compile: prepare $(LINUX_DIR)/.linux-compile + @$(MAKE) packages install: compile $(LINUX_KERNEL)