CraneBoard

From Texas Instruments Wiki
Jump to: navigation, search


CraneBoard

Introduction

Developed with Mistral Solutions, the CraneBoard provides developers a low cost development solution for Sitara AM3517 Cortex-A8 processor. The design offers designers a 4-layer PCB reference to enable their own products. CraneBoard offers peripherals, like CAN and PoE, that are not found on other low cost boards. Industrial, automotive, medical, consumer and a host of other applications can leverage this new low cost alternative to jump start their design and software development.

CraneBoard Out of the box experience

What's in the box?

Box contains a CraneBoard wrapped in an ESD Cover, followed by a bubble cover without any cables, documents and accessories.

Is there any factory default software flashed onto this board?

Yes x-loader, u-boot, kernel and JFFS2 root file system are flashed on the board.

Setup

  1. Connect UART cable to a UART port of Windows/Linux Machine.
  2. Connect Ethernet cable onto Ethernet connector on CraneBoard with another end connected to network port on LAN.
  3. Have terminal program, such as TeraTerm, HyperTerminal, or Minicom, running on the host machine.
  4. Configure the terminal program for (BAUD RATE - 115200, DATA - 8 bit, PARITY- none, STOP - 1bit, FLOW CONTROL - none)

Powering CraneBoard

Power ON the CraneBoard by one of the following options

  1. External Power Adapter can be used to power the board. (5V +/-3% ; 3A max)
  2. USB mini B to USB A cable can be used to power the board. Just connect the USB A side to Host machine and USB mini A side of cable to CraneBoard.
  3. PoE(Power over Ethernet) - If your ethernet supports PoE, you can connect the ethernet cable onto RJ45 connector on the CraneBoard

