From 21461e00cd6a714da57a09f0546f5bd09ad2c808 Mon Sep 17 00:00:00 2001 From: Petalzu Date: Mon, 30 Sep 2024 19:11:01 +0800 Subject: [PATCH 1/5] Update README --- README.md | 14 ++++++++++++-- README_zh.md | 16 +++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c8766e3..32fcb08 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ # Table of Content +- [Table of Content](#table-of-content) - [1. Linux Lab Overview](#1-linux-lab-overview) - [1.1 Project Introduction](#11-project-introduction) - [1.2 Project Homepage](#12-project-homepage) @@ -72,6 +73,9 @@ - [4.3 Using QEMU Emulator](#43-using-qemu-emulator) - [4.4 Using Toolchains](#44-using-toolchains) - [4.5 Using Rootfs](#45-using-rootfs) + - [4.5.1 Configuring Domestic Mirror Sources to Accelerate the Compilation Process](#451-configuring-domestic-mirror-sources-to-accelerate-the-compilation-process) + - [4.5.2 Installing pre-compiled applications with TinyBPT](#452-installing-pre-compiled-applications-with-tinybpt) + - [4.5.3 Reusing other distribution filesystems in Docker](#453-reusing-other-distribution-filesystems-in-docker) - [4.6 Debugging Linux and U-Boot](#46-debugging-linux-and-u-boot) - [4.6.1 Debugging Linux](#461-debugging-linux) - [4.6.2 Debugging U-Boot](#462-debugging-u-boot) @@ -112,7 +116,7 @@ - [6.1.6 Client.Timeout exceeded while waiting headers](#616-clienttimeout-exceeded-while-waiting-headers) - [6.1.7 Restart Linux Lab after host system shutdown or reboot](#617-restart-linux-lab-after-host-system-shutdown-or-reboot) - [6.1.8 the following directives are specified both as a flag and in the configuration file](#618-the-following-directives-are-specified-both-as-a-flag-and-in-the-configuration-file) - - [6.1.9 pathspec FETCH_HEAD did not match any file known to git](#619-pathspec-fetch_head-did-not-match-any-file-known-to-git) + - [6.1.9 pathspec FETCH\_HEAD did not match any file known to git](#619-pathspec-fetch_head-did-not-match-any-file-known-to-git) - [6.1.10 Docker not work in Ubuntu 20.04](#6110-docker-not-work-in-ubuntu-2004) - [6.1.11 Error creating aufs mount](#6111-error-creating-aufs-mount) - [6.2 QEMU Issues](#62-qemu-issues) @@ -137,7 +141,7 @@ - [6.4.2 linux/compiler-gcc7.h: No such file or directory](#642-linuxcompiler-gcc7h-no-such-file-or-directory) - [6.4.3 linux-lab/configs: Permission denied](#643-linux-labconfigs-permission-denied) - [6.4.4 scripts/Makefile.headersinst: Missing UAPI file](#644-scriptsmakefileheadersinst-missing-uapi-file) - - [6.4.5 unable to create file: net/netfilter/xt_dscp.c](#645-unable-to-create-file-netnetfilterxt_dscpc) + - [6.4.5 unable to create file: net/netfilter/xt\_dscp.c](#645-unable-to-create-file-netnetfilterxt_dscpc) - [6.4.6 how to run as root](#646-how-to-run-as-root) - [6.4.7 not in supported list](#647-not-in-supported-list) - [6.4.8 is not a valid rootfs directory](#648-is-not-a-valid-rootfs-directory) @@ -1392,6 +1396,12 @@ To build host tools, host gcc should be configured too(please specify `b=i386/pc ## 4.5 Using Rootfs +### 4.5.1 Configuring Domestic Mirror Sources to Accelerate the Compilation Process + +### 4.5.2 Installing pre-compiled applications with TinyBPT + +### 4.5.3 Reusing other distribution filesystems in Docker + Builtin rootfs is minimal, is not enough for complex application development, which requires modern Linux distributions. diff --git a/README_zh.md b/README_zh.md index bf2209c..da15987 100644 --- a/README_zh.md +++ b/README_zh.md @@ -14,6 +14,7 @@ # 目录 +- [目录](#目录) - [1. Linux Lab 概览](#1-linux-lab-概览) - [1.1 项目简介](#11-项目简介) - [1.2 项目主页](#12-项目主页) @@ -48,7 +49,7 @@ - [2.5 下载实验环境](#25-下载实验环境) - [2.6 运行并登录 Linux Lab](#26-运行并登录-linux-lab) - [2.7 更新实验环境并重新运行](#27-更新实验环境并重新运行) - - [2.8 快速上手:启动一个开发板](#28-快速上手:启动一个开发板) + - [2.8 快速上手:启动一个开发板](#28-快速上手启动一个开发板) - [3. Linux Lab 入门](#3-linux-lab-入门) - [3.1 使用开发板](#31-使用开发板) - [3.1.1 列出支持的开发板](#311-列出支持的开发板) @@ -87,6 +88,9 @@ - [4.3 QEMU 模拟器](#43-qemu-模拟器) - [4.4 Toolchain 工具链](#44-toolchain-工具链) - [4.5 Rootfs 文件系统](#45-rootfs-文件系统) + - [4.5.1 配置国内镜像源加速编译过程](#451-配置国内镜像源加速编译过程) + - [4.5.2 使用 TinyBPT 安装预编译好的应用](#452-使用-tinybpt-安装预编译好的应用) + - [4.5.3 复用 Docker 中的其他发行版文件系统](#453-复用-docker-中的其他发行版文件系统) - [4.6 Linux 与 U-Boot 调试](#46-linux-与-u-boot-调试) - [4.6.1 调试 Linux](#461-调试-linux) - [4.6.2 调试 U-Boot](#462-调试-u-boot) @@ -127,7 +131,7 @@ - [6.1.6 Client.Timeout exceeded while waiting headers](#616-clienttimeout-exceeded-while-waiting-headers) - [6.1.7 关机或重启主机后如何恢复运行 Linux Lab](#617-关机或重启主机后如何恢复运行-linux-lab) - [6.1.8 the following directives are specified both as a flag and in the configuration file](#618-the-following-directives-are-specified-both-as-a-flag-and-in-the-configuration-file) - - [6.1.9 pathspec FETCH_HEAD did not match any file known to git](#619-pathspec-fetch_head-did-not-match-any-file-known-to-git) + - [6.1.9 pathspec FETCH\_HEAD did not match any file known to git](#619-pathspec-fetch_head-did-not-match-any-file-known-to-git) - [6.1.10 Docker not work in Ubuntu 20.04](#6110-docker-not-work-in-ubuntu-2004) - [6.1.11 Error creating aufs mount](#6111-error-creating-aufs-mount) - [6.2 QEMU 相关](#62-qemu-相关) @@ -152,7 +156,7 @@ - [6.4.2 linux/compiler-gcc7.h: No such file or directory](#642-linuxcompiler-gcc7h-no-such-file-or-directory) - [6.4.3 linux-lab/configs: Permission denied](#643-linux-labconfigs-permission-denied) - [6.4.4 scripts/Makefile.headersinst: Missing UAPI file](#644-scriptsmakefileheadersinst-missing-uapi-file) - - [6.4.5 unable to create file: net/netfilter/xt_dscp.c](#645-unable-to-create-file-netnetfilterxt_dscpc) + - [6.4.5 unable to create file: net/netfilter/xt\_dscp.c](#645-unable-to-create-file-netnetfilterxt_dscpc) - [6.4.6 如何切到 root 用户](#646-如何切到-root-用户) - [6.4.7 提示指定的版本或者配置不存在](#647-提示指定的版本或者配置不存在) - [6.4.8 is not a valid rootfs directory](#648-is-not-a-valid-rootfs-directory) @@ -1668,6 +1672,12 @@ GCC 的版本可以分别在开发板特定的 Makefile 中针对 Linux, Uboot, ## 4.5 Rootfs 文件系统 +### 4.5.1 配置国内镜像源加速编译过程 + +### 4.5.2 使用 TinyBPT 安装预编译好的应用 + +### 4.5.3 复用 Docker 中的其他发行版文件系统 + 内置的 rootfs 很小,不足以应付复杂的应用开发,如果需要涉及高级的应用开发,需要使用现代的 Linux 发布包。 环境提供了针对 arm32v7 的 Ubuntu 18.04 的根文件系统,该文件系统已经制作成 Docker 镜像,以后有机会再提供更多更好的文件系统。 -- Gitee From 28987b779d242c748aaed85e17a778f97e3c32a3 Mon Sep 17 00:00:00 2001 From: Petalzu Date: Wed, 2 Oct 2024 17:28:55 +0800 Subject: [PATCH 2/5] Update documents and scripts --- README.md | 5 ++--- README_zh.md | 5 ++--- tools/toc.sh | 6 ++++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 32fcb08..36b9e99 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ # Table of Content -- [Table of Content](#table-of-content) - [1. Linux Lab Overview](#1-linux-lab-overview) - [1.1 Project Introduction](#11-project-introduction) - [1.2 Project Homepage](#12-project-homepage) @@ -116,7 +115,7 @@ - [6.1.6 Client.Timeout exceeded while waiting headers](#616-clienttimeout-exceeded-while-waiting-headers) - [6.1.7 Restart Linux Lab after host system shutdown or reboot](#617-restart-linux-lab-after-host-system-shutdown-or-reboot) - [6.1.8 the following directives are specified both as a flag and in the configuration file](#618-the-following-directives-are-specified-both-as-a-flag-and-in-the-configuration-file) - - [6.1.9 pathspec FETCH\_HEAD did not match any file known to git](#619-pathspec-fetch_head-did-not-match-any-file-known-to-git) + - [6.1.9 pathspec FETCH_HEAD did not match any file known to git](#619-pathspec-fetch_head-did-not-match-any-file-known-to-git) - [6.1.10 Docker not work in Ubuntu 20.04](#6110-docker-not-work-in-ubuntu-2004) - [6.1.11 Error creating aufs mount](#6111-error-creating-aufs-mount) - [6.2 QEMU Issues](#62-qemu-issues) @@ -141,7 +140,7 @@ - [6.4.2 linux/compiler-gcc7.h: No such file or directory](#642-linuxcompiler-gcc7h-no-such-file-or-directory) - [6.4.3 linux-lab/configs: Permission denied](#643-linux-labconfigs-permission-denied) - [6.4.4 scripts/Makefile.headersinst: Missing UAPI file](#644-scriptsmakefileheadersinst-missing-uapi-file) - - [6.4.5 unable to create file: net/netfilter/xt\_dscp.c](#645-unable-to-create-file-netnetfilterxt_dscpc) + - [6.4.5 unable to create file: net/netfilter/xt_dscp.c](#645-unable-to-create-file-netnetfilterxt_dscpc) - [6.4.6 how to run as root](#646-how-to-run-as-root) - [6.4.7 not in supported list](#647-not-in-supported-list) - [6.4.8 is not a valid rootfs directory](#648-is-not-a-valid-rootfs-directory) diff --git a/README_zh.md b/README_zh.md index da15987..b5c7e68 100644 --- a/README_zh.md +++ b/README_zh.md @@ -14,7 +14,6 @@ # 目录 -- [目录](#目录) - [1. Linux Lab 概览](#1-linux-lab-概览) - [1.1 项目简介](#11-项目简介) - [1.2 项目主页](#12-项目主页) @@ -131,7 +130,7 @@ - [6.1.6 Client.Timeout exceeded while waiting headers](#616-clienttimeout-exceeded-while-waiting-headers) - [6.1.7 关机或重启主机后如何恢复运行 Linux Lab](#617-关机或重启主机后如何恢复运行-linux-lab) - [6.1.8 the following directives are specified both as a flag and in the configuration file](#618-the-following-directives-are-specified-both-as-a-flag-and-in-the-configuration-file) - - [6.1.9 pathspec FETCH\_HEAD did not match any file known to git](#619-pathspec-fetch_head-did-not-match-any-file-known-to-git) + - [6.1.9 pathspec FETCH_HEAD did not match any file known to git](#619-pathspec-fetch_head-did-not-match-any-file-known-to-git) - [6.1.10 Docker not work in Ubuntu 20.04](#6110-docker-not-work-in-ubuntu-2004) - [6.1.11 Error creating aufs mount](#6111-error-creating-aufs-mount) - [6.2 QEMU 相关](#62-qemu-相关) @@ -156,7 +155,7 @@ - [6.4.2 linux/compiler-gcc7.h: No such file or directory](#642-linuxcompiler-gcc7h-no-such-file-or-directory) - [6.4.3 linux-lab/configs: Permission denied](#643-linux-labconfigs-permission-denied) - [6.4.4 scripts/Makefile.headersinst: Missing UAPI file](#644-scriptsmakefileheadersinst-missing-uapi-file) - - [6.4.5 unable to create file: net/netfilter/xt\_dscp.c](#645-unable-to-create-file-netnetfilterxt_dscpc) + - [6.4.5 unable to create file: net/netfilter/xt_dscp.c](#645-unable-to-create-file-netnetfilterxt_dscpc) - [6.4.6 如何切到 root 用户](#646-如何切到-root-用户) - [6.4.7 提示指定的版本或者配置不存在](#647-提示指定的版本或者配置不存在) - [6.4.8 is not a valid rootfs directory](#648-is-not-a-valid-rootfs-directory) diff --git a/tools/toc.sh b/tools/toc.sh index a925896..f335c75 100755 --- a/tools/toc.sh +++ b/tools/toc.sh @@ -19,8 +19,10 @@ else echo -e "# Table of Content\n" >> ${README}.toc fi -cat $README | grep -v "^# Table of Content" | grep -v "^# 目录" | grep ^# | sed "s%^##### % - %g" | sed "s%^#### % - %g" | sed -e "s%^### % - %g" | sed -e "s%^## % - %g" | sed -e "s%^# %- %g"\ - | sed -e "s%\(.*\)- \(.*\)%echo -n \"\1- [\2]\";echo \"(#\L\2)\" | tr ' ' '-' | tr -d '/' | tr -d '.' | tr -d ',' | sed -e 's/,//g'| tr -d ':' | tr -d '@'%g" | bash -v >>${README}.toc 2>/dev/null +cat $README \ + | grep -v "^# Table of Content" | grep -v "^# 目录" | grep ^# \ + | sed "s%^##### % - %g" | sed "s%^#### % - %g" | sed -e "s%^### % - %g" | sed -e "s%^## % - %g" | sed -e "s%^# %- %g"\ + | sed -e "s%\(.*\)- \(.*\)%echo -n \"\1- [\2]\";echo \"(#\L\2)\" | tr ' ' '-' | tr -d '/' | tr -d '.' | tr -d ',' | sed -e 's/,//g'| tr -d ':' | tr -d '@' | sed -e 's/[——:]//g'%g" | bash -v >>${README}.toc 2>/dev/null echo -e "\n" >> ${README}.toc -- Gitee From 6d1fbe79b14c8a3852246dc201d448b94cb2f645 Mon Sep 17 00:00:00 2001 From: Petalzu Date: Tue, 22 Oct 2024 17:06:35 +0800 Subject: [PATCH 3/5] Update documents --- README_zh.md | 27 +++++++++++++++++++++++++++ tools/toc.sh | 6 ++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/README_zh.md b/README_zh.md index b5c7e68..ceb86cd 100644 --- a/README_zh.md +++ b/README_zh.md @@ -1673,8 +1673,35 @@ GCC 的版本可以分别在开发板特定的 Makefile 中针对 Linux, Uboot, ### 4.5.1 配置国内镜像源加速编译过程 +在编译软件包时,可以使用国内镜像源加速下载过程,例如,在编译 buildroot 时,buildroot 的配置文件是一个名为 `.config` 的文件,可以通过 `make menuconfig` 命令来配置 buildroot。 + + $ make menuconfig + + -> Build Options + -> Mirrors and Download locations + -> Primary download site + -> [https://mirrors.lzu.edu.cn/buildroot/] + +或者使用如下命令设置: + + $ vim .config + /BR2_PRIMARY_SITE #找到BR2_PRIMARY_SITE + BR2_PRIMARY_SITE="http://mirror.lzu.edu.cn/buildroot" + ### 4.5.2 使用 TinyBPT 安装预编译好的应用 +TinyBPT (Tiny Buildroot Packaging Tool) 是一个 buildroot 的包管理工具,主要处理 buildroot 的包依赖关系,提供包的安装、卸载等功能。 + +如果要在 buildroot 构建的子系统中安装,则需要在主机下载后通过构建本地 HTTP 服务的方式提供给子系统下载。 + + $ wget https://gitee.com/tinylab/tinybpt/releases/download/v0.1-rc1/tinybpt-v0.1-rc1.tar.gz + $ mkdir -p /etc/tinybpt && mkdir -p /etc/ssl/certs + $ tar -xvf tinybpt-v0.1-rc1.tar.gz -C / + +使用 tinybpt 查看相关命令进行包的安装、卸载、查找、列出操作。 + + $ tinybpt -help + ### 4.5.3 复用 Docker 中的其他发行版文件系统 内置的 rootfs 很小,不足以应付复杂的应用开发,如果需要涉及高级的应用开发,需要使用现代的 Linux 发布包。 diff --git a/tools/toc.sh b/tools/toc.sh index f335c75..a925896 100755 --- a/tools/toc.sh +++ b/tools/toc.sh @@ -19,10 +19,8 @@ else echo -e "# Table of Content\n" >> ${README}.toc fi -cat $README \ - | grep -v "^# Table of Content" | grep -v "^# 目录" | grep ^# \ - | sed "s%^##### % - %g" | sed "s%^#### % - %g" | sed -e "s%^### % - %g" | sed -e "s%^## % - %g" | sed -e "s%^# %- %g"\ - | sed -e "s%\(.*\)- \(.*\)%echo -n \"\1- [\2]\";echo \"(#\L\2)\" | tr ' ' '-' | tr -d '/' | tr -d '.' | tr -d ',' | sed -e 's/,//g'| tr -d ':' | tr -d '@' | sed -e 's/[——:]//g'%g" | bash -v >>${README}.toc 2>/dev/null +cat $README | grep -v "^# Table of Content" | grep -v "^# 目录" | grep ^# | sed "s%^##### % - %g" | sed "s%^#### % - %g" | sed -e "s%^### % - %g" | sed -e "s%^## % - %g" | sed -e "s%^# %- %g"\ + | sed -e "s%\(.*\)- \(.*\)%echo -n \"\1- [\2]\";echo \"(#\L\2)\" | tr ' ' '-' | tr -d '/' | tr -d '.' | tr -d ',' | sed -e 's/,//g'| tr -d ':' | tr -d '@'%g" | bash -v >>${README}.toc 2>/dev/null echo -e "\n" >> ${README}.toc -- Gitee From a34b140a4cbcc9ab14003705e477e94fbca2dbe2 Mon Sep 17 00:00:00 2001 From: Petalzu Date: Tue, 22 Oct 2024 17:11:47 +0800 Subject: [PATCH 4/5] Update documents --- README.md | 26 ++++++++++++++++++++++++++ README_zh.md | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 36b9e99..0881687 100644 --- a/README.md +++ b/README.md @@ -1397,8 +1397,34 @@ To build host tools, host gcc should be configured too(please specify `b=i386/pc ### 4.5.1 Configuring Domestic Mirror Sources to Accelerate the Compilation Process +When compiling packages, you can use domestic mirror sources to speed up the download process. For example, when compiling buildroot, the buildroot configuration file is a file named `.config`, and you can configure buildroot with the `make menuconfig` command. + + $ make menuconfig + -> Build Options + -> Mirrors and Download locations + -> Primary download site + -> [https://mirrors.lzu.edu.cn/buildroot/] + +Or use the following command to set it up: + + $ vim .config + /BR2_PRIMARY_SITE #find BR2_PRIMARY_SITE + BR2_PRIMARY_SITE="https://mirror.lzu.edu.cn/buildroot” + ### 4.5.2 Installing pre-compiled applications with TinyBPT +TinyBPT (Tiny Buildroot Packaging Tool) is a package management tool for buildroot, which mainly handles package dependencies of buildroot and provides package installation and uninstallation functions. + +If you want to install it on a subsystem built by the buildroot, you need to download it from the host and make it available to the subsystem by building a local HTTP service. + + $ wget https://gitee.com/tinylab/tinybpt/releases/download/v0.1-rc1/tinybpt-v0.1-rc1.tar.gz + $ mkdir -p /etc/tinybpt && mkdir -p /etc/ssl/certs + $ tar -xvf tinybpt-v0.1-rc1.tar.gz -C / + +Use tinybpt to view the commands to install, uninstall, find, and list packages. + + $ tinybpt -help + ### 4.5.3 Reusing other distribution filesystems in Docker Builtin rootfs is minimal, is not enough for complex application development, diff --git a/README_zh.md b/README_zh.md index ceb86cd..aa138e8 100644 --- a/README_zh.md +++ b/README_zh.md @@ -1686,7 +1686,7 @@ GCC 的版本可以分别在开发板特定的 Makefile 中针对 Linux, Uboot, $ vim .config /BR2_PRIMARY_SITE #找到BR2_PRIMARY_SITE - BR2_PRIMARY_SITE="http://mirror.lzu.edu.cn/buildroot" + BR2_PRIMARY_SITE="https://mirror.lzu.edu.cn/buildroot" ### 4.5.2 使用 TinyBPT 安装预编译好的应用 -- Gitee From 888aba6911ed0f65da530b2e0b960adba309ce94 Mon Sep 17 00:00:00 2001 From: Petalzu Date: Wed, 23 Oct 2024 18:06:40 +0800 Subject: [PATCH 5/5] Update documents --- README.md | 1 - README_zh.md | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 0881687..a8bcf4c 100644 --- a/README.md +++ b/README.md @@ -1418,7 +1418,6 @@ TinyBPT (Tiny Buildroot Packaging Tool) is a package management tool for buildro If you want to install it on a subsystem built by the buildroot, you need to download it from the host and make it available to the subsystem by building a local HTTP service. $ wget https://gitee.com/tinylab/tinybpt/releases/download/v0.1-rc1/tinybpt-v0.1-rc1.tar.gz - $ mkdir -p /etc/tinybpt && mkdir -p /etc/ssl/certs $ tar -xvf tinybpt-v0.1-rc1.tar.gz -C / Use tinybpt to view the commands to install, uninstall, find, and list packages. diff --git a/README_zh.md b/README_zh.md index aa138e8..b6ddbc8 100644 --- a/README_zh.md +++ b/README_zh.md @@ -48,7 +48,7 @@ - [2.5 下载实验环境](#25-下载实验环境) - [2.6 运行并登录 Linux Lab](#26-运行并登录-linux-lab) - [2.7 更新实验环境并重新运行](#27-更新实验环境并重新运行) - - [2.8 快速上手:启动一个开发板](#28-快速上手启动一个开发板) + - [2.8 快速上手:启动一个开发板](#28-快速上手:启动一个开发板) - [3. Linux Lab 入门](#3-linux-lab-入门) - [3.1 使用开发板](#31-使用开发板) - [3.1.1 列出支持的开发板](#311-列出支持的开发板) @@ -1695,7 +1695,6 @@ TinyBPT (Tiny Buildroot Packaging Tool) 是一个 buildroot 的包管理工具 如果要在 buildroot 构建的子系统中安装,则需要在主机下载后通过构建本地 HTTP 服务的方式提供给子系统下载。 $ wget https://gitee.com/tinylab/tinybpt/releases/download/v0.1-rc1/tinybpt-v0.1-rc1.tar.gz - $ mkdir -p /etc/tinybpt && mkdir -p /etc/ssl/certs $ tar -xvf tinybpt-v0.1-rc1.tar.gz -C / 使用 tinybpt 查看相关命令进行包的安装、卸载、查找、列出操作。 -- Gitee