X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/5f6bfb34af82a3a6b987edc068a11838f26adf85..3944181a23e7dd1e798c665541d2acef42877f7c:/obsolete-buildroot/make/openwrt.mk diff --git a/obsolete-buildroot/make/openwrt.mk b/obsolete-buildroot/make/openwrt.mk index 7e1267b27..6b77c2c56 100644 --- a/obsolete-buildroot/make/openwrt.mk +++ b/obsolete-buildroot/make/openwrt.mk @@ -23,7 +23,7 @@ # Currently the dependencies are not all handled. But that's true of # our buildroot in general, since it wasn't really set up for end users. -OPENWRT_TARGETS:= openwrt-linux openwrt-kmodules.tar.bz2 \ +OPENWRT_TARGETS:= $(STAGING_DIR)/bin/sstrip gcc3_3 openwrt-linux openwrt-kmodules.tar.bz2 \ openwrt-shared openwrt-mtd openwrt-nvram openwrt-wlconf \ bridge dnsmasq1 iptables wtools busybox \ openwrt-rootprep @@ -34,24 +34,10 @@ openwrt-base: $(OPENWRT_TARGETS) ###################################################################### -ifneq ($(filter $(TARGETS),openwrt-base),) - -# WRT54G_SOURCE=wrt54gv2.2.02.2.tgz -# WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gv2/2.02.2 - -# WRT54G_SOURCE=wrt54g.2.02.7.tgz -# WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gv2/2.02.7 -# WRT54G_DIR=$(BUILD_DIR)/WRT54G - WRT54G_SOURCE=wrt54gs.2.07.1.tgz WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gs/2.07.1 - WRT54G_DIR=$(BUILD_DIR)/WRT54GS -# OPENWRT_ROOT=openwrt-root.tar.bz2 -# OPENWRT_SITE=http://127.0.0.1 -# OPENWRT_DIR=$(BUILD_DIR)/openwrt - LINUX_DIR=$(WRT54G_DIR)/release/src/linux/linux LINUX_FORMAT=zImage LINUX_BINLOC=arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz @@ -60,21 +46,21 @@ TARGET_MODULES_DIR:=$(TARGET_DIR)/lib/modules/2.4.20 $(LINUX_DIR)/.unpacked: $(WRT54G_DIR)/.prepared -(cd $(BUILD_DIR); ln -sf $(LINUX_DIR) linux) - # preserve the binary-only driver - #mv $(LINUX_DIR)/drivers/net/mac/mac.o \ - # $(LINUX_DIR)/drivers/net/mac/mac.o-saved touch $(LINUX_DIR)/.unpacked $(LINUX_DIR)/.patched: $(WRT54G_DIR)/.prepared - $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-linux-netfilter.patch - $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-wrt54g-linux.patch + $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR) $(SOURCE_DIR)/openwrt/kernel/patches # use replacement diag module code - cp -f $(SOURCE_DIR)/openwrt-diag.c $(LINUX_DIR)/drivers/net/diag/diag_led.c - cp -f $(SOURCE_DIR)/openwrt-wrt54g-linux.config $(LINUX_DIR)/.config + cp -f $(SOURCE_DIR)/openwrt/kernel/diag.c $(LINUX_DIR)/drivers/net/diag/diag_led.c + cp -f $(SOURCE_DIR)/openwrt/kernel/linux.config $(LINUX_DIR)/.config -(cd $(BUILD_DIR); ln -sf $(LINUX_DIR) linux) + -(cd $(LINUX_DIR)/arch/mips/brcm-boards/bcm947xx/; \ + rm -rf compressed; \ + tar jxvf $(SOURCE_DIR)/openwrt/kernel/compressed-20040531.tar.bz2; \ + ) touch $(LINUX_DIR)/.patched -$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched $(LINUX_DIR)/.nf-patched +$(LINUX_DIR)/.configured: $(LINUX_DIR)/.nf-patched $(LINUX_DIR)/.patched $(LINUX_DIR)/.bbc-patched $(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 $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile @@ -90,7 +76,7 @@ $(LINUX_DIR)/$(LINUX_BINLOC): $(LINUX_DIR)/.depend_done openwrt-kmodules.tar.bz2: $(LINUX_DIR)/$(LINUX_BINLOC) $(MAKE) -C $(LINUX_DIR) modules - $(MAKE) -C $(LINUX_DIR) DEPMOD=/bin/true \ + $(MAKE) -C $(LINUX_DIR) DEPMOD=true \ INSTALL_MOD_PATH=$(LINUX_DIR)/modules modules_install tar -C $(LINUX_DIR)/modules/lib -cjf openwrt-kmodules.tar.bz2 modules @@ -100,13 +86,11 @@ $(DL_DIR)/$(WRT54G_SOURCE): $(WGET) -P $(DL_DIR) $(WRT54G_SITE)/$(WRT54G_SOURCE) $(WRT54G_DIR)/.source: $(DL_DIR)/$(WRT54G_SOURCE) - #zcat $(DL_DIR)/$(WRT54G_SOURCE) | tar -C $(BUILD_DIR) -xvf - WRT54G/README.TXT WRT54G/release zcat $(DL_DIR)/$(WRT54G_SOURCE) | tar -C $(BUILD_DIR) -xvf - WRT54GS/README.TXT WRT54GS/release touch $(WRT54G_DIR)/.source $(WRT54G_DIR)/.prepared: $(WRT54G_DIR)/.source - $(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR) openwrt-wrt54g-router.patch - $(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR) openwrt-wrt54g-shared.patch + $(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR)/openwrt/patches touch $(WRT54G_DIR)/.prepared ###################################################################### @@ -218,8 +202,7 @@ openwrt-rootprep: ###################################################################### -openwrt-prune: - -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true; +openwrt-prune: openwrt-base # remove unneeded uClibc libs rm -rf $(TARGET_DIR)/lib/libthread_db* rm -rf $(TARGET_DIR)/lib/libpthread* @@ -230,10 +213,19 @@ openwrt-prune: rm -f $(TARGET_DIR)/usr/sbin/iptables-save rm -f $(TARGET_DIR)/usr/sbin/iptables-restore rm -f $(TARGET_DIR)/usr/sbin/ip6tables + rm -f $(TARGET_DIR)/usr/lib/iptables/libip6* + -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STAGING_DIR)/bin/sstrip 2>/dev/null || true; ###################################################################### -openwrt-linux.trx: openwrt-prune squashfsroot +$(STAGING_DIR)/bin/sstrip: + $(CC) -o $(STAGING_DIR)/bin/sstrip $(SOURCE_DIR)/openwrt/tools/sstrip.c + +wrt-tools: + $(CC) -o $(WRT54G_DIR)/release/tools/trx $(SOURCE_DIR)/openwrt/tools/trx.c + $(CC) -o $(WRT54G_DIR)/release/tools/addpattern $(SOURCE_DIR)/openwrt/tools/addpattern.c + +openwrt-linux.trx: openwrt-prune squashfsroot wrt-tools $(WRT54G_DIR)/release/tools/trx -o openwrt-linux.trx \ $(LINUX_DIR)/$(LINUX_BINLOC) $(IMAGE) @@ -247,24 +239,3 @@ openwrt-g-code.bin: openwrt-gs-code.bin openwrt-code.bin: openwrt-gs-code.bin openwrt-g-code.bin ###################################################################### - -openwrt-sourceball: - tar cjf buildroot-openwrt.tar.bz2 \ - README.openwrt \ - Makefile \ - Makefile-openwrt \ - make/openwrt.mk \ - make/uclibc.mk \ - make/busybox.mk \ - sources/uClibc.config \ - sources/uClibc.config-openwrt \ - sources/busybox-openwrt-*.patch \ - sources/busybox.config \ - sources/busybox.config-openwrt \ - sources/dnsmasq1-openwrt.patch \ - sources/iptables-openwrt-extensions.patch \ - sources/openwrt-wrt54g-linux.config \ - sources/openwrt-wrt54g-*.patch \ - sources/openwrt-diag.c - -endif