转载:https://blog.csdn.net/kenjianqi1647/article/details/88726391
官方教程:http://wiki.t-firefly.com/zh_CN/Firefly-RK3288/linux_compile.html
一、软件要求:编译环境初始化
1、Ubuntu 16.04 软件包安装
sudo apt-get install git gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler mtools \
parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools linaro-image-tools libssl-dev \
autotools-dev libsigsegv2 m4 libdrm-dev curl sed make binutils build-essential gcc g++ bash \
patch gzip bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libglib2.0-dev openssh-client lib32stdc++6
2、安装 ARM 交叉编译工具链和编译内核相关软件包
sudo apt-get install gcc-arm-linux-gnueabihf \
gcc-aarch64-linux-gnu device-tree-compiler lzop libncurses5-dev \
libssl1.0.0 libssl-dev
二、下载LINUX-SDK
下载源码包
1、下载repo工具
mkdir linux
cd linux
git clone https://github.com/FireflyTeam/repo.git
2、下载SDK
https://pan.baidu.com/s/1pETNQDurKDu_3TrTzDn9VA
下载之后在上面建立的linux目录下解压
解压方法
sudo apt-get install p7zip
sudo p7zip -d linux-sdk-3288.7z
3、同步源码
什么是repo?
Android是由Kernel、Dalvik、Bionic、Prebuilt、build等多个Git项目组成,如果我们分别使用Ubuntu Git命令来逐个获取显得非常麻烦,所以Android项目组编写了一个名为Repo的Python脚本来统一管理这些项目仓库,使得项目的获取更加简单。
首先安装repo,然后通过源码
在linux_sdk/目录运行ls -a命令,有.repo/目录,在这个repo目录下
sudo apt-get install repo
repo sync -c
注意:repo sync -c必须在root用户下执行,否则会报错。整个更新过程非常缓慢,中断失败后也要多次执行repo sync -c指令,直到更新成功为止。
三、编译SDK
1、编译前配置
device的路径如图所示
(2)本文例子:确定选用rk3288/firefly-rk3288.mk
firefly-rk3288.mk 相关配置介绍:
其中roof image path 默认配置如下所示:
2、配置板型
&nbs