This should bring up the kernel and a snapshot of the log is shown below :

   Texas Instruments X-Loader 1.46 (Nov 29 2010 - 23:10:41)
   Starting OS Bootloader...
   U-Boot 2009.11 (Nov 29 2010 - 23:14:21)
   OMAP34xx/35xx-GP ES1.0, CPU-OPP2 L3-165MHz
   Craneboard + LPDDR/NAND
   I2C:   ready
   DRAM:  256 MB
   NAND:  256 MiB
   In:    serial
   Out:   serial
   Err:   serial
   Die ID #3cae0001000000000158b5fd0100d025
   Net:   davinci_emac_initialize
   Ethernet PHY: GENERIC @ 0x00
   EMAC ID 3c:2d:b7:90:e8:e2
   DaVinci EMAC
   Hit any key to stop autoboot:  0
   No MMC card found
   Booting from nand ...
   NAND read: device 0 offset 0x480000, size 0x500000
    5242880 bytes read: OK
   ## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-2.6.32
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2103408 Bytes =  2 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
    OK
   Starting kernel ...
   Uncompressing    Linux.................................................................................................................................... done, booting the kernel.
   Linux version 2.6.32 (sriharsha@localhost.localdomain) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 Mon Nov 29 23:22:22     IST 2010
   CPU: ARMv7 Processor [411fc087] revision 7 (ARMv7), cr=10c53c7f
   CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
   Machine: AM3517/05 CRANEBOARD
   Memory policy: ECC disabled, Data cache writeback
   AM3517 ES3.1 (l2cache iva sgx neon isp )
   SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x100000
   Reserving 4194304 bytes SDRAM for VRAM
   Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
   Kernel command line: console=ttyS2,115200n8 root=/dev/mtdblock4 rw rootfstype=jffs2 eth=3c:2d:b7:90:e8:e2 ip=dhcp
   PID hash table entries: 1024 (order: 0, 4096 bytes)
   Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
   Memory: 256MB = 256MB total
   Memory: 251392KB available (3640K code, 320K data, 152K init, 0K highmem)
   Hierarchical RCU implementation.
   NR_IRQS:368
   Clocking rate (Crystal/Core/MPU): 26.0/332/500 MHz
   GPMC revision 5.0
   IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
   Total of 96 interrupts on 1 active controller
   OMAP GPIO hardware version 2.5
   OMAP clockevent source: GPTIMER1 at 32768 Hz
   Console: colour dummy device 80x30
   Calibrating delay loop... 519.87 BogoMIPS (lpj=2027520)
   Mount-cache hash table entries: 512
   CPU: Testing write buffer coherency: ok
   regulator: core version 0.5
   NET: Registered protocol family 16
   mux: Could not set signal i2c2_scl
   mux: Could not set signal i2c2_sda
   mux: Could not set signal i2c3_scl
   mux: Could not set signal i2c3_sda
   OMAP DMA hardware revision 4.0
    bio: create slab <bio-0> at 0
   SCSI subsystem initialized
   usbcore: registered new interface driver usbfs
   usbcore: registered new interface driver hub
   usbcore: registered new device driver usb
   i2c_omap i2c_omap.1: bus 1 rev3.12 at 400 kHz
    i2c_omap i2c_omap.2: bus 2 rev3.12 at 400 kHz
   i2c_omap i2c_omap.3: bus 3 rev3.12 at 400 kHz
   Switching to clocksource 32k_counter
   musb_hdrc: version 6.0, cppi4.1-dma, otg (peripheral+host), debug=0
   AM3517 OTG revision 4ea41001, PHY f0036a2, control 00
   musb_hdrc: USB OTG mode controller at d0810000 using DMA, IRQ 71
   NET: Registered protocol family 2
   IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
   TCP established hash table entries: 8192 (order: 4, 65536 bytes)
   TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
   TCP: Hash tables configured (established 8192 bind 8192)
   TCP reno registered
   UDP hash table entries: 256 (order: 0, 4096 bytes)
   UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
   NET: Registered protocol family 1
   RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
   RPC: Registered tcp NFSv4.1 backchannel transport module.
   NetWinder Floating Point Emulator V0.97 (double precision)
   VFS: Disk quotas dquot_6.5.2
   Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
   JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
   msgmni has been set to 491
   alg: No test for stdrng (krng)
    io scheduler noop registered
   io scheduler deadline registered
   io scheduler cfq registered (default)
   OMAP DSS rev 2.0
    OMAP DISPC rev 3.0
   OMAP VENC rev 2
   Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
   serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
   serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
   serial8250.2: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
   console [ttyS2] enabled
   brd: module loaded
   loop: module loaded
   omap2-nand driver initializing
   NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)
   Creating 5 MTD partitions on "omap2-nand.0":
   0x000000000000-0x000000080000 : "xloader-nand"
   0x000000080000-0x000000400000 : "uboot-nand"
   0x000000400000-0x000000480000 : "params-nand"
   0x000000480000-0x000000e80000 : "linux-nand"
   0x000000e80000-0x000010000000 : "jffs2-nand"
   vcan: Virtual CAN interface driver
   CAN device driver interface
   TI High End CAN Controller Driver 0.7
   ti_hecc ti_hecc.1: device registered (reg_base=d0870000, irq=24)
   usbcore: registered new interface driver cdc_ether
   usbcore: registered new interface driver dm9601
   ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
   ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
   ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
   ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
   ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
   usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
   usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
   usb usb1: Product: OMAP-EHCI Host Controller
   usb usb1: Manufacturer: Linux 2.6.32 ehci_hcd
   usb usb1: SerialNumber: ehci-omap.0
   hub 1-0:1.0: USB hub found
   hub 1-0:1.0: 3 ports detected
   Initializing USB Mass Storage driver...
   usbcore: registered new interface driver usb-storage
   USB Mass Storage support registered.
   usbcore: registered new interface driver usbtest
   tps65910_rtc tps65910_rtc: rtc core: registered tps65910_rtc as rtc0
    TPS65910 RTC device successfully registered
   tps65910_rtc tps65910_rtc: Power up reset detected.
   tps65910_rtc tps65910_rtc: Enabling TPS65910-RTC.
   Linux video capture interface: v2.00
   OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
   usbcore: registered new interface driver usbhid
   usbhid: USB HID core driver
   TCP cubic registered
   NET: Registered protocol family 17
   NET: Registered protocol family 15
   can: controller area network core (rev 20090105 abi 8)
   NET: Registered protocol family 29
   can: raw protocol (rev 20090105)
   can: broadcast manager protocol (rev 20090105 t)
   Power Management for TI OMAP3.
   VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
   emac-mii: probed
   tps65910_rtc tps65910_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
   eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, id=7c0f1)
       Sending DHCP requests .
        PHY: ffffffff:00 - Link is Up - 100/Full
       ., OK
     IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.15.54
    IP-Config: Complete:
     device=eth0, addr=192.168.15.54, mask=255.255.255.0, gw=192.168.15.1,
    host=192.168.15.54, domain=mistral.in, nis-domain=(none),
    bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
     Empty flash at 0x00f3132c ends at 0x00f31800
   VFS: Mounted root (jffs2 filesystem) on device 31:4.
    Freeing init memory: 152K
     INIT: version 2.86 booting
     Please wait: booting...
       Starting udev
       udev: starting version 141
            udev: deprecated sysfs layout; update the kernel or disable CONFIG_SYSFS_DEPRECATED; some udev features will not work correctly
    udevd[426]: inotify_add_watch(3, (null), 10) failed: Bad address
    udevd[426]: inotify_add_watch(3, (null), 10) failed: Bad address
    udevd[426]: inotify_add_watch(3, (null), 10) failed: Bad address
    udevd[426]: inotify_add_watch(3, (null), 10) failed: Bad address
    udevd[426]: inotify_add_watch(3, (null), 10) failed: Bad address
   udevd[426]: inotify_add_watch(3, (null), 10) failed: Bad address
   udevd[426]: inotify_add_watch(3, (null), 10) failed: Bad address
    udevd[426]: inotify_add_watch(3, (null), 10) failed: Bad address
   udevd[426]: inotify_add_watch(3, (null), 10) failed: Bad address
   udevd-event[905]: error changing netif name eth0 to eth3: Device or resource busy
    Remounting root file system...
    WARNING: Couldn't open directory /lib/modules/2.6.32: No such file or directory
    FATAL: Could not open /lib/modules/2.6.32/modules.dep.temp for writing: No such file or directory
     modprobe: FATAL: Could not load /lib/modules/2.6.32/modules.dep: No such file or directory
     modprobe: FATAL: Could not load /lib/modules/2.6.32/modules.dep: No such file or directory
    root: mount: mounting rootfs on / failed: No such file or directory
   Setting up IP spoofing protection: rp_filter.
   Configuring network interfaces... udhcpc (v1.13.2) started
   Sending discover...
   Sending select for 192.168.15.54...
   Lease of 192.168.15.54 obtained, lease time 28800
   adding dns 192.168.10.51
   adding dns 192.168.10.54
    done.
    Wed Dec  2 19:35:00 UTC 2009
    INIT: Entering runlevel: 5
    Starting telnet daemon.
     modprobe: FATAL: Could not load /lib/modules/2.6.32/modules.dep: No such file or directory
   Starting syslogd/klogd: done
   Starting thttpd.
    _____                    _____           _         _
   |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
   |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
   |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
             |___|                    |___|
   Arago Project http://arago-project.org am3517-crane ttyS2
   Arago 2009.11 am3517-crane ttyS2
   am3517-crane login: root
   root@am3517-crane:~#

