*********************************************** - README - MigoR(SH7722) BSP BSP Ver 1.0 (20080526) *********************************************** - kernel = 2.6.24.2 - boot loader = uboot 1.3.2 - tool chain -- GCC 4.2 ( specially tuned KPIT v701 for SH-4AL core ) -- glibc 2.5 -- binutils 2.17 - userland (rootfs) = Choosen and cross compiled from Fedora6 packages - Supported Device driver -- smc91x -- keysc -- mtd --- NOR --- NAND -- i2c -- touchscreen -- lcdc --- qvga --- wvga for RTA platform -- usb function (m66592) -- sdcard --- SD require special firmware (BIOS) upon license agreement --- See SD part of following BSP operation note -- mmc --- mmc require SD firmware as well as SD -- vpu -- siu -- vio/camera: - Unsupported device -- usb host (m66596) [intentionally config disabled] --- See USB part of following BSP operation note - BSP quick starter -- Target rootfs [root@localhost test]# cd /tftpboot [root@localhost test]# tar rootfs-migor-20080702.tar.bz2 -- Kernel compile [root@localhost test]# tar jxf linux-2.6.24-20080526.tar.bz2 [root@localhost linux-2.6.24]# cd linux-2.6.24 [root@localhost linux-2.6.24]# make [root@localhost linux-2.6.24]# cp arch/sh/boot/zImage /tftpboot/rootfs/. -- U-boot [root@localhost test]# tar jxf u-boot-sh-migor-20080326.tar.bz2 [root@localhost test]# make MigoR_config [root@localhost test]# make - Host cross enviroment setup * You can simply extract cross_toolcahin archive and add path to its directory [root@localhost test]# tar zxf gnush4-nofpu_linux_v0701-1.tar.gz [root@localhost test]# export PATH=/home/test/usr/share/gnush4-nofpu_linux_v0701-1/bin/:$PATH * You can confirm your installation by following command [root@localhost test]# sh3-linux-gcc -v Using built-in specs. Target: sh3-linux Configured with: /home/kpit/fsfsrc/v0701/gcc-4.2-20061205/configure --host=i686-linux --target=sh3-linux --prefix=/usr/share/gnush4-nofpu_linux_v0701-1 --with-cpu=sh4-nofpu --with-sysroot=/usr/share/gnush4-nofpu_linux_v0701-1/sh3-linux/sys-root --with-local-prefix=/usr/share/gnush4-nofpu_linux_v0701-1/sh3-linux/sys-root --disable-nls --enable-threads --enable-symvers=gnu --disable-__cxa_atexit --enable-languages=c,c++ --enable-c99 --enable-long-long --disable-multilib Thread model: posix gcc version 4.2-SH4-LINUX_v0701 * Note : Though SH-MobileR (SH7722) CPU core is SH-4AL, we use "sh3-linux-gcc" compiler. This toolchain is not for generic SH-3 nor SH-4(A), it is specially configured for SH-4AL CPU. - Host bootp / NFS setup * MIGO-R requires bootp and NFS capablities on host machine -- You need to modify /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 "rso"; allow booting; allow bootp; subnet 192.168.10.0 netmask 255.255.255.0{ } host migor{ hardware ethernet 00:00:00:07:08:09; fixed-address 192.168.10.233; filename"/rootfs/zImage"; option root-path "/tftpboot/rootfs"; } ----------------------------------------------------------------------------/ -- You need to modify /etc/exports --> config sample /---------------------------------------------------------------------------- /tftpboot/ 192.168.10.0/255.255.255.0(rw,sync,no_root_squash) ----------------------------------------------------------------------------/ -- You need to modify /etc/inetd.d/tftp --> config sample /---------------------------------------------------------------------------- # 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 ----------------------------------------------------------------------------/ * 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 ] - Console connection bitrate 115200 bps data length 8bit parity none stop bit 1bit - BSP operation note -- LCD selection (default QVGA or RTA WVGA ) 1. we have prepared separate kernel config file * QVGA --> use "config-qvga" * WVGA --> use "config-wvga" 2. You can also define LCD panel selection by kernel-config setting # make menuconfig --> System type --> Migo-R LCD Panel Board Selection - QVGA (320*240) - RTA WVGA (800*480) -- USB host (on-board m66596) We have intentionaly disabled on-board USB host, though we have already ported m66596 device support within current BSP. Renesas m66506 does not issue interrupt signal when USB coneection was detached then it requres software polling routine to confirm USB is still connected, and it means all class driver need to be modified to add this polling capability. Finally we thoughr that m66506 is not designed for Linux system and we intentionally disabled m66596 support in our MIGO-R BSP. Note that m66597 fixed this problem and works fine with various Linux USB class driver. If you still want to utilize on-board m66596, you need to modify each combined class driver code and test it by yourself. USB function (m66592 compatible on-chip IP block) -bash-3.00# modprobe g_file_storage file=/dev/ram0 g_file_storage gadget: File-backed Storage Gadget, version: 7 August 2007 g_file_storage gadget: Number of LUNs=1 g_file_storage gadget-lun0: ro=0, file: /dev/ram0 g_file_storage gadget: high speed config #1 < Make removable disk of 4MB > -- SD driver When you use SD interface, you must be a SD association member. [root@localhost ~]# cp u-code.bin /tftpboot/rootfs/lib/firmware/ -bash-3.00# modprobe sh7722_sd & 780 -bash-3.00# echo 1 > /sys/class/firmware/sh7722-sdhi/loading -bash-3.00# cat /lib/firmware/u-code.bin > /sys/class/firmware/sh7722-sdhi/data -bash-3.00# echo 0 > /sys/class/firmware/sh7722-sdhi/loading -bash-3.00# mmc0: new high speed SDHC card at address 6c44 mmcblk0: mmc0:6c44 SV04G 3870720KiB mmcblk0: p1 -bash-3.00# mount -t vfat /dev/sd1 /mnt/sd/ -bash-3.00# - Log for reference -- uboot startup log ** MIGO-R uboot is designed for network based development environment --- kernel loaded from Linux host machine using bootp protcol --- When kernel image successfully loaded and uboot prompt comes up, type "go 8d000000" to start Linux kernel --- userland (rootfs) is mounted as NFS /---------------------------------------------------------------------------------------- U-Boot 1.3.2-gcfec008e (Mar 19 2008 - 18:33:27) CPU: SH4 BOARD: Renesas MigoR DRAM: 64MB FLASH: 64MB In: serial Out: serial Err: serial Net: => bootp Warning: MAC addresses don't match: HW MAC address: FF:FF:FF:FF:FF:FF "ethaddr" value: 00:00:00:07:08:09 Using MAC Address 00:00:00:07:08:09 BOOTP broadcast 1 TFTP from server 192.168.10.30; our IP address is 192.168.10.233 Filename '/rootfs/zImage'. Load address: 0x8d000000 Loading: ################################################################# ################################################# done Bytes transferred = 1662140 (195cbc hex) => go 8d000000 ----------------------------------------------------------------------------------------/ -- kernel start log /---------------------------------------------------------------------------------------- ## Starting application at 0x8D000000 ... Linux version 2.6.24.2 (root@localhost.localdomain) (gcc version 4.2-SH4-LINUX_v0701) #1 PREEMPT Mon May 26 20:42:43 JST 2008 console [sercon0] enabled Booting machvec: Migo-R Node 0: start_pfn = 0xc000, low = 0x10000 Node 1: start_pfn = 0x55f0, low = 0x5610 Zone PFN ranges: Normal 22000 -> 65536 Movable zone start PFN for each node early_node_map[2] active PFN ranges 1: 22000 -> 22032 0: 49152 -> 65536 Built 2 zonelists in Node order, mobility grouping on. Total pages: 16288 Policy zone: Normal Kernel command line: console=tty0 console=ttySC0,115200 earlyprintk=serial ip=on ignore_loglevel root=/dev/nfs ip=dhcp debug: ignoring loglevel setting. PID hash table entries: 256 (order: 8, 1024 bytes) Using tmu for system timer Using 8.333 MHz high precision timer. Console: colour dummy device 80x25 console [tty0] enabled Linux version 2.6.24.2 (root@localhost.localdomain) (gcc version 4.2-SH4-LINUX_v0701) #1 PREEMPT Mon May 26 20:42:43 JST 2008 console [sercon0] enabled Booting machvec: Migo-R Entering add_active_range(0, 49152, 65536) 0 entries of 2 used Entering add_active_range(1, 22000, 22032) 1 entries of 2 used Node 0: start_pfn = 0xc000, low = 0x10000 Node 1: start_pfn = 0x55f0, low = 0x5610 Zone PFN ranges: Normal 22000 -> 65536 Movable zone start PFN for each node early_node_map[2] active PFN ranges 1: 22000 -> 22032 0: 49152 -> 65536 On node 0 totalpages: 16384 Normal zone: 128 pages used for memmap Normal zone: 0 pages reserved Normal zone: 16256 pages, LIFO batch:3 Movable zone: 0 pages used for memmap On node 1 totalpages: 32 Normal zone: 0 pages used for memmap Normal zone: 0 pages reserved Normal zone: 32 pages, LIFO batch:0 Movable zone: 0 pages used for memmap Built 2 zonelists in Node order, mobility grouping on. Total pages: 16288 Policy zone: Normal Kernel command line: console=tty0 console=ttySC0,115200 earlyprintk=serial ip=on ignore_loglevel root=/dev/nfs ip=dhcp debug: ignoring loglevel setting. PID hash table entries: 256 (order: 8, 1024 bytes) Using tmu for system timer Using 8.333 MHz high precision timer. Console: colour dummy device 80x25 console [tty0] enabled Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 61740k/65664k available (1904k kernel code, 591k data, 112k init) PVR=10300800 CVR=01440111 PRR=00000a10 I-cache : n_ways=4 n_sets=256 way_incr=8192 I-cache : entry_mask=0x00001fe0 alias_mask=0x00001000 n_aliases=2 D-cache : n_ways=4 n_sets=256 way_incr=8192 D-cache : entry_mask=0x00001fe0 alias_mask=0x00001000 n_aliases=2 Calibrating delay loop... 132.60 BogoMIPS (lpj=265216) Mount-cache hash table entries: 512 CPU: SH7722 net_namespace: 64 bytes NET: Registered protocol family 16 SCSI subsystem initialized Time: SuperH clocksource has been installed. NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 2, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP reno registered JFFS2 version 2.2. (NAND) c 2001-2006 Red Hat, Inc. io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered Console: switching to colour frame buffer device 80x40 graphics fb0: registered sh_mobile_lcdc_fb/mainlcd as 320x240 16bpp. SuperH SCI(F) driver initialized sh-sci: ttySC0 at MMIO 0xffe00000 (irq = 80) is a scif console handover: boot [sercon0] -> real [ttySC0] sh-sci: ttySC1 at MMIO 0xffe10000 (irq = 81) is a scif sh-sci: ttySC2 at MMIO 0xffe20000 (irq = 82) is a scif RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre eth0: SMC91C11xFD (rev 2) at b0000300 IRQ 32 [nowait] eth0: Ethernet addr: 00:00:00:07:08:09 eth0: PHY LAN83C183 (LAN91C111 Internal) Linux video capture interface: v2.00 vpu: Registered at major 61, irq 60 with 1024kb SDR buffer Driver 'sd' needs updating - please use bus_type methods physmap platform flash device: 04000000 at 00000000 physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 physmap-flash.0: CFI does not contain boot bank location. Assuming top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. RedBoot partition parsing not available Using physmap partition information Creating 3 MTD partitions on "physmap-flash.0": 0x00000000-0x00100000 : "uboot" 0x00100000-0x01000000 : "rootfs" 0x01000000-0x04000000 : "other" NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 286 at 0x023c0000 Bad eraseblock 4107 at 0x20160000 Bad eraseblock 4108 at 0x20180000 Bad eraseblock 4150 at 0x206c0000 Bad eraseblock 4151 at 0x206e0000 Bad eraseblock 4650 at 0x24540000 Bad eraseblock 4651 at 0x24560000 Bad eraseblock 4752 at 0x25200000 Bad eraseblock 4753 at 0x25220000 Bad eraseblock 4942 at 0x269c0000 Bad eraseblock 4943 at 0x269e0000 Bad eraseblock 5021 at 0x273a0000 Bad eraseblock 5022 at 0x273c0000 Bad eraseblock 5346 at 0x29c40000 Bad eraseblock 5347 at 0x29c60000 Bad eraseblock 5458 at 0x2aa40000 Bad eraseblock 5459 at 0x2aa60000 Bad eraseblock 5671 at 0x2c4e0000 Bad eraseblock 5672 at 0x2c500000 Bad eraseblock 5850 at 0x2db40000 Bad eraseblock 5851 at 0x2db60000 Bad eraseblock 6067 at 0x2f660000 Bad eraseblock 6068 at 0x2f680000 Bad eraseblock 6298 at 0x31340000 Bad eraseblock 6299 at 0x31360000 Bad eraseblock 6452 at 0x32680000 Bad eraseblock 6453 at 0x326a0000 Bad eraseblock 6872 at 0x35b00000 Bad eraseblock 6873 at 0x35b20000 Bad eraseblock 6919 at 0x360e0000 Bad eraseblock 6920 at 0x36100000 Bad eraseblock 7140 at 0x37c80000 Bad eraseblock 7141 at 0x37ca0000 Bad eraseblock 7169 at 0x38020000 Bad eraseblock 7170 at 0x38040000 Bad eraseblock 7171 at 0x38060000 Bad eraseblock 7187 at 0x38260000 Bad eraseblock 7188 at 0x38280000 Bad eraseblock 7436 at 0x3a180000 Bad eraseblock 7437 at 0x3a1a0000 Bad eraseblock 7670 at 0x3bec0000 Bad eraseblock 7671 at 0x3bee0000 Bad eraseblock 7827 at 0x3d260000 Bad eraseblock 7828 at 0x3d280000 Bad eraseblock 7830 at 0x3d2c0000 Bad eraseblock 7831 at 0x3d2e0000 Bad eraseblock 7896 at 0x3db00000 Bad eraseblock 7897 at 0x3db20000 Bad eraseblock 7952 at 0x3e200000 Bad eraseblock 7953 at 0x3e220000 Bad eraseblock 8091 at 0x3f360000 Bad eraseblock 8092 at 0x3f380000 Bad eraseblock 8135 at 0x3f8e0000 Bad eraseblock 8136 at 0x3f900000 Creating 2 MTD partitions on "NAND 1GiB 3,3V 8-bit": 0x00000000-0x20000000 : "nanddata1" 0x20000000-0x40000000 : "nanddata2" m66592_udc m66592_udc: version 18 Oct 2007 mice: PS/2 mouse device common for all mice input: sh_keysc as /class/input/input0 input: migor_ts as /class/input/input1 Advanced Linux Sound Architecture Driver Version 1.0.15 (Tue Nov 20 19:16:42 2007 UTC). siu-sh7343: initialized. ALSA device list: #0: Renesas sh7343 SIU irq 108 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. eth0: link down Sending DHCP requests .<6>eth0: link up, 100Mbps, full-duplex, lpa 0x45E1 ., OK IP-Config: Got DHCP answer from 192.168.10.30, my address is 192.168.10.233 IP-Config: Complete: device=eth0, addr=192.168.10.233, mask=255.255.255.0, gw=255.255.255.255, host=192.168.10.233, domain=rso, nis-domain=(none), bootserver=192.168.10.30, rootserver=192.168.10.30, rootpath=/tftpboot/rootfs Looking up port of RPC 100003/2 on 192.168.10.30 Looking up port of RPC 100005/1 on 192.168.10.30 VFS: Mounted root (nfs filesystem). Freeing unused kernel memory: 112k freed mount proc file system... mount sysfs file system... Remount file system... 192.168.10.233 login: ----------------------------------------------------------------------------------------/ END