Usage of the scripts for updating kernel file of android online

Precondition

Git URL

http://android.git.linaro.org/gitweb?p=platform/external/linaro-android-tools.git;a=summary

git clone http://android.git.linaro.org/git-ro/platform/external/linaro-android-tools.git

Usage of update-android.sh

  • Update kernel files in boot partition with boot.tar.bz2
    • Used for updating all the files in boot partition of android device with boot.tar.bz2
         ./update-android.sh out/target/product/pandaboard/boot.tar.bz2
  • Update the uImage file to the boot partition
    • Used for updating the uImage to the boot partition of android:
         ./update-android.sh ./arch/arm/boot/uImage
  • Update the dtb file to the boot partition
    • Used for updating the dtb file to the boot partition of android.
         cp ./arch/arm/boot/omap4-panda.dtb ./arch/arm/boot/board.dtb
         ./update-android.sh ./arch/arm/boot/board.dtb
  • Update a single file to the boot partition
    • Used for updating a single file like cmdline to the boot partition of android:
         ./update-android.sh ./cmdline
  • Update modules to /system/modules
    • find all *.ko files in the specified directory like ./modules_for_android, and push them to the system/modules/ directory in the android device of 127.0.0.1:5555.
         ./update-android.sh -s 127.0.0.1:5555 ./modules_for_android

Usage of update-uInitrd.sh

Used for updating the file in uInitrd of the kernel. Like update the init.rc file

  • Only source path specified
    • this will replace the /init.rc file in uInitrd with /tmp/init.rc which is an updated copy of the original /init.rc file
         ./update-uInitrd.sh /tmp/init.rc
  • Both source path and target path specified
    • this will replace the /init.rc file in uInitrd with /tmp/init.rc.org
         ./update-uInitrd.sh -t /init.rc /tmp/init.rc.org 
  • Specify the serial number of target
    • this will replace the /init.rc file in uInitrd with /tmp/init.rc.org for device 127.0.0.1:5555
         ./update-uInitrd.sh -s 127.0.0.1:5555 -t /init.rc /tmp/init.rc.org 

Get Usage from Command Line

$ ./update-android.sh -h
Usage:
update-android.sh [--serial|-s serial] [--partition|-p boot-partition] <boot.tar.bz2|uImage|board.dtb|...>
        Update the kernel files in the boot partition of the specified
        android device with the specified boot.tar.bz2 file

update-android.sh [--serial|-s serial] kernel-source-directory
        Push all the module files in the specified kernel dirctory
        into the /system/modules dirctory of the specified android device

update-android.sh --help|-h
        Print out this help information
$

$ ./update-uInitrd.sh -h
Usage:
update-uInitrd.sh [--serial|-s <serial>] [--partition|-p <boot-partition>] [--target|-t <target-file>] <source-file>
        Update the target file in uInitrd of the specified device
        with the specified source file
        When the target file is not specified, will update the file in
        the root directory that has the same file name of the source file

update-uInitrd.sh --help|-h
        Print out this help information
$

Description of Command Line Options

  • --serial|-s:
    • the serial number of the android devices, if there is only one adb connected, then the specification of this option is unnecessary.
  • --partition|-p:
    • The boot partition in the android device.
    • for pandaboard/vexpress_a9, it will use mmcblk0p1 as the default boot partition.
    • for origen, it will use mmcblk0p2 as the default boot partition.
    • for vexpress_tc2, it's not support. you need to specified the partition from command line, and need to update the zImage file separately.

Platform/Android/KernelUpdateTools (last modified 2013-08-29 08:01:40)