全志sina33编译手册
大文实验室/大文哥
壹捌陆捌零陆捌捌陆捌贰
wb4916 AT qq.com
完成时间:2017/6/8 17:36
Xshell 5 (Build 0964)
Copyright (c) 2002-2016 NetSarang Computer, Inc. All rights reserved.
Type `help' to learn how to use Xshell prompt.
[c:\~]$
Connecting to 192.168.0.8:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Mon Jun 5 18:03:47 2017 from 192.168.0.136
rootroot@cm-System-Product-Name:~$ cd wyb/y3_sina33/
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$ ll
总用量 5339252
drwx------ 3 rootroot rootroot 4096 6月 6 09:32 ./
drwxrwxr-x 12 rootroot rootroot 4096 6月 5 18:10 ../
-rw------- 1 rootroot rootroot 1048576000 5月 22 09:38 android.tar.bz2.aa
-rw------- 1 rootroot rootroot 1048576000 5月 22 09:42 android.tar.bz2.ab
-rw------- 1 rootroot rootroot 1048576000 5月 22 09:41 android.tar.bz2.ac
-rw------- 1 rootroot rootroot 1048505135 5月 22 09:42 android.tar.bz2.ad
-rw------- 1 rootroot rootroot 1273122860 5月 22 09:14 lichee.tar.gz
drwx------ 2 rootroot rootroot 4096 5月 31 15:32 Linux/
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$ tar zxvf lichee.tar.gz
……
lichee/brandy/u-boot-2011.09/nand_spl/board/freescale/mx31pdk/u-boot.lds
lichee/brandy/u-boot-2011.09/nand_spl/board/freescale/mx31pdk/Makefile
lichee/brandy/u-boot-2011.09/nand_spl/nand_boot.c
lichee/brandy/u-boot-2011.09/nand_spl/nand_boot_fsl_elbc.c
lichee/brandy/u-boot-2011.09/mkconfig
lichee/build.sh
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$ ll
总用量 5339256
drwx------ 4 rootroot rootroot 4096 6月 6 10:03 ./
drwxrwxr-x 12 rootroot rootroot 4096 6月 5 18:10 ../
-rw------- 1 rootroot rootroot 1048576000 5月 22 09:38 android.tar.bz2.aa
-rw------- 1 rootroot rootroot 1048576000 5月 22 09:42 android.tar.bz2.ab
-rw------- 1 rootroot rootroot 1048576000 5月 22 09:41 android.tar.bz2.ac
-rw------- 1 rootroot rootroot 1048505135 5月 22 09:42 android.tar.bz2.ad
drwxr-xr-x 6 rootroot rootroot 4096 9月 4 2014 lichee/
-rw------- 1 rootroot rootroot 1273122860 5月 22 09:14 lichee.tar.gz
drwx------ 2 rootroot rootroot 4096 5月 31 15:32 Linux/
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$ cat android.tar.bz2.a* > android.tar.bz2
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$ ll
总用量 9435192
drwx------ 4 rootroot rootroot 4096 6月 6 10:04 ./
drwxrwxr-x 12 rootroot rootroot 4096 6月 5 18:10 ../
-rw-rw-r-- 1 rootroot rootroot 4194233135 6月 6 10:05 android.tar.bz2
-rw------- 1 rootroot rootroot 1048576000 5月 22 09:38 android.tar.bz2.aa
-rw------- 1 rootroot rootroot 1048576000 5月 22 09:42 android.tar.bz2.ab
-rw------- 1 rootroot rootroot 1048576000 5月 22 09:41 android.tar.bz2.ac
-rw------- 1 rootroot rootroot 1048505135 5月 22 09:42 android.tar.bz2.ad
drwxr-xr-x 6 rootroot rootroot 4096 9月 4 2014 lichee/
-rw------- 1 rootroot rootroot 1273122860 5月 22 09:14 lichee.tar.gz
drwx------ 2 rootroot rootroot 4096 5月 31 15:32 Linux/
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$ tar jxvf android.tar.bz2
……
android/frameworks/mff/.git/logs
android/frameworks/mff/.git/index
android/frameworks/mff/.git/config
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$
rootroot@cm-System-Product-Name:~/wyb/y3_sina33$ cd lichee/
(这个README是个坑,不要用)
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/lichee$ cat README
Examples:
1. Build linux-3.3 image for EVB
$cd lichee/
$./build.sh -p sun6i
$./build.sh pack
2. Build linux kernel android
$./build.sh -p sun6i_fiber
3. Build linux test package
$./build.sh -p sun6i_dragonboard
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/lichee$ ./build.sh config
Welcome to mkscript setup progress
All available chips:
0. sun8iw5p1
Choice: 0
All available platforms:
0. android
1. dragonboard
2. linux
Choice: 0
All available kernel:
0. linux-3.4
Choice: 0
All available boards:
0. evb
1. maple
2. redwood
3. y2
4. y3
Choice: 4
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/lichee$ ./build.sh
……
CC [M] /home/rootroot/wyb/y3_sina33/lichee/linux-3.4/modules/mali/DX910-SW-99002-r4p0-00rel0/driver/src/devicedrv/mali/linux/mali_sync.o
CC [M] /home/rootroot/wyb/y3_sina33/lichee/linux-3.4/modules/mali/DX910-SW-99002-r4p0-00rel0/driver/src/devicedrv/mali/__malidrv_build_info.o
LD [M] /home/rootroot/wyb/y3_sina33/lichee/linux-3.4/modules/mali/DX910-SW-99002-r4p0-00rel0/driver/src/devicedrv/mali/mali.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/rootroot/wyb/y3_sina33/lichee/linux-3.4/modules/mali/DX910-SW-99002-r4p0-00rel0/driver/src/devicedrv/mali/mali.mod.o
LD [M] /home/rootroot/wyb/y3_sina33/lichee/linux-3.4/modules/mali/DX910-SW-99002-r4p0-00rel0/driver/src/devicedrv/mali/mali.ko
make[2]: Leaving directory `/home/rootroot/wyb/y3_sina33/lichee/linux-3.4'
make[1]: Leaving directory `/home/rootroot/wyb/y3_sina33/lichee/linux-3.4/modules/mali/DX910-SW-99002-r4p0-00rel0/driver/src/devicedrv/mali'
cp DX910-SW-99002-r4p0-00rel0/driver/src/devicedrv/mali/mali.ko /home/rootroot/wyb/y3_sina33/lichee/linux-3.4/output/lib/modules/3.4.39/
if [ 0 -eq 1 ]; then \
cp DX910-SW-99002-r4p0-00rel0/driver/src/devicedrv/ump/ump.ko /home/rootroot/wyb/y3_sina33/lichee/linux-3.4/output/lib/modules/3.4.39/; \
fi
make: Leaving directory `/home/rootroot/wyb/y3_sina33/lichee/linux-3.4/modules/mali'
regenerate rootfs cpio
8772 blocks
9475 blocks
build_ramfs
Copy boot.img to output directory ...
Copy modules to target ...
INFO: build kernel OK.
INFO: build rootfs ...
INFO: skip make rootfs for android
INFO: build rootfs OK.
INFO: ----------------------------------------
INFO: build lichee OK.
INFO: ----------------------------------------
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/lichee$
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/lichee$
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/lichee$ ll
总用量 40
drwxr-xr-x 7 rootroot rootroot 4096 6月 6 10:22 ./
drwx------ 5 rootroot rootroot 4096 6月 6 10:09 ../
drwxr-xr-x 10 rootroot rootroot 4096 9月 4 2014 brandy/
-rw-rw-r-- 1 rootroot rootroot 116 6月 6 10:22 .buildconfig
drwxr-xr-x 15 rootroot rootroot 4096 9月 4 2014 buildroot/
-r-xr-xr-x 1 rootroot rootroot 55 9月 4 2014 build.sh*
drwxr-xr-x 28 rootroot rootroot 4096 6月 6 10:26 linux-3.4/
drwxrwxr-x 3 rootroot rootroot 4096 6月 6 10:22 out/
-r--r--r-- 1 rootroot rootroot 232 9月 4 2014 README
drwxr-xr-x 7 rootroot rootroot 4096 9月 4 2014 tools/
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/lichee$ cd ../android/
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/android$ source build/envsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/asus/deb/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/grouper/vendorsetup.sh
including device/softwinner/astar-y3/vendorsetup.sh
including device/softwinner/polaris-common/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including sdk/bash_completion/adb.bash
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/android$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_x86-eng
3. aosp_mips-eng
4. vbox_x86-eng
5. aosp_tilapia-userdebug
6. aosp_deb-userdebug
7. aosp_flo-userdebug
8. aosp_grouper-userdebug
9. astar_y3-eng
10. astar_y3-user
11. aosp_hammerhead-userdebug
12. aosp_mako-userdebug
13. mini_x86-userdebug
14. mini_armv7a_neon-userdebug
15. mini_mips-userdebug
16. aosp_manta-userdebug
Which would you like? [aosp_arm-eng] 9
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=astar_y3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=KVT49L
OUT_DIR=out
============================================
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/android$ extract-bsp
/home/rootroot/wyb/y3_sina33/android/device/*/astar-y3/bImage copied!
/home/rootroot/wyb/y3_sina33/android/device/*/astar-y3/modules copied!
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/android$ make -j12
……
home/rootroot/wyb/y3_sina33/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/home/rootroot/wyb/y3_sina33/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:/home/rootroot/wyb/y3_sina33/android/development/scripts:/home/rootroot/wyb/y3_sina33/android/prebuilts/devtools/tools:
+ ENABLE_SPARSE_IMAGE=
+ '[' -s = -s ']'
+ ENABLE_SPARSE_IMAGE=-s
+ shift
+ '[' 6 -ne 5 -a 6 -ne 6 ']'
+ SRC_DIR=out/target/product/astar-y3/system
+ '[' '!' -d out/target/product/astar-y3/system ']'
+ OUTPUT_FILE=out/target/product/astar-y3/obj/PACKAGING/systemimage_intermediates/system.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=system
+ SIZE=805306368
+ FC=out/target/product/astar-y3/root/file_contexts
+ case $EXT_VARIANT in
+ '[' -z system ']'
+ '[' -z 805306368 ']'
+ '[' -n out/target/product/astar-y3/root/file_contexts ']'
+ FCOPT='-S out/target/product/astar-y3/root/file_contexts'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -S out/target/product/astar-y3/root/file_contexts -l 805306368 -a system out/target/product/astar-y3/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/astar-y3/system'
+ echo make_ext4fs -s -S out/target/product/astar-y3/root/file_contexts -l 805306368 -a system out/target/product/astar-y3/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/astar-y3/system
make_ext4fs -s -S out/target/product/astar-y3/root/file_contexts -l 805306368 -a system out/target/product/astar-y3/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/astar-y3/system
+ make_ext4fs -s -S out/target/product/astar-y3/root/file_contexts -l 805306368 -a system out/target/product/astar-y3/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/astar-y3/system
Creating filesystem with parameters:
Size: 805306368
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 3072
Label:
Blocks: 196608
Block groups: 6
Reserved block group size: 47
Created filesystem with 1669/49152 inodes and 143149/196608 blocks
+ '[' 0 -ne 0 ']'
Install system fs image: out/target/product/astar-y3/system.img
out/target/product/astar-y3/system.img+out/target/product/astar-y3/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=822163584 blocksize=4224 total=577594067 reserve=8308608
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/android$
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/android$
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/android$
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/android$ pack
copying tools file
copying configs file
copying boot resource
copying boot file
packing for android
normal
/home/rootroot/wyb/y3_sina33/lichee/tools/pack/pctools/linux/eDragonEx/
/home/rootroot/wyb/y3_sina33/lichee/tools/pack/out
Begin Parse sys_partion.fex
Add partion boot-resource.fex BOOT-RESOURCE_FEX
Add partion very boot-resource.fex BOOT-RESOURCE_FEX
FilePath: boot-resource.fex
FileLength=4f6400Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=afa000Add partion system.fex SYSTEM_FEX000000
Add partion very system.fex SYSTEM_FEX000000
FilePath: system.fex
FileLength=224a4bdcAdd partion recovery.fex RECOVERY_FEX0000
Add partion very recovery.fex RECOVERY_FEX0000
FilePath: recovery.fex
FileLength=db3800Add partion diskfs.fex DISKFS_FEX000000
Add partion very diskfs.fex DISKFS_FEX000000
FilePath: diskfs.fex
FileLength=200sys_config.fex Len: 0xf7e3
config.fex Len: 0x9c98
split_xxxx.fex Len: 0x200
sys_partition.fex Len: 0xf0a
boot0_nand.fex Len: 0x8000
boot0_sdcard.fex Len: 0x8000
u-boot.fex Len: 0xbc000
fes1.fex Len: 0x1f60
usbtool.fex Len: 0x20600
aultools.fex Len: 0x25d92
aultls32.fex Len: 0x2295a
cardtool.fex Len: 0x14000
cardscript.fex Len: 0x6ea
sunxi_mbr.fex Len: 0x10000
dlinfo.fex Len: 0x4000
arisc.fex Len: 0x93503
boot-resource.fex Len: 0x4f6400
Vboot-resource.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
boot.fex Len: 0xafa000
Vboot.fex Len: 0x4
system.fex Len: 0x224a4bdc
Vsystem.fex Len: 0x4
recovery.fex Len: 0xdb3800
Vrecovery.fex Len: 0x4
diskfs.fex Len: 0x200
Vdiskfs.fex Len: 0x4
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------
/home/rootroot/wyb/y3_sina33/lichee/tools/pack/sun8iw5p1_android_y3.img
pack finish
rootroot@cm-System-Product-Name:~/wyb/y3_sina33/android$
默认编译存在的问题:
1、adb shell必须要在调试模式里面打开!
2、带休眠时间+开机锁屏。调试不方便。