下载并编译android8.1工程

1.下载工程环境
路径:https://redmine.rockchip.com.cn/projects/rk3328-android-8-0-box-sdk-dev/wiki

repo init --repo-url ssh://[email protected]/tools/repo -u ssh://10.10.10.29:29418/android/platform/manifest -b rk33/mid/8.0/develop -m rk3328_box.xml//初始化repo

repo sync  //下载代码

//以上下载了ffplayer的工程环境

2.编译环境
按照网址上的方法分别编译uboot、kernel、android

uboot:
xlh@mid-server3:~/3328_8.1/u-boot$ make ARCHV=aarch64 rk3328_box_defconfig
xlh@mid-server3:~/3328_8.1/u-boot$ ./mkv8.sh

kernel:
xlh@mid-server3:~/3328_8.1/kernel$ make ARCH=arm64 rockchip_defconfig
xlh@mid-server3:~/3328_8.1/kernel$ make ARCH=arm64  rk3328-evb-android.img -j8

android:
xlh@mid-server3:~/3328_8.1$ source javaenv.sh   //用于修改jdk版本
xlh@mid-server3:~/3328_8.1$ mm -j8   //编译

3.下载ffplayer和ffmpeg
路径:http://10.10.10.100/#/admin/projects/libffplayer

lh@mid-server3:~/3328_8.1/frameworks/av/media$   git clone ssh://[email protected]:29418/libffplayer
//注意路径   此时把所有的下载下来了,但看不见代码

lh@mid-server3:~/3328_8.1/frameworks/av/media/libffplayer$  git branch -a   //查看分支
lh@mid-server3:~/3328_8.1/frameworks/av/media/libffplayer$   git checkout rkffplayer-2015  
 //切换到rkffplayer-2015分支,此时可以看到代码

//因为ffplayer要链接到ffmpeg,所以还要下载ffmpeg的代码
xlh@mid-server3:~/3328_8.1/external$ git clone ssh://[email protected]:29418/ffmpeg
xlh@mid-server3:~/3328_8.1/external/ffmpeg$ git branch -a
xlh@mid-server3:~/3328_8.1/external/ffmpeg$ git checkout ffmpeg-12-11-04

总结:repo init + repo sync 下载工程环境
编译uboot、kernel、android
git clone 下载libffplayer、ffmpeg代码
(不要弄错先后顺序)

遇到的问题:
编译android时,出现如下问题:
Failed to contact Jack server: Problem reading /home/xlh/.jack-server/client.pem. Try ‘jack-diagnose’
Failed to contact Jack server: Problem reading /home/xlh/.jack-server/client.pem. Try ‘jack-diagnose’
原因jack编译器不运行多个用户同时编译,要对~/.jack-settings和~/.jack-server/config.properties文件同时修改端口号。
解决方法:

prebuilts/sdk/tools/jack-diagnose   //运行该命令会显示错误情况

xlh@mid-server3:~$ vim .jack-settings   
xlh@mid-server3:~/.jack-server$ vim config.properties  //若没有该文件自己建立
xlh@mid-server3:~/.jack-server$ chmod 0600 config.properties   //设置权限
xlh@mid-server3:~$ cat .jack-settings
# Server settings
SERVER_HOST=localhost
SERVER_PORT_SERVICE=8074
SERVER_PORT_ADMIN=8075

# Internal, do not touch
SETTING_VERSION=4

config.properties文件如下:
#
#Thu Sep 22 20:26:05 CST 2016
jack.server.max-jars-size=104857600
jack.server.max-service=4
jack.server.service.port=8074
jack.server.max-service.by-mem=1\=2147483648\:2\=3221225472\:3\=4294967296
jack.server.admin.port=8075
jack.server.config.version=2
jack.server.time-out=7200

你可能感兴趣的:(平常问题,ffmpeg)