Install MontaVista™ Linux® PE 3.1 on ADI® Coyote IXP425 Adviser : Dr Cheng (鄭伯炤) Author : Shower Tsai (蔡鎮宇) :
Outline Introduction Set up Host environment Compile kernel Image Set up Target Set up Server Hello world Kernel module IXP400 Software Codelet
Introduction ADI coyote ixp425 Environment Prepare
ADI Coyote IXP425 LAN port WAN port Phone port Mini PCI slot power Intel® IXP425™ Reset Flash USB 1.1 Rs-232
Development Environment Host computer Target board Serial (Initial setup) NFS mount Network (Most work) Hard device TFTP server zImage DHCP server NFS server MVL Mini com
Preparing Development System OS Mandrake® 8.1 (on x86) Red Hat® 7.3 or 9.0 (on x86) SuSE® 9.0 (on x86) Solaris™ 8 (on Sparc™) Windows® 2000/XP MontaVista™ Linux® PE 3.1 File ipl_ixp400accesslibrarywithcrypto-1_5.zip (include access library and drivers ) ixp400linuxethernetdriverpatch-1_2.zip ixp400linuxintegrationpatch-1_2.zip (For kernel path and config : CONFIG_IXP425_ETH) ipl_ixp400npelibrarywithcrypto-1_5.zip
Initial process (1/2) Use Minicom / hyper terminal logon Redboot Install Linux 7.2 / 7.3 with all packages and shut down the firewall Configure TFTP 、 DHCP 、 NFS server Press Ctrl + C to stop Redboot execute script Install MVL PE 3.1 Host Binaries 、 arm_xscale_be 、 intel-ixdp425 LSP on Host and compile zImage Edit script and network configuration copy the zImage to /tftpbootPress reset and restart Target HOSTTARGET
Initial process (2/2) Target execute script Target download zImage from TFTP Auto decompress zImage and initial MontaVista Linux OS MVL OS get network information from DHCP MVL OS connect to NFS server Complete the process and then enter “root” to use the system Turn on TARGET
Set up Host environment Install MVL 3.1
Install MontaVista™ Linux® Version 3.1 Host Binaries Insert CD1 : MontaVista™ Linux® Version 3.1 Host Binaries Enter /mnt/cdrom/ install to install MontaVista™ Linux®
Install MVL 3.1 Host Binaries Open Web Browser , fill the URL with “ “
Install MVL 3.1 Host Binaries License agreement
Install MVL 3.1 Host Binaries Select full installation
Install MVL 3.1 Host Binaries Make sure everything is right and the press “next”
Install MVL 3.1 Development Environment Insert CD2 : MontaVista™ Linux® Version 3.1 Development Environment
Install MVL 3.1 Development Environment Agree license
Install MVL 3.1 Development Environment Make sure everything is right and the press “next”
Install MVL 3.1 Development Environment Installing
Install MVL 3.1 ADI coyote LSP arm_xscale_be Insert CD3 : MontaVista™ Linux® Version 3.1 ADI Coyote LSP arm_xscale_be
Install MVL 3.1 Development Environment Select ADI coyote Reference Platform
Install MVL 3.1 cross arm_xscale_be Insert CD4 : MontaVista™ Linux® Version 3.1 cross arm_xscale_be
Install MVL 3.1 target arm_xscale_be Insert CD5 : MontaVista™ Linux® Version 3.1 target arm_xscale_be
Install MVL 3.1 target arm_xscale_be
Select “skip”
Install MVL 3.1 target arm_xscale_be Finish
Compile kernel Image Get the file Patch Compile zImage
File you need go and downloadwww.intel.com ipl_ixp400accesslibrarywithcrypto-1_5.zip ipl_ixp400npelibrarywithcrypto-1_5.zip ixp400linuxethernetdriverpatch-1_2.zip ixp400linuxintegrationpatch-1_2.zip Unzip them to /root/nplab (work dir)
Patch the file Copy the file /opt/montavista/pro/devkit/lsp/adi- coyote-arm_xscale_be/linux _mvl31 linux Here has the source code of the kernel we need and then create a soft link “linux” point to the copy directory
Patch the file Fix ixp400_xscale_sw/buildUtils/environment.linux.sh linuxbe_KERNEL_DIR=/root/nplab/linux IX_XSCALE_SW=/root/nplab/ixp400_xscale_sw execute. environment.linux.sh
Patch the file Go to /root/nplab/linux patch -p1 <../ixp400LinuxKernel-BE-1_2.patch patch -p1 <../ixp400LinuxEthernetDriver-1_2.patch Go to /root/nplab Use ixp425_eth_update_nf_bridge- 1_2.patch to fix ixp425_eth.c
Start to compile zImage Go to /root/nplab/linux “make menuconfig” System Type ->IXP425 Implementation Options Network device support->Ethernet (10 or 100Mbit) Intel IXP425 Ethernet Device support
Start to compile zImage After “make menuconfig”,edit “.config” , patch Accesslibary CONFIG_IXP425_LIB=m make dep make zImage
Complete the compile We will have the “zImage” at /root/nplab/linux/arch/arm/boot Copy zImage to /tftpboot
Set up Target Configure moinicom Edit Script
Configure minicom Logon Linux by root “Minicom –s” to configure minicom
Configure minicom configure serial port by below
Configure minicom Exit Serial port setup and enter Modem and dialing
Configure minicom Clean A 、 B 、 K fields
Configure minicom Save setup as df1 Select “exit” to exit and connect to target Or select “exit from minicom” to exit
Edit Script Restart target. Press Ctrl+C to redboot
Edit Script At RedBoot Command line , enter “fconfig” to edit Script and network
Edit Script zImage 檔名
Edit Script Set Script waiting time before execute ( for example, wait 3 seconds )
Edit Script Set up your network
Edit Script Save and restart
Set up Server TFTP server DHCP server NFS server
Set up TFTP server Edit /etc/xinetd.d/tftp Change the “disable” field from “yes” to “no”
Set up TFTP server After save the file, execute etc/init.d/xinetd reload zImage will be copied to /tftpboot
Set up DHCP server Check dhcp.leases If not, use “touch”
Set up DHCP server Edit /etc/dhcp.conf
Set up DHCP server Restart DHCP server Run DHCP server when boot
Set up NFS server Edit /etc/exports Add “/opt/montavista/pro/devkit/arm/xscale_be/target *(rw,no_root_squash,no_all_squash)” Restart NFS
Set up NFS server Run NFS server when boot /sbin/chkconfig nfs on Sync NFS daemon : /usr/sbin/exportfs -ra
Hello world Set up executable search path Compile a program
The executable search path of Target 提供 Host 端使用 MontaVista™ Linux® 工具 Application : /opt/montavista/host/bin Man Pages : /opt/montavista/host/man Info Pages : /opt/montavista/host/info
The executable search path of host 提供 Host 端開發並可以在 Target 端執行的程 式 Application : /opt/montavista/devkit/arm/xscale_be/bin Man Pages : /opt/montavista/devkit/arm/xscale_be/ma n Info Pages : /opt/montavista/devkit/arm/xscale_be/inf o
The executable search path of Cross-development Application : /montavista/devkit/arm/xscale_be/target/bin Target : /bin /opt/montavista/devkit/arm/xscale_be/target/usr/bin Target : /usr/bin /opt/montavista/devkit/arm/xscale_be/target/sbin Target : /sbin /opt/montavista/devkit/arm/xscale_be/target/usr/sbin Target : /sbin /opt/montavista/devkit/arm/xscale_be/target/usr/share Target : /usr/share Man Pages : /opt/montavista/devkit/arm/xscale_be/target/usr/share/man Info Pages : /opt/montavista/devkit/arm/xscale_be/target/usr/share/info
Set up executable search path of Target 、 Host and Cross-development Set up Host Application path : /opt/montavista/pro/host/bin PATH=$PATH:/opt/montavista/pro/host/bin Then we can use the tool MontaVista™ Linux® provide ( ex. mvl-rpm ) montavista
Set up executable search path of Target 、 Host and Cross-development Set up Application path of Cross development : /opt/montavista/pro/devkit/arm/xscale_be/bin PATH=$PATH:/opt/montavista/pro/devkit/arm /xscale_be/bin Cross development Application perfix : xscale_be- ( ex. xscale_be-gcc ) montavista
Set up executable search path of Target 、 Host and Cross-development Edit /etc/profile Add Host Application path: /opt/montavista/pro/host/bin Add Cross development application path : /opt/montavista/pro/devkit/arm/xscale_be/bin
Hello world Create a directory “myapplication” Edit a progream : hellow.c
Hello world Use xscale_be-gcc to compile your c file Copy it to the directory where target mount /opt/montavista/pro/devkit/arm/xscale_be /target/root/
Execute the binary on target Logon on target and execute
Kernel module Create kernel module Install NPE-Ethernet driver
Create kernel module First, check the environment Go to /root/nplab and then use ”make module” to create kernel module
Create kernel module Execute make modules_install INSTALL_MOD_PATH=/~~~~ Install modules to the directory where target mount
Install NPE-Ethernet driver module Logon on target and use “lsmod” to show what modules have been loaded use “rmmod” to remove the module
Install NPE-Ethernet driver module Go to /lib/modules/2.4.20_mvl31- coyote/kernel/drivers/ixp400/
Install NPE-Ethernet driver module Ismod ixp400.o Go to /lib/modules/2.4.18_mvl30-ixdp425/kernel/drivers/net Ismod ixp425_eth.o
Configure ixp0 Configure the ip of ixp0 At same time, minicom~~~
IXP400 Software Codelet Install a codelet Test the codelet
Install ixp400 software codelet driver module Go to /lib/modules/2.4.18_mvl30- ixdp425/kernel/drivers/ixp400/ Ismod ixp400.o Ismod ixp400_codelets_ethAcc.o with operationType=1
Test codelet At same time, minicom~~ ixp0 擷取到由 Test 所產生的封包