Intel® I/O Processors Linux - Debian Installation Guide June 2005 Order Number: 306507001US June 2005
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT.
Contents—Linux - Debian Contents 1 Introduction ...................................................................................................................................... 5 2 Host Setup ....................................................................................................................................... 6 2.1 2.2 2.3 2.4 2.5 Minicom Setup ......................................................................................................................
Linux - Debian—Contents Revision History Date Revision June 2005 001 June 2005 4 Description Initial Release.
Introduction—Linux - Debian 1 Introduction The following instructions were validated using an IA host system running Fedora Core 3. The target is an IQ80331 booted in a Cyclone Microsystems* PCI Backplane. These instructions are also useful to those using a different setup, however there may be slight changes to accommodate different hosts or targets. Updates will be made to these instructions as changes are reported.
Linux - Debian—Host Setup 2 Host Setup After the base install of the Linux distribution, ensure that the following packages are installed. minicom: This is a terminal emulation package for viewing the serial port console output of the Linux target system. lrzsz: X, Y, and Z modem support. Native Development Tools:For building the cross tool chain, a native version of GCC must be installed as well as various utilities needed by the build of the cross tool chain.
Host Setup—Linux - Debian On my Fedora Core 3 system, I have the following packages installed to meet these requirements: • • • • • • • • • • • • • • • • • • • Note: coreutils-5.2.1-31 dhcp-3.0.1-11 gawk-3.1.3-9 gcc-3.4.2-6.fc3 gcc-c++-3.4.2-6.fc3 grep-2.5.1-31.2 libgcc-3.4.2-6.fc3 lrzsz-0.12.20-19 make-3.80-5 minicom-2.00.0-19 openssh-3.9p1-7 openssh-clients-3.9p1-7 openssh-server-3.9p1-7 nfs-utils-1.0.6-44 sed-4.1.2-4 system-config-nfs-1.2.8-1 telnet-0.17-30 tftp-0.39-1 tftp-server-0.
Linux - Debian—Host Setup 2.1 Minicom Setup Follow these steps to configure the minicom terminal emulator: 1. Log in as root 2. Start minicom setup (“minicom -s”) 3. Select [Serial port setup] a. Change Serial Device to the appropriate com port (/dev/ttyS0 is COM1, /dev/ttyS1 is COM2 etc.) b. Change Bps/Par/Bits to 115200 8N1, this is the default setting for all the Customer Reference Board Evaluation Platforms. c. Change all flow control settings to No/Off 4. Select [Modem and dialing parameter setup] a.
Host Setup—Linux - Debian 2.3 DHCPD Server Setup Create or edit the file /etc/dhcpd.conf. The actual dhcpd.conf file may be different than this depending on the needs, however, this is a reasonable starting point. deny unknown-clients; ddns-update-style ad-hoc; allow bootp; subnet 192.168.0.0 netmask 255.255.255.0 { } group { option option option option broadcast-address 192.168.0.255; domain-name "xscale-iop.net"; routers 192.168.0.1; subnet-mask 255.255.255.0; host myiop.xscale.
Linux - Debian—Host Setup 2.4 NFS Server Setup When Intel XScale® microarchitecture-Linux target is using NFS for its root file system, it is necessary to export the appropriate directory via the NFS Server. These instructions assume the NFS mounted root file system is located on the server as “/exports/fs.xscale”. Edit the file “/etc/exports” and add the following line: /exports/fs.xscale *(rw,no_root_squash,sync) Create the NFS shared directory: # mkdir /exports/fs.
Target Firmware Setup—Linux - Debian 3 Target Firmware Setup Connect the ethernet port of the Intel XScale® microarchitecture CRB to the server secondary ethernet controller via a crossover cable or connect them both to a GbE hub. Connect the serial port of the CRB to the serial port of the server. Running “minicom” should allow viewing of the RedBoot console output from the board. Ensure that the latest RedBoot is installed on the CRB.
Linux - Debian—Target Firmware Setup When preferred, use the TFTP server to download the images. This is much faster that XModem. Copy the {board}-rom\install\bin\redboot.srec and {board}-ram\install\bin\redboot.srec to the TFTP server under unique names such as redboot-rom.srec and redboot-ram.srec. Then issue the following command sequence: RedBoot> load -m tftp redboot-ram.
Cross Toolchain—Linux - Debian 4 Cross Toolchain The next step in building a Linux system for running on Intel XScale® microarchitecture is to generate a cross-toolchain for building the kernel and applications from the IA Linux host. Currently, we use a toolchain built using the crosstool build scripts (http://kegel.com/crosstool). We currently build for the armv5l-linux target. After the latest version of the script is downloaded a couple changes need to be made: 1. Edit the arm-xscale.
Linux - Debian—Kernel 5 Kernel The next step is to build an appropriate kernel. IOP Kernel patches are available at http:// sourceforge.net/projects/xscaleiop/. Grab the latest 2.6 kernel patch, and the corresponding kernel source tarball from http://www.kernel.org/. The following commands will configure the 2.6.10 IOP kernel for an IQ80331 platform. $ mkdir ~/work $ cd ~/work $ wget http://aleron.dl.sourceforge.net/sourceforge/xscaleiop/patch-2.6.10-iop1.bz2 $ wget http://www.kernel.
Kernel—Linux - Debian Now test that the kernel boots. It is OK for there to be no root file system at this point. This is only a trial test of the kernel. Table 2 gives the parameter values for each of the SCD CRBs. Table 2.
Linux - Debian—Kernel Built 1 zonelists Kernel command line: ip=boot root=nfs console=ttyS0,115200 cachepolicy=writeallc PID hash table entries: 1024 (order: 10, 16384 bytes) Console: colour dummy device 80x30 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Memory: 128MB = 128MB total Memory: 126720KB available (2289K code, 445K data, 320K init) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) CPU: Testing write buffer
Distributions—Linux - Debian 6 Distributions There are numerous choices for the root file system or distribution. Some distributions, such as Debian, are desktop-type distributions that have been ported to the ARM processor family. These distributions will give much flexibility in terms of application availability and an active developer community. These distributions will typically take a reasonably large amount of disk space and will likely be inappropriate for installation into a flash disk.
Linux - Debian—Distributions 6.1 Installing Debian See http://www.debian.org for more information on the Debian distribution. There are three main branches of Debian: stable (currently codenamed Woody), testing (currently codenamed Sarge), and unstable (currently codenamed Sid). (See http://www.debian.org/releases/ for more information). Installers for both Testing and Unstable exist; however, there were issues installing directly.
Distributions—Linux - Debian 6. There is an issue with the dpkg program that is part of the Debian installer. It fails to create lock files correctly when they are located on an NFS drive. The particular lock files are located in /target/var/lib/dpkg, so we will address this issue by creating a RAM disk and mounting it as /target/var/lib. Execute the following commands: # mke2fs /dev/ram1 # mkdir -p /target/var/lib # mount -t ext2 /dev/ram1 /target/var/lib # exit 7.
Linux - Debian—Distributions At this point the Base Installation is complete and the board should reboot to the RedBoot prompt. When wanting to install to a locally attached hard disk, a similar procedure can be used with changes as follows: • In step 2 above, the installer should detect the hard disk and prompt for a partition and format the disk rather than having to enter NFS information. • Additional installation steps may be useful depending on the needs; swap disks, additional partitions, etc.
Distributions—Linux - Debian 6.1.2 Initial Debian System Configuration On the first boot of the new Debian installation, the base-config application will be run. This will do more configuration of the system. Please consult the Debian home page for help with this process. I generally skip running the “tasksel” and “dselect” processes until I have tweaked the configuration of my system as discussed next. When running Linux on any of the IOP HBA-type CRBs (i.e.
Linux - Debian—Distributions 6.1.4 Maintaining System Time With NTP and NTPDATE Issue the following commands to install and configure ntpdate to run: # apt-get install ntpdate To install and run the NTP daemon, issue the following commands: # apt-get install ntp Now we can rerun tasksel and dselect applications to select other programs and finish our installation. 6.1.5 Upgrading to Debian Testing To upgrade the Debian installation to testing: 1. First edit the file “/etc/apt/sources.list”. 2.