Installing and Setting up Snapgear on Stareast
- Setting up linux and redboot on Stareast. Please refer to this document “Stareast Reference Manual” which comes with the Stareast boards.
- Instructions for making a 16MB Ramdisk (Updated Jan 15, 2006)
In default setting, the size of the ramdisk is 8M. While adding more applications into ramdisk, it will overflow. So we should build a 16M ramdisk in order to resolve this problem.First, in the root directory (This directory is arbitrary.):
#dd if=/dev/zero of=ramdisk_16m bs =1k count=16384
#mke2fs -vm0 ramdisk_16m
#mkdir /mnt/ramdisk_16m
#mount ramdisk_16m /mnt/ramdisk_16m -o loop
Copy the contents of the ../snapgear/romfs/ into the /mnt#cd snapgear/romfs/
#cp -r -f * /mnt/ramdisk_16m
Note: check the directory /romfs/dev/. If there is nothing in it, you should copy the dynamic devices from the file system ’../stareast.final_archive/images/ramdisk.4cards.gz’ to the 16M ramdisk.
#cd ../stareast.final_archive/images
#gunzip -d ramdisk.4cards.gz
#mkdir /tmp/ramdisk
#mount ramdisk.4cards /tmp/ramdisk -o loop
#cd /tmp/ramdisk/dev
#cp -Rvf * /mnt/ramdisk_16m/dev
(Unmount ramdisk image and gzip it)
#umount /mnt/ramdisk_16m
#umount /tmp/ramdisk
#gzip -vf9 /root/ramdisk_16m
(This should create ramdisk_16m.gz in your root directory)
Now the 16M filesystem has been setup, you may add the rebuilt applications to the corresponding directory.
- Kernel Configuration for Calexico driver. The sample kernel config file which can be used to compile Calexico driver can be found here . Note that calexico driver is for Linux-2.4.x kernel ONLY.
Note :For crypto configuration and compilation error. We have encountered that enabling Crypto library in snapgear kernel configuration results in compilation error. You can fix this error by copying kmap_types.hcd /your_snapgear_kernel_directory/snapgear/
cp linux-2.4.x/include/asm-alpha/kmap_types.h linux-2.4.x/include/asm/ - Calexico driver source for Station node—The sources for Calexico driver and the related patches can be downloaded from here . The following instructions will patch the driver for Stareast and can compiled against the stareast kernel configuration.
tar -xovf ipw2200-1.0.1.tar
cd ipw2200-1.0.1
patch -p1 < ../ipw2200-1.1-1.patch
patch -p1 < ../ipw2200-1.1-1-ixp425.patch
make KSRC=/your_snapgear_kernel_directory/snapgear/ - Copying driver files and updating ramdisk. Mount the ramdisk and copy driver files onto the appropriate directory
#gunzip -d your_ramdisk_image.gz
#mount your_ramdisk_image -o loop /mnt/ramdisk
#cd ipw2200-1.0.1
#mkdir /mnt/ramdisk/lib/modules/2.4.24-uc0/kernel/drivers/net/ipw2200
#cp -Rvf *.o /mnt/ramdisk/lib/modules/2.4.24-uc0/kernel/drivers/net/ipw2200/
- Copy hotplug scripts and firmware images and update ramdisk. The hotplug scripts can be found from here and firmware to load for calexico driver is available from here . Also update the /etc/rc(download from here ) startup script with this one to load calexico drivers at kernel satrtup.
cd /tmp
tar -xovf hotplug-scripts.tar
tar -xovf firmware-images-sta.tar
cp -Rvf hotplug-scripts/* /mnt/ramdisk/etc/
cp -Rvf firmware-images-sta/* /mnt/ramdisk/usr/lib/hotplug/firmware/
cp rc /mnt/ramdisk/etc/rc - Unmount ramdisk and compress ramdisk for loading onto Stareast board.
umount /mnt/ramdisk
gzip -vf9 your_ramdisk_image - Loading kernel image and ramdisk onto stareast.
You should press “Ctrl-C” to goto Redboot and stop the Linux kernel exectution.
Also setup the tftp server for proper downloading kernel images onto stareast through Ethernet. Also make sure to copy kernel image and ramdisk image onto /tftpboot directory.Execute the following commands in sequence.
Redboot>fis free
Redboot>fis init
Redboot>load -r -v -b 0×800000 your_ramdisk_image.gz
Redboot>fis create -b 0×800000 -l 0×600000 -f 0×50040000 -r 0×800000 ramdisk
Redboot>fis create -b 0×800000 -l 0×600000 ramdisk
Redboot>load -r -v -b 0×1600000 zImage-2.4-ipw
Redboot>fis create -b 0×1600000 -l 0×100000 -f 0×50600000 -r 0×01600000 zImage(Note here that length of ramdisk and zImage might be different for your kernel configuration and application setup).