Changes between Initial Version and Version 1 of OpenWrt/Configuration


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (21 months ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenWrt/Configuration

    v1 v1  
     1[[PageOutline]]
     2
     3= Custom Configuration OpenWrt =
     4
     5Gateworks uses OpenWrt and it boots up by default properly. 
     6
     7However, the install can be tweaked however the user wants.
     8
     9This must be done at '''COMPILE''' time however.
     10
     11
     12== make menuconfig ==
     13At the command prompt in the '''trunk''' directory where the Gateworks code was checked out, type the command:
     14
     15{{{
     16/gateworks-openwrt-x/gateworks-openwrt/trunk$ make menuconfig
     17}}}
     18
     19You will be presented with a GUI that looks like so:
     20[[BR]]
     21[[Image(makemenuconfig.png,300px)]]
     22
     23You can now make any changes, using the space bar to select different items.  Select the asterisk next to the line item you want.[[BR]][[BR]]
     24
     25'''NOTE:'''Once you make any changes, exit and save.
     26
     27
     28
     29'''There is a config file in the gateworks-openwrt directory as well as the trunk directory.'''  If a 'make cns3xxx' (Laguna) is ran after doing a make menuconfig, it will '''wipe out''' the changes done in make menuconfig.[[BR]][[BR]]
     30
     31Therefore, run a make -j8 V=99 in the OpenWrt trunk directory, followed by a make images/laguna in the upper directory to get a fresh firmware. 
     32{{{
     33/gateworks-openwrt/trunk$ make -j8 V=99
     34}}}
     35[[BR]][[BR]]
     36
     37The newly generated firmware will contain the packages selected.  The individual IPK files should also be listed at (for Laguna boards) /trunk/bin/cns3xxx/packages [[BR]][[BR]]
     38
     39
     40
     41
     42Then, the make images/laguna command (Laguna) compiles the artifacts from trunk into a firmware binary (.bin) to be flashed to the board.
     43
     44{{{
     45make images/laguna
     46}}}
     47
     48
     49== Specific Examples ==
     50=== Turning on GDB Server ===
     51
     52If you desire to turn on GDBServer you can do that in the make menuconfig.  Go to the main menu item titled 'Development' and you will see it in there.  Use the space bar to select the line with an asterisk as seen below:
     53[[BR]]
     54[[Image(gdb.png,600px)]]
     55
     56=== Configuring an IP Address ===
     57
     58By default, Gateworks boards ship with 192.168.1.1 as the default IP address.  Sometimes this conflicts with other IP addresses.  If desired, a configuration can be created to have the board come up with a different IP address.
     59
     60Please note, the below is ONLY for building a image.  It is VERY easy to change the IP address manually once the board is booted.  Only use the below method if you have a specific reason as it is much more difficult than configuring the board via serial once it is up and booted.
     61
     62WARNING: There is a 'preinit' network configuration is for preinit/failsafe (ie hit 'f' during boot for a failsafe terminal).  This most likely is not what people usually need. Rather, see below.
     63
     64
     65For customizing the IP address which is in the configuration file /etc/config/network (or any other files) the correct way is to put files in a 'files' directory in the build directory:
     66
     67
     68{{{
     69cd trunk ;   # openwrt trunk
     70mkdir -p files/etc/config
     71cat << EOF >> files/etc/config/network
     72config interface lan
     73        option ifname   eth0
     74        option type     bridge
     75        option proto    static
     76        option ipaddr   192.168.9.1
     77        option netmask  255.255.255.0
     78
     79EOF
     80
     81}}}
     82
     83DHCP would be:
     84{{{
     85option 'interface' 'lan'
     86    option 'ifname' 'eth0'
     87    option 'type' 'bridge'
     88    option 'defaultroute' '0'
     89    option 'peerdns' '0'
     90    option 'proto' 'dhcp'
     91}}}
     92
     93
     94
     95
     96
     97This will modify the rootfs that was created in the build directory (ie trunk/target-arm_v6k_uClibc-0.9.33.2_eabi/root-cns3xxx/etc/config/network)