“MYZR-A40I-EK204 android Build Reference Manual”的版本间的差异

来自明远智睿的wiki
跳转至: 导航搜索
(创建页面,内容为“The download of the source code package needs to be downloaded from the network disk provided by us.<br> After downloading to the computer, it needs to be copied to...”)
 
(没有差异)

2022年4月11日 (一) 14:49的最新版本

The download of the source code package needs to be downloaded from the network disk provided by us.
After downloading to the computer, it needs to be copied to the virtual machine via Samba or other methods.
​We can create an A40I-specific directory to store related source code, compilation tools and some things that will be used later.
For example, my directory is: /home/liangyh/my-work/A40I, in this directory I created 4 subdirectories:

=====> Input:
liangyh@FS12:~/my-work/A40I$ ls
01_image 02_sources 03_toolchain 04_app

​ ​Directory 01 can be used to place our compiled image (will be explained later)

​ ​Directory 02 is used to place source code

​ ​Directory 03 is to place the cross-compilation tool configuration script

​ ​Directory 04 we can use to place our own applications (assigned by the user)

​ Copy the source package to the ~/my-work/A40I/02_sources directory in the virtual machine using Samba or other methods

​ And then unzip the source package to the current directory:

=====> Input:
~/my-work/A40I/02_sources$ cat android7.1_v3.tar.bz2* | tar xjv

android source code compilation

The source code is compiled using the script, the cross-compilation tool is automatically configured, the source code is compiled, and finally the board image file is packaged and generated.

1. Compile lichee

=====> Input:
$ cd ~/my-work/A40I/02_sources/android7.1_v3/lichee
$ ./build.sh
=====> Output:
INFO: ----------------------------------------
INFO: build lichee ...
INFO: chip: sun8iw11p1
INFO: platform: androidm
INFO: kernel: linux-3.10
INFO: board: a40-myzr
INFO: output: out/sun8iw11p1/androidm/a40-myzr
INFO: ----------------------------------------

......

#### make completed successfully (23:30 (mm:ss)) ####

2. Compile Android

=====> Input:
$ cd ../android
$ source build/envsetup.sh

=====> Output:
lincluding device/asus/fugu/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh

......

=====> Input:
$ lunch a40_myzr-user

=====> Output:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.1
TARGET_PRODUCT=a40_myzr

......

3. Match the image in the compiled lichee

=====> Input:
$ extract-bsp

=====> Output:
/home/liangyh/my-work/A40I/02_sources/android7.1_v3/android/device/softwinner/a40-myzr/bImage copied!
/home/liangyh/my-work/A40I/02_sources/android7.1_v3/android/device/softwinner/a40-myzr/modules copied!

4. Compile:

=====> Input:
$ make -j16

=====> Output:
......

Creating filesystem with parameters:
    Size: 1610612736
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 6144
    Label: system
    Blocks: 393216
    Block groups: 12
    Reserved block group size: 95
Created filesystem with 2442/98304 inodes and 171693/393216 blocks
[100% 28462/28462] Install system fs image: out/target/product/a40-myzr/system.img
out/target/product/a40-myzr/system.img+out/target/product/a40-myzr/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=1644331392 blocksize=4224 total=680351248 reserve=16612992

#### make completed successfully (01:02:01 (hh:mm:ss)) ####

5. Package firmware:

=====> Input:
$ pack

=====> Output:
......

Dragon execute image.cfg SUCCESS !
----------image is at----------

/home/liangyh/my-work/A40I/02_sources/android7.1_v3/lichee/tools/pack/sun8iw11p1_androidm_a40-myzr_uart0.img

pack finish