CraneBoard Bringup Guide

CraneBoard Setup for NAND Booting

  1. Make sure CraneBoard is powered OFF
  2. Connect UART3 on CraneBoard to UART port of Windows/Linux Machine using RS232 Null Modem Cable
  3. Have Terminal program (TeraTerm, HyperTerminal or Minicom) running on the host machine.
  4. Configure the Terminal program for (BAUD RATE - 115200, DATA - 8 bit, PARITY- none, STOP - 1bit, FLOW CONTROL - none)
  5. Perform the switch settings as mention in SW4 Boot switch settings.
  6. Set SW4 switch settings as follows:
        8	7	6	5	4	3	2	1
        x	x	on	on      on     on       on     off
  1. Power ON the CraneBoard with an External +5v 3A Power Supply
  2. NAND should have x-loader, u-boot, kernel and rootfs file system (jffs2) images flashed prior to booting.
  3. Power on the board by connecting DC Jack cable onto CraneBoard and it will start booting x-loader, u-boot and kernel.
  4. At very beginning it will wait for 3 seconds of boot delay after loading x-loader. After that it will start booting kernel.
  5. Stop the auto boot by hitting any key if you want to stop at u-boot prompt.

CraneBoard Setup for MMC booting

MMC/SD Card Formatting Procedure

