UNICODE全志a31s四核A4开发板(ak78s)配置Android4.2.2的开发环境apt-get update模式(ubuntu11.04)0.03.txt
1、找海克莱特买了两片ak78s,签署NDA之后获得SDK:
android4.2.2:android_A31-Android4.2-v3.2.tar.gz
kernel:lichee_A31-Android4.2-v3.2.tar.gz
A31s_android开发环境使用手册V1.120130123.pdf
A31s_android开发环境使用手册V1.120130123_NoRestriction.pdf
linux下烧录程序:LiveSuitV305_For_Linux64.zip
Windows下烧录程序(不好用):PhoenixSuit1.0.6.rar
2、开启ubuntu系统的root用户的方法:
sudo passwd root
[sudo]password for rootroot:
Enter new UNIX password:
Retype new UNIX password:
passwd:password updated successfully
(重启之后即可用root登陆)
3、更新源列表
刷新源
apt-get update
(直接从ubuntu官网更新,非常快。公司10Mbps的网速。)
4、安装常用软件:
https://www.doczj.com/doc/5e11156372.html,/source/initializing.html
Initializing a Build Environment
Installing required packages(Ubuntu10.04--11.10)
You will need a64-bit version of Ubuntu.Ubuntu10.04is recommended.Building using a newer version of Ubuntu is currently only experimentally supported and is not guaranteed to work on branches other than master.
sudo apt-get install git-core gnupg flex bison gperf build-essential\
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs\
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev\
libgl1-mesa-dev g++-multilib mingw32tofrodos python-markdown\
libxml2-utils xsltproc
安装samba:
sudo smbpasswd-a root
(输入密码2次:root)
New SMB password:
Retype new SMB password: Added user root.
gedit/etc/samba/smb.conf
(在最后面添加以下内容:)[root]
comment=Root Derectories path=/
public=yes
browseable=yes
writable=yes
valid users=root [root]
comment=Root Derectories path=/
public=yes
browseable=yes
writable=yes
valid users=root [rootroot]
comment=Root Derectories path=/
public=yes
browseable=yes
writable=yes
valid users=rootroot
重启samba:
/etc/init.d/smbd restart
获取当前电脑配置的IP地址:ifconfig
freescale的i.MX6Q编译android4.2.2还需要安装:
sudo apt-get install uuid-dev
sudo apt-get install uuid
sudo apt-get install uuidcdef
sudo apt-get install liblzo2-dev
sudo apt-get install liblzo2-dev:i386
sudo apt-get install uuid-dev:i386
sudo apt-get install git-core
sudo apt-get install gnupg
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install gperf
sudo apt-get install build-essential
sudo apt-get install zip
sudo apt-get install curl
sudo apt-get install zlib1g-dev
sudo apt-get install libc6-dev
sudo apt-get install lib32ncurses5-dev
sudo apt-get install ia32-libs
sudo apt-get install x11proto-core-dev
sudo apt-get install libx11-dev
sudo apt-get install lib32readline5-dev
rootroot@rootroot-Aspire-4738G:~$sudo apt-get install lib32readline5-dev Reading package lists...Done
Building dependency tree
Reading state information...Done
Package lib32readline5-dev is not available,but is referred to by another package. This may mean that the package is missing,has been obsoleted,or
is only available from another source
However the following packages replace it:
lib32readline-gplv2-dev
E:Package'lib32readline5-dev'has no installation candidate
rootroot@rootroot-Aspire-4738G:~$
sudo apt-get install lib32readline-gplv2-dev
sudo apt-get install lib32z-dev
sudo apt-get install libgl1-mesa-dev
sudo apt-get install g++-multilib
sudo apt-get install mingw32
sudo apt-get install tofrodos
sudo apt-get install python-markdown
sudo apt-get install libxml2-utils
sudo apt-get install uboot-mkimage
5、Ubuntu下手动安装jdk6:jdk-6u37-linux-x64.bin
https://www.doczj.com/doc/5e11156372.html,/earl86/archive/2008/10/26/1666550.html
Ubuntu手动安装jdk6
cd/opt
chmod777jdk-6u37-linux-x64.bin
./jdk-6u37-linux-x64.bin-s/opt
配置classpath,修改所有用户的环境变量
cp/etc/profile/etc/profile.bak
$sudo gedit/etc/profile
在文件最后添加
#set java environment
JAV A_HOME=/opt/jdk1.6.0_37
export JRE_HOME=/opt/jdk1.6.0_37/jre
export CLASSPATH=.:$JAV A_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAV A_HOME/bin:$JRE_HOME/bin:$PATH
测试(重启系统之后):java-version
Android系统的编译:
4.编译代码
4.1.
4.1.编译内核
4.2.
4.2.编译Android
在lichee目录下面执行以下语句(海克莱特推荐用)
./build.sh-p sun6i_fiber_a31s
当屏幕上出现
###############################
#
compile success
#
###############################
表明编译成功完成,假如编译停止时未看见这个编译成功的提示表明编译失败。注意:
编译帮助指令,
在不知道自己该输入什么指令编译固件时,
可以在lichee目录下键入./build.sh
-h来获取帮助。
4.2.
4.2.编译Android
nti
在lichee目录下面执行以下语句(海克莱特推荐用)
./build.sh-p sun6i_fiber_a31s
当屏幕上出现
###############################
#
compile success
#
###############################
表明编译成功完成,假如编译停止时未看见这个编译成功的提示表明编译失败。注意:
编译帮助指令,
在不知道自己该输入什么指令编译固件时,
可以在lichee目录下键入./build.sh
-h来获取帮助。
在android目录下执行以下语句
选择android产品
source build/envsetup.sh
lunch
屏幕上会出现以下输出:
root@rootroot-desktop:/home/a31s_android4.2_v3.2/android#source build/envsetup.sh including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including device/samsung/toroplus/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/softwinner/fiber-3g/vendorsetup.sh
including device/softwinner/fiber-a31st512m/vendorsetup.sh
including device/softwinner/fiber-a31st/vendorsetup.sh
including device/softwinner/fiber-common/vendorsetup.sh
including device/softwinner/fiber-evb/vendorsetup.sh
including device/softwinner/fiber-w01/vendorsetup.sh
including device/softwinner/fiber-w02/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
root@rootroot-desktop:/home/a31s_android4.2_v3.2/android#lunch
You're building on Linux
Lunch menu...pick a combo:
1.full-eng
2.full_x86-eng
3.vbox_x86-eng
4.full_mips-eng
5.full_grouper-userdebug
6.full_tilapia-userdebug
7.mini_armv7a_neon-userdebug
8.mini_armv7a-userdebug
9.mini_mips-userdebug
10.mini_x86-userdebug
11.full_mako-userdebug
12.full_maguro-userdebug
13.full_manta-userdebug
14.full_toroplus-userdebug
15.full_toro-userdebug
16.fiber_3g-eng
17.fiber_a31st512m-eng
18.fiber_a31st-eng
19.fiber_evb-eng
20.fiber_w01-eng
21.fiber_w02-eng
22.full_panda-userdebug
Which would you like?[full-eng]18
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.2
TARGET_PRODUCT=fiber_a31st
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-2.6.38-8-generic-x86_64-with-Ubuntu-11.04-natty HOST_BUILD_TYPE=release
BUILD_ID=JDQ39
OUT_DIR=out
============================================
选择跟自己开发板对应的产品:18.fiber_a31st-eng
拷贝内核和模块到android中device/softwinner/fiber-xxx/
rootroot@rootroot-Barebone-name:~/a31s_android4.2_v3.2/android$extract-bsp /home/rootroot/a31s_android4.2_v3.2/android/device/*/fiber-a31st/bImage copied! /home/rootroot/a31s_android4.2_v3.2/android/device/*/fiber-a31st/modules copied!编译android
make-j8
8为开8个线程,请根据您的电脑的实际配置选用。(普通的电脑设置为make-j2即可)在out/target/product/fiber-xxx/目录下面会生成boot.img,recovery.img,system.img3个包。
5.固件打包升级
5.1.打包
直接在android目录下输入命令pack即可。
pack
打包成功屏幕上会出现以下打印
root@rootroot-desktop:/home/a31s_android4.2_v3.2/android#pack
--------release version,donnot have uart printf-------------
!!!Packing for crane!!!
`chips/sun6i/configs/android/default/diskfs.fex'->`out/diskfs.fex'
`chips/sun6i/configs/android/default/env.cfg'->`out/env.cfg'
`chips/sun6i/configs/android/default/image.cfg'->`out/image.cfg'
`chips/sun6i/configs/android/default/sys_partition_private.fex'->`out/sys_partition_private.fex' `chips/sun6i/configs/android/fiber-a31st/sys_config.fex'->`out/sys_config.fex'
`chips/sun6i/configs/android/fiber-a31st/sys_partition.fex'->`out/sys_partition.fex'
`chips/sun6i/configs/android/fiber-a31st/bootlogo.bmp'->`out/bootfs/os_show/bootlogo.bmp'
`/home/a31s_android4.2_v3.2/lichee/out/android/u-boot.bin'->`bootfs/linux/u-boot.bin'
argc=2
input name sys_config.fex
Script1source file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sys_config.fex Script1bin file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sys_config.bin
parser1file ok
argc=2
input name sys_partition.fex
Script1source file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sys_partition.fex Script1bin file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sys_partition.bin parser1file ok
boot0file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/boot0_nand.bin
script file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sys_config.bin
script update boot0ok
boot0file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/boot0_sdcard.fex
script file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sys_config.bin
script update boot0ok
uboot file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/boot1_nand.fex
script file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sys_config.bin
boot1length=68000
total length=74000
checksum=e0aa4e6a
uboot file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/boot1_sdcard.fex script file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sys_config.bin
boot1length=40000
total length=4c000
checksum=ac5ba37e
mbr count=4
partitation file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sys_partition.bin mbr_name file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/sunxi_mbr.fex download_name file Path=/home/a31s_android4.2_v3.2/lichee/tools/pack/out/dlinfo.fex mbr size=16384
mbr magic softw411
disk name=bootloader
disk name=env
disk name=boot
disk name=system
disk name=data
disk name=misc
disk name=recovery
disk name=cache
disk name=databk
disk name=UDISK
this is not a partition key
update_for_part_info0
crc0=4d5d4517
crc1=d8e0144a
crc2=bd56e1ec
crc3=28ebb0b1
update mbr file ok
disk:c
CopyRootToFS(/home/a31s_android4.2_v3.2/lichee/tools/pack/out/bootfs)
c:\linux
c:\os_show
c:\magic.bin
find magic!!
RealLen=0x5CDC00
CPlugin Free lib
CPlugin Free lib
FileLength=5cdc00FileSizeHigh=0
FileLength=20000FileSizeHigh=0
FileLength=8a6000FileSizeHigh=0
FileLength=1dc85534FileSizeHigh=0
FileLength=b41800FileSizeHigh=0
/home/a31s_android4.2_v3.2/lichee/tools/pack/pctools/linux/eDragonEx/
/home/a31s_android4.2_v3.2/lichee/tools/pack/out
Begin Parse sys_partion.fex
Add partion bootloader.fex BOOTLOADER_FEX00
Add partion very bootloader.fex BOOTLOADER_FEX00
FilePath:bootloader.fex
FileLength=5cdc00FileSizeHigh=0
Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath:env.fex
FileLength=20000FileSizeHigh=0
Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath:boot.fex
FileLength=8a6000FileSizeHigh=0
Add partion system.fex SYSTEM_FEX000000
Add partion very system.fex SYSTEM_FEX000000
FilePath:system.fex
FileLength=1dc85534FileSizeHigh=0
Add partion recovery.fex RECOVERY_FEX0000
Add partion very recovery.fex RECOVERY_FEX0000
FilePath:recovery.fex
FileLength=b41800FileSizeHigh=0
Add partion diskfs.fex DISKFS_FEX000000
BuildImg0
Dragon execute image.cfg SUCCESS!
---------image is at-------------
/home/a31s_android4.2_v3.2/lichee/tools/pack/sun6i_android_fiber-a31st.img
备用知识:
(貌似不好使)
1、给浏览器Firefox安装插件Tab Mix Plus0.4.0.4:
https://https://www.doczj.com/doc/5e11156372.html,/zh-CN/firefox/addon
https://https://www.doczj.com/doc/5e11156372.html,/zh-CN/firefox/addon/tab-mix-plus/?src=search
Tab Mix Plus0.4.0.4
作者:onemen,Gary Reyes
Tab Mix Plus加强Firefox的标签页浏览功能。它包括的功能有复制标签、集中控制标签、标签点击选项卡、撤销关闭的标签和窗口等等。它还包括一个功能全面的会话管理器。
2、在ubuntu下安装Flash,以阅读BAIDU文库:
https://www.doczj.com/doc/5e11156372.html,/jhting/item/2047ff0a3381dcdd73e676c1
CentOS6.2安装Flash Player插件(64)
把libflashplayer.so复制到/usr/lib64/mozilla/plugins/libflashplayer.so
root@rootroot-desktop:/usr#find.-name libflashplayer.so
./lib/mozilla/plugins/libflashplayer.so
./lib64/mozilla/plugins/libflashplayer.so
./lib64/kde4/libflashplayer.so
root@rootroot-desktop:/usr#
3、Ubuntu12.04中文输入法的安装(没有琢磨明白)
https://www.doczj.com/doc/5e11156372.html,/os/201207/144189.html
输入密码后,系统会安装简体中文语言包。
第二步,安装IBus框架,在终端输入以下命令:
sudo apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3ibus-qt4
rootroot@rootroot-Aspire-4738G:~$im-switch-s ibus
The program'im-switch'is currently not installed.You can install it by typing:
sudo apt-get install im-switch
rootroot@rootroot-Aspire-4738G:~$sudo apt-get install im-switch
启动IBus框架,在终端输入:
im-switch-s ibus
安装完IBus框架后注销系统,保证更改立即生效。
第三步:安装拼音引擎
有下面几种常用选择:
sudo apt-get install ibus-pinyin ibus-table-wubi ibus-googlepinyin ibus-sunpinyin
IBus拼音:sudo apt-get install ibus-pinyin
IBUS五笔:sudo apt-get install ibus-table-wubi
谷歌拼音输入法:sudo apt-get install ibus-googlepinyin
Sun拼音输入法:sudo apt-get install ibus-sunpinyin
第四步:设置IBus框架https://www.doczj.com/doc/5e11156372.html,
ibus-setup
此时,IBus Preference设置被打开。我们在Input Method选项卡中,选择自己喜欢的输入方式,并配置自己喜欢的快捷键即可。如下图所示:
rwxrwxr-x7rootroot rootroot40966月2522:45./
drwxr-xr-x5rootroot rootroot40968月1415:23../
drwxrwxr-x9rootroot rootroot40966月2522:43boot/
drwxrwxr-x15rootroot rootroot40966月2522:43buildroot/
-r-xr-xr-x1rootroot rootroot556月2522:28build.sh*
drwxrwxr-x26rootroot rootroot40966月2522:28linux-3.3/
-r--r--r--1rootroot rootroot2326月2522:28README
drwxrwxr-x8rootroot rootroot40966月2522:28tools/
drwxrwxr-x22rootroot rootroot40966月2522:28u-boot/
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/lichee$
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/lichee$
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/lichee$
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/lichee$./build.sh-p sun6i_fiber_a31s
#######################################
#skip make buildroot for fiber_a31s#
#######################################
/home/rootroot/a31s_android4.2_v3.2/lichee/buildroot
Using default config......!
build standby
make:Entering directory `/home/rootroot/a31s_android4.2_v3.2/lichee/linux-3.3/arch/arm/mach-sun6i/pm/standby'
arm-linux-gnueabi-gcc-I.-I/home/rootroot/a31s_android4.2_v3.2/lichee/linux-3.3/include -I/home/rootroot/a31s_android4.2_v3.2/lichee/linux-3.3/arch/arm/mach-sun6i/include-g-c-nostdlib -march=armv7-a-marm-D__STANDBY_MODULE__-fno-unwind-tables -fno-asynchronous-unwind-tables-mlittle-endian-O2--min_array_alignment=4 --no_unaligned_access common.c-o common.o
arm-linux-gnueabi-gcc-I.-I/home/rootroot/a31s_android4.2_v3.2/lichee/linux-3.3/include -I/home/rootroot/a31s_android4.2_v3.2/lichee/linux-3.3/arch/arm/mach-sun6i/include-g-c-nostdlib -march=armv7-a-marm-D__STANDBY_MODULE__-fno-unwind-tables -fno-asynchronous-unwind-tables-mlittle-endian-O2--min_array_alignment=4 --no_unaligned_access standby.c-o standby.o
arm-linux-gnueabi-gcc-I.-I/home/rootroot/a31s_android4.2_v3.2/lichee/linux-3.3/include -I/home/rootroot/a31s_android4.2_v3.2/lichee/linux-3.3/arch/arm/mach-sun6i/include-g-c-nostdli
fs2/libyaffs2.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o lib/zlib/libz.o nand_sunxi/libnand net/libnet.o post/libpost.o board/allwinner/sun6i/libsun6i.o--end-group /home/rootroot/a31s_android4.2_v3.2/lichee/u-boot/arch/arm/lib/eabi_compat.o-L /home/rootroot/a31s_android4.2_v3.2/lichee/buildroot/output/external-toolchain/bin/../lib/gcc/arm-lin ux-gnueabi/4.6.3-lgcc-Map u-boot.map-o u-boot
arm-linux-gnueabi-objcopy-O srec u-boot u-boot.srec
arm-linux-gnueabi-objcopy--gap-fill=0xff-O binary u-boot u-boot.bin
make[1]:Leaving directory`/home/rootroot/a31s_android4.2_v3.2/lichee/u-boot'
mkdir:created directory‘/home/rootroot/a31s_android4.2_v3.2/lichee/out’
‘/home/rootroot/a31s_android4.2_v3.2/lichee/u-boot/u-boot.bin’->‘/home/rootroot/a31s_android4.2_v3.2/lichee/out/android/u-boot.bin’
###############################
#compile success#
###############################
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/lichee$
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/lichee$
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/lichee$
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/android$extract-bsp
/home/rootroot/a31s_android4.2_v3.2/android/device/*/fiber-a31st/bImage copied!
/home/rootroot/a31s_android4.2_v3.2/android/device/*/fiber-a31st/modules copied!
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/android$
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/android$
rootroot@rootroot-Aspire-4738G:~/a31s_android4.2_v3.2/android$make-j8
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.2
TARGET_PRODUCT=fiber_a31st
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.0-19-generic-x86_64-with-Ubuntu-13.04-raring
HOST_BUILD_TYPE=release
BUILD_ID=JDQ39
OUT_DIR=out
============================================
Checking build tools versions...
external/bluetooth/bluedroid/Android.mk:8:NO BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR,using only generic configuration CEDARX_PRODUCTOR:GENERIC
find:`../../vendor/unbundled_google/libs/gcm/gcm-client/src':No such file or directory
find:`../../vendor/unbundled_google/libs/gcm/gcm-server/src':No such file or directory
find:`../../vendor/unbundled_google/libs/gcm/gcm-client/src':No such file or directory
find:`../../vendor/unbundled_google/libs/gcm/gcm-server/src':No such file or directory
find:`src':No such file or directory
PRODUCT_COPY_FILES
frameworks/base/data/sounds/effects/ogg/Effect_Tick.ogg:system/media/audio/ui/Effect_Tick.ogg ignored.
PRODUCT_COPY_FILES
frameworks/base/data/sounds/effects/ogg/KeypressStandard.ogg:system/media/audio/ui/KeypressStan dard.ogg ignored.
PRODUCT_COPY_FILES
frameworks/base/data/sounds/effects/ogg/KeypressSpacebar.ogg:system/media/audio/ui/KeypressSpa cebar.ogg ignored.
PRODUCT_COPY_FILES
frameworks/base/data/sounds/effects/ogg/KeypressDelete.ogg:system/media/audio/ui/KeypressDelete. ogg ignored.
PRODUCT_COPY_FILES
frameworks/base/data/sounds/effects/ogg/KeypressReturn.ogg:system/media/audio/ui/KeypressReturn. ogg ignored.
PRODUCT_COPY_FILES
frameworks/base/data/sounds/effects/ogg/VideoRecord.ogg:system/media/audio/ui/VideoRecord.ogg ignored.
127|shell@android:/#busybox find.-name"0-0021"
./sys/devices/platform/sun6i-i2c.0/i2c-0/0-0021
./sys/bus/i2c/devices/0-0021
./sys/bus/i2c/drivers/gc0308/0-0021