'android'에 해당되는 글 '2'건

사용자 삽입 이미지

Android boot.img는 kernel + ramdisk입니다.
이 boot.img를 변경 적용하는 방법입니다.


$split_bootimg.pl boot.img 하면
kernel image와 ramdisk 이미지가 분리되면서, 아래와 같이 size와 cmdline 정보를 볼 수 있습니다.
Page size: 2048 (0x00000800)
Kernel size: 7115952 (0x006c94b0)
Ramdisk size: 4083551 (0x003e4f5f)
Board name:
Command line: console=ttyHSL0,115200,n8 user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.hardware=xxx .....
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete


kernel base address를 확인해 놓습니다. 다시 압축할 때 필요하겠죠.
$unpackbootimg -i boot.img

ramdisk를 압축해제 합니다.
ramdisk는 루트파일 시스템으로 init script, mount를 위한 directory 구조를 가지고 있는 ram 파일 시스템입니다.
$gzip -d boot.img-ramdisk.gz
cpio를 이용해 ramdisk를 풀어줍니다.
디렉토리를 만들어 압축을 풀어야 나중에 편합니다.
$mkdir ramdisk && mv boot.img-ramdisk ramdisk/ && cd ramdisk
$cpio -i -F boot.img-ramdisk

이제 boot.img에 포함된 ramdisk를 확인&수정할 수 있습니다.
수정하고자 하는 내용 변경 후,
$find . | cpio -o -H newc -O ../ramdisk
$cd .. && gzip ramdisk


만들어진 ramdisk와 kernel 이미지를 합칩니다.
$mkbootimg --cmdline "기존 cmdline" --base "unpackbootimg에서 확인한 base address" --pagesize (split에서 나온 page size) --kernel boot.img-kernel --ramdisk ramdisk.gz -o new-boot.img

완성되었으니 디바이스에 밀어넣으면 됩니다.
$fastboot flash boot new-boot.img





2015/02/17 08:47 2015/02/17 08:47
Posted by scott

How to configure development environment

1. Installation basic package on ubuntu 9.04 (32-bit x86)

   sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind python2.4 gawk wine

winecfg  #even though wraning is shown, ignore it in server.

2. Configuring python version and path for building AMSS

Python version and path is different as project.

In case of foreign product, 2.4 version is recommended and recommended path is /usr/local/bin/python2.4.

sudo ln -sf /usr/bin/python2.4 /usr/local/bin/python2.4

In case of domestic product, 2.4 version is recommended and recommended path is /pkg/python/2.4.3/bin/python.

sudo mkdir -p /pkg/python/2.4.3/bin
sudo ln -sf /usr/bin/python2.4 /pkg/python/2.4.3/bin/python

3. Installing RVCT

get ARM.tar.bz2
After then uncompress it to /opt directory.

      sudo tar xvjf ARM.tar.bz2 -C /opt

* You can identify that ARM directory is created at /opt directory.
* You should set ARMTOOLS, ARMROOT, ARMPATH, ARMLIB, ARMINCLUDE, ARMINC, ARMBIN, ARMHOME and ARMLMD_LICENSE_FILE environment variables for using RVCT toolchain.
* make rvct22_Config.sh to your local directory and move it /opt/share.

o copy rvct22_Config.sh to /opt/share directory without UI

     sudo mkdir -p /opt/share
    cd /opt/share
    sudo chmod a+x rvct22_Config.sh
    cd -

    or

    sudo cp rvct22_Config.sh /etc/profile.d/

o content of rvct22_Config.sh

            #!/bin/sh

            # This is script to build on Linux
            # Sets path for RVDS v.2.2.1

            export ARMTOOLS=RVCT22
            # use ARMROOT environment variable, scott@semanogic.com
            if [ -z "$ARMROOT" ]; then
            export ARMROOT=/opt/ARM
            fi

            export ARMPATH=$ARMROOT/RVCT/Programs/2.2/503/linux-pentium
            export EMAKE_ROOT=../../../../..

            #
            # ARM Include and Path Variables
            #
            export ARMLIB=$ARMROOT/RVCT/Data/2.2/503/lib
            export ARMINCLUDE=$ARMROOT/RVCT/Data/2.2/503/include/unix
            export ARMINC=$ARMROOT/RVCT/Data/2.2/503/include/unix
            export ARMBIN=$ARMROOT/RVCT/Programs/2.2/503/linux-pentium
            export ARMHOME=$ARMROOT

            export ARMLMD_LICENSE_FILE=8224@mccc-linux1:8224@165.243.137.66:8224@mcsw.lc01

            export PATH=$ARMPATH:$PATH


4. Installation and setting JDK 1.5 and JDK 1.6
4.1 Installation and setting manually

*******************************************************

For Stern User, go to ==== 3.2 Installation and setting automatically ==== *******************************************************

JDK version is differnce as android platform version.

    * In case of cupcake: JDK 1.6
    * In case of donut: JDK 1.5
    * In case of eclair: JDK 1.5

To build all platform, recommend to install JDK manually.

    * Click "첨부파일" on bottom of this page and download jdk-1_5_0_22-linux-i586.bin and jdk-6u17-linux-i586.bin"
    * execute the both executable binary shell script.

      sh jdk-1_5_0_22-linux-i586.bin

      sh jdk-6u17-linux-i586.bin

    * execute the both executable binary shell script.
    * jdk1.5.0_22 and jdk1.6.0_17 directory will be created in current directory.
    * Move them to random directory. (/usr/local/lib/jdk or /opt/jdk)
    * To use them, you must configure environment variables such as below.

      export JAVA_HOME=${JDK_DIRECTORY}
      export PATH=$JAVA_HOME/bin:$PATH
      export CLASSPATH=$JAVA_HOME/lib/tools.jar:.

          o Example in case of using JDK 1.6

            export JAVA_HOME=/usr/local/lib/jdk/jdk1.6.0_17
            export PATH=$JAVA_HOME/bin:$PATH
            export CLASSPATH=$JAVA_HOME/lib/tools.jar:.

          o Example in case of using JDK 1.5

            export JAVA_HOME=/usr/local/lib/jdk/jdk1.5.0_22
            export PATH=$JAVA_HOME/bin:$PATH
            export CLASSPATH=$JAVA_HOME/lib/tools.jar:.

4.2 Installation and setting automatically

(ubuntu 9.10 이상 /etc/apt/sources.list 추가)

deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse


    sudo apt-get update

    sudo apt-get install sun-java5-jdk

    * In case of using java 1.5(for stern user)

      sudo update-java-alternatives -s java-1.5.0-sun

    * In case of using java 1.6(for cupcake)

      sudo apt-get install sun-java6-jdk
     sudo update-java-alternatives -s java-6-sun

5. Installation eclipse

    * Download  eclipse
    * Uncompress

      mkdir $HOME/tools
     tar xvzf eclipse-java-galileo-linux-gtk.tar.gz -C $HOME/tools

    * Execute

      $HOME/tools/eclipse

    * Registering eclipse in panel

2010/05/11 16:03 2010/05/11 16:03
Posted by scott
TAG