Background
I got this board from some Qualcomm guys at the Embedded Systems Conference "Design West" in San Jose in april 2012. Here is some idiomatic terminology you need:
- The SoC used is an APQ8060, it means this is a APQ8660 variant without modem, because the DragonBoard doesn't do 3G data or voicecalls, no. So it's a so-called "application processor" only. You will mostly build for 8660 anyway.
- The machine is known as surf in Qualcomm Android lingo, so configurations will have names such as msm8660_surf indicating the SoC and its board (the DragonBoard). However watch out: the machine called SURF in the mainline kernel tree is not the DragonBoard!
- The RS232 serial port is set at 115200 baud. USB-to-serial dongles didn't work for me, you might need a real serial port. Just open the console and play around. If you need to be root on the default software just hit su and play around. It's this quite restricted Android shell.
Preparations
This board only talks the fastboot boot protocol. (No U-Boot or such.) So you need to get this tool. On Fedora, simply:
yum install android-tools
This will get you the command-line tool fastboot.
To get the board into fastboot mode so that a new kernel (or image, or whatever) can be uploaded to it, remove the battery connector and DC plug so that the board is completely unpowered, then press and hold down the 5 key on the keypad while inserting the DC plug. At this point the board is in the state where you can run the fastboot command line.
Split the supplied boot image and boot the parts
There are various tools for peeling apart the supplied boot.img into its constituents. The one that finally worked for me was named unpackbootimg, and produced a number of files, most notably the kernel zImage and the ramdisk. When you have these parts the following magic boots it:
fastboot -b 40200000 -c "console=ttyHSL0,115200,n8 androidboot.hardware=qcom" -p 2048 boot boot.img-zImage boot.img-ramdisk.gz
So to boot a mainline kernel all you need is to replace the boot.img-zImage with something freshly compiled. However the TTY name is also changed in mainline from ttyHSL to ttyMSM so the parameter needs changing. Actually, with a mainline zImage kernel all you need is:
fastboot -b 40200000 -c "console=ttyMSM0,115200,n8" boot zImage
Building all of Android or just the stock kernel
This is pretty painful.
- Install repo from Google
- Retrieve and sync the source code something like so, and wait for some hours until it's sync:ed out:
mkdir android cd android repo init -u git://codeaurora.org/platform/manifest.git -b ics_chocolate -m default.xml --repo-url=git://codeaurora.org/tools/repo.git repo sync
- yum install perl-Switch zip curl gcc gcc-c++ flex bison gperf glibc-devel zlib-devel ncurses-devel libX11-devel libstdc++ libsx-devel readline-devel libXrender libXrandr
- Install Make 3.81 locally somewhere, e.g.:
mkdir /var/android-build cd /var/android-build tar xvfz make-3.81.tar.gz cd make-3.81 ./configure ./build.sh
- Install Sun's (Oracle's) JDK
- export PATH=/usr/java/jdk1.6.0_32/bin:/var/android-build/make-3.81:$PATH
- export LD_LIBRARY_PATH=/usr/java/jdk1.6.0_32/lib
- source build/envsetup.sh
- choosecombo, choose release, msm8660_surf, eng using the figures
- make -j9 kernel (if you have 8 cores, like me, rule is # of cores +1)
- If you are lucky the whole shebang will build in due time and the build products stack up in out/target/product/msm8660_surf
- Note: I only got this to the point of building that kernel and boot.img
Links
- Compile Android On Fedora 15/16 By Xoomdev
- Working with the Qualcomm APQ8060 DragonBoard development board by some guy called "follower" who tries to use the MacOS to develop for it, seems to be a rational thinking being, that's good...
