Android4A5D3xEK

Abstracts: We give both prebuilt demo packages for SAMA5D3x-EK with LCD display as well as the steps to build the demo from source code.


Prebuilt demo packages

Here is the current release demo packages for Android4SAM for SAMA5D3xEK board

Based on Android-4.2.2_r1.1 SAMA5D3x with Android-4.2.2_r1.1
NAND boot Android-4.2.2_r1.1-sama5d3x-nandboot.zip
md5sum
SD Card boot Android-4.2.2_r1.1-sama5d3x-sdcardboot.zip
md5sum

The binary demo works with SamA5D3x-EK with LCD support.

It also supports:

Build Demo packages from source code

Android file system

We suggest to use ubuntu 10.04.04 LTS based system to build Android source code. To configure your system correctly, please check Initializing a Build Environment.

Get Source code

  • For Android4SAM v4.2
       $ mkdir android4sam_v4.2 && cd android4sam_v4.2
       $ repo init -u git://github.com/Android4SAM/platform_sammanifest.git -b android4sam_v4.2
       $ repo sync
       

  • For Android4SAM v4.2 with headless for D35
       $ mkdir android4sam_v4.2_headless && cd android4sam_v4.2_headless
       $ repo init -u git://github.com/Android4SAM/platform_sammanifest.git -b android4sam_v4.2 -m headless.xml
       $ repo sync
       

  • For Android4SAM v4.1
       $ mkdir android4sam_v4.1 && cd android4sam_v4.1
       $ repo init -u git://github.com/Android4SAM/platform_sammanifest.git -b android4sam_v4.1
       $ repo sync
       

  • For Android4SAM v4.0
       $ mkdir android4sam_v4.0 && cd android4sam_v4.0
       $ repo init -u git://github.com/Android4SAM/platform_sammanifest.git -b android4sam_v4.0
       $ repo sync
       

  • For Android4SAM v3.1
       $ mkdir android4sam_v3.1 && cd android4sam_v3.1
       $ repo init -u git://github.com/Android4SAM/platform_sammanifest.git -b android4sam_v3.1
       $ repo sync
       

  • For Android4SAM v3.0
       $ mkdir android4sam_v3.0 && cd android4sam_v3.0
       $ repo init -u git://github.com/Android4SAM/platform_sammanifest.git -b android4sam_v3.0
       $ repo sync
       

TIP The last step need quite a long time, which is heavily depends on your network speed. The total size you will get is about 8 GiB, please check your network speed and know about the time it will spend.

You can check the log information for repo init and repo sync.

Configure and Build

TIP The headless building process is the same as Audio.

For Audio default support

$ source build/envsetup.sh
$ lunch sama5d3-eng
$ make -j4

For ISI default support
TIP This only support in Android4SAM v4.2 release

$ source build/envsetup.sh
$ lunch sama5d3isi-eng
$ make -j4

TIP -j [jobs] specifies the number of jobs (commands) to run simultaneously. Here using -j4 as an example. More information take man make as a reference.

TIP make will take more time, for example: on a 4 core cpu, 4 GiB DDR, it will take more than half an hour.

You can check the log information for source build/envsetup.sh, lunch sama5d3-eng and make -j4.

Generate ubifs image for boot up from NAND flash

TIP The headless generate ubifs image process is the same as Audio.

For Audio default support

$ mkubi_image -b sama5d3

For ISI default support
TIP This only support in Android4SAM v4.2 release

$ mkubi_image -b sama5d3isi

For Android4SAM v4.2 or Android4SAM v4.1 or Android4SAM v4.0 Then, you will get system_ubifs-SAMA5D3-ANDROID-4.2.2_r1.1.img and userdata_ubifs-SAMA5D3-ANDROID-4.2.2_r1.1.img file.

For Android4SAM v3.1 or v3.0 Then, you will get system_ubifs-SAMA5D3-ANDROID-4.0.4_r2.1.img and userdata_ubifs-SAMA5D3-ANDROID-4.0.4_r2.1.img file.

