Axis Area
Public Area
Special pages
NOTE
ETRAX meant “Ethernet and Token Ring controller from AXis” in the beginning - from ETRAX 100LX and onwards the chip does not have a Token Ring controller in it so simply consider it as a name.
CRIS stands for “Code Reduced Instruction Set” and is the CPU architecture/instruction set developed by Axis and used inside our ETRAX chips. It is highly optimized and typically gives less code then the i386 instruction set. You can say that CRIS is the CPU, but ETRAX is the whole ASIC with I/O interfaces etc.
Do “boot_linux -i kimage -p” and then run the printed command but replace ”–file kimage c0004000 –jump c0004000” with ”–memtest c0000000 cXXXXXXX” where you exchange XXXXXXX with the upper limit of you memory size (for 8M bytes of memory that would be 0800000).
Follow the instructions in How do I test the memory? but instead of using ”–memtest …” use ”–memdump 8XXXXXXX 8YYYYYYY” where you exchange XXXXXXX with the lower and YYYYYYY with the upper address of the span of the flash memory you would like to dump. To dump the first 100 bytes of the flash memory use ”–memdump 80000000 80000064”.
The network boot button is mounted approximately 1.5cm behind the panel and can be reached through the hole of the left mounting screw of the second RS232 port (the RS232 port that is closest to the USB port). Basically you will have to unscrew the mounting screw for the RS-232 port and use a thin stick (perhaps a screwdriver) to push the network boot button, by lightly bending the stick (the button will sound a quiet “tick” when being pressed down). Note that this description only is valid for the (newer) hardware revision that has the USB port mounted vertically.
The network boot button is accessible via a hole in the front panel, see the image below. Use e.g. a pen or a paper clip to push the boot button and keep the boot button depressed while powering on the Device Server. See Flash HOWTO for the details of the network boot mode.
For install directions read the compiler_install guide.
The usage is described in the compiling_for_cris_howto.
There have been some questions if it would be possible to use the cris compiler under Windows together with cygwin. The answer is NO. Firstly, the cris-dist tools can not easily be ported. Secondly, several parts of the SDK assume that GNU/Linux is used. As a consequence, porting the development environment has not been considered worthwhile.
This question is more Linux specific. However, the SDK use some quirks to ease the development of modules. Provided that you have the module code in hello.c use the following as Makefile.
MODULE = hello_mod.o obj-hello_mod = hello.o PREVENT_RECURSIVE_INCLUDE = 1 include $(AXIS_TOP_DIR)/modules/rules.build_modules
Sometime you notice that your kernel eats more space that you are willing to offer. Since Linux is ported to so many Embedded Plattforms some patches exists that reduce the kernel. Here comes the TinyLinux project.. The target is to provide a forum for people interessted in saving space. see http://tree.celinuxforum.org/ and specialy on size reduction take a look at http://tree.celinuxforum.org/pubwiki/moin.cgi/SystemSizeResources
Axis continually import new Linux kernels and once in a while supply patches upstream for the CRIS v10 and v32 port. However, the CRIS support in the official kernel is usually not very reliable. Hence Axis advice against trying to use kernels from kernel.org for the CRIS architecture. Instead use the kernels that has been proven to work with the CRIS architecture, these are distributed as a part of the software distribution. This implies that the latest Linux kernel not always will be available for CRIS. However, if you require a special feature in a new kernel you can of course send a request to Axis on the dev-etrax mailing list. Another possibility is to patch the most recently released kernel from Axis with the specific feature that is required.
If you make errors during file manipulation of the file system and get stuck with the board not responding anymore or not booting at all you can restore the original factory settings from the rescue partition. The restoration is limited to the read-write partition, such as the /etc directory. Restoring from the rescue partition will return /etc to the state it was in when the unit was originally flashed.
To initiate a rescue restore, press the factory default button and while holding it applying power to the Axis developer board. Continue to hold the button for at least 10 seconds, which is a safe amount of time for the rescue restore request to be detected during the boot attempt. The button is located behind a tiny hole (on the Axis 82, 83, and 83+) just below the Eth0 LED or (on the Axis 88 and 89) between SER0 and SER1. A stiff wire (paper clip) will depress the button. You won't have to extend the wire into the hole very far, only about 5mm.
Once you do this procedure the Axis developer board will continue booting after you release the button once 10 seconds have expired.
Note that you will loose all your modifications done on the files in the read/write directory /etc that will be reverted to the factory default. To revert deeper modifications you will have to reflash the board from the SDK environment.
If one of the leds flash with a period of approximately 1 second that indicates that the serial number is not set for the product. On all Axis products the serial number can be found on a sticker on the card and begins with 00408c. Observe that the serial number is also used as the MAC address. To set the serial number use the “bootblocktool” tool. For instructions consult the Change the MAC address question below.
The flashing action is controlled by the daemon statusled. To stop the blinking you will have to block this daemon with the command:
killall statusled
After the command if the LED remains in the ON state you can switch it off with the command:
statusled off
If the leds are flashing really, really fast, then the checksum of the kernel-partition (in flash memory) does not match the checksum in the partition table (in flash memory). There are at least two reasons for that to happen:
The second Ethernet device is an USB to Ethernet controller (RTL 8150) mounted on the developer board. Hence it makes use of the USB interface and the generic RTL 8150 driver for Linux. Off course this driver doesn’t include any functionality to flash LEDs on this special hardware (the “eth1 led” is in this case connected via the general port A on the ETRAX 100LX). Neither do the USB driver have any special source code for flashing this led. If you write a patch to the RTL 8150 general driver that flash this led please submit it to this Wiki and announce it on the dev-etrax mailing list.
The factory default MAC address of Axis products is the same as the serial number which begin with 00408c. If you would like to use a MAC address different form the serial number you can edit the /etc/conf.d/mac file.
If the serial number has not been configured is possible to set it (but only once!). To set the serial number use the bootblocktool command:
bootblocktool -a SERNO 00408Cxxxxxx
Exchange “xxxxxx” with the serial number of the board. All Axis developer boards/device servers should have a sticker with the serial number.
The system log can be found in /var/log/messages
To see continuously from a telnet session or a SSH session, the system log messages generated from the kernel or from other applications that use syslog you can insert the following command:
tail -f /var/log/messages
To see the bootup messages use the dmesg program
To set the system clock use the date command.
date MMDDHHMMYYYY
Where MM=Month, DD=Day, HH=Hour, MM=Minute, and YY=Year
To permanently store the system clock in the RTC chip just type the following command
hwclock -w
For cramfs based images (usually the root filesystem on products with NOR flash) you can use the loopback device to mount the image on your host system:
mount -t cramfs rootfs.img <mount point> -o loop
Unfortunately you can not do the same for jffs2 based images (jffs2 is used for the root filesystem on products with NAND flash). But in software distribution 2.10 and later you can emulate what would end up in the image by running the following command from the software distribution root directory:
fakeroot metafiles --prefix `pwd`/target/<target> --etcdir `pwd`/target/<target>/etc exec /bin/sh
The Web server configuration file is /etc/httpd/conf/boa.conf. The meaning of all the parameters presented in this file is reported on www.boa.org. Once changed the configuration parameters you need to restart the server with the following commands:
/etc/init.d/httpd stop /etc/init.d/httpd start
or
/etc/init.d/httpd restart
Axis has added basic authentication support to the Boa Web server. The configuration is not described in www.boa.org's documentation.
Here is an example of how to enable password protection in the default web pages in the AXIS 88 Developer Board. It's done in the same or in a similar way in the other targets in the Axis Software Distribution. In /etc/httpd/conf/boa.conf there are some lines configuring the basic authentication support:
Realm Administrator axadmin ProtSpace Administrator / ProtRealm Administrator anonymous ProtPath Administrator /axis-cgi/admin/ ProtPath Administrator /usr/html/axis-cgi/admin/ ProtPath Administrator /admin-bin/ ProtPath Administrator /usr/html/admin-bin/
Changing “anonymous” to “password” in the “ProtRealm” line enables password protection.
Realm Administrator axadmin ProtSpace Administrator / ProtRealm Administrator password ProtPath Administrator /axis-cgi/admin/ ProtPath Administrator /usr/html/axis-cgi/admin/ ProtPath Administrator /admin-bin/ ProtPath Administrator /usr/html/admin-bin/
After modifying boa.conf you must restart the Web server as described above.
Here's an other configuration example:
# Realm: Association between realm name and group # Example: Realm Administrator axadmin Realm Administrator axadmin Realm Operator axadmin Realm Operator axoper Realm Viewer axadmin Realm Viewer axoper Realm Viewer axview Realm PTZOperator axptz Realm Upnp axview # ProtSpace: Association between realm name and protection space, RFC 2617 # Example: ProtSpace Administrator /admin/ ProtSpace Administrator / ProtSpace Operator / ProtSpace Viewer / ProtSpace PTZOperator / # ProtRealm: Protection by password or anonymous # Example: ProtRealm Viewer anonymous ProtRealm Administrator password ProtRealm Operator password ProtRealm Viewer password ProtRealm PTZOperator password ProtRealm Upnp anonymous # ProtPath: Association between realm name and path name # Example: ProtPath Viewer /usr/html/axis-cgi/com/ ProtPath Viewer /axis-cgi/io/ ProtPath Viewer /usr/html/axis-cgi/io/ ProtPath Viewer /axis-cgi/buffer/ ProtPath Viewer /usr/html/axis-cgi/buffer/ ProtPath Viewer /axis-cgi/scripts/ ProtPath Viewer /usr/html/axis-cgi/scripts/ ProtPath Viewer /axis-cgi/view/ ProtPath Viewer /usr/html/axis-cgi/view/ ProtPath Administrator /axis-cgi/admin/ ProtPath Administrator /usr/html/axis-cgi/admin/ ProtPath Operator /axis-cgi/operator/ ProtPath Operator /usr/html/axis-cgi/operator/
It's possible to add web pages and CGI scripts to your Developer Board without having to build a new firmware image. This is described in the AXIS Scripting Guide, in the “Creating custom Web pages and CGI scripts” section.
By default (from SDK release 2.00) eth0 is configured with dhcp and will fallback to IP 192.168.0.90 if a dhcp server can not be found.
To change the IP address momentarily just use the ifconfig command from a console or telnet session:
ifconfig eth0 x.x.x.x
Where x.x.x.x is the new address to use. The address will remain changed up to the new reboot of the board. For more information on how to use ifconfig read the man page.
To change the network configuration permanently you need to modify the file /etc/conf.d/net.eth0. In this file a parameter named BOOTPROTO controls if the board should use dhcp or not. To make the board not to use dhcp change the line to:
BOOTPROTO="none"
Or let it be the following to continue to use dhcp:
BOOTPROTO="dhcp"
If the BOOTPROTO is set to “none” the following rows specify the network parameters used at startup:
IP="192.168.0.90" NETMASK="255.255.255.0" BROADCAST="192.168.0.255" GATEWAY="192.168.0.1"
Since only a few device nodes are created in the default firmware images it is likely that device nodes will not exist for drivers other than the ones enabled by default. Consequently, you will have to create the device nodes yourself. Since the root file system is on a read only partition the creation of the device nodes has to be done when you build the images. A suggestion is to add a few lines in “packages/devices/axis-2.4/Makefile”.
In the SDK top directory run “make menuconfig”. In the “general configuration” menu you can select which standard C library you would like to use (uClibc or glibc).
Everything in the /var directory is stored in RAM, hence it will be wiped out when rebooting. The default contents of the /var directory (present when booting the board) is stored in the /.var.tar file. If you would like to save something that reside in the /var directory one thing that can be done is to create a symbolic link to a writeable partition, e.g., /etc. Since the /.var.tar file reside in the read only root file system changes to this file must be done when building the firmware image. One solution to circumvent this is to create a script that create the symbolic link while booting.
Look in the cookbook section.
JFFS requires a minimum of 5 flash blocks and JFFS2 requires 8 blocks (with a 64kB block size the minimum partition size is 0x050000 and 0x080000 respectively).
If you for some reason would like to use JFFS instead of JFFS2 change type=jffs2 to type=jffs for the following line in the configure-files/common/common file.
partition fstab type=jffs2 dev=/dev/flash2 mpoint=/mnt/flash mopts=noauto pass=2 \
NB if you are using the flashit or flashitall scripts you also have to change the following line in the corresponding file:
PSIZE_JFFS=`awk '!/\#/ { if ( $4 == "jffs2" ) print $2 }' ptablespec \
The telnet deamon found in the SDK interpret enter as a double CRLF, giving the user no chance to input his/her password. To circumvent this do not press enter when the username have been entered, instead press Ctrl-J. Another method is to use PuTTY. In this case it is necessary to uncheck the “Return Key sends Telnet New Line instead of ^M” option in the PuTTY config panel.
Job control will be turned off since your shell can not obtain a controlling terminal. This happens since the debug port essentially is ”/dev/console” and hence the kernel will not provide a controlling terminal. This is the normal behaviour for the shell on the debug port which implies a few restrictions, e.g., Control-C will not work. When working with the developer board it is recommended that you run a shell on a normal tty or login remote using telnet or ssh.