|
|
@ -440,7 +440,7 @@ sudo umount -l rpi/sys |
|
|
|
\chapter{构建 openEuler Embedded} |
|
|
|
参考这里 \url{https://embedded.pages.openeuler.org/master/introduction/index.html},把主要步骤记录一下。 |
|
|
|
\section{系统安装 docker } |
|
|
|
用 root 权限执行下面的命令: |
|
|
|
\noindent 用 root 权限执行下面的命令: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\scriptsize]{bash} |
|
|
|
groupadd docker |
|
|
|
usermod -a -G docker user |
|
|
@ -449,19 +449,66 @@ systemctl restart docker |
|
|
|
chmod o+rw /var/run/docker.sock |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
\section{安装 oebuild} |
|
|
|
\section{准备 oebuild 安装环境} |
|
|
|
\subsection{安装 oebuild} |
|
|
|
\noindent 执行以下命令: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\scriptsize]{bash} |
|
|
|
pip3 install oebuild |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
\section{制作 Rk3588 镜像和 SDK} |
|
|
|
\subsection{创建安装目录} |
|
|
|
\noindent 执行以下命令: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\scriptsize]{bash} |
|
|
|
oebuild init yocto-oebuild -b openEuler-24.03-LTS |
|
|
|
cd yocto-oebuild |
|
|
|
oebuild update |
|
|
|
oebuild update docker |
|
|
|
oebuild generate -p ok3588 -f systemd -f openeuler-qt |
|
|
|
cd build/ok3588 |
|
|
|
oebuild generate -p ok3588 -d rk3588 -f systemd |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
\section{制作 Rk3588 镜像和 SDK} |
|
|
|
|
|
|
|
\subsection{添加客户要求软件} |
|
|
|
编辑 ``build/rk3588/compile.yaml'' , 在 ``local.conf:'' 下面添加必要软件,如下示例: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\scriptsize]{bash} |
|
|
|
local_conf: | |
|
|
|
INIT_MANAGER = "systemd" |
|
|
|
VIRTUAL-RUNTIME_dev_manager = "systemd" |
|
|
|
IMAGE_INSTALL:append = "tcpdump ethtool iperf2 bridge-utils minicom" |
|
|
|
|
|
|
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-openeuler" |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
其中 ``IMAGE\_INSTALL:append'' 是新增的内容。 |
|
|
|
|
|
|
|
\subsection{编译镜像文件} |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\scriptsize]{bash} |
|
|
|
cd build/rk3588 |
|
|
|
oebuild bitbake openeuler-image |
|
|
|
oebuild bitbake openeuler-image -c do_populate_sdk |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
\subsection{问题处理} |
|
|
|
|
|
|
|
\begin{enumerate}[(1)] |
|
|
|
\item {ERROR - ERROR: tcpdump-4.99.3-r0 do\_fetch: Bitbake Fetcher Error: FetchError(`Unable to fetch URL from any source.', `file://tcpdump-4.99.3.tar.gz')} |
|
|
|
|
|
|
|
先用下面命令下载文件: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\scriptsize]{bash} |
|
|
|
cd yocto-oebuild/src/yocto-meta-openembedded/meta-networking/\ |
|
|
|
recipes-support/tcpdump/tcpdump |
|
|
|
wget -c http://www.tcpdump.org/release/tcpdump-4.99.3.tar.gz |
|
|
|
wget -c https://gitee.com/src-openeuler/tcpdump/raw/master/\ |
|
|
|
backport-0002-Use-getnameinfo-instead-of-gethostbyaddr.patch |
|
|
|
wget -c https://gitee.com/src-openeuler/tcpdump/raw/master/\ |
|
|
|
backport-0007-Introduce-nn-option.patch |
|
|
|
wget -c https://gitee.com/src-openeuler/tcpdump/raw/master/\ |
|
|
|
backport-0009-Change-n-flag-to-nn-in-TESTonce.patch |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
然后修改 ``\texttt{yocto-oebuild/src/yocto-meta-openeuler/meta-\\% |
|
|
|
openeuler/dynamic-layers/networking-layer/recipes-support\\% |
|
|
|
/tcpdump/tcpdump\_\%.bbappend}'' 文件中的 ``SRC\_URI[md5sum]'' 和 |
|
|
|
``SRC\_URI[md5sum]''。 |
|
|
|
|
|
|
|
\end{enumerate} |
|
|
|