Friday, April 12, 2013

How to Mirror Cyanogenmod Repo

As you may known, a repo is a list of git. Mirror a repo equal to mirror all git in this list.
There are several ways to mirror a repo:

1. It's simple to mirror it if it's aosp repo that support mirror already. That's guided by Google:
# Create a local mirror
$ mkdir -p /usr/local/mirror-aosp
$ cd /usr/local/mirror-aosp
$ repo init -u https://android.googlesource.com/mirror/manifest --mirror
$ repo sync
# Clone from your local mirror
$ mkdir aosp
$ cd aosp
$ repo init -u /usr/local/mirror-aosp/platform/manifest.git
# Update local mirror
$ cd /usr/local/mirror-aosp
$ repo sync

2. It's still simple if the repo also provide gitweb. As an example below for case of omapzoom
# Getting the tool
$ wget https://raw.github.com/ndechesne/git-mirror/master/git-mirror;
$ chmod +x git-mirror
# Create a local mirror
$ ./git-mirror -o /path/to/local-mirror/ -s http://git.omapzoom.org -g git://git.omapzoom.org
# Clone from your local mirror
$ mkdir omapzoom
$ cd omapzoom
$ repo init -u /path/to/local-mirror/git.omapzoom.org/platform/manifest.git
# Run again to update it
$ ./git-mirror -o /path/to/local-mirror/ -s http://git.omapzoom.org -g git://git.omapzoom.org

3. It's not simple if the repo does not support repo mirror like aosp also does not provide gitweb. It's CyanogenMod. So, to mirror it
Step1: getting list of git of CyanogenMod repo
Step2: mirror all git in this list
I made a helper sript to do that, please use if you like.
do-mirror-cyanogenmod

Usage:
$ chmod +x do-mirror-cyanogenmod
$ ./do-mirror-cyanogenmod NUMBER_CONCURRENT_DOWNLOAD

Example:
# Create a local mirror
$ mkdir mirror-cyanogenmod
$ cd mirror-cyanogenmod
$ ./do-mirror-cyanogenmod 8
# Clone from local mirror
$ repo init -u /path/to/mirror-cyanogenmod/android.git
# Update local mirror
$ cd /path/to/mirror-cyanogenmod/
$ ./do-mirror-cyanogenmod 8

NOTE: manifest of cyanogenmod usually includes several remotes, you may need to revise it accordingly

Reference:
[Setup git mirror]
http://www.omappedia.com/wiki/Setup_git_mirror
[Downloading the Source Tree]
http://source.android.com/source/downloading.html





Tuesday, December 21, 2010

Beagleboard-xM - Using TFTP To Load Images

All Beagleboard-xM's owners may already known, it's impossible using u-boot to load image into uSDCard or RAM, so far. This's no matter if you do not frequently changing the image but really a trouble if your job needs to do. So, if the u-boot cannot do, why don't let the kernel and busybox does. If you like it, please follow few steps below:

LAMP: By using:
o Kernel which supports mmc driver and ethernet driver
o tinyfs_loader which provides tftp command

Step 1: Setup environment
o A beagleboard-xm with uSDCard
o An tftp, nfs server

Step 2: Install kernel and tinyfs_loader (including busybox)
o A bootable uSDCard/vfat partion, x-loader & u-boot should be there. Still need u-boot, sure :D
o Download an uImage_loader and a tinyfs_loader from there
o Put the uImage_loader to uSDCard/vfat, tinyfs_loader to nfs server (extract tinyfs_loader as sudoers)

Step 3: Change as needed
o loadimage.tftp script in tinyfs_loader is called by init.rc
o Please modify this script as needed. At minimum you should change uImage name and tftp server IP
o By default, after loading image, loadimage.tftp calls to reboot

Step 4: In action
o For loading image, the bootcmd and bootargs should be something like this
# setenv bootcmd 'mmc init; fatload mmc 0 0x80000000 uImage_loader; bootm 0x80000000;'
# setenv bootargs console=ttyS2,115200n8 rootfs=/dev/nfs rw init=/init nfsroot=${SERVER_IP}:/srv/tinyfs_loader ip=${BOARD_IP}

EOL:
o Depend on your habit of using u-boot script, this loading ciruit could be very convenient and fast
o It's possible to get back the image from uSDCard to tftp server

Saturday, November 20, 2010

Wednesday, November 3, 2010

Friday, October 1, 2010

Friday, May 28, 2010

BeagleBoard-xM. How can I wait for U.

http://beagleboard.org/hardware-xM