1. Gather all required Tools.

  • MMC/SD Card
  • MMC/SD Card writer
  • MMC/SD Card Formatting/Partitioning Tool (To create a bootable partition on MMC/SD Card)
  • Recommended HP USB Disk Storage Format Tool 2.0.6: [[1]]

2. Format the MMC/SD Card for FAT32 FS

  • Insert the Card writer/reader into the Windows machine.
  • Insert MMC/SD card into the card reader/writer
  • Open the HP USB Disk Storage Format Tool.
  • Select “FAT32 as File System”.
  • Click on “Start”.
  • After formatting is done Click “OK”
  • Copy MLO, u-boot.bin onto MMC/SD Card

Booting procedure

  1. Make sure CraneBoard is powered OFF
  2. Connect UART3 port on CraneBoard to UART port of Windows/Linux Machine using RS232 Null Modem Cable
  3. Have Terminal program (TeraTerm, HyperTerminal or Minicom) running on the host machine.
  4. Configure the Terminal program for (BAUD RATE - 115200, DATA - 8 bit, PARITY- none, STOP - 1bit, FLOW CONTROL - none)
  5. Insert the MMC/SD card that has kernel, u-boot, MLO images into MMC/SD slot on CraneBoard Board.
  6. For SD/MMC Booting set SW4 switch as follows
   8	  7	 6       5	4	3	2	1
   x	  x	off	off    off     on       on      on
  1. Stop the auto boot by hitting any key if you want to stop at u-boot prompt.
  2. Power ON the CraneBoard board with an External +5v 3A Power Supply

Flashing images onto NAND

  1. Format MMC/SD card as mentioned in CraneBoard Hardware Setup and boot from the same.
  2. Save x-load.bin.ift to be flashed onto NAND as 'mlo' on MMC
  3. Save u-boot.bin to boot as u-boot.bin on MMC
  4. Save uImage onto MMC.
  5. Save rootfs.jffs2 onto MMC.
  6. Setup the CraneBoard to boot over MMC.
  7. At u-boot prompt execute the following commands

Initializing MMC and erasing NAND

   mmc init 
   nand erase 
   mw.b 0x81600000 0xFF 0x1400000

X-loader flashing

   nand erase 0 80000 
   fatload mmc 0 0x81600000 MLO                     
   nandecc hw 
   nand write.i 0x81600000 0 80000

U-boot flashing

   nand erase 0x80000 0x400000 
   fatload mmc 0 0x81600000 u-boot.bin 
   nandecc sw 
   nand write.i 0x81600000 0x80000 0x400000 

Kernel flashing

   fatload mmc 0 0x81600000 uImage             
   nand erase 480000 E80000 
   nandecc sw
   nand write.i 0x81600000 480000 E80000 

File system flashing

   fatload mmc 0 0x81600000 crane_rootfs.jffs2     
   nand erase E80000 FF0000 
   nandecc sw 
   nand write.i 0x81600000 E80000 FF0000

ITBOK for CraneBoard

Building images for CraneBoard

Openembedded Development Environment

Introduction

CraneBoard uses the Openembedded build system. The "Getting started[2]" set of pages will show you how to set up cross development build environment on your Linux desktop or laptop. It will teach you how to check out the most recent source code for the CraneBoard distribution, and how to use the build system to create standard images for X-Loader, U-Boot, Kernel and Root filesystem.

