Difference between revisions of "How to Make an Android SD Card Flash Image for MIPS CI20"

From eLinux.org
Jump to: navigation, search
(Add pointer to link for correct tool chain to avoid future build problems)
(Update build procedures for KitKat vs Lollipop, UBIFS vs EXT4, and add boot directions for EXT4. Refer reader to old directions for reflashing for UBIFS.)
Line 16: Line 16:
 
Create repo and fetch contents
 
Create repo and fetch contents
  
         repo init -u git://github.com/MIPS/manifests.git -b dev-mips-kitkat -m mips-kk-4.4.2_r1.m1.xml
+
        # KitKat
 +
         repo init -u git://github.com/MIPS/manifests.git -b dev-mips-kitkat -m ci20-kk-4.4.2_r3.m1.xml
 +
        repo sync
 +
 
 +
        # Lollipop
 +
        repo init -u git://github.com/MIPS/manifests.git -b dev-mips-lollipop-mr1 -m ci20-lp-5.1.1_r6.m1.xml
 
         repo sync
 
         repo sync
 
          
 
          
Line 28: Line 33:
 
Run "make"
 
Run "make"
  
         make -j 8 # You may need to adjust the number depending on your build system
+
        # UBIFS
 +
         make -j <N> # You may need to adjust the number depending on your build system
 +
 
 +
        # EXT4
 +
        make WITH_EXT4=true -j <N> # You may need to adjust the number depending on your build system
  
 
Insert an SD card to be written into the host system then run the following commands
 
Insert an SD card to be written into the host system then run the following commands
  
 
         cd device/imgtec/ci20/sdcardinstaller/
 
         cd device/imgtec/ci20/sdcardinstaller/
 +
 +
        # UBIFS
 
         ./mksdcard /dev/sd''X'' # The name of the SD card device may vary across systems
 
         ./mksdcard /dev/sd''X'' # The name of the SD card device may vary across systems
  
The SD card can now be used to [[CI20_Dev_Zone#NAND_Flashing_SD_card|flash the CI20 NAND.]]
+
        # EXT4
 +
        ./mksdcard-ext4 /dev/sdX
 +
       
 +
 
 +
If you are using UBIFS the SD card can now be used to [[CI20_Dev_Zone#NAND_Flashing_SD_card|flash the CI20 NAND.]]
 +
 
 +
If you are using EXT4, the SD image is used as the boot image:
 +
 
 +
        * Place the JP3 jumper to position 2-3,
 +
        * Plug in the SD card and power on the board,
  
 
== Github links ==
 
== Github links ==

Revision as of 15:07, 19 October 2015

Tool Chain

Before attempting the steps below please follow the directions for downloading and installing the appropriate tool chain here.

Build steps

Create a directory to hold the source tree

       mkdir <CI20 Android Directory>

Enter new directory

       cd <CI20 Android Directory>

Create repo and fetch contents

       # KitKat
       repo init -u git://github.com/MIPS/manifests.git -b dev-mips-kitkat -m ci20-kk-4.4.2_r3.m1.xml
       repo sync
       # Lollipop
       repo init -u git://github.com/MIPS/manifests.git -b dev-mips-lollipop-mr1 -m ci20-lp-5.1.1_r6.m1.xml
       repo sync
       

Set up environment variables needed to build image (Note. this takes 50Gb of space and quite a bit of time)

       export TOP=`pwd`
       source build/envsetup.sh
       lunch aosp_ci20-userdebug
       export JAVA_HOME=/usr/lib/jvm/java-6-oracle

Run "make"

       # UBIFS
       make -j <N> # You may need to adjust the number depending on your build system
       # EXT4
       make WITH_EXT4=true -j <N> # You may need to adjust the number depending on your build system

Insert an SD card to be written into the host system then run the following commands

       cd device/imgtec/ci20/sdcardinstaller/
       # UBIFS
       ./mksdcard /dev/sdX # The name of the SD card device may vary across systems
       # EXT4
       ./mksdcard-ext4 /dev/sdX
       

If you are using UBIFS the SD card can now be used to flash the CI20 NAND.

If you are using EXT4, the SD image is used as the boot image:

       * Place the JP3 jumper to position 2-3,
       * Plug in the SD card and power on the board,

Github links

These repositories host the sources for the the kernel, u-boot and android.

https://github.com/MIPS/CI20_linux/tree/dev-mips-kitkat-v3.0.8
https://github.com/MIPS/CI20_u-boot/tree/dev-mips-kitkat-v2013.10
https://github.com/MIPS/CI20_android/tree/dev-mips-kitkat