StarEast with Snapgear 3.3.0 Setup Manual
StarEast with Snapgear 3.3.0 Setup Manual
Author:
Jackie Wu (jackie.wu@intel.com)
Table of Contents
1 Introduction
2 Target:
3 Installation
3.1 GNU Make
3.2 Sharutils
3.3 Snapgear-3.3.0 with IAL patch installation
3.4 Building
3.5 Hotplug support
3.6 /etc/rc modification
3.7 IPW driver building
1. Introduction
This manual is a supplement to “StarEast Multi-Radio Wireless Platform Reference Manual.doc”. The audients are assumed having experience on setting up the StarEast cross-building environment based on Snapgear-3.1.1.
This manual is to update Snapgear-3.1.1 to Snapgear-3.3.0 and update kernel from 2.4.x to 2.6.x. Based on existing Snapgear-3.1.1 cross-building environment, using this manual can create a 2.6.x kernel image and related ramdisk to run on StarEast.
The steps that have not been talked in this document can be referred to the “StarEast Multi-Radio Wireless Platform Reference Manual.doc”.
2. Target:
a) Build kernel image with Linux 2.6.* based on Snapgear distribution.
b) Integrate Intel IXP Access Library 2.0 to use latest Ethernet driver.
c) Make ramdisk to support ipw2200 driver, including hotplug support.
3 Installation
3.1 GNU Make
The GNU make version 3.80 and up has to be required to compile Intel AccessLibrary code as part of Snapgear Source distribution. “make –v” can check the version of the make on the host machine.
3.2 Sharutils
Sharutils should be used to patch the IAL patch into Snapgear.
a) Download sharutils-4.6.2.tar.gz from http://www.gnu.org/software/sharutils/. Higher version should be OK.
b) tar zxvf sharutils-4.6.2.tar.gz
c) ./configure
d) make; make install
3.3 Snapgear-3.3.0 with IAL patch installation
a) Download Snapgear-3.3.0 distribution from http://ftp.snapgear.org/pub/snapgear/src/snapgear-3.3.0.tar.gz.
b) Download Snapgear IXP400 Intel Access Library patch from http://ftp.snapgear.org/pub/snapgear/src/snapgear-modules-20051115.sh
c) Download the Intel access library (v2.0) from http://www.intel.com/design/network/products/npfamily/download_ixp400.htm
d) Run “./ snapgear-modules-20051115.sh” to extract patch files to a folder. There should be a file “README” to tell you how to install snapgear and how to patch the IAL patch into snapgear.
We choose CSR-2.0 without crypto code as the IAL version.
Note: This step need “sharutils” in 3.2 to extract the patch files.
e) Download the Linux tool chain (arm-linux-tools-20031127) from http://www.snapgear.org/snapgear/downloads.html. There is higher version of the tool chain (arm-linux-tools-20051123) that is assumed working well. But in this manual, we used arm-linux-tools-20031127 in testing, which is same as that in Snapgear-3.1.1. (So this step can be skipped if you have already the cross-building environment for Snapgear-3.1.1)
f) Apply the following patch to snapgear folder to fix bug on serial port 1.
3.4 Building
We assume the Snapgear folder is in $(rootdir). It’s the folder you extract the snapgear-3.3.0.tar.gz.
Once you rebuild the kernel image, you must recompile and build the driver as well as the modules.
In Snapgear-3.3.0 building environment, there are 3 parts- Kernel, external modules and User apps. The external modules in our building are the IAL related modules, including ixp4xx ethernel NIC driver.
cd $(rootdir)
make menuconfig
Go to snapgear setup GUI.
Vendor/Product Selection—->—-Select the Vendor you wish to target
Intel—-Select the Product you wish to target
IXDP425
Kernel/Library/Defaults Selection—->
(linux-2.6.x) Kernel Version
(glibc) Libc Version
[*]Customize Kernel Settings
[*]Customize Module Settings
[*]Customize Vendor/User Settings
Save setting and exit. Then go to kernel setup GUI.
System Type—->
ARM system type (IXP4xx-based)
Intel IXP4xx Implementation Options
[*]Build big-endian kernel
Boot Options—->
Default kernel command string
console=ttyS1,115200 root=/dev/ram0 initrd=0×00800000,16M mem=64M@0×00000000
[Note: Easier to edit it directly in $(rootdir)/linux-2.6.x/.config]
Devices Drivers—->
Generic Driver Options—->
<*> Hotplug firmware loading support
Block devices—->
<*> Loopback device support
(16384) Default RAM disk size (Kbytes)
Networking support—- >
Networking support—- >
Networking options—- >
Wireless LAN (non-hamradio)—- >
[*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
Input device support—- >
Unselect all input device to reduce size of kernel.
Network File Systems—- >
[*] Provide NFSv3 client support
[*] Provide NFSv4 client support
Kernel hacking—- >
Options in this folder can be used to print more debugging information of kernel.
Save setting and exit. Then go to modules setup GUI.
XSCALE/IXP400 Modules—- >
(2.0) Intel Access Library version
[] Names network interfaces as eth, not ixp. (Unselect for convenience)
Save setting and exit. Then go to User apps setup GUI.
Network Applications—- >
[*] bridge utils—- Net-tools
[*] arp—- Wireless-tools
[*] wireless_tools support
[*] iwconfig
[*] iwgetid
[*] iwlist
[*] iwpriv
[*] iwspy
Save setting and exit.
make
The ramdisk and zImage will be generated and copied to /tftpboot.
The ramdisk created here is only 8M. Actually you can create bigger (16M) or use original ramdisk. Then copy all under $(rootdir)/romfs to the ramdisk.
To create 16M ramdisk:
#dd if=/dev/zero of=ramdisk_16m bs=1k count=16384
#mke2fs –vm0 ramdisk_16m
#mount ramdisk_16m /mnt –o loop
#cp –rf $(rootdir)/romfs/* /mnt
#gzip –vf9 ramdisk_16m
3.5 Hotplug support
To support hotplug, we need to add hotplug userspace agent to ramdisk.
a) Download hotplug-2004_09_23.tar.gz from http://kernel.org/pub/linux/utils/kernel/hotplug/. Extract it to a folder $(hotplug_install)
b) #cp –r $(hotplug_install)/etc /mnt
c) #cp –r $(hotplug_install)/sbin /mnt
3.6 /etc/rc modification
To support hotplug function, we need to start sysfs support when the system boot. Add code as following:
mount –t proc proc /proc
mount –o remount,rw /dev/root /
mkdir /sys
mount –t sysfs /sys /sys
ifconfig lo 127.0.0.1
To setup Ethernet NIC driver, modify following code:
ifconfig lo 127.0.0.1
modprobe ixp400
cat /etc/IxNpeMicrocode.dat > /dev/ixNpe
modprobe ixp400_eth
ifconfig ixp0 *.*.*.*
3.7 IPW driver building
To build ipw driver, run following command from the directory where IPw2200 driver is untarred:
#make KSRC=$(rootdir) ARCH=arm