The steps for the entire process are summarized in Quick start, but it is recommended that you read through the detailed instructions in Setting up a Build Environment and the following sections for a better understanding of the process.

Quick start

This section is for those who just want to get started and don't care for too many explanations along the way. It assumes that you are an experienced developer and that your development machine is running on a relatively recent Linux distribution.

Unless you know what you are doing, it is highly recommended that you do not deviate from this process. For a more detailed description of this process please read "Setting up a build environment [3]". Bitbake version 1.10.2 is required for the OE latest build which can be downloaded from http://download.berlios.de/bitbake/bitbake-1.10.2.tar.gz. The Openembedded project resides in a Git repository. You can find that at git://git.openembedded.org/openembedded. Web interface is: [4]. To obtain Openembedded:

  1. Install git
  2. Go to the base directory of your OpenEmbedded environment
  3. $ cd /stuff/
  4. Checkout the repository
   $ git clone git://git.openembedded.org/openembedded

or for the firewall challenged, try

   $ git clone http://repo.or.cz/r/openembedded.git

This is the data you'll be using for all your work.

Create local configuration

Copy the default local.conf.sample:

   $ cd /stuff/
   $ cp openembedded/conf/local.conf.sample build/conf/local.conf
   $ vi build/conf/local.conf

For building .dev branch, in local.conf file, at least three of the following entries should be present. For building CraneBoard :

   BBFILES = "/stuff/openembedded/recipes/*/*.bb"
   DISTRO = "angstrom-2008.1"
   MACHINE = "am3517-crane"

If you choose to install OE in your home directory, modify local.conf to refer to the OE paths as /home/<username>/ rather than ~/ else It does not recognize *.bb packages.

Setup the environment

The following command set should be run every time you open a terminal for development.

   $ export BBPATH=/stuff/build:/stuff/openembedded
   $ export PATH=/stuff/bitbake/bin:$PATH

If you have installed BitBake:

   $ export BBPATH=/stuff/build:/stuff/openembedded

Start building

For building x-loader :

   $ bitbake -v x-load

For building u-boot for CraneBoard:

   $ bitbake -v virtual/bootloader

For building the uImage for CraneBoard :

   $ bitbake -v virtual/kernel 

or

Example: For building a file system with GUI support:

   $ bitbake -v x11-gpe-image 

The above command will build X-Loader, U-Boot, Kernel and Root filesystem.

This initial build will take time since it needs to download all the sources. When it completes, you will find the MLO, U-boot, Kernel and root filesystem image in

/stuff/openembedded/tmp/deploy/glibc/images/am3517-crane:

   $ ls /stuff/openembedded/tmp/deploy/glibc/images/am3517-crane
   Angstrom-x11-gpe-image-glibc-ipk-2010.7-test-20101229-am3517-crane.rootfs.jffs2 
   Angstrom-x11-gpe-image-glibc-ipk-2010.7-test-20101229-am3517-crane.rootfs.tar 
   Angstrom-x11-gpe-image-glibc-ipk-2010.7-test-20101229-am3517-crane-testlab/
   MLO-am3517-crane 
   MLO-am3517-crane-1.46+r18+gitrfc6d5be15c703d21aef0ae0b8c02177721f0445f-r18 
   u-boot-am3517-crane-2009.11+r68+gitrc0a8fb217fdca7888d89f9a3dee74a4cec865620-r68.bin 
   u-boot-am3517-crane.bin 
   modules-am3517-crane.tgz
   uImage-2.6.32-r97+gitr5fc29e7b2a76a64a739f857858ef0b98294aa155-am3517-crane.bin
   uImage-am3517-crane.bin

The "shorter" link name saves typing effort. Your file names may differ slightly from the above since some of them are time-stamped or versioned. At this point, we are ready to update CraneBoard with the x-load, u-boot, kernel that we just built.

ANGSTROM Build

For building Angstrom root file system Online, please follow the link below:

http://narcissus.angstrom-distribution.org/[5]