SH7763RDP Linux manual 1. Specification kernel = 2.6.27 boot loader = U-Boot 2008.10 tool chain GCC 4.1.2 glibc 2.7-rc1 binutils 2.7-rc1 kernel-headers 2.6.23-rc2 userland (rootfs) = Choosen and cross compiled from gentoo packages 2. Supported Device scif2 mtd usb host sh_eth mmc host lcdc hac 3. BSP quick starter 3.1 Host cross enviroment setup You can simply extract cross_toolcahin archive and add path to its directory < How to install > (1) Copy installer(install.sh) from 20081022/installer/install.sh (2) Copy data from 20081022/corss-sh4--unknown-linux-gnu/* (3) Execute install.sh script PC# cp -rf /xxx/20081022/installer/ /xxxx/. PC# cp -rf /xxx/20081022/cross-sh4--unknown-linux-gnu/ /xxxx/. PC# cd installer/ PC# ./install.sh You can confirm your installation by following command [root@localhost home]# sh4-unknown-linux-gnu-gcc -v Using built-in specs. Target: sh4-unknown-linux-gnu Configured with: /var/tmp/cross/sh4-unknown-linux-gnu/portage/cross-sh4-unknown-linux-gnu/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/usr --bindir=/usr/i486-pc-linux-gnu/sh4-unknown-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/lib/gcc/sh4-unknown-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/sh4-unknown-linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/sh4-unknown-linux-gnu/4.1.2/man --infodir=/usr/share/gcc-data/sh4-unknown-linux-gnu/4.1.2/info --with-gxx-include-dir=/usr/lib/gcc/sh4-unknown-linux-gnu/4.1.2/include/g++-v4 --host=i486-pc-linux-gnu --target=sh4-unknown-linux-gnu --build=i486-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++ --with-sysroot=/usr/sh4-unknown-linux-gnu --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2) 4. How to build from source 4.1 U-boot [root@localhost]# tar -xjf /xxx/u-boot-2008.10-sh7763rdp.tar.bz2 [root@localhost]# cd u-boot-2008.10-sh7763rdp [root@localhost]# make sh7763rdp_config Configuring for sh7763rdp board... [root@localhost]# make (snip) 4.2 Kernel [root@localhost]# tar -xjf /xxx/linux-2.6.27-sh7763rdp.tar.bz2 [root@localhost]# cd linux-2.6.27-sh7763rdp [root@localhost]# make uImage ....... (arch/sh/boot/uImage) 4.3 Userland Please create /tftpboot/rootfs directory and defrost the userland. [root@localhost]# mkdir /tftpboot/rootfs [root@localhost]# cd /tftpboot/rootfs [root@localhost]# tar -xjf /xxxx/rootfs-gentoo-sh7763-20081022.tar.bz2 5. Flash memory mapping 0x00000000 - 0x00040000 : U-BOOT 0x00040000 - 0x00240000 : KERNEL 0x00240000 - 0x04000000 : ROOT FILESYSTEM(not used) 6. Host bootp / NFS setup 6.1 Host network setup I explain by the following network setting. IP address 192.168.10.30 netmask 255.255.255.0 Broadcast address 192.168.10.255 gateway 192.168.10.1 6.2 /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.230; next-server 192.168.10.30; server-identifier 192.168.10.30; option optin-129 code 129 = string; option domain-name "test"; allow booting; allow bootp; subnet 192.168.10.0 netmask 255.255.255.0{ } host sh7763rdp{ hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address 192.168.10.63; filename"/rootfs/uImage"; option root-path "/tftpboot/rootfs"; } 6.2 /etc/exports /tftpboot/ 192.168.10.0/255.255.255.0(rw,sync,no_root_squash) 6.3 /etc/xinetd.d/tftp # default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 } 6.4 startup network Then startup network servece on your host machine. [root@localhost ~]# exportfs -a [root@localhost ~]# /etc/rc.d/init.d/portmap restart Stopping portmap: [ OK ] Starting portmap: [ OK ] [root@localhost ~]# /etc/rc.d/init.d/nfs restart Shutting down NFS mountd: [ OK ] Shutting down NFS daemon: [ OK ] Shutting down NFS quotas: [ OK ] Shutting down NFS services: [ OK ] Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS daemon: [ OK ] Starting NFS mountd: [ OK ] [root@localhost ~]# /etc/rc.d/init.d/nfslock restart Stopping NFS locking: [ OK ] Stopping NFS statd: [ OK ] Starting NFS statd: [ OK ] [root@localhost ~]# /etc/rc.d/init.d/dhcpd restart Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ] [root@localhost ~]# service xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ] 7. console connection bitrate 115200 bps data length 8bit parity none stop bit 1bit 8. Boot Please switch on the board. If work U-Boot, setup board's MAC address and save environment. => setenv ethaddr XX:XX:XX:XX:XX:XX => saveenv Please input "bootp" on U-Boot. U-boot downloads Linux kernel image(uImage) from TFTP server. Please input "bootm" on U-Boot. Boot Linux kernel. 9. MMC setup / how to use You can use ext2/vfat formatting MMC card. We tested Sanyo MMC card 32MB and Panasic 512MB SD card only. how to use Please insert your MMC card to board. oprofile: using timer interrupt. TCP cubic registered NET: Registered protocol family 1 NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. mmc0: new MMC card at address 0001 mmcblk0: mmc0:0001 SDMB-32 31360KiB mmcblk0: p1 net eth0: attached phy 1 to driver Generic PHY You can mount mmc card follow commands. # mount /dev/mmcblk0p1 /mnt 10. about LCDC 10.1 LCDC driver This driver support 640x480x16bit(VGA connecter) and 800x400x16bit(Wide VGA panel). We checked on Dell E171FP DirectFB demo You can use DirectFB demo.(df_andi , etc..) 10.2 How to execute DirectFB application In order to execute the application of DirectFB-example, please install module drivers and specify the path of DirectFB library. # insmod /lib/modules/2.6.27/drivers/char/fusion/fusion.ko # export LD_LIBRARY_PATH=/usr/local/sh4-linux/lib # cd /usr/local/sh4-linux/bin/ # ./df_andi & 11. How to use sound Please update userland. How to play sound (2.1) Use front speaker (2.1.1) Connect Please connect a speaker to terminal for SH7763RDP front speaker(J6). (2.1.2) How to check 1. Please set front speaker volum. $ amixer set Master 100 $ amixer set Headphone 100 $ amixer set PCM 100 2. Please play a wav file with aplay command. $ aplay test.wav (2.2) Use rear speaker (2.2.1) Connect Please connect a speaker to terminal for SH7763RDP rear speaker(J6). (2.2.2) How to check 1. Please set rear speaker volum. $ amixer set Master 100 $ amixer set Headphone 100 $ amixer set PCM 100 2. Please play a wav file with aplay command. $ aplay test.wav (2.3) Play sound from line-in with front speaker (2.3.1) connect 1. Please connect a speaker to terminal for SH7763RDP front speaker(J6). 2. Please connect a line-in to terminal for SH7763RDP microphone(J4). (2.3.2) How to check 1. Please set front speaker volum. $ amixer set Master 100 $ amixer set Headphone 100 $ amixer set PCM 100 2. Please input sounds from a mic. 3. Please check that a sound is output by a front speaker. Recording check (3.1) Use microphone (3.1.1) Connect 1. Please connect a speaker to terminal for SH7763RDP front speaker(J6). 2. Please connect a mic to terminal for SH7763RDP microphone(J5). (3.1.2) How to check 1. Please set front speaker volum. $ amixer set Master 100 $ amixer set Headphone 100 $ amixer set PCM 100 2. Please execute arecord comamnd, and input sounds from a microphone. $ arecord -t wav -d 7 rec_test.wav -f S16_LE -c2 -r 44100 -v Plaese input sounds from a microphone. 3. Please play wav file(rec_test.wav) which was taped by arecord command and check that the sound that taped is output by a front speaker. $ arecord rec_test.wav 12. source code Please contact to the following e-mail address when you want to obtain a source code. info (at) superh-linux (dot) org -- This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)