-$(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 $(BUILD_DIR)/linux/.configured: $(LINUX_DIR)/.unpacked $(LINUX_KCONFIG)
- $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/Makefile
+$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
+ $(PATCH) $(LINUX_DIR) $(LINUX_PATCHES)
+ # copy kernel source which is maintained in openwrt via cvs
+ cp -a $(LINUX_KERNEL_SOURCE)/* $(LINUX_DIR)
+ # copy binary wlan driver
+ cp -a $(BUILD_DIR)/wl/*.o $(LINUX_DIR)/drivers/net/wl
+ # copy proprietary et source
+ cp -a $(BUILD_DIR)/et/* $(LINUX_DIR)/drivers/net/et
+ cp -a $(BUILD_DIR)/et/*.h $(LINUX_DIR)/include/
+ $(SED) 's/@expr length/@-expr length/' $(LINUX_DIR)/Makefile
+ touch $(LINUX_DIR)/.patched
+
+$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched