星期二, 9月 17, 2013

Add a project on exist AOSP repository


Add a project on exist AOSP repository (ex: realtek android driver)


  • Make a git repository & add/commit files
    cd /hardware/realtek/wlan
    git init
    git add *
    git commit -m "1st release" -a


  • Create .repo/projects
    cd .git
    mkdir -p ../../../../.repo/projects/hardware/realtek/wlan.git
    cp -a * ../../../../.repo/projects/hardware/realtek/wlan.git/

  • Remove local git files & make link to .repo/projects
    rm -rf branches/ config description hooks/ info/ logs/ objects/ refs/
    ln -s ../../../../.repo/projects/hardware/realtek/wlan.git/branches .
    ln -s ../../../../.repo/projects/hardware/realtek/wlan.git/config .
    ln -s ../../../../.repo/projects/hardware/realtek/wlan.git/description .
    ln -s ../../../../.repo/projects/hardware/realtek/wlan.git/hooks .
    ln -s ../../../../.repo/projects/hardware/realtek/wlan.git/info .
    ln -s ../../../../.repo/projects/hardware/realtek/wlan.git/logs .
    ln -s ../../../../.repo/projects/hardware/realtek/wlan.git/objects .
    ln -s ../../../../.repo/projects/hardware/realtek/wlan.git/refs .


  • Edit project.list and manifest.xml

    vi .repo/project.list
- add
 hardware/realtek/wlan
    vi .repo/manifest.xml 
- add