Hawkboard

Hardware Details



 * Technical Reference Manual for OMAP L 138 Processor is Here
 * Applications of OMAP L 138 are Here

Tools

 * ARM Cross Compiler - Bare Metal
 * ARM Cross Compiler - For Linux/U-boot
 * DSP Cross Compiler c674x via option -mv6740
 * AIS Generator / UART Host Tool (Needs .NET Framework)

Compiling u-boot (bootloader)
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- distclean make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omapl_hawkboard_config make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
 * 1) Issue compile commands with make:

Signing u-boot for UART boot

 * 1) Copy u-boot (elf) file to the host machine where AIS Generator is installed. Follow the below steps
 * 2) [[File:AIS gen uart1.JPG]]
 * 3) [[File:AIS gen uart2.JPG]]
 * 4) [[File:AIS gen uart3.JPG]]
 * 5) [[File:AIS gen uart4.JPG]]

Signing u-boot for NAND boot

 * 1) Copy u-boot (elf) file to the host machine where AIS Generator is installed. Follow the below steps
 * 2) [[File:AIS gen nand1.JPG]]
 * 3) Configure PLL0, PLL1, DDR tabs as shown above. The File name to generate remains as in the step above.

Compiling Linux Kernel
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- distclean make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omapl138_hawkboard_defconfig make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage
 * 1) Issue compile commands with make:

Booting u-boot over UART

 * Power OFF the board
 * Close any previously running terminal programs
 * Connect the UART cable to the Host machine.

Following process used on Windows family of Operating System:
 * User can use mono utility with dvflasher.ext program to load u-boot on Linux system.
 * Details To be updated

Following process used on Windows family of Operating System: (File IO): Read 414964 bytes from file D:\hawk_release\u-boot_uart_ais.bin. (Serial Port): Opening COM1 at 115200 baud...  (AIS Parse): Read magic word 0x41504954. (AIS Parse): Waiting for BOOTME...  (AIS Parse): Performing Start-Word Sync...   (AIS Parse): Performing Ping Opcode Sync...   (AIS Parse): Processing command 0: 0x5853590D. (AIS Parse): Performing Opcode Sync...  (AIS Parse): Executing function...   (AIS Parse): Processing command 1: 0x5853590D. (AIS Parse): Loaded 1512-byte section to address 0xC10E4BEC. ...  ...   ...   (AIS Parse): Processing command 15: 0x58535906. (AIS Parse): Performing Opcode Sync...  (AIS Parse): Performing jump and close...   (AIS Parse): AIS complete. Jump to address 0xC1080000. (AIS Parse): Waiting for DONE...  (AIS Parse): Boot completed successfully. (Serial Port): Closing COM1.
 * Configure the Boot Switches as 1-OFF 2-ON 3-OFF 4-ON
 * Start the UART Host Utility, should have been installed with AIS Generator / UART Host Tool
 * Select the AIS FILE Generated for UART [[File:UART_HOST_BOOT.JPG]]
 * Click on the Start button
 * Power UP the Device
 * If you see errors click on stop and press start again and give a board reset.
 * Wait till you all the below messages and COM is closed:
 * Now Start any standard UART Terminal and hit enter key, should see the u-boot prompt

Procedure to flash u-boot on NAND
After booting the u-boot over UART as mentioned above, hawkboard.org > setenv serverip 172.24.156.199 hawkboard.org > setenv ipaddr 172.24.190.58 hawkboard.org > tftpboot 0xc0700000 u-boot_nand_ais.bin TFTP from server 172.24.156.199; our IP address is 172.24.190.58 Filename 'u-boot_nand_ais.bin'. Load address: 0xc0700000 Loading: ################################################################# #################  done Bytes transferred = 414988 (6550c hex) hawkboard.org > nand erase NAND erase: device 0 whole chip OK  hawkboard.org > nand write.e 0xc0700000 0x20000 0x70000
 * On the u-boot prompt in the terminal window
 * Configure the Ethernet server and Client IP addresses, For e.g.
 * Download the u-boot generated for NAND
 * Erase NAND Flash
 * Flash the NAND with u-boot

