Thursday, June 3, 2010

Build Android filesystem

The files downloaded from 0xlab are modified. Here is how it works now.

1. U-boot: u-boot can be version as long as it detect C4 board. You can use "saveenv" to save boot options to NAND. At least the delay time was saved. The following code should be used to pass the boot option to kernel.

==============
"mmcargs=setenv bootargs console=${console} " \
"init=/init " \
"rootwait " \
"vram=${vram} " \
"omapfb.mode=640x480MR-16@60 " \
"omapfb.debug=y " \
"omapdss.def_disp=${defaultdisplay} " \
"root=${mmcroot} " \
"rootfstype=${mmcrootfstype}\0" \
==============


2. Kernel: The kernel file can be downloaded from http://gitorious.org/0xlab-kernel. The only thing you need to change is the boot option.

==============
CONFIG_CMDLINE="root=/dev/mmcblk0p2 init=/init rw console=ttyS2,115200n8"
==============

That will set the root to the SD card.

3. Root file system: Zipped root file system from 0xlab works fine. The compiled system does not work very well at this moment.

Wednesday, June 2, 2010

repo sync error

sync stopped at 61%, solved by the following.

also have the same problem and I solved it by modifying manually
the .repo/manifests/default.xml file:
fetch="git://gitorious.org/0xdroid/" #instead of
fetch="git://git.0xlab.org/"
review="0xlab.org" />

Tuesday, June 1, 2010

Add eth0

=================
netcfg
netcfg eth0 dhcp
setprop net.dns1 134.129.111.111
=================

Boot procedure

The prebuilt image works fine. My kernel and rootfs do not boot. The kernel can not find the files system. It seems the kernel boot option needs to be set up to boot from "root=/dev/mmcblk0p2". I kernel option I found is:

===============
root=/dev/mmcblk0p2 init=/init rw console=ttyS2,115200n8
===============


I am trying my own rootfs with prebuilt kernel. More will follow

Monday, May 31, 2010

Compile kernel

git clone git://gitorious.org/0xlab-kernel/kernel.git
git checkout -b kernel_omap3 origin/omap3
make omap3_beagle_defconfig

boot option (to start from SD card)
===============
root=/dev/mmcblk0p2 init=/init rw console=ttyS2,115200n8
===============

make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- uImage

Compile u-boot

U-Boot is the interface between X-loader and Kernel Image. Wrong u-Boot could disable your USB port and other things. If you want to use GPIO, you can also enable GPIO in u-Boot. The beagleboard x-loader looks for u-boot.bin file on your MMC card. If none was found, the beagleboard will use the default NAND u-boot.bin file, which could have the USB disabled.


Modify the file

===============
pico ./include/configs/omap3_beagle.h
make omap3_beagle_config
make
===============

Make from source

before you make, you need a buildspec.mk file to speicify the beagleboard.

===================
echo "TARGET_PRODUCT := beagleboard" > buildspec.mk
echo “INSTALL_PREBUILT_DEMO_APKS := true” >> buildspec.mk
===================

Then use:

===================
make -j2
===================

The output of the make is a root file system in out/target/product/beagleboard/system.img


===================
* Format the first partition over than 100MB with VFAT on a SD card.
* Download the installer uImage.bin
* Rename out/target/product/beagleboard/system.img to android-beagle.ubi
* Rename arch/arm/boot/uImage to 0xkernel-beagle.bin
* Copy above three files into the first partition of SD/MMC card
* Plug the SD card in Beagle board SD slot and restart the Beagleboard
* Wait for UI installer over. The installer would perform NAND flashing and u-boot environment setup.
* Unplug SD card from the Beagleboard and reboot
* Enjoy!
===================