R2D+ Linux Setup Manual This document is the setup manuals of the SH-Linux evaluation environment for evaluating R2D+ as a Linux platform. [Setup Procedure] 1 Host PC I prepared to Fodera Core 4 PC as SH-GCC environment. Therefore, there is no operating result except the environment. 2 Toolchain Extend "toolchain_345.tar.bz2" under any directory. Ex) # cp /.../toolchain_345.tar.bz2 /home # cd /home # tar jvxf toolchain_345.tar.bz2 # export PATH=/home/usr/local/bin:$PATH 3 Bootloader 3.1 Extend "iipl+eth-1.0.0-normal-20060906.tar.gz" under any directory. Ex) # cp /.../ipl+eth-1.0.0-normal-20060906.tar.gz /home # cd /home/ # tar xvzf ipl+eth-1.0.0-normal-20060906.tar.gz 3.2 Bootloader compiling If the compiling of bootloader finishes normally, "sh-stub.srec" is made under "/ipl+eth-1.0.0-normal". # cd ipl+eth-1.0.0-normal/ # make Please compile "ipl+eth-1.0.0-readonly-20060906.tar.gz" similarly. 4 Root file system Extend "rootfs-R2D+_20060906.tar.bz2" under any directory. Ex) # mkdir /home/rootfs # cp /.../rootfs-R2D+_20060906.tar.bz2 /home/rootfs # cd /home/rootfs # tar xvjf rootfs-R2D+_20060906.tar.bz2 5 Linux-kernel 5.1 Extend "linux-2.6.14.4-R2D+_20060906.tar.bz2" under any directory. Ex) # cp /.../linux-2.6.14.4-R2D+_20060906.tar.bz2 /home # cd /home # tar xvjf linux-2.6.14.4-R2D+_20060906.tar.bz2 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. # cd linux-2.6.14.4/ # cp -p .config ../ # make mrproper # cp -p ../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 # ls arch/sh/boot Makefile compressed zImage 6 Linux evaluation environment 6.1 Setting Linux PC for "NFS boot" 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 local6; option domain-name-servers 192.168.10.230; subnet 192.168.10.0 netmask 255.255.255.0 { range dynamic-bootp 192.168.10.101 192.168.10.234; # Target IP Address } group { filename "/home/rootfs/zImage"; option root-path "/home/rootfs/"; host 201 { hardware ethernet xx:xx:xx:xx:xx:x; } # Target MAC Address } [NFS server setup] # vi /etc/exports /home/rootfs 192.168.10.0/255.255.255.0(rw,no_root_squash) [DHCP and NFS server restarting] # exportfs -a # /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 6.2 Setting SH-Linux kernel for "NFS boot" # cd /home/linux-2.6.14.4/ # vi .config CONFIG_CMDLINE="mem=128M console=ttySC1,115200 root=/dev/nfs ip=bootp" # make menuconfig Networking ---> Networking options ---> [*] IP: kernel level autoconfiguration [ ] IP: DHCP support [*] IP: BOOTP support File system ---> Network File System ---> [*] Root file system on NFS (Please perform make after save) # make # cp arch/sh/boot/zImage /home/rootfs/. 6.3 NFS Boot method The following is a log at the time of NFS boot (Please input n and z). [ R0P751RLC0011RL ] : 2006 Board Rev. 2.1 < FPGA = 1.00 > Kernel Loader Rev. 3.01(m) SH IPL+eth version 1.0, Copyright (C) 2000 Free Software Foundation, Inc. This software comes with ABSOLUTELY NO WARRANTY; for details type `w'. This is free software, and you are welcome to redistribute it under certain conditions; type `l' for details. PCI: SH7751 PCI host bridge found. PCI:RTL8139 device found. > n n Booting from network! - ioaddr 0xfe242000, addr 00:00:87:6b:af:97 100Mbps full-duplex Searching for server (BOOTP/DHCP)... IP Address: 192.168.10.202 Server: 192.168.10.23 Kernel to load: "/home/gohda/plusR2D/rootfs/zImage" Loading Kernel: /home/gohda/plusR2D/rootfs/zImage .............. ................................................................ ................................................................ .........................................................SUM: d7ac335 done > z z Linux version 2.6.14.4_RTS7751R2D (root@localhost.localdomain) (gcc version 3.4.5 20060103 (3.4.5-10.1a)) #39 PREEMPT Tu e Sep 5 19:07:34 JST 2006 Renesas Technology Sales RTS7751R2D support. FPGA version:1 (revision:0) Built 1 zonelists Kernel command line: mem=64M console=ttySC1,115200 root=/dev/nfs ip=bootp (abbreviation) Concluded.