wiki:OpenWrt/Configuration

Custom Configuration OpenWrt

Video: https://youtu.be/HHhT6z0J5TU

Gateworks uses OpenWrt and it boots up by default properly.

However, the install can be tweaked however the user wants.

This must be done at COMPILE time however.

make menuconfig

At the command prompt in the trunk directory where the Gateworks code was checked out, type the command:

/gateworks-openwrt$ make menuconfig

You can now make any changes, using the space bar to select different items. Select the asterisk next to the line item you want.

NOTE:Once you make any changes, exit and save.

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.

Therefore, 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.

/gateworks-openwrt$ make -j8 V=99

The newly generated firmware will contain the packages selected. The individual IPK files should also be listed at (for Laguna boards) /trunk/bin/cns3xxx/packages

Then, the make images/laguna command (Laguna) compiles the artifacts from trunk into a firmware binary (.bin) to be flashed to the board.

make images/laguna

Specific Examples

Turning on GDB Server

If 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:

Configuring an IP Address

By 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.

Please 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.

WARNING: 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.

For 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:

cd /openwrt ;   # openwrt trunk
mkdir -p files/etc/config
cat << EOF >> files/etc/config/network
config interface lan
        option ifname   eth0
        option type     bridge
        option proto    static
        option ipaddr   192.168.9.1
        option netmask  255.255.255.0

EOF

DHCP would be:

Edit /etc/config/network

delete line option 'type' 'bridge' change 'proto' to 'dhcp'

option 'interface' 'lan'
    option 'ifname' 'eth0'
    option 'type' 'bridge'
    option 'defaultroute' '0'
    option 'peerdns' '0'
    option 'proto' 'dhcp'

run command

/etc/init.d/network restart

Enjoy DHCP!

  • This 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)
Last modified 4 years ago Last modified on 06/23/2020 07:20:39 PM
Note: See TracWiki for help on using the wiki.