NAND write: device 0 offset 0x20000, size 0x70000 458752 bytes written: OK  hawkboard.org >
 * Switch off the board
 * Change the DIP Switches for NAND boot 1-ON 2-OFF 3-OFF 4-OFF

Booting u-boot over NAND
Flash u-boot into NAND as mentioned above
 * Switch off the board
 * Change the DIP Switches for NAND boot 1-ON 2-OFF 3-OFF 4-OFF
 * Switch on the board

Booting Linux Kernel and Mounting RAMDISK
You should find a kernel and a ramdisk image if you haven't found already. You can download samples from. Then copy these files to your "/tftpboot" directory assuming you will use tftp for transferring files to your board. In order to do so you need to run a tftp server on your system. Under linux a good choice is atfptd, but you can also use others. Typically a linux tftp server exports the directory /tftpboot. Make sure before you continue that your ftp server is running. At the u-boot prompt:

Set ethernet connection:

$setenv serverip  $setenv ipaddr

 should be the address of the PC running the tftp server. should be an address that is not in use on the same subnet as the tftp server. Transfer files to the board:

$tftp c0700000 uImage_v1 $tftp c1180000 ramdisk_v1.gz

If you broke your bootargs previously then:

$setenv bootargs "mem=128M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M"

And finally boot the images:

$bootm c0700000

Booting Linux Kernel and Mounting NFS (Network File System)
You should find a kernel and a root file system image if you haven't found already. Then copy the kernel to your "/tftpboot" directory assuming you will use tftp for transferring files to your board. In order to do so you need to run a tftp server on your system. Under linux a good choice is atfptd, but you can also use others. Typically a linux tftp server exports the directory /tftpboot. Make sure before you continue that your ftp server is running.

Next as root create a directory /nfsroot and populate it with your root filesystem. Under linux make sure you have a file /etc/exports that contains: /nfsroot 192.168.1.0/255.255.255.0(rw)

Assuming your subnet is 192.168.1.0. Make sure you install and start an nfs server.

Then, at the u-boot prompt:

Set ethernet connection:

setenv serverip  setenv ipaddr

 should be the address of the PC running the tftp server. should be an address that is not in use on the same subnet as the tftp server. Transfer the to the board:

tftp c0700000 uImage_v1

Set boot arguments:

setenv bootargs "mem=128M console=ttyS2,115200n8 root=/dev/nfs nfsroot=:/nfsroot ip=dhcp"

Of course again with filling in the PC ip address.

And finally boot the image:

bootm c0700000

Note: you probably want to avoid that you have to retype these commands every time you want to boot. This can be achieved easily by issuing the following commands on the u-boot prompt:

setenv serverip  setenv ipaddr setenv bootargs_nfs mem=128M console=ttyS2,115200n8 root=/dev/nfs nfsroot=:/nfsroot ip=dhcp setenv bootcmd 'setenv bootargs $bootargs_nfs;tftp c0700000 uImage.v1; bootm c0700000' saveenv

Make sure to use single quotes in the last setenv command. Of course you can replace uImage.v1 with whatever name your file has in your /tftpboot directory. After issueing these five commands the board will automatically boot (after a timeout) whenever you power the board or press the reset button (of course assuming the right files are in your /tftpboot and /nfsroot directories and the nfsserver and tftp server are running).

Booting Linux Kernel from USB
u-boot does allow booting from USB, but only using the USB 2.0 mini connector. u-boot cannot boot from the USB 1.1 port (the standard A-type port), so you need to get yourself an adapter cable to go from the mini port to an A-female type. I think I got mine from ebay or dealextreme.

In order to boot from usb, prepare an usb disk with two partitions. The first one should be small (50M or so) and should contain a fat16 filesystem. The second one can dover the rest of the disk and should contain an ext2 fileysystem

