AMC Flash Image update from Redboot
From Zenitel Wiki
Upgrade of AMC-IP Flash Image from Redboot
Contents
General
This document describes how to flash the AMC-IP board using Ethernet and TFTP transfer. The process requires a small image (boot loader) written to FLASH in advance. This image will always be present after production.
A complete FLASH image (32MB) Board Support Package, can be written to the flash on-board. It is also possible to write the separate partitions on the flash. The Partitions are:
- RedBoot_xx (Boot loader, image file redboot_xx.bin)
- LinKern_xx (Linux Kernel, image file zImage_xx)
- RootFS_xx (Linux file system for applications, image file root_xx.jffs2
- BackupFS_xx (Linux file system for backup files, image file backup_xx.jffs2)
xx is an image version number. The image version can in linux be read with the command: ‘cat /proc/mtd’
AMC hardware preparation
- Turn switch S601 – 1 to ON (enable Linux consol on serial port 1)
- Move jumper S700 to upper position (1 – 2) to disable the watchdog
Setup
|----| RS-232 (115200,8-N-1) |--------| | |--------------------------|S1 | | PC | | AMC-IP | | | Ethernet | | | |--------------------------|Eth0 | |----| |--------|
- On the AMC IP board use serial port 1 and ethernet port 0.
- The RS-232 link is used for console (command prompt for RedBoot)
- The Ethernet link is used for file transfer (TFTP transfer) of the image to flash.
- The RS-232 and Ethernet links can either be on the same PC or different PCs.
Extract image files
- Download the AMC IP Flash Image file "alpha_uimage_xx.zip" ((xx = version number) from the download server http://swrelease.zenitelcss.com/
- Unzip the downloaded file and store it on a folder on the PC (e.g. c:\work\amc_images)
TFTP Server
A TFTP server has to be installed on the PC. A recommended TFTP server for windows is tftp32 from http://tftpd32.jounin.net
Unzip the files to a folder on the PC (e.g. c:\Program Files\tftpd32\) and run tftpd32.exe (no install).
Set the image folder (e.g. c:\work\amc_images) as ‘base directory’ in tftpd32 (use the ‘settings’ button).
Turn off the DHCP (also under 'settings') server part of the tftp32 application to avoid interfering with other DHCP servers in your network.
The TFTP Server program must be running during the Image upgrade process.
RedBoot init
Note: Avoid using arrow- and special keys with redboot!
Open a serial console to the AMC-IP board (e.g. HyperTerminal or Terra Term). Communication parameters: 115200 baud, no parity, 8 data bits, 1 stop bit.
Power On or reset the AMC-IP board. A ‘+’ sign in the console window indicates a reboot.
Press Ctrl + C within 3 seconds after the reset/power on.
When the RedBoot application starts you should also be able to see LED activate sequence on the front of the board.
Wait for the RedBoot prompt (this can take some time):
Redboot>
Make sure the the ‘bootp’ parameter is set to ‘false’
Redboot> fconfig bootp
If set to 'true' change to 'false' by using <backspace> to delete current setting and type in false.
In general use <backspace> to edit parameters displayed by the fconfig command
Make sure the network interface is set to ‘npe_eth0’:
Redboot> fconfig net_device npe_eth0
Clear the IP configuration in NVRAM (Only required if AlphaComImageUpgrade PC application have been used for the board):
Redboot> mfill -b 0x5442ff00 -l 256 -p 0x0000 -2
Configure the network address/mask for the AMC-IP board (replace example 10.5.220.13 with actual address):
Redboot> fconfig bootp_my_ip 10.5.220.13 Redboot> fconfig bootp_my_ip_mask 255.255.255.0
If you are connecting the AMC-board back-to-back with your PC we have standardized on a ‘Windows Automatic Private’ address IP:169.254.1.5/255.255.0.0
If you are connecting to a PC in a LAN you must find a free address in this LAN (check with your IT-administrator).
If the TFTP server is in a different network, a gateway address has to be set up :
Redboot> fconfig bootp_my_gateway_ip
Finally the IP-address of the server (i.e. the PC were the image files are located) has to be setup (replace example 10.5.220.101 with actual address):
Redboot> fconfig bootp_server_ip 10.5.220.101
The complete configuration can be listed:
Redboot> fconfig –l –n
To activate the settings:
Redboot> reset
Now the AMC board will reset. Press Ctrl + C within 3 seconds to log on to Redboot again.
To test the IP connection to the server (use Ctrl-C to abort ping):
Redboot> ping –h <server-ip>
Note: Make sure that the server is able to reply. The TFTP Server program must be running. If the OS is Windows XP you might need to stop the Windows Firewall temporarily.
Example:
RedBoot> ping -h 169.254.232.100 Immediate response: Network PING - from 169.254.1.5 to 169.254.232.100 Response after 20 seconds: PING - received 10 of 10 expected
Complete FLASH image
Load image without the Bootloader, unlock, erase and program (all but RedBoot):
RedBoot> load -r -v -b 0x01008000 alpha_uimage_16.bin
The load process takes approx. 1 minute, and should complete without any error messages. When finnished a message saying "Raw file loaded 0x01008000-0x02f87fff, assumed entry at 0x01008000" will be displayed, and the RedBoot promt will reappear. Now run the unlock command:
RedBoot> fis unlock -f 0x50080000 -l 0x01f80000
The command should execute without any error messages, and the RedBoot promt will reappear. Run the erase command:
RedBoot> fis erase -f 0x50080000 -l 0x01f80000
The erase process takes approx. 4 minutes, and should complete without any error messages. When finnished the RedBoot promt will reappear. Now run the write command:
RedBoot> fis write -b 0x01008000 -f 0x50080000 -l 0x01f80000
When the process is finished the Redboot prompt RedBoot> will be displayed.
Finalizing the AMC
Switch off the power and:
- Turn switch S601 – 1 to OFF (disable Linux consol on serial port 1)
- Move jumper S700 to down position (2 – 3) to enable the watchdog
The AMC board is now ready for regular use.
Partition Update (optional)
The partitions can also be flashed independently. The general AlphaCom flash update command is fis alpha:
fis alpha [-v <version_string>] <image_name> (RedBoot | LinKern | RootFS | BackupFS | ALL)
Example:
Update to the Linux Kernel Image version 03:
Redboot> fis alpha –v 03 LinKern
Update to the Linux Root file system to version 10:
Redboot> fis alpha –v 10 RootFS
Note! The RedBoot image requires a reboot to RAM mode as for the complete update. The procedure is the same as for a complete update.
Important! Before confirming to flash be sure that the correct image is loaded without any errors. Check for previous error messages!
Important! The image name has to be supplied with the correct case (small and big letters). Redboot is not case sensitive to the image name, but the linux kernel searches for a RedBoot image case sensitive.
To list the partitions on the flash use:
Redboot> fis list