Transplant android 4.4.2 to SAMA5D3X

This forum is for users of Atmel's SAM Series and who are interested in using Android.

Moderator: nferre

crown
Posts: 6
Joined: Fri Aug 12, 2016 5:17 am

Transplant android 4.4.2 to SAMA5D3X

Wed Aug 24, 2016 10:24 am

Platform: MYD-SAMA5D3X
Version: android4.4.2

Step1: obtaining android original codes
1. $ mkdir android4sam_v4.4
2. $ cd android4sam_v4.4
3. $ repo init -u git://github.com/Android4SAM/platform_sammanifest.git -b android4sam_v4.4
4. $ repo sync

Step2: configuring android
1. $ . build/envsetup.sh
2. $ lunch sama5d3-eng
3. $ make

Step3: generating android mirro image
1
$ mkubi_image -b sama5d3
If everyting goes smothly with you, system_ubifs-SAMA5D3-ANDROID-4.4.2_r2.img 和userdata_ubifs-SAMA5D3-ANDROID-4.4.2_r2.img wil be generated under current catalogue.
unfortunately, if there are any problems, please refer to the details on make_android_ubifs.log

Step4: bruning the development board
Copy the img file which was generated above into one of the burned mirro Android-image's catalogue, amend and burn the control file flash_all.tcl:
……
……
## Files to load
set bootstrapFile "boot.bin"
set ubootFile "u-boot.bin"
set kernelFile "uImage"
append dtbFile $variant_name $board_suffix ".dtb"
set rootfsFile "rootfs.ubi"
set ubootEnvFile "ubootEnv.bin"

set systemfsFile "system_ubifs-SAMA5D3-ANDROID-4.4.2_r2.img"
set datafsFile "userdata_ubifs-SAMA5D3-ANDROID-4.4.2_r2.img"
if {! [file exists $dtbFile]} {
puts "-E- === Unknown $variant_name + board $board_suffix combination ==="
exit
}
## NandFlash Mapping
set bootStrapAddr 0x00000000
set ubootAddr 0x00040000
set ubootEnvAddr 0x000c0000
set dtbAddr 0x00180000
set kernelAddr 0x00200000

set systemfsAddr 0x01000000
set datafsAddr 0x0A000000
……
……

puts "-I- === Enable trimffs ==="
NANDFLASH::NandSetTrimffs 1
puts "-I- === Load the android system file system ==="
send_file {NandFlash} "$systemfsFile" $systemfsAddr 0
puts "-I- === Load the android data file system ==="
send_file {NandFlash} "$datafsFile" $datafsAddr 0

puts "-I- === DONE. ==="

Step5: firing android
Please remenber to start-up android after burned and amend uboot envionment variables.

U-Boot> setenv filesys_env 'ubi.mtd=1 ubi.mtd=2 root=ubi0:system rootfstype=ubifs init=/init androidboot.hardware=sama5-ek androidboot.console=ttyS0'
U-Boot> setenv nand_args 'run bootargs_defaults
U-Boot> setenv bootargs ${bootargs} no_console_suspend mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,144M(system),80M(userdata) ${filesys_env}'
U-Boot> saveen
U-Boot> boot

Thanks for your reading! :D

Return to “ANDROID”

Who is online

Users browsing this forum: No registered users and 1 guest