I have partitioned the disk on my linux desktop with fdisk, and made the filesystems with mkfs.vfat /dev/sdX1 ; mkfs.ext2 /dev/sdX2 (where X is the letter for your card (e.g, f, g, h). Take care to use the right letter otherwise you might destroy valuable data (and start with an empty card).

After partitioning copy your uImage file to the fat partition. I named it uImage.bin. Also put your root filesystem on the ext2 partition.

Then, in u-boot set your u-boot environment variables as

setenv bootargs mem=128M console=ttyS2,115200n8 root=/dev/sda2 rootwait setenv bootcmd 'usb reset;fatload usb 0 c0700000 uImage.bin; bootm c0700000'

Optionally followed by a saveenv to make your settings persistent.

Unfortunately this is where things start to go wrong for me If I connect the usb stick to the 2.0 port the kernel boots, but crashes when trying to access the root filesystem (although I can access the root filesystem when board is booted through tftp and I insert the usb stick afterwards). And if I try using a hub, my usb stick is not detected at all. Guess there are some issues left, but as it can also be due to my kernel, I've chosen to report my findings here. If you have more success please add to this text (probably specifying what kernel you used and where you got it from).

PS: in order to access an USB device on the mini port it might be needed to put a jumper on the two pins that are closest to the connector. Whether or not this is needed depends on your cable (if you have a readl mini a cable this is not needed, but unfortunately lots of cables out there are not the right ones).

Booting Linux Kernel from SD or SATA
Currentlythe provided u-boot does not allow booting from either SD or SATA. However, it is possible to boot from nand and have the root filesystem loaded from SD or SATA. If you want to do so, you have to figure out the right partition for the root filesystem and add that to your bootargs.

E.g. in u-boot say something like:

setenv bootargs mem=128M console=ttyS2,115200n8 root=/dev/sda1 rootwait

Where you replace /dev/sda1 with the name of the device that contains your root filesystem. /dev/sda1 is a good name for sata partition 1 if no usb or sd devices are present. Note that the rootwait argument is needed. It tells the kernel to wait until the disk has settled.

MISC
If you find screen broken, do this before bootm in u-boot, ideally this should go into kernel code

mw.l 0x01c14110 0x44442222 1;mw.l 0x01c14114 0x44400000 1;mw.l 0x01c14118 0x04604404 1;

For booting over MMC the bootargs should be

setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p1 rootwait ip=off

For booting android over MMC the bootargs should be

setenv bootargs mem=128M console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p1 rootwait ip=off init=/init androidboot.console=ttyS2

Android for hawkboard is here http://labs.embinux.org/index.php/Android_Porting_Guide_to_OMAP-L_138_HawkBoard

Live Links

 * Blog		: http://hawkboard.wordpress.com/
 * Portal	: http://hawkboard.org
 * Join us	: hawkboard on google groups
 * IRC		: “#hawkboard” on Freenode
 * IRC logs     : http://ibot.rikers.org/%23hawkboard/
 * Twitter	: http://twitter.com/hawkboard
 * Wikipedia    : http://en.wikipedia.org/wiki/Hawk_Board
 * Photos(Flickr): http://www.flickr.com/photos/hawkboard
 * Mails		: hawkboard@googlegroups.com
 * Software	: code.google.com/p/hawkboard
 * OMAP L 138 	: http://focus.ti.com/docs/prod/folders/print/omap-l138.html
 * Applications 	: http://wiki.davincidsp.com/index.php/C674x/OMAPL1x_Introductory_Information
 * More Details	: http://wiki.davincidsp.com/index.php/Category:OMAPL1

Guide Links

 * Ubunty Jaunty on the hawkboard : http://blog.binaerwelt.com/2010/02/ubuntu-on-the-hawkboard/
 * Android on the hawkboard : http://labs.embinux.org/index.php/Android_Porting_Guide_to_OMAP-L_138_HawkBoard