https://elinux.org/api.php?action=feedcontributions&user=Manju&feedformat=atomeLinux.org - User contributions [en]2024-03-19T07:41:37ZUser contributionsMediaWiki 1.31.0https://elinux.org/index.php?title=Hawkboard&diff=19813Hawkboard2010-04-24T07:51:16Z<p>Manju: </p>
<hr />
<div>[[Category: Linux]]<br />
[[Category: OMAP]]<br />
[[Category: DSP]]<br />
[[Category: Hawkboard]]<br />
<br />
[[File:Hawk sticker1.JPG]]<br />
<br />
<br />
----<br />
<br />
== Hardware Details ==<br />
<br />
[[File:Hawkboard hw.jpg]]<br />
<br />
* [http://hawkboard.googlecode.com/files/Hawkboard_UG_ver1.pdf '''HawkBoard User Manual''']<br />
* [http://hawkboard.googlecode.com/files/Hawkboard_schematics_v1.pdf '''HawkBoard Schematics''']<br />
* Technical Reference Manual for OMAP L 138 Processor is [http://focus.ti.com/docs/prod/folders/print/omap-l138.html Here]<br />
* Applications of OMAP L 138 are [http://wiki.davincidsp.com/index.php/C674x/OMAPL1x_Introductory_Information Here]<br />
<br />
== Software Details ==<br />
<br />
=== Tools & Softwares Downloads===<br />
* '''[http://www.codesourcery.com/sgpp/lite/arm/portal/package5353/public/arm-none-eabi/arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 ARM Cross Compiler - Bare Metal]'''<br />
<br />
''Note:''<br />
<br />
1.This is for RTOS systems or "bare metal" systems where no operating system is present. <br />
These toolchains should not be used to build Linux kernels or applications.<br />
<br />
2.New Releases : http://www.codesourcery.com/sgpp/lite/arm/portal/release1033<br />
<br />
<br />
*''' [http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 ARM Cross Compiler - For Linux/U-boot]'''<br />
<br />
''Note:''<br />
<br />
1.Systems running "full" Linux, i.e., Linux on CPUs with an MMU. <br />
Use this to build both the Linux kernel and applications.<br />
<br />
2.New Releases : http://www.codesourcery.com/sgpp/lite/arm/portal/release1039<br />
<br />
*''' [http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_ccstudio/codegen/C6000/6.1.12/ti_cgt_c6000_6.1.12_setup_linux_x86.bin DSP Cross Compiler] c674x via option -mv6740 '''<br />
<br />
<br />
*''' [http://www-s.ti.com/sc/techlit/sprab41.zip AIS Generator / UART Host Tool] ([http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe Needs .NET Framework])'''<br />
<br />
====Tools From Other Vendors====<br />
* [http://impactlinux.com/fwl/downloads/binaries/cross-compiler-armv5l.tar.bz2 ARM Cross Compiler provided by impactlinux]<br />
<br />
* [http://impactlinux.com/fwl/downloads/binaries/native-compiler-armv5l.tar.bz2 ARM Native Compiler (to be used directly on Hawkboard) provided by impactlinux]<br />
<br />
====JTAG emulators====<br />
* [http://www.innovatesolutions.net/whitepapers/app-note-for-using-ccsv4-xds-emulator-with-hawkboard Application Note for using CCSv4 & XDS Emulator with Hawkboard]<br />
<br />
===Misc Tools===<br />
* [http://www.virtualbox.org/wiki/Downloads VirtualBox -To run Linux/Windows simultaneously with Windows/Linux]<br />
<br />
* [http://tftpd32.jounin.net/download/Tftpd32-3.35-setup.exe Tftp Server]<br />
<br />
* [http://www.ayera.com/teraterm/ttpro313.zip Teraterm-Tool to Access Serial Console(Alternative to Hyperterminal) + SSH Client]<br />
<br />
=== Sources ===<br />
* [http://hawkboard.googlecode.com/files/linux-omapl1_ver1.tar.bz2 Linux Kernel]<br />
* [http://hawkboard.googlecode.com/files/u-boot-omapl1_v1.tar.bz2 u-boot]<br />
<br />
==Getting Started==<br />
1.'''Powering the Device''': Hawkboard can be powered through USB OTG port(mini USB) or Separate 5V Source. Since the USB port of a PC/laptop or hub are often limited to 500 mA, it is advisable to use a separate power supply of 5VDC that supplies at least 1.5 A of current.<br />
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#00f1cc; align:right; "><br />
'''Note: It is recommended to use a separate 5VDC Power supply with at least a 1.5 Amps current rating instead of USB Power for Normal Operation of the Board'''<br />
</div><br />
<br />
2.'''Connecting VGA Monitor''': Once the power supply has been attached, Hawkboard boots to Uboot Bootloader and will show Hawkboard Logo on Screen.<br />
<br />
3.'''Connecting UART''': To transfer images to Hawkboard and to set other parameters, the UART/serial cable needs to be attached to Hawkboard and PC. A NULL Modem(Crossed Cable i.e 2 and 3 Crossed) is needed for that.<br />
Run a terminal session (such as Minicom on Linux or TeraTerm on Windows) on the Host PC and configure it to connect to that serial port with the following characteristics:<br />
: Bits per Second: 115200<br />
: Data Bits: 8<br />
: Parity: None<br />
: Stop Bits: 1<br />
: Flow Control: None<br />
: Transmit delay: 0 msec/char, 10 msec/line<br />
<br />
[[File:Hawk_Serial_Set.JPG]]<br />
<br />
After powering the device you should be able to see the following:<br />
<br />
[[File:Hawk_uboot_msg.JPG | 480px ]]<br />
[[File:Hawk_vga_logo.jpg | 480px ]]<br />
<br />
<br />
* On Hyperterminal (Any other Serial Console) (Left) On VGA Monitor you will see HawkBoard Logo (Right)<br />
<br />
<br />
=== Command prompts in this guide ===<br />
In this guide, commands are preceded by prompts that indicate the<br />
environment where the command is to be typed. For example:<br />
<br />
* '''host$'''<br />
:Indicates command to be typed into the shell window of the host Linux workstation.<br />
* '''Hawkboard.org>'''<br />
:Indicates commands to be typed into the U-Boot shell in a console window connected to the Hawkboard's serial port. <br />
* '''target$'''<br />
:Indicates commands to be typed into the Linux shell in the terminal window connected to the Hawkboard's serial port or TTY..<br />
<br />
== Building & Booting Uboot images from source ==<br />
<br />
HawkBoard comes with pre-installed U-boot and normally you don't want to Compile and Load U-boot<br />
unless you have Bricked the Bootloader or want to change something.So You can Skip this Section <br />
and can go Directly to [http://elinux.org/Hawkboard#Compiling_Linux_Kernel Compiling Linux Kernel] or [http://elinux.org/Hawkboard#Booting_2 Booting] Kernel Section.<br />
<br />
=== Compiling u-boot (bootloader) ===<br />
# Issue compile commands with make:<br />
'''host$''' make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- distclean<br />
'''host$''' make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omapl_hawkboard_config <br />
'''host$''' make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-<br />
<br />
=== Signing u-boot for UART boot ===<br />
# Copy u-boot (elf) file to the host machine where AIS Generator is installed. Follow the below steps<br />
# [[File:AIS gen uart1.JPG]]<br />
# [[File:AIS gen uart2.JPG]]<br />
# [[File:AIS gen uart3.JPG]]<br />
# [[File:AIS gen uart4.JPG]]<br />
<br />
=== Signing u-boot for NAND boot ===<br />
# Copy u-boot (elf) file to the host machine where AIS Generator is installed. Follow the below steps<br />
# [[File:AIS gen nand1.JPG]]<br />
# Configure PLL0, PLL1, DDR tabs as shown above. The File name to generate remains as in the step above.<br />
<br />
===Booting===<br />
<br />
==== Booting u-boot over UART ====<br />
* Power OFF the board<br />
* Close any previously running terminal programs<br />
* Connect the UART cable(Null/Cross Cable) to the Host machine.<br />
<br />
Following process used on Windows family of Operating System: <br />
* User can use mono utility with dvflasher.ext program to load u-boot on Linux system. <br />
* Details To be updated <br />
<br />
Following process used on Windows family of Operating System: <br />
* Configure the Boot Switches as 1-OFF 2-ON 3-OFF 4-ON <br />
* Start the UART Host Utility, should have been installed with [http://www-s.ti.com/sc/techlit/sprab41.zip AIS Generator / UART Host Tool]<br />
* Select the AIS FILE Generated for UART <br />
[[File:UART_HOST_BOOT.JPG]]<br />
<br />
* Click on the Start button<br />
* Power UP the Device<br />
* If you see errors click on stop and press start again and give a board reset.<br />
* Wait till you all the below messages and COM is closed:<br />
(File IO): Read 414964 bytes from file D:\hawk_release\u-boot_uart_ais.bin.<br />
(Serial Port): Opening COM1 at 115200 baud...<br />
(AIS Parse): Read magic word 0x41504954.<br />
(AIS Parse): Waiting for BOOTME...<br />
(AIS Parse): Performing Start-Word Sync...<br />
(AIS Parse): Performing Ping Opcode Sync...<br />
(AIS Parse): Processing command 0: 0x5853590D.<br />
(AIS Parse): Performing Opcode Sync...<br />
(AIS Parse): Executing function...<br />
(AIS Parse): Processing command 1: 0x5853590D.<br />
(AIS Parse): Loaded 1512-byte section to address 0xC10E4BEC.<br />
...<br />
...<br />
...<br />
(AIS Parse): Processing command 15: 0x58535906.<br />
(AIS Parse): Performing Opcode Sync...<br />
(AIS Parse): Performing jump and close...<br />
(AIS Parse): AIS complete. Jump to address 0xC1080000.<br />
(AIS Parse): Waiting for DONE...<br />
(AIS Parse): Boot completed successfully.<br />
(Serial Port): Closing COM1.<br />
* Now Start any standard UART Terminal and hit enter key, should see the u-boot prompt<br />
<br />
==== Procedure to flash u-boot on NAND ====<br />
After booting the u-boot over UART as mentioned above, <br />
* On the u-boot prompt in the terminal window<br />
* Configure the Ethernet server and Client IP addresses, For e.g. <br />
hawkboard.org > setenv serverip 172.24.156.199<br />
hawkboard.org > setenv ipaddr 172.24.190.58<br />
* Download the u-boot generated for NAND<br />
hawkboard.org > tftpboot 0xc0700000 u-boot_nand_ais.bin<br />
<br />
TFTP from server 172.24.156.199; our IP address is 172.24.190.58<br />
Filename 'u-boot_nand_ais.bin'.<br />
Load address: 0xc0700000<br />
Loading: #################################################################<br />
#################<br />
done<br />
Bytes transferred = 414988 (6550c hex) <br />
* Erase NAND Flash<br />
hawkboard.org > nand erase<br />
<br />
NAND erase: device 0 whole chip<br />
OK<br />
* Flash the NAND with u-boot<br />
hawkboard.org > nand write.e 0xc0700000 0x20000 0x70000<br />
<br />
NAND write: device 0 offset 0x20000, size 0x70000<br />
458752 bytes written: OK<br />
hawkboard.org ><br />
* Switch off the board<br />
* Change the DIP Switches for NAND boot 1-ON 2-OFF 3-OFF 4-OFF<br />
<br />
==== Booting u-boot over NAND ====<br />
Flash u-boot into NAND as mentioned above<br />
* Switch off the board<br />
* Change the DIP Switches for NAND boot 1-ON 2-OFF 3-OFF 4-OFF<br />
* Switch on the board<br />
<br />
== Building & Booting Kernel images from source ==<br />
<br />
=== Compiling Linux Kernel ===<br />
# Issue compile commands with make:<br />
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- distclean<br />
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omapl138_hawkboard_defconfig<br />
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage<br />
<br />
=== Booting ===<br />
<br />
==== Booting Linux Kernel and Mounting RAMDISK ====<br />
<br />
You should find a kernel and a ramdisk image if you haven't found already. You can download samples from [http://code.google.com/p/hawkboard/downloads/list] (uImage_v1 & ramdisk_v1.gz)). 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. <br><br />
At the u-boot prompt:<br />
<br />
Set ethernet connection:<br />
<br />
$setenv serverip <PC ipaddress><br />
$setenv ipaddr <board ipaddress><br />
<br />
<PC ipaddress> should be the address of the PC running the tftp server.<br><br />
<board ipaaddress> should be an address that is not in use on the same subnet as the tftp server.<br><br />
Transfer files to the board:<br />
<br />
$tftp c0700000 uImage_v1<br />
$tftp c1180000 ramdisk_v1.gz<br />
<br />
If you broke your bootargs previously then:<br />
<br />
$setenv bootargs "mem=128M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M"<br />
<br />
And finally boot the images:<br />
<br />
$bootm c0700000<br />
<br />
==== Booting Linux Kernel and Mounting NFS (Network File System) ====<br />
Load the Kernel through NAND Flash or TFTP Method ,Once kernel has been loaded to RAM using <br />
tftp c0700000 uImage_v1 or similar Next.<br />
Follow following steps to Mount RootFS through NFS.(Ubuntu)<br />
<br />
=====Setting NFS Server=====<br />
1. Install NFS Server <br />
'''host$''' sudo apt-get install portmap nfs-kernel-server<br />
<br />
2. Share the Folder containing extracted RootFS (e.g /nfsroot contains RootFS)<br />
<br />
Edit /etc/exports and add the shares:<br />
<br />
/nfsroot <NETWROK_IP><SUBNET_MASK>(rw,sync,no_subtree_check,no_root_squash)<br />
<br />
e.g, /nfsroot 192.168.0.0/255.255.255.0(rw,sync,no_subtree_check,no_root_squash)<br />
<br />
Assuming your network is is 192.168.0.0 <br />
<br />
NB:- no_root_squash might be necessary if you are getting sudo erros in Ubuntu Rootfs<br />
<br />
3.After setting up /etc/exports, export the shares:<br />
<br />
'''host$''' sudo exportfs -ra<br />
<br />
restart the nfs-server if required<br />
<br />
'''host$''' sudo /etc/init.d/nfs-kernel-server restart<br />
<br />
=====Booting Board using NFS=====<br />
Under Uboot prompt once the Kernel has been loaded through <br />
''hawkboard.org>'' tftp c0700000 uImage_v1<br />
<br />
1.Set bootargs<br />
<br />
Set boot arguments:<br />
<br />
a)If Board uses Static IP<br />
<br />
<br />
''hawkboard.org>'' setenv bootargs 'console=ttyS2,115200n8 noinitrd rw ip=<HawkboardIP>:<server-ip>:<gateway-ip>:<netmask>::eth0: root=/dev/nfs nfsroot=<NFS Server ipaddress>:/nfsroot'<br />
<br />
e.g <br />
''hawkboard.org>'' setenv bootargs 'console=ttyS2,115200n8 noinitrd rw ip=192.168.0.125:192.168.0.1:192.168.0.1:255.255.255.0::eth0: root=/dev/nfs nfsroot=<NFS Server ipaddress>:/nfsroot'<br />
<br />
where 192.168.0.125 is board IP & 192.168.0.1 is gateway IP& Router IP.<br />
<br />
<br />
b)DHCP IP Board<br />
<br />
''hawkboard.org>'' setenv bootargs "mem=128M console=ttyS2,115200n8 root=/dev/nfs nfsroot=<Server ipaddress>:/nfsroot ip=dhcp"<br />
<br />
<br />
2.And finally boot the image:<br />
<br />
''hawkboard.org>'' bootm c0700000<br />
<br />
==== Booting Linux Kernel from USB ====<br />
This steps work for USB Pendrive connected to Hub or Directly to USB Standard Port <br />
and rootfs is Ubuntu jaunty made through rootstock.Should work for other distribution too.<br />
<br />
1. Load uimage through tftp ( as usual)<br />
setenv serverip <PC IP><br />
setenv ipaddr <BOARD IP><br />
tftp c0700000 uImage_v1<br />
<br />
2.Sent environment variable<br />
setenv bootargs console=ttyS2,115200n8 noinitrd root=/dev/sda1 rootwait rw init=/sbin/init<br />
<br />
3.bootm <br />
bootm c0700000<br />
<br />
Here /dev/sda1 is USB Drive with only one ext2 partition and rootfs lying init.<br />
<br />
NB:-Ensure that keyboard is connected otherwise it will get stuck in "Setting preliminary keymap"..<br />
<br />
==== Booting Linux Kernel from SATA ====<br />
<br />
Currently the provided u-boot does not allow booting from either SATA.<br />
However, it is possible to boot from nand and have the root filesystem loaded from SATA.<br><br />
If you want to do so, you have to figure out the right partition for the root filesystem and add that to your bootargs.<br />
<br />
E.g. in u-boot say something like:<br />
<br />
setenv bootargs mem=128M console=ttyS2,115200n8 root=/dev/sda1 rootwait<br />
<br />
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.<br />
Note that the rootwait argument is needed. It tells the kernel to wait until the disk has settled.<br />
<br />
==== Booting Linux Kernel from SD OR MMC====<br />
<br />
Currently the provided u-boot does not allow direct booting from either SD or MMC<br />
However, it is possible to boot from nand and have the root filesystem loaded from SD <br><br />
If you want to do so, you have to figure out the right partition for the root filesystem and add that to your bootargs.<br />
<br />
<br />
E.g. in u-boot say something like:<br />
<br />
setenv bootargs console=ttyS2,115200n8 console=tty1 noinitrd root=/dev/mmcblk0p1 rootwait rw<br />
<br />
or <br />
<br />
setenv bootargs console=ttyS2,115200n8 console=tty1 noinitrd root=/dev/mmcblk0p1 rootdelay = 2 rootfstype = ext2 rw<br />
<br />
Here p1 in mmcblk0p1 says that Rootfs is present in first partition of SD Card.<br />
<br />
==== MISC ====<br />
1.If you find screen broken, do this before bootm in u-boot, ideally this should go into kernel code<br />
<br />
mw.l 0x01c14110 0x44442222 1;mw.l 0x01c14114 0x44400000 1;mw.l 0x01c14118 0x04604404 1;<br />
<br />
2.For booting android over MMC the bootargs should be<br />
<br />
setenv bootargs mem=128M console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p1 rootwait ip=off init=/init androidboot.console=ttyS2<br />
<br />
3.You probably want to avoid that you have to retype these commands every time you want to boot. <br />
This can be achieved easily by issuing the following commands on the u-boot prompt:<br />
<br />
setenv serverip <PC ipaddress><br />
setenv ipaddr <board ipaddress><br />
setenv bootargs_nfs mem=128M console=ttyS2,115200n8 root=/dev/nfs nfsroot=<PC ipaddress>:/nfsroot ip=dhcp<br />
setenv bootcmd 'setenv bootargs $bootargs_nfs;tftp c0700000 uImage.v1; bootm c0700000'<br />
saveenv<br />
<br />
Make sure to use single quotes in the last setenv command.<br />
<br />
==Distributions(Rootfs)==<br />
1.Angstrom Linux http://www.angstrom-distribution.org/narcissus/<br />
<br />
2.Ubuntu Use Rootstock<br />
<br />
3.Impactlinux http://impactlinux.com/fwl/downloads/binaries/root-filesystem-armv5l.tar.bz2<br />
<br />
4.Fedora https://fedoraproject.org/wiki/Architectures/ARM<br />
<br />
5.http://arago-project.org<br />
<br />
<br />
==FAQs==<br />
<br />
<br />
==Common Issues==<br />
<br />
==Projects Based on HawkBoard==<br />
<br />
<br />
<br />
==Live Links==<br />
<br />
* Blog : http://hawkboard.wordpress.com/<br />
* Portal : http://hawkboard.org<br />
* Join us : hawkboard on google groups<br />
* IRC : “#hawkboard” on Freenode<br />
* IRC logs : http://ibot.rikers.org/%23hawkboard/<br />
* Twitter : http://twitter.com/hawkboard<br />
* Wikipedia : http://en.wikipedia.org/wiki/Hawk_Board<br />
* Photos(Flickr): http://www.flickr.com/photos/hawkboard<br />
* Mails : hawkboard@googlegroups.com <br />
* Software : code.google.com/p/hawkboard<br />
* OMAP L 138 : http://focus.ti.com/docs/prod/folders/print/omap-l138.html<br />
* Applications : http://wiki.davincidsp.com/index.php/C674x/OMAPL1x_Introductory_Information<br />
* More Details : http://wiki.davincidsp.com/index.php/Category:OMAPL1<br />
<br />
==Guide Links==<br />
<br />
* Ubunty Jaunty on the hawkboard : http://blog.binaerwelt.com/2010/02/ubuntu-on-the-hawkboard/<br />
* Android on the hawkboard : http://labs.embinux.org/index.php/Android_Porting_Guide_to_OMAP-L_138_HawkBoard</div>Manju