Show
Ignore:
Timestamp:
03/12/07 16:44:11 (5 years ago)
Author:
benoitg
Message:
  • contrib/ Add contrib dir to collect the scripts and other code distributed with, but not really part of wifidog.
  • Include the scripts used to build a ipkg on Openwrt RC6 and 0.9
  • Modify the build system to finally be able to build wifidog directly from the wifidog directory using the same files

used to make the official .ipk, without having to copy ANYTHNG to the openwrt SDK.
At last, there is now a new target: make ipk make ipk OPENWRTSDK=path_to_openwrt_sdk

  • ipk/ Removed the obsolete OpenWRT RC4 scripts
  • README.openwrt: Update
  • scripts/openwrt/ remove obsolete dir.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog/README.openwrt

    r1004 r1189  
    2020You have four options for building wifidog using the OpenWRT toolchain. 
    2121 
    22 1. get the prebuilt, minimal OpenWRT toolchain. 
    23    wget http://downloads.openwrt.org/whiterussian/newest/OpenWrt-SDK-Linux-i686-1.tar.bz2 
    24    ... unpack the tarball, etc 
    25    ... the full path to the OpenWrt-SDK-Linux-i686-1 directory is your BUILDROOT 
     221. get the prebuilt, minimal OpenWRT toolchain, and give the makefile it's path: 
     23        cd ~  
     24        wget http://downloads.openwrt.org/whiterussian/newest/OpenWrt-SDK-Linux-i686-1.tar.bz2 
     25        tar -jxvf OpenWrt-SDK-Linux-i686-1.tar.bz2 
     26   make ipk OPENWRTSDK=~/OpenWrt-SDK-Linux-i686-1/ 
    2627 
    27    cd wifidog directory (where this README is) 
    28    ipkg/rules-rc4-sdk BUILDROOT=<Full Path to OpenWrt SDK> 
    29  
    30    If it works (!) you will have an ipkg file in your wifidog directory 
    31    with the wifidog package in it.  You can then boot up your OpenWrt 
    32    router, copy the ipkg to it, and install it using the ipkg commands. 
     28   If it works (!) you will have an ipkg file in $(OPENWRTSDK)/bin/packages/bin/packages/ 
     29   You can then boot up your OpenWrt 
     30   router, copy the .ipk to it, and install it using the ipkg commands. 
    3331 
    3432   You should also make sure that the wifidog prereqs are already 
    35    installed on the router before you go to run wifidog. 
     33   installed on the router before you go to run wifidog.  Note that the  
     34   package will check this for you. 
    3635 
    3736   The prereqs are: 
     
    4544   debian apt-get or fedora yum or up2date. 
    4645 
    47 2. checkout the stable release of the full OpenWRT toolchain. 
    48    This will let you build your own flash image for the router. 
    49    Since the above minimal toolchain isn't precompiled for all 
    50    computers, this is the way to go if you want to use the toolchain 
    51    on a non-intel computer, like a Mac. 
    52  
    53    svn checkout https://svn.openwrt.org/openwrt/branches/whiterussian OpenWrt-ToolChain-Linux 
    54    ... follow the instructions in the README, INSTALL 
    55    ... typically, ./configure; make; make install 
    56    ... the full path to the OpenWrt-ToolChain-Linux directory is your BUILDROOT 
    57  
    58    So, you've got your toolchain built (with it's version of gcc, ld, 
    59    etc etc).  Now on to compiling wifidog: 
    60  
    61    cd wifidog directory (where this README is) 
    62    ipkg/rules-rc4 BUILDROOT=<Full Path to OpenWrt toolchain> 
    63  
    64    If it works (!) you will have an ipkg file in your wifidog directory 
    65    with the wifidog package in it and all the prereqs.  You can then boot 
    66    up your OpenWrt router, copy the ipkg to it, and install it using the 
    67    ipkg commands. 
    68  
    69    The advantage with this method is that the wifidog build process will 
    70    draw into itself all it's openwrt prereqs. 
    71  
    72    The other big plus is that you can cut your own custom openwrt flash 
    73    image that has all the things you want in it, like asterisk or java, 
    74    and of course including wifidog. 
    75  
    76 3. checkout the bleeding edge release of the full OpenWRT toolchain 
    77    Careful, you may brick your router. 
    78    Currently, if you want to run linux 2.6, this is the only way to go. 
    79    Plus, there are new tools, apps, and a better build process. 
    80  
    81    svn checkout https://svn.openwrt.org/openwrt/trunk OpenWrt-ToolChain-Linux 
    82    ... follow the instructions in the README, INSTALL 
    83    ... typically, ./configure; make; make install 
    84    ... the full path to the OpenWrt-ToolChain-Linux directory is your BUILDROOT 
    85  
    86    The rest of this recipe is just like 2. 
    87  
    88 4. you want to use a pre-rc4 version of the OpenWRT toolchain. 
    89    You have to work with the full toolchain, so the recipe is like 2. 
    90    except for the build of wifidog: 
    91  
    92    cd wifidog directory (where this README is) 
    93    ipkg/rules BUILDROOT=<Full Path to pre-rc4 OpenWrt toolchain> 
    94  
    95    This builds wifidog using the older OpenWRT. 
    96  
    97  
    9846---- How to integrate wifidog with the OpenWRT flash image build process ---- 
    9947 
    100 Go to the OpenWRT build root.  This is the top level directory 
    101 from the tarball or from the svn checkout.  You should find a README or 
    102 README.SDK file there, and most importantly a "package" directory. 
     48Download the OpenWRT imagebuilder 
     49-Add the ipkg you built above in the /packages directory 
     50-Add the line "wifidog" in the various files in /lists 
    10351 
    104 You'll notice that under the package subdirectory are specifications for all 
    105 the applications available under OpenWRT.  As of RC4, wifidog is not yet there. 
    106 To integrate wifidog into the build process you'll need to add a specification 
    107 for wifidog into the package directory, and add wifidog to the build list. 
    108  
    109   BUILDROOT=<OpenWRT build root> 
    110   mkdir $BUILDROOT/package/wifidog   
    111   mkdir $BUILDROOT/package/wifidog/ipkg 
    112   mkdir $BUILDROOT/package/wifidog/patches 
    113  
    114 Create a wifidog Config.in file.  This will define wifidog to the OpenWRT build process. 
    115 When configuring OpenWRT you run "make menuconfig".  This compiles a few things, and 
    116 then presents a menu textual-ui that allows you select various options for the build. 
    117 Among other things you can choose the application packages that are part of the build. 
    118 A wifidog Config.in file will put an entry for wifidog in the menu ui. 
    119  
    120   cp package/wifidog/Config.in $BUILDROOT/package/wifidog/Config.in 
    121  
    122 Create a Makefile.  This will be used by the OpenWRT build process to obtain (download) 
    123 configure and build wifidog. 
    124  
    125   cp package/wifidog/Makefile $BUILDROOT/package/wifidog/Makefile 
    126  
    127 Create a debian package file.  This will be used by the OpenWRT build process to make 
    128 an ipkg file. 
    129  
    130   cp package/wifidog/ipkg/wifidog.control $BUILDROOT/package/wifidog/ipkg/wifidog.control 
    131  
    132 Create a list of the config files that will be installed 
    133  
    134   cp package/wifidog/ipkg/wifidog.conffiles $BUILDROOT/package/wifidog/ipkg/wifidog.conffiles 
    135  
    136 Create an initialization script that will start up wifidog 
    137  
    138   cp scripts/init.d/wifidog $BUILDROOT/package/wifidog/ipkg/wifidog.init 
    139  
    140 Edit the OpenWRT package Config.in to add wifidog to the list of packages 
    141  
    142   vi $BUILDROOT/package/Config.in 
    143  
    144 Add the following line to the "Network" section: 
    145  
    146   source "package/wifidog/Config.in" 
    147  
    148 Save it. 
    149  
    150 Edit the OpenWRT package Makefile add wifidog to the list of packages 
    151  
    152   vi $BUILDROOT/package/Makefile 
    153  
    154 Add the following line with the rest of the lines like that: 
    155  
    156   package-$(BR2_PACKAGE_WIFIDOG) += wifidog 
    157  
    158 Add the following line to the dependency section: 
    159  
    160   wifidog-compile: libpthread-compile iptables-compile 
    161  
    162 Save it. 
    163  
    164 Since the newest OpenWRT releases, we will be able to release 
    165 binary IPKGs that should work on all the OpenWRT installations. 
    166  
    167 The binaries are available at sourceforge. 
    168  
    169 The older instructions are now outdated, but they are still at the bottom. 
    170  
    171 Because they now release the images and an SDK, you can also compile 
    172 WiFiDog for the images they distribute if the current IPKG we distribute is 
    173 not up-to-date enough for you. 
    174  
    175 To do so, download the SDK named: OpenWrt-SDK-Linux from OpenWRT, 
    176 then get the package/wifidog/ directory from OpenWRT's CVS (it will be included 
    177 in the next versions of OpenWRT) and put it under to have a layout similar to this: 
    178  
    179 OpenWrt-SDK-Linux-i686-1/package/ 
    180 OpenWrt-SDK-Linux-i686-1/package/depend.mk 
    181 OpenWrt-SDK-Linux-i686-1/package/rules.mk 
    182 OpenWrt-SDK-Linux-i686-1/package/wifidog 
    183 OpenWrt-SDK-Linux-i686-1/package/wifidog/Config.in 
    184 OpenWrt-SDK-Linux-i686-1/package/wifidog/Makefile 
    185 OpenWrt-SDK-Linux-i686-1/package/wifidog/ipkg 
    186 OpenWrt-SDK-Linux-i686-1/package/wifidog/ipkg/wifidog.control 
    187 OpenWrt-SDK-Linux-i686-1/package/wifidog/ipkg/wifidog.init 
    188 OpenWrt-SDK-Linux-i686-1/package/wifidog/ipkg/wifidog.conffiles 
    189  
    190 Then, simply run make at the root of OpenWrt-SDK-Linux-i686-1. 
    191  
    192 You should end up with an IPKG file in OpenWrt-SDK-Linux-i686-1/bin/packages/ 
    193 if everything went well. 
    194  
    195 ---- OLDER INSTRUCTIONS ---- 
    196  
    197 In order to compile OpenWRT for the linksys WRT54G, you must first 
    198 obtain and install the OpenWRT build environement from the OpenWRT 
    199 project: http://openwrt.ksilebo.net/ 
    200  
    201 Once you have successfully built a full toolchain according to the 
    202 instructions for OpwnWRT, you can compile binaries for the MIPS_EL 
    203 platform. 
    204   
    205 Once you have successfully compiled your buildroot, you can change 
    206 back to your wifidog subversion checkout directory and use the commands: 
    207  
    208 ./ipkg/rules BUILDROOT=<path_to_openwrt_buildroot> 
    209  
    210 If your OpenWRT buildroot is compiled and the toolchain is complete, 
    211 you should now have an 'ipkg' in your wifidog directory. 
    212  
    213 The Makefile will compile iptables that is not compiled by default 
    214 and import all the binaries in the right places in the ipkg tree. 
    215  
    216 IMPORTANT:  Before you run wifidog, you must run: 
    217  
    218 insmod ipt_mac