bpi_a64_android的编译配置文件排版v1.2.txt
2017/4/6 18:58
0、SDK压缩包的下载:
(链接:http://pan.baidu.com/s/1i5yZtQ1 密码:646o)
http://forum.banana-pi.org/t/bpi-m64-android-6-0-1-source-code/2748
BPI-M64 Android 6.0.1 source code
Banana Pi BPI-M64
google driver link:
https://drive.google.com/open?id=0B_YnvHgh2rwjaVVMSi1xU1ZOY2c
国内下载地址:
http://dev.banana-pi.org.cn/
http://dev.banana-pi.org.cn/Source_Code/BPI-M64/BPI-A64-Android_SourceCode.tar.gz
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ tar zxvf BPI-A64-Android_SourceCode.tar.gz
还没完,你必须增加3个编译链^_(链接:http://pan.baidu.com/s/1o77wyiY 密码:oe0v)
Notice: Please download this file to the correct path https://drive.google.com/open?id=0B_YnvHgh2rwjaVRrc2VoR0xLTlE
(1)gcc-linaro-aarch64.tar.xz ==> /lichee/buildroot/dl
(2)gcc-linaro-aarch64.tar.xz ==> /lichee/brandy/toolchain
(3)gcc-linaro-arm.tar.xz ==> /lichee/brandy/toolchain
重新分块压缩:
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ tar zcvf - bpi_a64_android/ | split -b 3990000000 - bpi_a64_android_wyb_patch1_20170310.tar.gz
rootroot@cm-System-Product-Name:~$ cd /home/wwt/bpi_a64_android/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ cat bpi_a64_android_wyb_patch1_20170310.tar.gza* > android.tar.gz
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ tar zxvf android.tar.gz
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ ll
总用量 15487948
drwx------ 3 rootroot rootroot 4096 4月 6 15:18 ./
drwxrwxrwx 9 rootroot rootroot 4096 4月 6 15:11 ../
-rw-rw-r-- 1 rootroot rootroot 7929814164 4月 6 15:17 android.tar.gz
drwxrwxr-x 4 rootroot rootroot 4096 1月 9 10:54 bpi_a64_android/
-rw------- 1 rootroot rootroot 3990000000 3月 10 20:32 bpi_a64_android_wyb_patch1_20170310.tar.gzaa
-rw------- 1 rootroot rootroot 3939814164 3月 10 20:37 bpi_a64_android_wyb_patch1_20170310.tar.gzab
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ cd bpi_a64_android/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android$ ll
总用量 20
drwxrwxr-x 4 rootroot rootroot 4096 1月 9 10:54 ./
drwx------ 3 rootroot rootroot 4096 4月 6 15:18 ../
drwxrwxr-x 26 rootroot rootroot 4096 1月 5 15:40 android/
drwxrwxr-x 7 rootroot rootroot 4096 9月 5 2016 lichee/
-rw-rw-r-- 1 rootroot rootroot 977 1月 9 10:01 README.md
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android$
1、编译lichee内核
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ cd bpi_a64_android/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android$ cd lichee/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ ./build.sh config
Welcome to mkscript setup progress
All available chips:
0. sun50iw1p1
Choice: 0
All available platforms:
0. android
1. dragonboard
2. linux
3. camdroid
4. secureandroid
Choice: 0
All available kernel:
0. linux-3.10
1. linux-3.4
Choice: 0
All available boards:
0. bpi-m64-hdmi
1. bpi-m64-lcd
Choice: 1
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ ./build.sh
Copy boot.img to output directory ...
Copy modules to target ...
sun50iw1p1 compile Kernel successful
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:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$
硬件配置:(六核心得i7-4930K+16GB的内存)
rootroot@cm-System-Product-Name:~$ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
12 Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz
2、编译Android(大约需要一个小时):
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ cd ../android/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ source build/envsetup.sh
including device/asus/deb/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including 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-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/htc/flounder/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/moto/shamu/vendorsetup.sh
including device/softwinner/bpi-m64-hdmi/vendorsetup.sh
including device/softwinner/bpi-m64-lcd/vendorsetup.sh
including device/softwinner/common/vendorsetup.sh
including sdk/bash_completion/adb.bash
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. aosp_deb-userdebug
8. aosp_flo-userdebug
9. full_fugu-userdebug
10. aosp_fugu-userdebug
11. mini_emulator_arm64-userdebug
12. m_e_arm-userdebug
13. mini_emulator_mips-userdebug
14. mini_emulator_x86_64-userdebug
15. mini_emulator_x86-userdebug
16. aosp_flounder-userdebug
17. aosp_hammerhead-userdebug
18. aosp_hammerhead_fp-userdebug
19. aosp_shamu-userdebug
20. bpi_m64_hdmi-eng
21. bpi_m64_hdmi-user
22. bpi_m64_hdmi-userdebug
23. bpi_m64_lcd-eng
24. bpi_m64_lcd-user
25. bpi_m64_lcd-userdebug
Which would you like? [aosp_arm-eng] 23
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=bpi_m64_lcd
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
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=MMB29M
OUT_DIR=out
============================================
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ extract-bsp
/home/wwt/bpi_a64_android/bpi_a64_android/android/device/softwinner/bpi-m64-lcd/bImage copied!
/home/wwt/bpi_a64_android/bpi_a64_android/android/device/softwinner/bpi-m64-lcd/modules copied!
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ make -j12
Creating filesystem with parameters:
Size: 2147483648
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 8192
Label: system
Blocks: 524288
Block groups: 16
Reserved block group size: 127
Created filesystem with 2422/131072 inodes and 260574/524288 blocks
Install system fs image: out/target/product/bpi-m64-lcd/system.img
out/target/product/bpi-m64-lcd/system.img+out/target/product/bpi-m64-lcd/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=2192446080 blocksize=4224 total=1034077436 reserve=22146432
#### make completed successfully (57:57 (mm:ss)) ####
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
3、打包img镜像
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ pack -d
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/tools/pack/sun50iw1p1_android_bpi-m64-lcd_card0.img
pack finish
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ pack
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/tools/pack/sun50iw1p1_android_bpi-m64-lcd_uart0.img
pack finish
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
4、编译uboot(可选)
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy$ ./build.sh -p sun50iw1p1
CC external/openssl_ext.c ...
make -C /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/spl/
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/ss_spl.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/spc_spl.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/smc_spl.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/gic_spl.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/debug.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/ctype.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/eabi_compat.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/efuse_spl.c ...
make -C /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/
make[3]: 没有什么可以做的为 `all'。
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-gcc -E -include /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/include/u-boot/u-boot.lds.h -DSBROMSWADDR="(0x10480)" -ansi -D__ASSEMBLY__ -P - </home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/main/sboot.lds >/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.lds
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-ld /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/dram/libchipid.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/dram/libdram.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/mmc/libmmc.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/nand/libnand.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/flash/libflash.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/libs/libgeneric.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/load/libload.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/main/libmain.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/openssl/libopenssl.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/spl/libsource_spl.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/libgeneric.o -L /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/gcc-linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.3 -lgcc -T/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.lds -o sboot.axf -Map sboot.map
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-objcopy -O binary /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.axf /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.bin
"sboot_sun50iw1p1.bin" -> "/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/sun50iw1p1/bin/sboot_sun50iw1p1.bin"
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy$
5、配置menuconfig(裁剪内核)
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ ./build.sh config
Welcome to mkscript setup progress
All available chips:
0. sun50iw1p1
Choice: 0
All available platforms:
0. android
1. dragonboard
2. linux
3. camdroid
4. secureandroid
Choice: 0
All available kernel:
0. linux-3.10
1. linux-3.4
Choice: 0
All available boards:
0. bpi-m64-hdmi
1. bpi-m64-lcd
Choice: 1
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ cd linux-3.10/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/linux-3.10$ cp .config bak1_orig.config
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/linux-3.10$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/linux-3.10$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/linux-3.10$ make ARCH=arm64 menuconfig
(1)改大打印缓存
General setup --->
(17) Kernel log buffer size (16 => 64KB, 17 => 128KB)
修改为:
(18) Kernel log buffer size (16 => 64KB, 17 => 128KB)
(2)只保留博通/正基的WIFI/BT:AP6212等
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
<M> Broadcom FullMAC wireless cards support
(/system/vendor/modules/fw_bcmdhd.bin) Firmware path
(/system/vendor/modules/nvram.txt) NVRAM path
Enable Chip Interface (SDIO bus interface support) --->
Interrupt type (Out-of-Band Interrupt) --->
<M> Realtek 8723B SDIO or SPI WiFi
<M> Realtek 8723BS_VQ0 WiFi
<M> Realtek 8189F SDIO WiFi
修改为:
< > Realtek 8723B SDIO or SPI WiFi
< > Realtek 8723BS_VQ0 WiFi
< > Realtek 8189F SDIO WiFi
(3)关闭SELinux安全内核方便调试
Security options --->
[*] NSA SELinux Support
[*] NSA SELinux boot parameter
(1) NSA SELinux boot parameter default value
[ ] NSA SELinux runtime disable
[*] NSA SELinux Development Support
[*] NSA SELinux AVC Statistics
(1) NSA SELinux checkreqprot default value
[ ] NSA SELinux maximum supported policy format version
修改为:
[ ] NSA SELinux Support
(4)在内核中增加USB摄像头/打开UVC的驱动
Device Drivers --->
<*> Multimedia support --->
[ ] Media USB Adapters --->
修改为:
[*] Media USB Adapters --->
--- Media USB Adapters
*** Webcam devices ***
< > USB Video Class (UVC)
修改为:
<M> USB Video Class (UVC)
[*] UVC input events device support (NEW)
6、默认编译的IMG镜像的功能验证:
(1)、LCD(MIPI)+CTP
(2)、WIFI+BT:AP6212A0
(3)、RJ45以太网Ethernet
(4)、HDMI
(5)、USB摄像头/UVC使用APP/APK:CameraFi实现。可以实现500万像素拍照和录像,太牛了!!!!
USB摄像头打开的时候,竟然没有/dev/video0,非常神奇。
root@bpi-m64-lcd:/dev # ls -l v*
ls -l v*
crw------- root root 7, 0 2010-01-01 08:01 vcs
crw------- root root 7, 1 2010-01-01 08:01 vcs1
crw------- root root 7, 128 2010-01-01 08:01 vcsa
crw------- root root 7, 129 2010-01-01 08:01 vcsa1
2017/4/6 18:58
0、SDK压缩包的下载:
(链接:http://pan.baidu.com/s/1i5yZtQ1 密码:646o)
http://forum.banana-pi.org/t/bpi-m64-android-6-0-1-source-code/2748
BPI-M64 Android 6.0.1 source code
Banana Pi BPI-M64
google driver link:
https://drive.google.com/open?id=0B_YnvHgh2rwjaVVMSi1xU1ZOY2c
国内下载地址:
http://dev.banana-pi.org.cn/
http://dev.banana-pi.org.cn/Source_Code/BPI-M64/BPI-A64-Android_SourceCode.tar.gz
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ tar zxvf BPI-A64-Android_SourceCode.tar.gz
还没完,你必须增加3个编译链^_(链接:http://pan.baidu.com/s/1o77wyiY 密码:oe0v)
Notice: Please download this file to the correct path https://drive.google.com/open?id=0B_YnvHgh2rwjaVRrc2VoR0xLTlE
(1)gcc-linaro-aarch64.tar.xz ==> /lichee/buildroot/dl
(2)gcc-linaro-aarch64.tar.xz ==> /lichee/brandy/toolchain
(3)gcc-linaro-arm.tar.xz ==> /lichee/brandy/toolchain
重新分块压缩:
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ tar zcvf - bpi_a64_android/ | split -b 3990000000 - bpi_a64_android_wyb_patch1_20170310.tar.gz
rootroot@cm-System-Product-Name:~$ cd /home/wwt/bpi_a64_android/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ cat bpi_a64_android_wyb_patch1_20170310.tar.gza* > android.tar.gz
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ tar zxvf android.tar.gz
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ ll
总用量 15487948
drwx------ 3 rootroot rootroot 4096 4月 6 15:18 ./
drwxrwxrwx 9 rootroot rootroot 4096 4月 6 15:11 ../
-rw-rw-r-- 1 rootroot rootroot 7929814164 4月 6 15:17 android.tar.gz
drwxrwxr-x 4 rootroot rootroot 4096 1月 9 10:54 bpi_a64_android/
-rw------- 1 rootroot rootroot 3990000000 3月 10 20:32 bpi_a64_android_wyb_patch1_20170310.tar.gzaa
-rw------- 1 rootroot rootroot 3939814164 3月 10 20:37 bpi_a64_android_wyb_patch1_20170310.tar.gzab
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ cd bpi_a64_android/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android$ ll
总用量 20
drwxrwxr-x 4 rootroot rootroot 4096 1月 9 10:54 ./
drwx------ 3 rootroot rootroot 4096 4月 6 15:18 ../
drwxrwxr-x 26 rootroot rootroot 4096 1月 5 15:40 android/
drwxrwxr-x 7 rootroot rootroot 4096 9月 5 2016 lichee/
-rw-rw-r-- 1 rootroot rootroot 977 1月 9 10:01 README.md
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android$
1、编译lichee内核
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android$ cd bpi_a64_android/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android$ cd lichee/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ ./build.sh config
Welcome to mkscript setup progress
All available chips:
0. sun50iw1p1
Choice: 0
All available platforms:
0. android
1. dragonboard
2. linux
3. camdroid
4. secureandroid
Choice: 0
All available kernel:
0. linux-3.10
1. linux-3.4
Choice: 0
All available boards:
0. bpi-m64-hdmi
1. bpi-m64-lcd
Choice: 1
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ ./build.sh
Copy boot.img to output directory ...
Copy modules to target ...
sun50iw1p1 compile Kernel successful
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:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$
硬件配置:(六核心得i7-4930K+16GB的内存)
rootroot@cm-System-Product-Name:~$ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
12 Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz
2、编译Android(大约需要一个小时):
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ cd ../android/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ source build/envsetup.sh
including device/asus/deb/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including 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-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/htc/flounder/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/moto/shamu/vendorsetup.sh
including device/softwinner/bpi-m64-hdmi/vendorsetup.sh
including device/softwinner/bpi-m64-lcd/vendorsetup.sh
including device/softwinner/common/vendorsetup.sh
including sdk/bash_completion/adb.bash
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. aosp_deb-userdebug
8. aosp_flo-userdebug
9. full_fugu-userdebug
10. aosp_fugu-userdebug
11. mini_emulator_arm64-userdebug
12. m_e_arm-userdebug
13. mini_emulator_mips-userdebug
14. mini_emulator_x86_64-userdebug
15. mini_emulator_x86-userdebug
16. aosp_flounder-userdebug
17. aosp_hammerhead-userdebug
18. aosp_hammerhead_fp-userdebug
19. aosp_shamu-userdebug
20. bpi_m64_hdmi-eng
21. bpi_m64_hdmi-user
22. bpi_m64_hdmi-userdebug
23. bpi_m64_lcd-eng
24. bpi_m64_lcd-user
25. bpi_m64_lcd-userdebug
Which would you like? [aosp_arm-eng] 23
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=bpi_m64_lcd
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
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=MMB29M
OUT_DIR=out
============================================
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ extract-bsp
/home/wwt/bpi_a64_android/bpi_a64_android/android/device/softwinner/bpi-m64-lcd/bImage copied!
/home/wwt/bpi_a64_android/bpi_a64_android/android/device/softwinner/bpi-m64-lcd/modules copied!
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ make -j12
Creating filesystem with parameters:
Size: 2147483648
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 8192
Label: system
Blocks: 524288
Block groups: 16
Reserved block group size: 127
Created filesystem with 2422/131072 inodes and 260574/524288 blocks
Install system fs image: out/target/product/bpi-m64-lcd/system.img
out/target/product/bpi-m64-lcd/system.img+out/target/product/bpi-m64-lcd/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=2192446080 blocksize=4224 total=1034077436 reserve=22146432
#### make completed successfully (57:57 (mm:ss)) ####
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
3、打包img镜像
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ pack -d
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/tools/pack/sun50iw1p1_android_bpi-m64-lcd_card0.img
pack finish
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$ pack
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/tools/pack/sun50iw1p1_android_bpi-m64-lcd_uart0.img
pack finish
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/android$
4、编译uboot(可选)
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy$ ./build.sh -p sun50iw1p1
CC external/openssl_ext.c ...
make -C /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/spl/
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/ss_spl.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/spc_spl.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/smc_spl.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/gic_spl.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/debug.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/ctype.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/eabi_compat.c ...
CC /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/efuse_spl.c ...
make -C /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/
make[3]: 没有什么可以做的为 `all'。
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-gcc -E -include /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/include/u-boot/u-boot.lds.h -DSBROMSWADDR="(0x10480)" -ansi -D__ASSEMBLY__ -P - </home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/main/sboot.lds >/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.lds
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-ld /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/dram/libchipid.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/dram/libdram.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/mmc/libmmc.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/nand/libnand.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/flash/libflash.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/libs/libgeneric.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/load/libload.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/main/libmain.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/openssl/libopenssl.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/spl/libsource_spl.o /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/libgeneric.o -L /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/gcc-linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.3 -lgcc -T/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.lds -o sboot.axf -Map sboot.map
/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-objcopy -O binary /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.axf /home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.bin
"sboot_sun50iw1p1.bin" -> "/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/sun50iw1p1/bin/sboot_sun50iw1p1.bin"
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/brandy$
5、配置menuconfig(裁剪内核)
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ ./build.sh config
Welcome to mkscript setup progress
All available chips:
0. sun50iw1p1
Choice: 0
All available platforms:
0. android
1. dragonboard
2. linux
3. camdroid
4. secureandroid
Choice: 0
All available kernel:
0. linux-3.10
1. linux-3.4
Choice: 0
All available boards:
0. bpi-m64-hdmi
1. bpi-m64-lcd
Choice: 1
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee$ cd linux-3.10/
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/linux-3.10$ cp .config bak1_orig.config
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/linux-3.10$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/linux-3.10$
rootroot@cm-System-Product-Name:/home/wwt/bpi_a64_android/bpi_a64_android/lichee/linux-3.10$ make ARCH=arm64 menuconfig
(1)改大打印缓存
General setup --->
(17) Kernel log buffer size (16 => 64KB, 17 => 128KB)
修改为:
(18) Kernel log buffer size (16 => 64KB, 17 => 128KB)
(2)只保留博通/正基的WIFI/BT:AP6212等
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
<M> Broadcom FullMAC wireless cards support
(/system/vendor/modules/fw_bcmdhd.bin) Firmware path
(/system/vendor/modules/nvram.txt) NVRAM path
Enable Chip Interface (SDIO bus interface support) --->
Interrupt type (Out-of-Band Interrupt) --->
<M> Realtek 8723B SDIO or SPI WiFi
<M> Realtek 8723BS_VQ0 WiFi
<M> Realtek 8189F SDIO WiFi
修改为:
< > Realtek 8723B SDIO or SPI WiFi
< > Realtek 8723BS_VQ0 WiFi
< > Realtek 8189F SDIO WiFi
(3)关闭SELinux安全内核方便调试
Security options --->
[*] NSA SELinux Support
[*] NSA SELinux boot parameter
(1) NSA SELinux boot parameter default value
[ ] NSA SELinux runtime disable
[*] NSA SELinux Development Support
[*] NSA SELinux AVC Statistics
(1) NSA SELinux checkreqprot default value
[ ] NSA SELinux maximum supported policy format version
修改为:
[ ] NSA SELinux Support
(4)在内核中增加USB摄像头/打开UVC的驱动
Device Drivers --->
<*> Multimedia support --->
[ ] Media USB Adapters --->
修改为:
[*] Media USB Adapters --->
--- Media USB Adapters
*** Webcam devices ***
< > USB Video Class (UVC)
修改为:
<M> USB Video Class (UVC)
[*] UVC input events device support (NEW)
6、默认编译的IMG镜像的功能验证:
(1)、LCD(MIPI)+CTP
(2)、WIFI+BT:AP6212A0
(3)、RJ45以太网Ethernet
(4)、HDMI
(5)、USB摄像头/UVC使用APP/APK:CameraFi实现。可以实现500万像素拍照和录像,太牛了!!!!
USB摄像头打开的时候,竟然没有/dev/video0,非常神奇。
root@bpi-m64-lcd:/dev # ls -l v*
ls -l v*
crw------- root root 7, 0 2010-01-01 08:01 vcs
crw------- root root 7, 1 2010-01-01 08:01 vcs1
crw------- root root 7, 128 2010-01-01 08:01 vcsa
crw------- root root 7, 129 2010-01-01 08:01 vcsa1
root@bpi-m64-lcd:/dev #