[TOP]
安装
下载安装环境OpenSTLinux distribution
- 安装repo
PC $> sudo apt-get update
PC $> sudo apt-get install repo
- 从github同步OpenSTLinux distribution
$ mkdir ~/Distribution-Package
$ cd <working directory path>/Distribution-Package
$ mkdir openstlinux-4.19-thud-mp1-19-10-09
$ cd openstlinux-4.19-thud-mp1-19-10-09
$ repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-4.19-thud-mp1-19-10-09
$ repo sync
repo init 出现 Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
,由于无法连接谷歌服务器下载源文件(梯子也没用),按照如下方法解决:
sudo mkdir ~/bin
sudo PATH=~/bin:$PATH
sudo git config --global user.name "Your Name"
sudo git config --global user.email "you@example.com"
sudo cd <working directory path>/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09
sudo git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
sudo cp -r git-repo/repo ~/bin/repo
sudo chmod a+x ~/bin/repo
sudo mkdir .repo
sudo cp -r git-repo .repo/repo
sudo repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-4.19-thud-mp1-19-10-09
sudo repo sync -c -j8
此过程时间较长,等待同步完成
安装OpenSTLinux distribution
- 运行如下代码部署环境,然后同意协议
$ DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
$ tree
.
└── conf
├── bblayers.conf
├── conf-notes.txt
├── local.conf
├── site.conf
└── templateconf.cfg
1 directory, 5 files
本地配置文件路径build-<distro>-<machine>/conf/local.conf
,包含所有本地用户配置
顶层配置文件路径build-<distro>-<machine>/conf/bblayers.conf
,告知BitBake构建的层
- 安装g++/make编译环境环境
sudo apt update
sudo apt install chrpath g++ gawk gcc make texinfo rpcgen
bison flex//语法分析器生成器
sed // 编辑器
wget curl //下载器
cvs subversion git-core //版本控制
coreutils //shell
unzip //解压zip
texi2html // 转Texinfo 到 HTML
texinfo //文档系统
docbook-utils //脚本集合
gawk //awk编程
python-pysqlite2 //SQLite 3的Python接口
diffstat //linux 基础命令
help2man //help --version生成手册页面工具
make //
gcc //
build-essential //提供编译程序必须软件包的列表信息
g++ //
desktop-file-utils //处理桌面信息的程序
chrpath //
libxml2-utils //
xmlto //
docbook //
bsdmainutils //
iputils-ping //
cpio //
python-wand //
python-pycryptopp //
python-crypto //
sudo apt-get install default-jre
rpcgen编译工具无法安装,按照以下教程手动安装
wget https://github.com/thkukuk/rpcsvc-proto/releases/download/v1.4/rpcsvc-proto-1.4.tar.gz
tar xf rpcsvc-proto-1.4.tar.gz
cd rpcsvc-proto-1.4
./configure
make
make install
- 生成Starter Package
glibc库要求glibc2.28-r0
bitbake st-image-weston
- 按照入门包的安装步骤,将生成的Starter Package,烧写到开发板