|
|
@ -65,27 +65,27 @@ echo "127.0.0.1 sytc" >> /etc/hosts |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\footnotesize]{bash} |
|
|
|
dpkg-reconfigure dash |
|
|
|
\end{minted} |
|
|
|
选择“NO”。 |
|
|
|
选择{\kx “}NO{\kx ”}。 |
|
|
|
\item 配置 locals: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\footnotesize]{bash} |
|
|
|
dpkg-reconfigure locales |
|
|
|
\end{minted} |
|
|
|
至少选择 en\_US.UTF-8 和 zh\_CN.UTF-8。 |
|
|
|
\item 配置/etc/fstab,例如: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\footnotesize]{bash} |
|
|
|
# <file system> <mount pt> <type> <options> <dump> <pass> |
|
|
|
/dev/root / auto rw,noauto 0 1 |
|
|
|
tmpfs /tmp tmpfs mode=1777 0 0 |
|
|
|
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 |
|
|
|
#PARTLABEL=oem /oem ext2 defaults 0 2 |
|
|
|
PARTLABEL=userdata /userdata ext4 defaults 0 0 |
|
|
|
proc /proc proc defaults 0 0 |
|
|
|
devtmpfs /dev devtmpfs defaults 0 0 |
|
|
|
devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0 |
|
|
|
tmpfs /dev/shm tmpfs nosuid,nodev,noexec 0 0 |
|
|
|
sysfs /sys sysfs defaults 0 0 |
|
|
|
debugfs /sys/kernel/debug debugfs defaults 0 0 |
|
|
|
pstore /sys/fs/pstore pstore defaults 0 0 |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\scriptsize]{bash} |
|
|
|
# <file system> <mount pt> <type> <options> <dump> <pass> |
|
|
|
/dev/root / auto rw,noauto 0 1 |
|
|
|
tmpfs /tmp tmpfs mode=1777 0 0 |
|
|
|
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 |
|
|
|
#PARTLABEL=oem /oem ext2 defaults 0 2 |
|
|
|
PARTLABEL=userdata /userdata ext4 defaults 0 0 |
|
|
|
proc /proc proc defaults 0 0 |
|
|
|
devtmpfs /dev devtmpfs defaults 0 0 |
|
|
|
devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0 |
|
|
|
tmpfs /dev/shm tmpfs nosuid,nodev,noexec 0 0 |
|
|
|
sysfs /sys sysfs defaults 0 0 |
|
|
|
debugfs /sys/kernel/debug debugfs defaults 0 0 |
|
|
|
pstore /sys/fs/pstore pstore defaults 0 0 |
|
|
|
\end{minted} |
|
|
|
\item 修改 getty 服务,使 root 自动登录。修改文件 /usr/lib/systemd/system/serial-getty@.service 的 ExecStart 对应的值: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\scriptsize]{ini} |
|
|
@ -129,14 +129,13 @@ PermitRootLogin yes |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
\subsection{安装 rockchip 硬解码器} |
|
|
|
\noindent 添加软件源: |
|
|
|
添加软件源: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\footnotesize]{bash} |
|
|
|
apt-get install software-properties-common |
|
|
|
add-apt-repository ppa:george-coolpi/multimedia |
|
|
|
apt update |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
\noindent 安装 gstreamer : |
|
|
|
安装 gstreamer : |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\footnotesize]{bash} |
|
|
|
apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ |
|
|
|
libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base \ |
|
|
@ -144,8 +143,22 @@ gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \ |
|
|
|
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools \ |
|
|
|
gstreamer1.0-alsa gstreamer1.0-pulseaudio ffmpeg |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
\noindent 安装插件gstreamer1.0-rockchip |
|
|
|
安装插件gstreamer1.0-rockchip |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\footnotesize]{bash} |
|
|
|
apt-get install gstreamer1.0-rockchip |
|
|
|
\end{minted} |
|
|
|
|
|
|
|
\subsection{打包成 ext4 文件系统} |
|
|
|
|
|
|
|
清理并退出 chroot 环境: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\footnotesize]{bash} |
|
|
|
apt-get clean |
|
|
|
exit |
|
|
|
\end{minted} |
|
|
|
执行命令,打包成 ext4 的文件系统文件: |
|
|
|
\begin{minted}[bgcolor=lightgray!30,fontsize=\footnotesize]{bash} |
|
|
|
IMAGE_SIZE_MB=$(( $(sudo du -sh -m ubuntu | cut -f1) + 300 )) |
|
|
|
dd if=/dev/zero of=ubuntu.img bs=1M count=0 seek=${IMAGE_SIZE_MB} |
|
|
|
sudo mkfs.ext4 -d ubuntu ubuntu.img |
|
|
|
\end{minted} |
|
|
|
可以将 ubuntu.img 烧写到 EMMC 的 rootfs 分区上。 |