创建ubuntu docker
创建dockerfile
# 设置基础镜像为Ubuntu 18.04
FROM ubuntu:20.04
# 设置作者信息
MAINTAINER warren "2016426377@qq.com"
# 设置环境变量,用于非交互式安装
ENV DEBIAN_FRONTEND=noninteractive
# 备份源列表文件
RUN cp -a /etc/apt/sources.list /etc/apt/sources.list.bak
# 将源列表中的 http://.*ubuntu.com 替换为 http://repo.huaweicloud.com
RUN sed -i 's@http://.*ubuntu.com@http://repo.huaweicloud.com@g' /etc/apt/sources.list
# 更新包列表
RUN apt update
# 安装基本的编译工具和依赖
RUN apt install -y build-essential crossbuild-essential-arm64 \
bash-completion vim sudo locales time rsync bc python
# 安装其他依赖包,这里编译android11sdk需要的环境
RUN apt install -y device-tree-compiler git-core u-boot-tools mtools parted libudev-dev \
libusb-1.0-0-dev autoconf autotools-dev libsigsegv2 m4 intltool libdrm-dev \
curl sed make binutils build-essential gcc g++ bash patch gzip gawk bzip2 \
perl tar cpio python unzip rsync file bc wget libncurses5 libglib2.0-dev \
libgtk2.0-dev libglade2-dev cvs git mercurial openssh-client subversion \
asciidoc w3m dblatex graphviz libssl-dev expect fakeroot cmake \
flex bison liblz4-tool libtool keychain net-tools adb lib32gcc-7-dev g++-7 \
libstdc++-7-dev libncurses5-dev libncursesw5-dev openssh-server
RUN apt install -y bear
# 再次更新包列表并安装任何未安装的依赖
RUN apt update && apt install -y -f
# 生成本地化语言支持
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
# 创建开发板用户
RUN useradd -c 'warren user' -m -d /home/warren -s /bin/bash warren
# sudo免密登录
RUN sed -i -e '/\%sudo/ c \%sudo ALL=(ALL) NOPASSWD: ALL' /etc/sudoers
RUN usermod -a -G sudo warren
USER warren
#设置docker工作目录为/home/lckfb
WORKDIR /home/warren
#容器使用这个内核方法
#docker run --privileged --mount
#type=bind,
#source=/home/LCKFB_RK3566/ROCKCHIP_ANDROID11.0_SDK_RELEASE/ROCKCHIP_ANDROID11.0_SDK_RELEASE,
#target=/home/lckfb/android11 --name="lckfb_android11_sdk" -h lckfb -it lckfb_android11_sdk_cmp
创建镜像
docker build -t rv1126_sdk .
创建容器
sudo docker run --privileged --mount type=bind, \
source=/home/warren/00-Learning/rv1126,target=/home/warren/ --name="rv1126_sdk" -h warren -it rv1126
解压sdk包
参考手册 Rockchip_Developer_Guide_Linux_Software_CN
.build.sh lunch 选择板级BoardConfig-38x38-spinand.mk
source envsetup.sh 选择rockchip_rv1126_rv1109_spi_nand
SDK结构
编译sdk
./build.sh 编译所有并打包
编译成功后在rockdev中生成打包的镜像update.img