2009年9月21日 星期一

Add omap3 beagleboard support in Qi

My previous post said adding support of beagleboard was the next step in Qi. It seems to be time to release this work. But it's not yet finished. There're couple things on my TODO list. Here is a brief HowTo of building Qi for beagleboard.

- git clone git://git.warmcat.com/qi
- git checkout -b beagle origin/omap3530
- edit CROSS_TUPLE parameter in build script according to your setup
- ./build
- Using the signGP to manipulate qi image. The following is my script to generate bootable image for beagleboard.


#!/bin/sh -x
signGP ./image/qi-omap3530*bin
mv ./image/*.ift MLO


- Make partitions for VFAT and EXT3 respectively in your SD card.
- copy your rootfs into EXT3 partition
- copy MLO file to VFAT partition
- copy your kernel uImage to /boot/ directory and rename it as
uImage-OMAPBEAGLE.bin
- If you have any kernel command needed to add, you can add text file /boot/boot/append-OMAP_BEAGLE
- Boot from SD /* Holding USER key and press RESET key */

If everything goes as well, you can see

Qi Bootloader omap3530 matt-abacus omap3530_146fa25ffad66c65
一 9月 21 19:01:16 CST 2009 Copyright (C) 2009 0xlab.org.


Detected: OMAP3530_BEAGLE, Beagle C3

Trying kernel: SD Card rootfs
Partition: 2 start +819315 512-byte blocks, size 266 MiB
Found: "Linux-2.6.29-omap1-06519-gc3598"
Size: 2089 KiB
Cmdline: console=ttyS2,115200n8 init=/sbin/init loglevel=8 rootfstype=ext3 rootwait root=/dev/mmcblk0p2
Starting --->

Uncompressing Linux.........................................................................done, booting the kernel.
Linux version 2.6.29-omap1-06519-gc3598c9-dirty (matt@matt-abacus) (gcc version 4.2.3 (SQL Star ARM Cross Toolchain 2008-beta1)) #395 Fri Sep 18 14:42:37 CST 2009
CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OMAP3 Beagle Board
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 65536
free_area_init_node: node 0, pgdat c0432be8, node_mem_map c04af000
Normal zone: 512 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 65024 pages, LIFO batch:15
OMAP3430 ES3.0
SRAM: Mapped pa 0x40200000 to va 0xd7000000 size: 0x100000
Reserving 12582912 bytes SDRAM for VRAM
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
Kernel command line: console=ttyS2,115200n8 init=/sbin/init loglevel=8 rootfstype=ext3 rootwait root=/dev/mmcblk0p2
..........


Here is my TODO list for reminding,

- Add support for booting from NAND
- Add hardware version detection

PS. Since the DVI module would be only reset one time. So the flash phenomenon on the display device as getting into kernel would not be existed.

2009年9月4日 星期五

Getting start to know ARM-based debug system

It's a VERY VERY late post.

When I was stuck on porting Qi on the beagleboard, the first thought is to use openOCD to see where problem is. Unfortunately, the support for ARM cortex A8 is provided but not full functional. The good thing of opensource is, anything goes wrong or you don't like it, you can just fix by yourself. But the assumption is, you need to know how to fix. So I can't help myself to start to learn the knowledge about ARM debug system. After the co-work with Holger, my ex-colleague, we have some progress to make openOCD work as we expect. He also posted the thing on his blog:

- Standing on the shoulders of giants - Fixing OpenOCD for the Beagleboard

If you are interesting with how to get familiar with ARM-based debug system for Cortex A8, Magnus provides a great introduction:

- Debugging on Cortex-A8, System components