If any errors, please check make_android_ubifs.log file

You can check the log information for mkubi_image -b sama5d3.

Generate image for boot up from sd card

For generate SD card image, you need have root permission of your host PC, and know the SD card device name.

Warning, important when use mksd_image, it will reformat the SD card, so all data on SD card will lose. Please be sure when execute this command and get the right device name of SD card, or else it will cause unrecovery damage.

  • Switch to root user to get root permission for operation,
       $ sudo su root
       
  • Take /dev/sdb as the device name for SD card.

TIP The headless generate sd card image process is the same as Audio.

For Audio default support

   $ mksd_image -b sama5d3 -s /dev/sdb
   
For ISI default support
TIP This only support in Android4SAM v4.2 release
   $ mksd_image -b sama5d3isi -s /dev/sdb
   

If any errors, please check make_sdcard_ubifs.log file

You can check the log information for mksd_image -b sama5d3 -s /dev/sdb.

AT91Bootstrap

For more information about at91bootstrap, please visit Linux4SAM.

Get source code

You can download AT91Bootstrap source code on the at91bootstrap git repository. You can clone the repository by doing:
$ git clone git://github.com/linux4sam/at91bootstrap.git
$ cd at91bootstrap

  • For Android4SAM v4.2
       $ git checkout -b android4sam_v4.2 Android4sam_v4.2
       

  • For Android4SAM v4.1
       $ git checkout -b android4sam_v4.1 Android4sam_v4.1
       

  • For Android4SAM v4.0
       $ git checkout -b android4sam_v4.0 Android4sam_v4.0
       

  • For Android4SAM v3.1
       $ git checkout -b android4sam_v3.1 android4sam_v3.1
       

  • For Android4SAM v3.0
       $ git checkout -b android4sam_v3.0 remotes/origin/at91bootstrap-3.5.x
       

Configure and Build

Assuming you are at the AT91Bootstrap root directory.

Generate boot file for boot up from NAND flash

  • Using sama5d3xeknf_android_uimage_dt_defconfig for Android4SAM v4.2 to configure the at91bootstrap.
  • Using sama5d3xeknf_android_dt_defconfig for Android4SAM v4.1 or v4.0 to configure the at91bootstrap.
  • Using at91sama5d3xeknf_android_dt_defconfig for Android4SAM v3.0 or v3.1 to configure the at91bootstrap.

Following take Android4SAM v4.2 as an example

$ make mrproper
$ make sama5d3xeknf_android_uimage_dt_defconfig
$ make ARCH=arm CROSS_COMPILE=(path_to_cross-compiler/cross-compiler-prefix-) 

Generate boot file for boot up from SD card

  • Using sama5d3xeksd_android_uimage_dt_defconfig for Android4SAM v4.2 to configure the at91bootstrap for booting from SD/MMC slot 0 on EK.
  • Using sama5d3xeksd_android_dt_defconfig for Android4SAM v4.1 or v4.0 to configure the at91bootstrap for booting from SD/MMC slot 0 on EK.
  • Using at91sama5d3xeknf_android_dt_defconfig for Android4SAM v3.0 or v3.1 to configure the at91bootstrap for booting from SD/MMC slot 0 on EK.

Following take Android4SAM v4.2 as an example

$ make mrproper
$ make sama5d3xeksd_android_uimage_dt_defconfig
$ make ARCH=arm CROSS_COMPILE=(path_to_cross-compiler/cross-compiler-prefix-) 

Android Linux kernel

Get Source code

You can download Android Linux kernel source code on the linux-at91 git repository. You could clone the repository by doing:

