-$(LINUX_KCONFIG):
- @if [ ! -f "$(LINUX_KCONFIG)" ] ; then \
- echo ""; \
- echo "You should create a .config for your kernel"; \
- echo "and install it as $(LINUX_KCONFIG)"; \
- echo ""; \
- sleep 5; \
- fi;
-
-$(LINUX_DIR)/.configured: $(LINUX_DIR)/.unpacked $(LINUX_KCONFIG)
- $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/Makefile
- $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/arch/mips/Makefile
+$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
+ $(PATCH) $(LINUX_DIR) $(LINUX_PATCHES)
+ touch $(LINUX_DIR)/.patched
+
+$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
+ -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
+#ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS_LZMA),y)
+# $(SED) "s,rootfstype=jffs2,rootfstype=squashfs," $(LINUX_DIR)/.config
+#endif
+#ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS),y)
+# $(SED) "s,rootfstype=jffs2,rootfstype=squashfs," $(LINUX_DIR)/.config
+#endif
+ $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \
+ $(LINUX_DIR)/Makefile \
+ $(LINUX_DIR)/arch/mips/Makefile