LANBIC Linux Setup Manual This document is the setup manuals of the SH-Linux evaluation environment for evaluating LANBIC as a Linux platform. [Setup Procedure] 1 Host PC I prepared to Fodera Core 2 PC as SH-GCC environment. Therefore, there is no operating result except the environment. 2 Toolchain Extend "toolchain_345.tar.gz" under any directory. Ex) # cp /.../toolchain_345.tar.gz /home # cd /home # tar zvxf toolchain_345.tar.gz # export PATH=/home/usr/local/bin:$PATH 3 Bootloader 3.1 Expand "ipl+eth.tar.gz" under any directory. Ex) # cp /.../ipl+eth.tar.gz /home # cd /home/ # tar xvzf ipl+eth.tar.gz 3.2 Bootloader compiling If the compiling of bootloader finishes normally, "sh-stub.srec" is made under "/ipl+eth". # cd ipl+eth/ # make 3.3 Writing bootloader If you write bootloader to the on-board flash memory, please setup these following process. 3.3.1 Change the on-board dip switch in order to start the monitor program in EPROM. +-------------------+-------------------------------+-------------------------------+ |AREA0 |Flash ROM |EEPROM | +-------------------+-------------------------------+-------------------------------+ |Bit |1 2 3 4 5 6 7 8 |1 2 3 4 5 6 7 8 | +-------------------+-------------------------------+-------------------------------+ |FROM Board SW1 |ON OFF OFF OFF OFF ON ON OFF|ON OFF OFF OFF OFF ON ON OFF| +-------------------+-------------------------------+-------------------------------+ |LANBIC CORE SW1 |ON OFF OFF OFF OFF OFF OFF OFF|ON ON ON OFF OFF OFF OFF OFF| +-------------------+-------------------------------+-------------------------------+ |LANBIC CORE SW3 |ON OFF OFF OFF ON OFF OFF OFF|ON OFF ON OFF ON OFF OFF OFF| +-------------------+-------------------------------+-------------------------------+ 3.3.2 Connect between CN6 of Lanbic Main Core board and the monitor PC via RS232 cross cable. 3.3.3 Start the terminal software on PC and set up the following serial communication protocol. Baud rate :38400kbps Data :8 bits Parity :none Stop :1 bit Flow control:none 3.3.4 The switch of the power supply (SW8) is turned on and confirm the following message on the terminal. ITS-DS7 monitor (38.4 Kbps SCIF2) Cache off -Little endian on EPROM 2004.04.23-01 Ver.4.2.1 for core + func > 3.3.5 Practice "LF" command, then confirm the following message on the terminal. > LF RAM Clear..... please send!('.'& CR stop load) 3.3.6 Open the Send file window ([File] -> [Send file...]). After you select "sh-stub.srec", the Flash ROM write program is started. If you confirm the followng message, the switch of the power supply (SW8) is turned off. Erasing. Writing. > 3.3.7 Dip switches are returned to the original setup and the switch of the power supply is turned on again, the updated bootloader is operated. 4 Root file system Extend "rootfs.tar.gz" under any directory. Ex) # cp /.../rootfs.tar.gz /home # cd /home # tar xvzf rootfs.tar.gz 5 Linux-kernel 5.1 Extend "linux-2.6.10.tar.gz" under any directory. Ex) # cp /.../linux-2.6.10.tar.gz /home # cd /home # tar xvzf linux-2.6.10.tar.gz 5.2 Kernel environment initializaton .config is the kernel configuration file. When the source code of sh-Linux is newly installed, it is necessary to initialize the compiler environment. # cp -p .config Config # make mrproper # cp -p Config .config 5.3 Kernel configuration If you operate the following command, you can see the kernel configuration window. # make menuconfig 5.4 Kernel compiling If compiling is finished normally, the kernel image file (zImage) is made under "arch/sh/boot/ " # make zImage Put "zImage" to the file system (under "/home/rootfs"). 6 Linux evaluation environment The SH-Linux evaluation environment achieves the network file system by using the DHCP function and the NFS server function of Linux PC. Therefore, you should set the DHCP server and the NFS server of Linux PC. Concretely, it is necessary to edit the following file. [DHCP server setup] # vi /etc/dhcpd.conf ddns-update-style ad-hoc; default-lease-time 600; max-lease-time 7200; log-facility local7; option domain-name-servers 192.168.10.100; subnet 192.168.10.0 netmask 255.255.255.0 { } host LANBIC { hardware ethernet **:**:**:**:**:**; # Target MAC Address fixed-address 192.168.10.232; # Target IP Address filename "/home/rootfs/zImage"; option root-path "/home/rootfs"; } [NFS server setup] # vi /etc/exports /home/rootfs 192.168.10.0/255.255.255.0(rw,sync,no_root_squash) [DHCP and NFS server restarting] # /etc/rc.d/init.d/portmap restart # /etc/rc.d/init.d/nfs restart # /etc/rc.d/init.d/nfslock restart # /etc/rc.d/init.d/dhcpd restart 7 Lanbic starting procedure 7.1 In order to operate the bootloader, the setup of the serial terminal is as follows. Baud rate :38400kbps Data :8 bits Parity :none Stop :1 bit Flow control:none 7.2 Bootloader starting An effective command is only "n" and "z" in this. That is, the linux kernel(zImage file) is downloaded from the LinuxPC(DHCP server) by "n" command. And, the linux kernel is started by "z" command.