$ git clone git://github.com/Android4SAM/linux-at91.git
$ cd linux-at91

  • For Android4SAM v4.2
       $ git checkout -b android4sam_v4.2 Android4sam_v4.2
       

  • For Android4SAM v4.1
       $ git checkout -b android4sam_v4.1 Android4sam_v4.1
       

  • For Android4SAM v4.0
       $ git checkout -b android4sam_v4.0 Android4sam_v4.0
       

  • For Android4SAM v3.1
       $ git checkout -b android4sam_v3.1 android4sam_v3.1
       

  • For Android4SAM v3.0
       $ git checkout -b android4sam_v3.0 remotes/origin/android4sam_v3.0
       

Configure and build

Assuming you are at the Android Linux kernel root directory.

Generate uImage for boot up from NAND flash

Warning, important Before you build Android Linux kernel, you need to copy root (<android_working_dir> /out/target/product/sama5d3/root) folder build from Android to Android Linux kernel root folder.

Please use sama5d3_android_ubifs_defconfig to configure Android Linux kernel.

$ make mrproper
$ make ARCH=arm sama5d3_android_ubifs_defconfig
$ make ARCH=arm CROSS_COMPILE=(path_to_cross-compiler/cross-compiler-prefix-)  uImage

Generate uImage for boot up from SD card

Please use sama5d3_android_sdcard_defconfig to configure Android Linux kernel

$ make mrproper
$ make ARCH=arm sama5d3_android_sdcard_defconfig
$ make ARCH=arm CROSS_COMPILE=(path_to_cross-compiler/cross-compiler-prefix-) uImage

Generate dtb file for EK board

For sama5d3xek board, we only support boot up with device tree. Please visit for more information: Changes introduced by Device Tree support.

$ make ARCH=arm CROSS_COMPILE=<path_to_cross-compiler/cross-compiler-prefix-> dtbs
... ... ...
  DTC     arch/arm/boot/sama5d31ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d31ek.dts"
  DTC     arch/arm/boot/sama5d31ek_pda.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d31ek_pda.dts"
  DTC     arch/arm/boot/sama5d33ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d33ek.dts"
  DTC     arch/arm/boot/sama5d33ek_pda.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d33ek_pda.dts"
  DTC     arch/arm/boot/sama5d34ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d34ek.dts"
  DTC     arch/arm/boot/sama5d34ek_pda.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d34ek_pda.dts"
  DTC     arch/arm/boot/sama5d35ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d35ek.dts"
  DTC     arch/arm/boot/sama5d36ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d36ek.dts"
  DTC     arch/arm/boot/sama5d36ek_pda.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d36ek_pda.dts"

Then you will find each dtb files under arch/arm/boot/dts folder.

Boot up Android

Boot up Android from NAND flash

There are two methods, choose one you prefer.

After that, reboot EK board, you can boot up Android system

Boot up Android from SD card

When you run mksd_image command, it will create three partitions on your SD card:

  • Partition 1: formatted as DOS partition
    • Please copy at91bootstrap image into this partition as boot.bin
    • Please copy dtb files: at91bootstrap will auto choose dtb file if successfully read one wire information, if read one wire failed, it will fall back use sama5d31ek.dtb (For Android4SAM v3.0, it use ek.dtb) file name.
    • Please copy uImage into this partition as image.bin
  • Partition 2: formatted as EXT4 partition, Android file system exist in this partition, copied by mksd_image automatically.
  • Partition 3: formatted as DOS partition, export as external sd card, so can access with massive storage.

After that, insert SD card and reboot EK board, you can boot up Android system

r18 - 01 Oct 2014 - 03:39:53 - JunminLin
 
Android4SAM

Copyright by the contributing authors. All material on the platform is the property of the contributing authors.

Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions

Atmel and others, are registered trademarks or trademarks of Atmel or its subsidiaries.This site is powered by the TWiki collaboration platform

ARM and others are registered trademarks or trademarks or ARM Ltd. Other terms and product names may be trademarks of others.

Under the terms of the Creative Commons Attribution License

Syndicate this siteRSS ATOM