====== Wing for embedded devices ====== This page describes how to obtain and run Wing on one of the supported platforms. Other hardware platforms may require some adaptations. The WING toolkit currently supports (officially) the following platforms: * PCEngines ALIX (should work also on the Soekris net55xx boards) * PCEngines WRAP * Soekris net48xx * Gateworks Cambria GW2358-4 (experimental) [[http://openwrt.org/|OpenWRT]] has been selected as Operating system for our testbed. OpenWRT is a minimalist BusyBox/Linux distribution released under a GPL license. It provides an automated system for downloading the source code for both the kernel and the userspace tools, and compiling it to work on any supported platform. Moreover, OpenWRT is also characterized by a small memory and disk footprint which makes it suitable for a wide rage of networking devices and provides an hardware configuration and maintenance abstraction through a custom system and package configuration facility called UCI (Universal Configuration Interface) ====== Using a pre-built firmware ====== The easiest way to run Wing is to download a pre-compiled firmware image, flash it on a compact flash, and plug it in a supported wireless router. Pre-build firmwares can be downloaded from the [[Downloads]] page. Please note that, like the default OpenWrt images, our firmware does not sets a default password. It is then necessary to telnet into the router using the serial interface and set a password. After this step is completed it will be possible to remotely access the router using ssh. The default LAN IP is 10.0.0.1. ====== Building the firmware from scratch ====== Check out the latest source from the public subversion repository: svn co http://gforge.create-net.org/svn/wing/trunk wing Let $WING_HOME be the directory where the sources have been checked out. The sources contain a script named ''build.sh'' which allows you to build the firmwares for the platforms currently supported by Wing. For each target platform defined in the ''targets'' directory, ''build.sh'' performs the following operations: - The OpenWRT sources are checked-out in ''$WING_HOME/staging/kamikaze-[version]-[revision]'' - Both the OpenWRT and the WING packages feeds are update and the packages listed into ''$WING_HOME/deps'' are installed - For each profile the following operation are performed: - The configuration file ''$WING_HOME/config/[target]-[profile].config'' is copied to ''$WING_HOME/staging/kamikaze-[version]-[revision]'' - The product code is generated according to the ''$WING_HOME/tags'' list and copied to ''$WING_HOME/staging/kamikaze-[version]-[revision]/target/linux/[target]/base-files/etc/version'' - The binary images are built Here follows a list of option that can be passed to the script: * **-h**, print an help message * **-d**, debug mode. It basically runs ''make V=99'' instead of just ''make''. This sets the maximum level of verbosity for the make command allowing you debug errors and misbehaviors. * **-t **, build only the specified target (x86) * **-p **, builds only the specified profile (alix_madwifi, cambria_madwifi, ...). Please refer to [[software:downloads|Downloads]] section for a list of the profiles. When the build process is finished, the resulting firmwares and packages will be available in the $WING_HOME/bin directory. ====== Installation ====== ==== PCEngines ans Soekris boards ==== A pre-built image can be transfered to a compact flash card using the ''dd'' command available in any GNU/Linux distribution, e.g.the following command will overwrite whatever is present on the /dev/sdb device: dd if=wing-x86-alix_madwifi-nightly-jffs2-128k.img of=/dev/sdb If you built the firmware from scratch following the instruction provided above you can use the ''dd'' from the $WING_HOME directory and provide the full path to the image: dd if=bin/releases/nightly/x86/wing-x86-alix_madwifi-nightly-jffs2-128k.img Alternatively you can use the compact flash programming utility included in the repository: sudo ./willitrun -t XA-100 -d /dev/sdc The previous command will overwrite wathever device is plugged at ''/dev/sdc'' with a firmware suitable for a PC Alix platform equipped with WiFi cards supported by the Madwifi driver. Please refer to [[software:downloads|Downloads]] section for a list of the available product codes. After rebooting the router the mesh should be up and running. ==== Gateworks Cambria boards ==== In order to install the WING firmware (or any other firmware) on a Gateworks Cambria, you must satisfy the following prerequisites: - Install a tftp server and configure it to listen at the 192.168.3.1/24 address. - Obtain both the kernel and the root partition images. A pre-compiled version of both images can be found in the [[software:downloads|Downloads]] section. - Save the two images in the root directory of the tftp server. - Connect the tftp server and Cambria board using a crossover Ethernet cable (port 1). - Connect the Cambria board and the server using a 9-pin M/F null modem cable. - From the server, configure a terminal emulation program (e.g. minicom) using the following parameters: 115200 baud, 8 data bits, 1 stop bit, no parity, and no flow control. At this point you can run the terminal emulator, power on the node, and press CTRL+C to access the bootloader CLI. Note that the factory network configuration for the Gateworks boards is the following: * IP Address: 192.168.3.2/24 * Gateway: 0.0.0.0 * Default server: 192.168.3.1 The default configuration can be changed using the ''fconfig'' command. The factory flash memory configuration is the following: ^ Name ^ FLASH addr ^ Mem addr ^ Length ^ Entry point ^ | RedBoot | 0x50000000 | 0x50000000 | 0x00080000 | 0x00000000 | | FIS directory | 0x51FE0000 | 0x51FE0000 | 0x0001F000 | 0x00000000 | | RedBoot config | 0x51FFF000 | 0x51FFF000 | 0x00001000 | 0x00000000 | The first partition contains the bootloader program (redboot), the last two partitions contain configuration parameters. As you can notice, flash memory starting from address 0x50080000 to address 0x51FD9999 is free and can be used for the OpenWRT operating system. The following commands will create two new partitions on the flash memory, linux and rootfs. The first one contains the OpenWRT kernel, while the second one contains the OpenWRT root file system. If something goes wrong, the flash memory can be restore to the factory configuration by using command ''fis init''. fis unlock -f 0x50000000 -l 0x2000000 fis init load -r -v -b 0x00800000 wing-ixp4xx-cambria_madwifi-nightly-zImage fis create linux load -r -v -b 0x00800000 wing-ixp4xx-cambria_madwifi-nightly-squashfs.img fis create rootfs After successfully executing these commands, OpenWRT can be loaded by entering: fis load linux exec ====== License ====== Code is released under a BSD license.