diff --git a/README.md b/README.md index c8766e38619fdc60b035408b150f9000c7bad67f..a8bcf4cde4af34b8793e589538bec324f3093b13 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,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) @@ -1392,6 +1395,37 @@ 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 + +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 + $ 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, which requires modern Linux distributions. diff --git a/README_zh.md b/README_zh.md index bf2209cef03d6a09f2eee9a8b8d966c5f2582dd0..b6ddbc8ebef7e21f66fdb85ef23c78d48e9b84cd 100644 --- a/README_zh.md +++ b/README_zh.md @@ -87,6 +87,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) @@ -1668,6 +1671,38 @@ GCC 的版本可以分别在开发板特定的 Makefile 中针对 Linux, Uboot, ## 4.5 Rootfs 文件系统 +### 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="https://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 + $ tar -xvf tinybpt-v0.1-rc1.tar.gz -C / + +使用 tinybpt 查看相关命令进行包的安装、卸载、查找、列出操作。 + + $ tinybpt -help + +### 4.5.3 复用 Docker 中的其他发行版文件系统 + 内置的 rootfs 很小,不足以应付复杂的应用开发,如果需要涉及高级的应用开发,需要使用现代的 Linux 发布包。 环境提供了针对 arm32v7 的 Ubuntu 18.04 的根文件系统,该文件系统已经制作成 Docker 镜像,以后有机会再提供更多更好的文件系统。