Changeset 231


Ignore:
Timestamp:
2005-02-12T03:36:55+01:00 (13 years ago)
Author:
wbx
Message:

add trx and modified addpattern from rodent, update via tftp still works on gs v1.0, Makefile cleanup, renaming linksysstuff

Location:
trunk/openwrt/package/openwrt
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/package/openwrt/openwrt.mk

    r224 r231  
    11############################################################# 
    22# 
    3 # openwrt tools 
     3# linksys and openwrt tools 
    44# 
    55############################################################# 
    66 
    7 OPENWRT_SITE=http://openwrt.openbsd-geek.de 
     7LINKSYS_KERNEL_INCLUDE=$(BUILD_DIR)/linksys-kernel 
    88 
    9 # shared library 
    10 OPENWRT_SHARED_SOURCE=openwrt-shared.tar.gz 
    11 OPENWRT_SHARED_DIR=$(BUILD_DIR)/openwrt-shared 
    12 OPENWRT_SHARED_TARGET_BINARY:=usr/lib/libshared.so 
     9# shared library stuff extracted from linksys firmware GPL sourcetree 
     10# WRT54GS_3_37_2_1109_US 
     11LINKSYS_SHARED_TGZ=linksys-shared.tar.gz 
     12LINKSYS_SHARED_DIR=$(BUILD_DIR)/linksys-shared 
     13LINKSYS_SHARED_TARGET_BINARY:=usr/lib/libshared.so 
    1314 
    14 $(DL_DIR)/$(OPENWRT_SHARED_SOURCE): 
    15         $(WGET) -P $(DL_DIR) $(OPENWRT_SITE)/$(OPENWRT_SHARED_SOURCE) 
     15$(DL_DIR)/$(LINKSYS_SHARED_TGZ): 
     16        $(WGET) -P $(DL_DIR) $(LINKSYS_TGZ_SITE)/$(LINKSYS_SHARED_TGZ) 
    1617 
    17 $(OPENWRT_SHARED_DIR)/.source: $(DL_DIR)/$(OPENWRT_SHARED_SOURCE) 
    18         zcat $(DL_DIR)/$(OPENWRT_SHARED_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - 
    19         touch $(OPENWRT_SHARED_DIR)/.source 
     18$(LINKSYS_SHARED_DIR)/.source: $(DL_DIR)/$(LINKSYS_SHARED_TGZ) 
     19        zcat $(DL_DIR)/$(LINKSYS_SHARED_TGZ) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - 
     20        touch $(LINKSYS_SHARED_DIR)/.source 
    2021 
    21 $(TARGET_DIR)/$(OPENWRT_SHARED_TARGET_BINARY): $(OPENWRT_SHARED_DIR)/.source  
    22         $(MAKE) -C $(OPENWRT_SHARED_DIR) -f Makefile-openwrt \ 
     22$(TARGET_DIR)/$(LINKSYS_SHARED_TARGET_BINARY): $(LINKSYS_SHARED_DIR)/.source  
     23        $(SED) 's/#include.*/#include <cy_conf.h>/g;' $(LINKSYS_SHARED_DIR)/utils.h 
     24        $(MAKE) -C $(LINKSYS_SHARED_DIR) -f Makefile-openwrt \ 
    2325                INSTALLDIR=$(TARGET_DIR) \ 
    2426                CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld STRIP="$(STRIP)" \ 
    25                 CFLAGS="$(TARGET_CFLAGS) -I. -I../binary/include -Wall -I$(OPENWRT_SRCBASE)/" \ 
     27                CFLAGS="$(TARGET_CFLAGS) -I$(LINKSYS_KERNEL_INCLUDE)/include \ 
     28                -I$(LINKSYS_KERNEL_INCLUDE) -Wall -I." \ 
    2629                        install 
    2730 
    28 openwrt-shared: $(TARGET_DIR)/$(OPENWRT_SHARED_TARGET_BINARY) 
     31linksys-shared: $(TARGET_DIR)/$(LINKSYS_SHARED_TARGET_BINARY) 
    2932 
    30 openwrt-shared-clean: 
    31         -$(MAKE) -C $(OPENWRT_SHARED_DIR) clean 
     33linksys-shared-clean: 
     34        -$(MAKE) -C $(LINKSYS_SHARED_DIR) clean 
    3235 
    3336 
    34 # nvram tool 
    35 OPENWRT_NVRAM_SOURCE=openwrt-nvram.tar.gz 
    36 OPENWRT_NVRAM_DIR=$(BUILD_DIR)/openwrt-nvram 
    37 OPENWRT_NVRAM_TARGET_BINARY:=usr/sbin/nvram 
     37# nvram tool extracted from linksys firmware GPL sourcetree 
     38# WRT54GS_3_37_2_1109_US 
     39LINKSYS_NVRAM_TGZ=linksys-nvram.tar.gz 
     40LINKSYS_NVRAM_DIR=$(BUILD_DIR)/linksys-nvram 
     41LINKSYS_NVRAM_TARGET_BINARY:=usr/sbin/nvram 
    3842 
    39 $(DL_DIR)/$(OPENWRT_NVRAM_SOURCE): 
    40         $(WGET) -P $(DL_DIR) $(OPENWRT_SITE)/$(OPENWRT_NVRAM_SOURCE) 
     43$(DL_DIR)/$(LINKSYS_NVRAM_TGZ): 
     44        $(WGET) -P $(DL_DIR) $(LINKSYS_TGZ_SITE)/$(LINKSYS_NVRAM_TGZ) 
    4145 
    42 $(OPENWRT_NVRAM_DIR)/.source: $(DL_DIR)/$(OPENWRT_NVRAM_SOURCE) 
    43         zcat $(DL_DIR)/$(OPENWRT_NVRAM_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - 
    44         touch $(OPENWRT_NVRAM_DIR)/.source 
     46$(LINKSYS_NVRAM_DIR)/.source: $(DL_DIR)/$(LINKSYS_NVRAM_TGZ) 
     47        zcat $(DL_DIR)/$(LINKSYS_NVRAM_TGZ) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - 
     48        touch $(LINKSYS_NVRAM_DIR)/.source 
    4549 
    46 $(TARGET_DIR)/$(OPENWRT_NVRAM_TARGET_BINARY): $(OPENWRT_NVRAM_DIR)/.source 
    47         $(MAKE) -C $(OPENWRT_NVRAM_DIR) INSTALLDIR=$(TARGET_DIR) \ 
     50$(TARGET_DIR)/$(LINKSYS_NVRAM_TARGET_BINARY): $(LINKSYS_NVRAM_DIR)/.source 
     51        $(MAKE) -C $(LINKSYS_NVRAM_DIR) INSTALLDIR=$(TARGET_DIR) \ 
    4852                CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld STRIP="$(STRIP)" \ 
    49                 CFLAGS="$(TARGET_CFLAGS) -I. -I../binary/include -Wall -DOPENWRT_NVRAM" \ 
     53                CFLAGS="$(TARGET_CFLAGS) -I. -I$(LINKSYS_KERNEL_INCLUDE)/include \ 
     54                -I$(LINKSYS_KERNEL_INCLUDE) -I$(LINKSYS_SHARED_DIR) -Wall" install 
     55 
     56linksys-nvram: $(TARGET_DIR)/$(LINKSYS_NVRAM_TARGET_BINARY) 
     57 
     58linksys-nvram-clean: 
     59        -$(MAKE) -C $(LINKSYS_NVRAM_BUILD_DIR) clean 
     60 
     61# wlconf tool extracted from linksys firmware GPL sourcetree 
     62# WRT54GS_3_37_2_1109_US 
     63LINKSYS_WLCONF_TGZ=linksys-wlconf.tar.gz 
     64LINKSYS_WLCONF_DIR=$(BUILD_DIR)/linksys-wlconf 
     65LINKSYS_WLCONF_TARGET_BINARY:=usr/sbin/wlconf 
     66 
     67$(DL_DIR)/$(LINKSYS_WLCONF_TGZ): 
     68        $(WGET) -P $(DL_DIR) $(LINKSYS_TGZ_SITE)/$(LINKSYS_WLCONF_TGZ) 
     69 
     70$(LINKSYS_WLCONF_DIR)/.source: $(DL_DIR)/$(LINKSYS_WLCONF_TGZ) 
     71        zcat $(DL_DIR)/$(LINKSYS_WLCONF_TGZ) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - 
     72        touch $(LINKSYS_WLCONF_DIR)/.source 
     73 
     74$(TARGET_DIR)/$(LINKSYS_WLCONF_TARGET_BINARY): $(LINKSYS_WLCONF_DIR)/.source 
     75        $(MAKE) -C $(LINKSYS_WLCONF_DIR) INSTALLDIR=$(TARGET_DIR) \ 
     76                CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld STRIP="$(STRIP)" \ 
     77                CFLAGS="$(TARGET_CFLAGS) -I. -I$(LINKSYS_KERNEL_INCLUDE)/include \ 
     78                        -I$(LINKSYS_KERNEL_INCLUDE) \ 
     79                        -I$(LINKSYS_SHARED_DIR) \ 
     80                        -I$(LINKSYS_NVRAM_DIR) \ 
     81                        -Wall -DOPENWRT_WLCONF" \ 
     82                LDFLAGS="-lnvram -lshared -L$(BUILD_DIR)/linksys-shared -L$(BUILD_DIR)/linksys-nvram" \ 
    5083                        install 
    5184 
    52 openwrt-nvram: $(TARGET_DIR)/$(OPENWRT_NVRAM_TARGET_BINARY) 
     85linksys-wlconf: $(TARGET_DIR)/$(LINKSYS_WLCONF_TARGET_BINARY) 
    5386 
    54 openwrt-nvram-clean: 
    55         -$(MAKE) -C $(OPENWRT_NVRAM_BUILD_DIR) clean 
     87linksys-wlconf-clean: 
     88        -$(MAKE) -C $(LINKSYS_WLCONF_BUILD_DIR) clean 
     89 
    5690 
    5791# mtd tool 
     
    6498openwrt-mtd: $(TARGET_DIR)/$(OPENWRT_MTD_TARGET_BINARY) 
    6599 
    66 # wlconf tool 
    67 OPENWRT_WLCONF_SOURCE=openwrt-wlconf.tar.gz 
    68 OPENWRT_WLCONF_DIR=$(BUILD_DIR)/openwrt-wlconf 
    69 OPENWRT_WLCONF_TARGET_BINARY:=usr/sbin/wlconf 
     100# trx tool 
     101OPENWRT_TRX_SOURCE=package/openwrt/trx.c 
     102OPENWRT_TRX_TARGET=$(BUILD_DIR)/trx 
    70103 
    71 $(DL_DIR)/$(OPENWRT_WLCONF_SOURCE): 
    72         $(WGET) -P $(DL_DIR) $(OPENWRT_SITE)/$(OPENWRT_WLCONF_SOURCE) 
     104$(OPENWRT_TRX_TARGET):  
     105                $(CC) -o $(OPENWRT_TRX_TARGET) $(OPENWRT_TRX_SOURCE) 
    73106 
    74 $(OPENWRT_WLCONF_DIR)/.source: $(DL_DIR)/$(OPENWRT_WLCONF_SOURCE) 
    75         zcat $(DL_DIR)/$(OPENWRT_WLCONF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - 
    76         touch $(OPENWRT_WLCONF_DIR)/.source 
     107openwrt-trx: $(OPENWRT_TRX_TARGET) 
    77108 
    78 $(TARGET_DIR)/$(OPENWRT_WLCONF_TARGET_BINARY): $(OPENWRT_WLCONF_DIR)/.source 
    79         $(MAKE) -C $(OPENWRT_WLCONF_DIR) INSTALLDIR=$(TARGET_DIR) \ 
    80                 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld STRIP="$(STRIP)" \ 
    81                 CFLAGS="$(TARGET_CFLAGS) -I. -I../binary/include -I$(BUILD_DIR)/openwrt-shared \ 
    82                         -I$(BUILD_DIR)/openwrt-nvram -Wall -DOPENWRT_WLCONF" \ 
    83                 LDFLAGS="-lnvram -lshared -L$(BUILD_DIR)/openwrt-shared -L$(BUILD_DIR)/openwrt-nvram" \ 
    84                         install 
     109# addpattern tool 
     110OPENWRT_ADDPATTERN_SOURCE=package/openwrt/addpattern.c 
     111OPENWRT_ADDPATTERN_TARGET=$(BUILD_DIR)/addpattern 
    85112 
    86 openwrt-wlconf: $(TARGET_DIR)/$(OPENWRT_WLCONF_TARGET_BINARY) 
     113$(OPENWRT_ADDPATTERN_TARGET):  
     114                $(CC) -o $(OPENWRT_ADDPATTERN_TARGET) $(OPENWRT_ADDPATTERN_SOURCE) 
    87115 
    88 openwrt-wlconf-clean: 
    89         -$(MAKE) -C $(OPENWRT_WLCONF_BUILD_DIR) clean 
     116openwrt-addpattern: $(OPENWRT_ADDPATTERN_TARGET) 
     117 
     118openwrt:        linksys-shared linksys-nvram linksys-wlconf openwrt-mtd openwrt-trx openwrt-addpattern 
    90119 
    91120 
    92 openwrt:        openwrt-shared openwrt-nvram openwrt-mtd openwrt-wlconf 
    93  
    94  
Note: See TracChangeset for help on using the changeset viewer.