$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER) $(DL_DIR)/$(LINUX_ET_DRIVER)
-mkdir -p $(LINUX_BUILD_DIR)
bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) -
- ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
+ rm -f $(LINUX_DIR)
+ ln -s $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
touch $(LINUX_DIR)/.unpacked
$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
- $(PATCH) $(LINUX_DIR) ./patches
+ [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD)
+ $(PATCH) $(LINUX_DIR) ./patches/generic
touch $(LINUX_DIR)/.patched
$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
touch $(LINUX_DIR)/.depend_done
$(LINUX_DIR)/$(LINUX_BINLOC): $(LINUX_DIR)/.depend_done
- $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) CFLAGS_KERNEL="-fno-delayed-branch " $(LINUX_FORMAT)
+ $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_FORMAT)
$(LINUX_KERNEL): $(LINUX_DIR)/$(LINUX_BINLOC)
cp -fa $< $@
touch -c $(LINUX_KERNEL)
$(LINUX_IMAGE): $(LINUX_KERNEL)
- cat $^ | $(BUILD_DIR)/lzma/lzma e -si -so -eos > $@ || (rm -f $@ && false)
+ cat $^ | $(BUILD_DIR)/lzma/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false)
$(LINUX_DIR)/.modules_done: $(LINUX_KERNEL) $(LINUX_IMAGE)
rm -rf $(LINUX_BUILD_DIR)/modules
- $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) CFLAGS_KERNEL="-fno-delayed-branch " modules
+ $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) modules
$(MAKE) -C $(LINUX_DIR) DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install
touch $(LINUX_DIR)/.modules_done
[ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true
clean:
- rm -f $(LINUX_KERNEL) $(LINUX_IMAGE)
rm -rf $(LINUX_BUILD_DIR)
rm -f $(TARGETS)