build Raspberry Pi image, refine the documentation
This commit is contained in:
parent
709348c40a
commit
f869dc13c0
52
README.en.md
52
README.en.md
@ -70,17 +70,13 @@ You can get introduction of openEuler SBC SIG from [sig-SBC](https://gitee.com/o
|
||||
- [openEuler Adaptation Guide](documents/rockchip/openEuler适配指南.md)
|
||||
- [Using RKNPU on openEuler](documents/rockchip/在openEuler上使用RKNPU.md)
|
||||
- [Run RKLLM on openEuler](documents/rockchip/在openEuler上运行RKLLM.md)
|
||||
- [scripts](./scripts/):
|
||||
- [Raspberry Pi](./scripts/raspberrypi): Script for building openEuler image for Raspberry Pi
|
||||
- [Quickly Build (without kernel compilation)](scripts/raspberrypi/build-image.sh)
|
||||
- [Build on host (with kernel compilation)](scripts/raspberrypi/build-image-common.sh)
|
||||
- [Build in a Docker container (with kernel compilation)](scripts/raspberrypi/build-image-docker.sh)
|
||||
- [Rockchip and other SoCs](./scripts/rockchip): Used to build openEuler images for Rockchip and other SoCs
|
||||
- [One-time build images](scripts/rockchip/build.sh)
|
||||
- [Build a boot Image](scripts/rockchip/build_boot.sh)
|
||||
- [Build a rootfs Image](scripts/rockchip/build_rootfs.sh)
|
||||
- [Compile u-boot](scripts/rockchip/build_u-boot.sh)
|
||||
- [Generate a bootable image](scripts/rockchip/gen_image.sh)
|
||||
- [scripts](./scripts/): Script for building openEuler image
|
||||
- [Build a unified system image](scripts/build.sh)
|
||||
- [Build a unified system image using Docker](./scripts/build-image-docker.sh)
|
||||
- [Build a boot Image](scripts/build_boot.sh)
|
||||
- [Build a rootfs Image](scripts/build_rootfs.sh)
|
||||
- [Compile u-boot](scripts/build_u-boot.sh)
|
||||
- [Generate a bootable image](scripts/gen_image.sh)
|
||||
|
||||
## How to download latest image
|
||||
|
||||
@ -306,38 +302,6 @@ To build openEuler AArch64 image for Raspberry Pi, Rockchip or other SoCs, the r
|
||||
For other architecture hardware, you can use [QEMU](https://www.qemu.org/) to build AArch64 system emulation.
|
||||
|
||||
### Run the scripts to build image
|
||||
|
||||
You can use the respective scripts of Raspberry Pi, Rockchip or other SoCs to build images. Refer to the specific documentation:
|
||||
You can use the unified build scripts [build.sh](./scripts/build.sh) or [build-image-docker.sh](./scripts/build-image-docker.sh) to build images for Raspberry Pi, Rockchip, and other development boards, either directly on the host machine or by launching a Docker container. For details, please refer to the documentation below:
|
||||
- [Build Raspberry Pi images](./documents/树莓派.md#构建镜像)
|
||||
- [Build images for Rochchip and other SoCs](./documents/瑞芯微等开发板.md#镜像构建)
|
||||
|
||||
Alternatively, you can use the unified entry point [build.sh](./scripts/build.sh) to build images for Raspberry Pi, Rockchip or other SoCs by executing the following command:
|
||||
|
||||
`sudo bash scripts/build.sh --board BOARD_TYPE --in-docker [other_args...]`
|
||||
|
||||
Parameter Definitions & Meaning:
|
||||
|
||||
1. `--in-docker`
|
||||
Build the image using a Docker container. Refer to the links below:
|
||||
- [Build Raspberry Pi images in Docker](./documents/树莓派.md#docker-容器内构建)
|
||||
- [Build images for Rockchip or other SoCs in Docker](./documents/瑞芯微等开发板.md#docker-容器内构建)
|
||||
|
||||
2. `--board BOARD_TYPE`
|
||||
Specifies the development board type. Currently supported parameters include:
|
||||
|
||||
- `rpi`: Build a Raspberry Pi image without compiling the kernel. For other parameters, refer to [Quick build for Raspberry Pi (no kernel compilation)](./documents/树莓派.md#快速构建无需编译内核推荐).
|
||||
- `rpi-custom`: Build a Raspberry Pi image with kernel compilation. For other parameters, refer to [Build a Raspberry Pi image using a custom-compiled kernel](./documents/树莓派.md#完全构建包括编译内核).
|
||||
- `firefly-itx-3588j`: Build a Firefly ITX-3588J image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `firefly-rk3399`: Build a Firefly RK3399 image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `firefly-roc-rk3566-pc`: Build a Firefly ROC-RK3566-PC image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `firefly-roc-rk3568-pc`: Build a Firefly ROC-RK3568-PC image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `firefly-roc-rk3568-pc-se`: Build a Firefly ROC-RK3568-PC-SE image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `firefly-roc-rk3588s-pc`: Build a Firefly ROC-RK3588S-PC image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `phytiumpi-4gb`: Build a Phytium Pi 4GB image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `radxa-rock5b`: Build a Radxa Rock-5B image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `radxa-rockpi-4a`: Build a Radxa RockPi-4A image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `orangepi-zero2`: Build a Orange Pi Zero2 image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
- `longanpi-3h`: Build a Sipeed Longan Pi 3H image. For other parameters, refer to [Build an image for Rockchip or other SoCs](./documents/瑞芯微等开发板.md#一次构建).
|
||||
|
||||
3. `-h`, `--help`
|
||||
Display help information.
|
||||
|
||||
51
README.md
51
README.md
@ -69,17 +69,13 @@ SIG 组基本信息位于 [sig-SBC](https://gitee.com/openeuler/community/tree/m
|
||||
- [openEuler 适配指南](documents/rockchip/openEuler适配指南.md)
|
||||
- [在openEuler上使用RKNPU](documents/rockchip/在openEuler上使用RKNPU.md)
|
||||
- [在openEuler上运行RKLLM](documents/rockchip/在openEuler上运行RKLLM.md)
|
||||
- [scripts](./scripts/): 镜像构建脚本
|
||||
- [树莓派](./scripts/raspberrypi): 构建 openEuler 树莓派镜像的脚本
|
||||
- [快速构建(不编译内核)](scripts/raspberrypi/build-image.sh)
|
||||
- [主机上构建(编译内核)](scripts/raspberrypi/build-image-common.sh)
|
||||
- [Docker 容器中构建(编译内核)](scripts/raspberrypi/build-image-docker.sh)
|
||||
- [瑞芯微等开发板](./scripts/rockchip): 构建 openEuler RK3399 等开发板镜像的脚本
|
||||
- [一次构建脚本](scripts/rockchip/build.sh)
|
||||
- [boot 镜像构建脚本](scripts/build_boot.sh)
|
||||
- [rootfs 镜像构建脚本](scripts/build_rootfs.sh)
|
||||
- [u-boot 编译脚本](scripts/rockchip/build_u-boot.sh)
|
||||
- [可启动镜像生成脚本](scripts/rockchip/gen_image.sh)
|
||||
- [scripts](./scripts/): openEuler 镜像构建脚本
|
||||
- [构建完整镜像](scripts/build.sh)
|
||||
- [使用 Docker 构建完整镜像](./scripts/build-image-docker.sh)
|
||||
- [构建 boot 镜像](scripts/build_boot.sh)
|
||||
- [构建 rootfs 镜像](scripts/build_rootfs.sh)
|
||||
- [编译 u-boot](scripts/build_u-boot.sh)
|
||||
- [将 u-boot、boot、rootfs 合并成一个完整镜像](scripts/gen_image.sh)
|
||||
|
||||
## 最新镜像
|
||||
|
||||
@ -305,37 +301,6 @@ SIG 组基本信息位于 [sig-SBC](https://gitee.com/openeuler/community/tree/m
|
||||
其他架构可以使用 [QEMU](https://www.qemu.org/) 模拟器搭建 AArch64 运行环境。
|
||||
|
||||
### 构建镜像
|
||||
|
||||
可以使用树莓派或瑞芯微等开发板各自的脚本构建镜像,具体文档参考:
|
||||
镜像构建使用统一入口 [build.sh](./scripts/build.sh) 或 [build-image-docker.sh](./scripts/build-image-docker.sh) 在宿主机或者启动 Docker 容器构建树莓派或瑞芯微等开发板镜像。具体参考以下文档:
|
||||
- [树莓派镜像构建](./documents/树莓派.md#构建镜像)
|
||||
- [瑞芯微等开发板镜像构建](./documents/瑞芯微等开发板.md#镜像构建)
|
||||
|
||||
也可以使用统一入口 [build.sh](./scripts/build.sh) 构建树莓派或瑞芯微等开发板镜像,执行命令:
|
||||
|
||||
`sudo bash scripts/build.sh --board BOARD_TYPE --in-docker [other_args...]`
|
||||
|
||||
各个参数含义:
|
||||
|
||||
1. --in-docker
|
||||
使用 Docker 容器构建镜像,参考链接:
|
||||
- [使用 Docker 容器构建树莓派镜像](./documents/树莓派.md#docker-容器内构建)
|
||||
- [使用 Docker 容器构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#docker-容器内构建)
|
||||
|
||||
2. --board BOARD_TYPE
|
||||
开发板类型和构建方式。当前支持的参数有:
|
||||
- rpi,无需编译内核直接构建树莓派镜像,其他参数请参考 [无需编译内核快速构建树莓派镜像](./documents/树莓派.md#快速构建无需编译内核推荐)。
|
||||
- rpi-custom,编译内核并构建树莓派镜像,其他参数请参考 [编译内核构建树莓派镜像](./documents/树莓派.md#完全构建包括编译内核)。
|
||||
- firefly-itx-3588j,构建 Firefly ITX-3588J 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- firefly-rk3399,构建 Firefly RK3399 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- firefly-roc-rk3566-pc,构建 Firefly ROC-RK3566-PC 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- firefly-roc-rk3568-pc,构建 Firefly ROC-RK3568-PC 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- firefly-roc-rk3568-pc-se,构建 Firefly ROC-RK3568-PC-SE 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- firefly-roc-rk3588s-pc,构建 Firefly ROC-RK3588S-PC 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- phytiumpi-4gb,构建 Phytium Pi 4GB 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- radxa-rock5b,构建 Radxa Rock-5B 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- radxa-rockpi-4a,构建 Radxa RockPi-4A 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- orangepi-zero2,构建 Orange Pi Zero2 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
- longanpi-3h,构建 Sipeed Longan Pi 3H 开发板镜像,其他参数请参考 [构建瑞芯微等开发板镜像](./documents/瑞芯微等开发板.md#一次构建)。
|
||||
|
||||
3. -h, --help
|
||||
显示帮助信息。
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
### 使用 BSP 内核
|
||||
|
||||
如果想使用 BSP 内核进行测试,可以在构建指令中指定 BSP 内核的仓库地址及对应分支,参考[一次构建](../瑞芯微等开发板.md#一次构建)。
|
||||
如果想使用 BSP 内核进行测试,可以在构建指令中指定 BSP 内核的仓库地址及对应分支,参考 [构建完整镜像](../瑞芯微等开发板.md#构建完整镜像)。
|
||||
|
||||
## 准备 u-boot
|
||||
|
||||
@ -46,17 +46,17 @@
|
||||
|
||||
- RK35xx
|
||||
|
||||
需要将编译好的 u-boot 二进制文件放到 [u-boot 目录](../../scripts/rockchip/bin/u-boot/)下,并在版型文件中增加文件路径。
|
||||
需要将编译好的 u-boot 二进制文件放到 [u-boot 目录](../../scripts/bin/u-boot/)下,并在版型文件中增加文件路径。
|
||||
|
||||
## 准备 firmware 文件
|
||||
|
||||
这里提到的 firmware 是开发板的板载蓝牙和 WiFi 的驱动固件,可参考[本框架储存的的 firmware 文件](../../scripts/rockchip/bin/linux-firmware/)。
|
||||
这里提到的 firmware 是开发板的板载蓝牙和 WiFi 的驱动固件,可参考[本框架储存的的 firmware 文件](../../scripts/bin/linux-firmware/)。
|
||||
|
||||
请确定开发板所使用的 firmware,并提交至仓库的相应目录下。
|
||||
|
||||
## 编写版型文件
|
||||
|
||||
适用的开发板的版型配置文件在 [boards](../../scripts/rockchip/boards/) 文件夹中,版型文件示例如下:
|
||||
适用的开发板的版型配置文件在 [boards](../../scripts/boards/) 文件夹中,版型文件示例如下:
|
||||
|
||||
```
|
||||
ubootconfig=firefly-rk3399_defconfig #Required! The name of defconfig file when compiling u-boot, which defaults to firefly-rk3399_defconfig.
|
||||
@ -77,13 +77,13 @@ POST_BOARD_OVERLAY() {
|
||||
|
||||
1. ubootconfig=UBOOT_DEFCONFIG
|
||||
|
||||
开发板对应的 defconfig 的文件名称,对应 [u-boot/configs](https://github.com/u-boot/u-boot/tree/master/configs) 下 `UBOOT_DEFCONFIG` 文件,默认为 `firefly-rk3399_defconfig`;如需在 RK3568/RK3588 开发板上使用预编译的 u-boot,可以将此项设置为 `none`。
|
||||
开发板对应的 defconfig 的文件名称,对应 [u-boot/configs](https://github.com/u-boot/u-boot/tree/master/configs) 下 `UBOOT_DEFCONFIG` 文件,默认为 `firefly-rk3399_defconfig`;如需在 RK3568/RK3588 开发板上使用预编译的 u-boot,可以将此项设置为空:`ubootconfig=`。
|
||||
|
||||
如果设置为 `none`,则还需添加以下附属配置参数:
|
||||
如果设置为空 ``,则还需添加以下附属配置参数:
|
||||
|
||||
- local_uboot_dir
|
||||
|
||||
开发板 u-boot 配置设置为 `none` 时,本地预编译的 u-boot 二进制文件的位置。
|
||||
开发板 u-boot 配置设置为空时,本地预编译的 u-boot 二进制文件的位置。
|
||||
|
||||
2. dtb_name=DTB_NAME
|
||||
|
||||
@ -114,11 +114,11 @@ POST_BOARD_OVERLAY() {
|
||||
|
||||
6. POST_BOARD_OVERLAY()
|
||||
|
||||
`POST_BOARD_OVERLAY()` 是执行复制 firmware 文件到根目录以及对目标开发板根目录执行特定操作的函数,其使用的变量与 [build_rootfs.sh](../../scripts/rockchip/build_rootfs.sh) 相同,通常包含以下两个变量:
|
||||
`POST_BOARD_OVERLAY()` 是执行复制 firmware 文件到根目录以及对目标开发板根目录执行特定操作的函数,其使用的变量与 [build_rootfs.sh](../../scripts/build_rootfs.sh) 相同,通常包含以下两个变量:
|
||||
|
||||
- nonfree_bin_dir
|
||||
|
||||
该参数为储存 firmware 的文件夹,默认为 [${workdir}/../bin](../../scripts/rockchip/bin/)。
|
||||
该参数为储存 firmware 的文件夹,默认为 [../../scripts/bin/](../../scripts/bin/)。
|
||||
|
||||
- rootfs_dir
|
||||
|
||||
@ -126,4 +126,4 @@ POST_BOARD_OVERLAY() {
|
||||
|
||||
## 运行测试
|
||||
|
||||
通过运行脚本[一次构建](../瑞芯微等开发板.md#一次构建),将 `--board` 参数设置为新增开发板的版型文件来运行测试。
|
||||
通过运行脚本 [构建完整镜像](../瑞芯微等开发板.md#构建完整镜像),将 `--board` 参数设置为新增开发板的版型文件来运行测试。
|
||||
|
||||
@ -441,7 +441,7 @@ dnf --installroot=$WORKDIR/rootfs/ install -y alsa-utils wpa_supplicant vim net-
|
||||
```
|
||||
3. 拷贝 wifi 配置文件,蓝牙启动文件
|
||||
|
||||
1. 下载 [无线配置目录](../../scripts/rockchip/bin/wireless) 到 $WORKDIR
|
||||
1. 下载 [无线配置目录](../../scripts/bin/wireless) 到 $WORKDIR
|
||||
|
||||
2. 拷贝文件 :
|
||||
```
|
||||
|
||||
@ -47,8 +47,8 @@
|
||||
1. 生成的刷写文件压缩包为 build 下或项目主页发布的的压缩后的 RAW 原始镜像(需要解压):openEuler-VERSION-BOARD-RELEASE.img.xz。
|
||||
|
||||
2. 项目主页 scripts/bin 目录下提供的:
|
||||
- 如果是 RK3399,使用 [rk3399_loader.bin](../../scripts/rockchip/bin/rk3399_loader.bin)
|
||||
- 如果是 RK3588,使用 [rk3588_loader.bin](../../scripts/rockchip/bin/rk3588_loader.bin)
|
||||
- 如果是 RK3399,使用 [rk3399_loader.bin](../../scripts/bin/rk3399_loader.bin)
|
||||
- 如果是 RK3588,使用 [rk3588_loader.bin](../../scripts/bin/rk3588_loader.bin)
|
||||
|
||||
3. 下载版本不小于 2.92 的 [RKDevTool 工具](https://dl.radxa.com/tools/windows/windows_RKDevTool_Release_v2.92.zip)。
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# 一次构建命令列举
|
||||
# 构建完整镜像命令列举
|
||||
|
||||
- [描述](#描述)
|
||||
- [适用的 RK3399 开发板](#适用的-rk3399-开发板)
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
## 描述
|
||||
|
||||
本文档介绍了支持的开发板以及对应的一次构建命令。
|
||||
本文档介绍了支持的开发板以及构建对应开发板完整镜像的命令。
|
||||
|
||||
### 适用的 RK3399 开发板:
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
1. --board BOARD_CONFIG
|
||||
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/rockchip/boards) 文件夹中,示例文件 [sample.conf](../scripts/rockchip/boards/sample.conf),默认为 `firefly-rk3399`。其包括的配置参数意义见[版型文件](./openEuler适配指南.md#编写版型文件)。
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/boards) 文件夹中,示例文件 [sample.conf](../scripts/boards/sample.conf),默认为 `firefly-rk3399`。其包括的配置参数意义见[版型文件](./openEuler适配指南.md#编写版型文件)。
|
||||
|
||||
2. -h, --help
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
1. --board BOARD_CONFIG
|
||||
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/rockchip/boards) 文件夹中,示例文件 [sample.conf](../scripts/rockchip/boards/sample.conf),默认为 `firefly-rk3399`。其包括的配置参数意义见[版型文件](./openEuler适配指南.md#编写版型文件)。
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/boards) 文件夹中,示例文件 [sample.conf](../scripts/boards/sample.conf),默认为 `firefly-rk3399`。其包括的配置参数意义见[版型文件](./openEuler适配指南.md#编写版型文件)。
|
||||
|
||||
2. -k, --kernel KERNEL_URL
|
||||
|
||||
@ -78,15 +78,15 @@
|
||||
|
||||
1. --board BOARD_CONFIG
|
||||
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/rockchip/boards) 文件夹中,示例文件 [sample.conf](../scripts/rockchip/boards/sample.conf),默认为 `firefly-rk3399`。其包括的配置参数意义见[版型文件](./openEuler适配指南.md#编写版型文件)。
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/boards) 文件夹中,示例文件 [sample.conf](../scripts/boards/sample.conf),默认为 `firefly-rk3399`。其包括的配置参数意义见[版型文件](./openEuler适配指南.md#编写版型文件)。
|
||||
|
||||
2. -r, --repo REPO_INFO
|
||||
|
||||
开发源 repo 文件的 URL 或者路径,也可以是开发源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。
|
||||
软件源 repo 文件的 URL 或者路径,也可以是软件源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。
|
||||
下面分别举例:
|
||||
|
||||
- 开发源 repo 文件的 URL,如 `https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS-SP2/generic.repo`。
|
||||
- 开发源的 repo 文件路径:
|
||||
- 软件源 repo 文件的 URL,如 `https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS-SP2/generic.repo`。
|
||||
- 软件源的 repo 文件路径:
|
||||
|
||||
`./openEuler-20.03-LTS.repo`:生成 openEuler 20.03 LTS 版本的镜像,该文件内容参考 <https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo>。
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
- `xfce`,带 Xfce 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `ukui`,带 UKUI 桌面及必要的配套软件(不包括中文字体以及输入法)。
|
||||
- `dde`,带 DDE 桌面及必要的配套软件(不包括中文字体以及输入法)。
|
||||
- rpmlist 文件路径,其中包含镜像中要安装的软件列表,内容参考 [rpmlist](../../scripts/rockchip/configs/rpmlist)。
|
||||
- rpmlist 文件路径,其中包含镜像中要安装的软件列表,内容参考 [rpmlist](../../scripts/configs/rpmlist)。
|
||||
|
||||
默认使用 `headless` 选项。
|
||||
|
||||
@ -132,7 +132,7 @@
|
||||
|
||||
1. --board BOARD_CONFIG
|
||||
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/rockchip/boards) 文件夹中,示例文件 [sample.conf](../scripts/rockchip/boards/sample.conf),默认为 `firefly-rk3399`。其包括的配置参数意义见[版型文件](./openEuler适配指南.md#编写版型文件)。
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/boards) 文件夹中,示例文件 [sample.conf](../scripts/boards/sample.conf),默认为 `firefly-rk3399`。其包括的配置参数意义见[版型文件](./openEuler适配指南.md#编写版型文件)。
|
||||
|
||||
2. -n, --name IMAGE_NAME
|
||||
|
||||
|
||||
291
documents/树莓派.md
291
documents/树莓派.md
@ -11,8 +11,8 @@
|
||||
- [镜像构建](#镜像构建)
|
||||
- [准备环境](#准备环境)
|
||||
- [构建镜像](#构建镜像)
|
||||
- [快速构建(无需编译内核,推荐)](#快速构建无需编译内核推荐)
|
||||
- [完全构建(包括编译内核)](#完全构建包括编译内核)
|
||||
- [无需编译内核构建镜像](#无需编译内核构建镜像)
|
||||
- [使用自定义内核构建镜像](#使用自定义内核构建镜像)
|
||||
- [Docker 容器内构建](#docker-容器内构建)
|
||||
|
||||
<!-- /TOC -->
|
||||
@ -38,10 +38,12 @@
|
||||
- [openEuler 21.09 内测版(DDE 桌面、中文输入法)更新日志](raspberrypi/changelog/changelog-21.09-DDE.md)
|
||||
- [openEuler 21.09 内测版(Xfce 桌面、中文输入法)更新日志](raspberrypi/changelog/changelog-21.09-Xfce.md)
|
||||
- [openEuler 21.09 内测版(LXDE 桌面、中文输入法)更新日志](raspberrypi/changelog/changelog-21.09-LXDE.md)
|
||||
- [scripts](../scripts/raspberrypi): 构建 openEuler 树莓派镜像的脚本
|
||||
- [快速构建(不编译内核)](../scripts/raspberrypi/build-image.sh)
|
||||
- [完全构建(编译内核)](../scripts/raspberrypi/build-image-common.sh)
|
||||
- [Docker 容器中构建](../scripts/raspberrypi/build-image-docker.sh)
|
||||
- [scripts](../scripts): 构建 openEuler 树莓派镜像的脚本
|
||||
- [构建完整镜像](scripts/build.sh)
|
||||
- [使用 Docker 构建完整镜像](./scripts/build-image-docker.sh)
|
||||
- [构建 boot 镜像](scripts/build_boot.sh)
|
||||
- [构建 rootfs 镜像](scripts/build_rootfs.sh)
|
||||
- [将 u-boot、boot、rootfs 合并成一个完整镜像](scripts/gen_image.sh)
|
||||
|
||||
## 最新镜像
|
||||
|
||||
@ -75,12 +77,97 @@
|
||||
|
||||
详细过程参见 [openEuler 镜像的构建](raspberrypi/openEuler镜像的构建.md)。
|
||||
|
||||
构建脚本见 [scripts/raspberrypi](../scripts/raspberrypi)。
|
||||
构建脚本见 [scripts](../scripts)。
|
||||
|
||||
构建镜像需执行命令:
|
||||
|
||||
`sudo bash build.sh --board BOARD_CONFIG -n NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO_INFO -s SPEC --cores N`
|
||||
|
||||
脚本运行结束后,会提示镜像的存储位置,镜像默认保存在脚本运行所在目录的 `build/YYYY-MM-DD/` 下。
|
||||
|
||||
各个参数意义:
|
||||
|
||||
1. --board BOARD_CONFIG
|
||||
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/boards) 文件夹中,示例文件 [sample.conf](../scripts/boards/sample.conf)。构建树莓派镜像需要设置为 `raspberrypi`,对应文件 [raspberrypi.conf](../scripts/boards/raspberrypi.conf)。
|
||||
|
||||
其包括的配置参数意义如下:
|
||||
|
||||
- platform=PLATFORM
|
||||
|
||||
开发板所使用的平台,目前支持的平台有:broadcom、rockchip、phytium。构建树莓派镜像需要设置为 `broadcom`。
|
||||
|
||||
- device-tree=DTB_NAME
|
||||
|
||||
内核设备树中的设备名称,和开发板名称有一点区别,对应 [kernel/arch/arm64/boot/dts/broadcom](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/arch/arm64/boot/dts/broadcom) 下的 `DTB_NAME.dts` 文件。构建树莓派镜像时,默认编译出所有树莓派平台的设备树文件,因此该参数可以为空或者根据需要设置为 `bcm2711-rpi-4-b` 或 `bcm2712-rpi-5-b`。
|
||||
|
||||
- ubootconfig=UBOOT_DEFCONFIG
|
||||
|
||||
开发板对应的 defconfig 的文件名称,对应 [u-boot/configs](https://github.com/u-boot/u-boot/tree/master/configs) 下 `UBOOT_DEFCONFIG` 文件,默认为 `firefly-rk3399_defconfig`。构建树莓派镜像无需这部分内容,默认为空:`ubootconfig=`。
|
||||
|
||||
2. -n, --name IMAGE_NAME
|
||||
|
||||
构建的镜像名称,例如:`openEuler-24.03-LTS-raspi-aarch64-alpha1`。
|
||||
|
||||
3. -k, --kernel KERNEL_URL
|
||||
|
||||
内核源码仓库的项目地址,如 `https://gitee.com/openeuler/raspberrypi-kernel.git`。可根据需要设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git` 或 `git@gitee.com:openeuler/kernel.git`。
|
||||
|
||||
注意,如果本参数为空,则不会编译内核源码,默认使用软件源中的内核包。
|
||||
|
||||
4. -b, --branch KERNEL_BRANCH
|
||||
|
||||
内核源码的对应分支,例如:OLK-6.6。根据 -k 参数有以下选择:
|
||||
|
||||
- -k https://gitee.com/openeuler/rockchip-kernel.git
|
||||
- openEuler-20.03-LTS
|
||||
- -k https://gitee.com/openeuler/kernel.git
|
||||
- openEuler-21.09
|
||||
|
||||
5. -c, --config KERNEL_DEFCONFIG
|
||||
|
||||
内核编译使用的配置文件名称或路径,如 `bcm2711_defconfig`、`bcm2712_defconfig`。如果该参数为配置文件名称,请确保该文件在内核源码的目录 arch/arm64/configs 下。
|
||||
|
||||
注意,如果 `--branch` 参数为 `OLK-6.6` 且本参数 `--config` 为空,则默认编译出同时支持树莓派 5 和树莓派 4B 的内核映像。
|
||||
|
||||
6. -r, --repo REPO_INFO
|
||||
|
||||
软件源 repo 文件的 URL 或者路径,也可以是软件源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。
|
||||
|
||||
下面分别举例:
|
||||
- 软件源 repo 文件的 URL,如 `https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS-SP1/generic.repo`
|
||||
- 软件源的 repo 文件路径:
|
||||
- `./openEuler-20.03-LTS-SP1.repo`:生成 openEuler 20.03 LTS SP1 版本的镜像,该文件内容参考 <https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS-SP1/generic.repo>。
|
||||
- 资源库的 baseurl 列表,如 `"http://repo.openeuler.org/openEuler-20.03-LTS-SP1/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS-SP1/EPOL/aarch64/"`。
|
||||
|
||||
7. -s, --spec SPEC
|
||||
|
||||
构建的镜像版本:
|
||||
- `headless`,无图形界面版的镜像。
|
||||
- `xfce`,带 Xfce 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `ukui`,带 UKUI 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `dde`,带 DDE 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `gnome`,带 GNOME 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `devstation`,带 GNOME 桌面、中文字体、输入法、大量开发工具和 IDE 等配套软件。
|
||||
- rpmlist 文件路径,该文件包含镜像中要安装的软件列表,内容参考 [rpmlist](../scripts/configs-rpi/rpmlist)。
|
||||
|
||||
默认使用 `headless` 选项。
|
||||
|
||||
8. --cores N
|
||||
|
||||
并行编译的数量,根据运行脚本的宿主机 CPU 实际数目设定,默认为可用的 CPU 总数。
|
||||
|
||||
9. -h, --help
|
||||
|
||||
显示帮助信息。
|
||||
|
||||
|
||||
#### 无需编译内核构建镜像
|
||||
例如,使用软件源中的内核包构建 openEuler 24.03 LTS SP2 版本 openEuler 树莓派镜像,执行命令:`sudo bash build.sh --board raspberrypi --kernel "" --branch "" --config "" --repo https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS-SP2/generic.repo --name openEuler-24.03-LTS-raspi-aarch64-alpha1`
|
||||
|
||||
#### 快速构建(无需编译内核,推荐)
|
||||
|
||||
> **须知:**
|
||||
>当前支持多个 openEuler 版本,即 20.09、20.03 LTS SP1、21.03、20.03 LTS SP2、21.09、20.03 LTS SP3、22.03 LTS、22.09、22.03 LTS SP1、23.03、22.03 LTS SP2、22.03 LTS SP3、24.03 LTS、22.03 LTS SP4、24.09、24.03 LTS SP1、25.03、24.03 LTS SP2 版本。
|
||||
>无需编译内核,使用软件源中的内核包,当前支持版本有 20.09、20.03 LTS SP1、21.03、20.03 LTS SP2、21.09、20.03 LTS SP3、22.03 LTS、22.09、22.03 LTS SP1、23.03、22.03 LTS SP2、22.03 LTS SP3、24.03 LTS、22.03 LTS SP4、24.09、24.03 LTS SP1、25.03、24.03 LTS SP2。
|
||||
>如果构建包含 Xfce/UKUI/DDE/GNOME 桌面环境或者 DevStation 开发者工作站的镜像,需要注意五点:
|
||||
>1. 构建包含 Xfce 桌面环境的镜像,当前只支持 openEuler 21.03/20.03 LTS SP2/21.09/20.03 LTS SP3/22.03 LTS/22.09/22.03 LTS SP1/23.03/22.03 LTS SP2/22.03 LTS SP3/24.03 LTS/22.03 LTS SP4/24.09 版本。自 openEuler 24.03 LTS SP1 起,不再支持 Xfce 桌面环境。
|
||||
>2. 构建包含 DDE 桌面环境的镜像,当前只支持 openEuler 20.03 LTS SP1/21.03/20.03 LTS SP2/21.09/20.03 LTS SP3/22.03 LTS/22.09/22.03 LTS SP1/23.03/22.03 LTS SP2/22.03 LTS SP3/24.03 LTS/22.03 LTS SP4/24.09/24.03 LTS SP1/25.03/24.03 LTS SP2 版本。
|
||||
@ -88,168 +175,68 @@
|
||||
>4. 构建 DevStation 开发者工作站的镜像,当前只支持 openEuler 24.03 LTS SP1/25.03/24.03 LTS SP2 版本。
|
||||
>5. 根据需要设置 -s/--spec,其具体意义见该参数的介绍部分。
|
||||
|
||||
使用已有的树莓派内核、固件、蓝牙等 RPM 包构建镜像。
|
||||
|
||||
构建镜像需执行命令:
|
||||
|
||||
`sudo bash build-image.sh -d DIR -r REPO -n IMAGE_NAME -s SPEC`
|
||||
|
||||
各个参数意义:
|
||||
|
||||
1. -d, --dir DIR
|
||||
|
||||
构建镜像和临时文件的输出目录,默认为脚本所在目录。如果 `DIR` 不存在则会自动创建。
|
||||
|
||||
脚本运行结束后,会提示镜像的存储位置,默认保存在 `DIR/raspi_output/img/` 下。
|
||||
|
||||
2. -r, --repo REPO_INFO
|
||||
|
||||
开发源 repo 文件的 URL 或者路径,也可以是开发源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。
|
||||
|
||||
下面分别举例:
|
||||
- 开发源 repo 文件的 URL,如 `https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-21.03/generic.repo`。
|
||||
- 开发源的 repo 文件路径:
|
||||
- `./openEuler-21.03.repo`:生成 openEuler 21.03 版本的镜像,该文件内容参考 <https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-21.03/generic.repo>。
|
||||
- 资源库的 baseurl 列表,如 `"http://repo.openeuler.org/openEuler-21.03/OS/aarch64/ http://repo.openeuler.org/openEuler-21.03/EPOL/aarch64/"`。
|
||||
|
||||
3. -n, --name IMAGE_NAME
|
||||
|
||||
构建的镜像名称。
|
||||
|
||||
例如,`openEuler-21.03.img`。默认为`openEuler-raspi-aarch64.img`,或者根据 `-n, --name IMAGE_NAME` 参数自动生成。
|
||||
|
||||
4. -s, --spec SPEC
|
||||
|
||||
构建的镜像版本:
|
||||
- `headless`,无图形界面版的镜像。
|
||||
- `xfce`,带 Xfce 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `ukui`,带 UKUI 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `dde`,带 DDE 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `gnome`,带 GNOME 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `devstation`,带 GNOME 桌面、中文字体、输入法、大量开发工具和 IDE 等配套软件。
|
||||
- rpmlist 文件路径,其中包含镜像中要安装的软件列表,内容参考 [rpmlist](../scripts/raspberrypi/config/rpmlist)。
|
||||
|
||||
默认使用 `headless` 选项。
|
||||
|
||||
5. -h, --help
|
||||
|
||||
显示帮助信息。
|
||||
|
||||
#### 完全构建(包括编译内核)
|
||||
|
||||
包含编译内核、下载树莓派相关固件等过程,速度相对较慢。
|
||||
#### 使用自定义内核构建镜像
|
||||
例如,使用软件源中的内核包构建 openEuler 24.03 LTS SP2 版本 openEuler 树莓派镜像,执行命令:`sudo bash build.sh --board raspberrypi --kernel "https://gitee.com/openeuler/raspberrypi-kernel.git" --branch "OLK-6.6" --config "" --repo https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS-SP2/generic.repo --name openEuler-24.03-LTS-raspi-aarch64-alpha1`
|
||||
|
||||
> **须知:**
|
||||
>当前支持三个 openEuler 版本,即 20.03 LTS、20.09、20.03 LTS SP1、21.03、20.03 LTS SP2、21.09、20.03 LTS SP3、22.03 LTS、22.09、22.03 LTS SP1、23.03、22.03 LTS SP2、22.03 LTS SP3、24.03 LTS、22.03 LTS SP4、24.09、24.03 LTS SP1、25.03、24.03 LTS SP2 版本。
|
||||
>使用自定义内核,当前支持版本有 20.03 LTS、20.09、20.03 LTS SP1、21.03、20.03 LTS SP2、21.09、20.03 LTS SP3、22.03 LTS、22.09、22.03 LTS SP1、23.03、22.03 LTS SP2、22.03 LTS SP3、24.03 LTS、22.03 LTS SP4、24.09、24.03 LTS SP1、25.03、24.03 LTS SP2。
|
||||
>如果构建包含 Xfce/UKUI/DDE 桌面环境或者 DevStation 开发者工作站的镜像,需要注意六点:
|
||||
>1. 构建包含 Xfce 桌面环境的镜像,当前只支持 openEuler 21.03/20.03 LTS SP2/21.09/20.03 LTS SP3/22.03 LTS/22.09/22.03 LTS SP1/23.03/22.03 LTS SP2/22.03 LTS SP3/24.03 LTS/22.03 LTS SP4/24.09 版本,需要选择对应内核源码和分支。自 openEuler 24.03 LTS SP1 起,不再支持 Xfce 桌面环境。
|
||||
> - openEuler 21.03:需要选择 [openEuler 内核](https://gitee.com/openeuler/kernel) 的 [openEuler-21.03](https://gitee.com/openeuler/kernel/tree/openEuler-21.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/kernel.git`,-b/--branch` 设置为 `openEuler-21.03`。
|
||||
> - openEuler 20.03 LTS SP2/20.03 LTS SP3:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-20.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-20.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-20.03-LTS`。
|
||||
> - openEuler 21.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-21.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-21.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-21.09`。
|
||||
> - openEuler 22.03 LTS:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS`。
|
||||
> - openEuler 22.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.09`。
|
||||
> - openEuler 22.03 LTS SP1:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP1](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP1/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP1`。
|
||||
> - openEuler 23.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-23.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-23.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-23.03`。
|
||||
> - openEuler 22.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP2](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP2/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP2`。
|
||||
> - openEuler 22.03 LTS SP3/22.03 LTS SP4:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-5.10](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-5.10/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-5.10`。
|
||||
> - openEuler 24.03 LTS/24.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`。
|
||||
> - openEuler 21.03:需要选择 [openEuler 内核](https://gitee.com/openeuler/kernel) 的 [openEuler-21.03](https://gitee.com/openeuler/kernel/tree/openEuler-21.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/kernel.git`,`-b/--branch` 设置为 `openEuler-21.03`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 20.03 LTS SP2/20.03 LTS SP3:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-20.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-20.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-20.03-LTS`,`-c/--config` 设置为 `openeuler-raspi_defconfig`。
|
||||
> - openEuler 21.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-21.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-21.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-21.09`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.09`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS SP1:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP1](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP1/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP1`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 23.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-23.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-23.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-23.03`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP2](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP2/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP2`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS SP3/22.03 LTS SP4:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-5.10](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-5.10/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-5.10`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 24.03 LTS/24.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`,`-c/--config` 设置为空 `""`。
|
||||
>2. 构建包含 UKUI 桌面环境的镜像,当前只支持 openEuler 20.09/20.03 LTS SP1/21.03/20.03 LTS SP2/21.09/20.03 LTS SP3/22.03 LTS/22.09/22.03 LTS SP1/23.03/22.03 LTS SP2/22.03 LTS SP3/24.03 LTS/22.03 LTS SP4/24.09/24.03 LTS SP1/25.03/24.03 LTS SP2 版本,需要选择对应内核源码和分支。
|
||||
> - openEuler 20.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-20.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-20.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-20.09`。
|
||||
> - openEuler 20.03 LTS SP1/20.03 LTS SP2/20.03 LTS SP3:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-20.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-20.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-20.03-LTS`。
|
||||
> - openEuler 21.03:需要选择 [openEuler 内核](https://gitee.com/openeuler/kernel) 的 [openEuler-21.03](https://gitee.com/openeuler/kernel/tree/openEuler-21.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/kernel.git`,-b/--branch` 设置为 `openEuler-21.03`。
|
||||
> - openEuler 21.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-21.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-21.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-21.09`。
|
||||
> - openEuler 22.03 LTS:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS`。
|
||||
> - openEuler 22.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.09`。
|
||||
> - openEuler 22.03 LTS SP1:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP1](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP1/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP1`。
|
||||
> - openEuler 23.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-23.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-23.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-23.03`。
|
||||
> - openEuler 22.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP2](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP2/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP2`。
|
||||
> - openEuler 22.03 LTS SP3/22.03 LTS SP4:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-5.10](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-5.10/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-5.10`。
|
||||
> - openEuler 24.03 LTS/24.09/24.03 LTS SP1/24.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`。
|
||||
> - openEuler 25.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-25.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-25.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-25.03`。
|
||||
> - openEuler 20.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-20.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-20.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-20.09`,`-c/--config` 设置为 `openeuler-raspi_defconfig`。
|
||||
> - openEuler 20.03 LTS SP1/20.03 LTS SP2/20.03 LTS SP3:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-20.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-20.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-20.03-LTS`,`-c/--config` 设置为 `openeuler-raspi_defconfig`。
|
||||
> - openEuler 21.03:需要选择 [openEuler 内核](https://gitee.com/openeuler/kernel) 的 [openEuler-21.03](https://gitee.com/openeuler/kernel/tree/openEuler-21.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/kernel.git`,-b/--branch` 设置为 `openEuler-21.03`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 21.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-21.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-21.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-21.09`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.09`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS SP1:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP1](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP1/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP1`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 23.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-23.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-23.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-23.03`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP2](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP2/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP2`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS SP3/22.03 LTS SP4:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-5.10](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-5.10/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-5.10`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 24.03 LTS/24.09/24.03 LTS SP1/24.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`,`-c/--config` 设置为空 `""`。
|
||||
> - openEuler 25.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-25.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-25.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-25.03`,`-c/--config` 设置为空 `""`。
|
||||
>3. 构建包含 DDE 桌面环境的镜像,当前只支持 openEuler 20.03 LTS SP1/21.03/20.03 LTS SP2/21.09/20.03 LTS SP3/22.03 LTS/22.09/22.03 LTS SP1/23.03/22.03 LTS SP2/22.03 LTS SP3/24.03 LTS/22.03 LTS SP4/24.09/24.03 LTS SP1/25.03/24.03 LTS SP2 版本。
|
||||
> - openEuler 20.03 LTS SP1/20.03 LTS SP2/20.03 LTS SP3:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-20.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-20.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-20.03-LTS`。
|
||||
> - openEuler 21.03:需要选择 [openEuler 内核](https://gitee.com/openeuler/kernel) 的 [openEuler-21.03](https://gitee.com/openeuler/kernel/tree/openEuler-21.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/kernel.git`,-b/--branch` 设置为 `openEuler-21.03`。
|
||||
> - openEuler 21.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-21.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-21.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-21.09`。
|
||||
> - openEuler 22.03 LTS:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS`。
|
||||
> - openEuler 22.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.09`。
|
||||
> - openEuler 22.03 LTS SP1:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP1](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP1/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP1`。
|
||||
> - openEuler 23.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-23.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-23.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-23.03`。
|
||||
> - openEuler 22.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP2](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP2/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP2`。
|
||||
> - openEuler 22.03 LTS SP3/22.03 LTS SP4:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-5.10](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-5.10/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-5.10`。
|
||||
> - openEuler 24.03 LTS/24.09/24.03 LTS SP1/24.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`。
|
||||
> - openEuler 25.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-25.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-25.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-25.03`。
|
||||
> - openEuler 20.03 LTS SP1/20.03 LTS SP2/20.03 LTS SP3:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-20.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-20.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-20.03-LTS`,`-c/--config` 设置为 `openeuler-raspi_defconfig`。
|
||||
> - openEuler 21.03:需要选择 [openEuler 内核](https://gitee.com/openeuler/kernel) 的 [openEuler-21.03](https://gitee.com/openeuler/kernel/tree/openEuler-21.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/kernel.git`,-b/--branch` 设置为 `openEuler-21.03`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 21.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-21.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-21.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-21.09`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.09:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.09](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.09/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.09`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS SP1:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP1](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP1/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP1`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 23.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-23.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-23.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-23.03`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-22.03-LTS-SP2](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-22.03-LTS-SP2/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-22.03-LTS-SP2`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 22.03 LTS SP3/22.03 LTS SP4:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-5.10](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-5.10/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-5.10`,`-c/--config` 设置为 `bcm2711_defconfig`。
|
||||
> - openEuler 24.03 LTS/24.09/24.03 LTS SP1/24.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`,`-c/--config` 设置为空 `""`。
|
||||
> - openEuler 25.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-25.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-25.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-25.03`,`-c/--config` 设置为空 `""`。
|
||||
>4. 构建包含 GNOME 桌面环境的镜像,当前只支持 openEuler 24.03 LTS/22.03 LTS SP4/24.09/24.03 LTS SP1/25.03/24.03 LTS SP2 版本。
|
||||
> - openEuler 24.03 LTS/24.09/24.03 LTS SP1/24.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`。
|
||||
> - openEuler 25.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-25.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-25.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-25.03`。
|
||||
> - openEuler 24.03 LTS/24.09/24.03 LTS SP1/24.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`,`-c/--config` 设置为空 `""`。
|
||||
> - openEuler 25.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-25.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-25.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-25.03`,`-c/--config` 设置为空 `""`。
|
||||
>5. 构建 DevStation 开发者工作站的镜像,当前只支持 openEuler 24.03 LTS SP1/25.03/24.03 LTS SP2 版本。
|
||||
> - openEuler 24.03 LTS SP1/24.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`。
|
||||
> - openEuler 25.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-25.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-25.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-25.03`。
|
||||
> - openEuler 24.03 LTS SP1/24.03 LTS SP2:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [OLK-6.6](https://gitee.com/openeuler/raspberrypi-kernel/tree/OLK-6.6/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `OLK-6.6`,`-c/--config` 设置为空 `""`。
|
||||
> - openEuler 25.03:需要选择 [openEuler-RaspberryPi 内核](https://gitee.com/openeuler/raspberrypi-kernel) 的 [openEuler-25.03](https://gitee.com/openeuler/raspberrypi-kernel/tree/openEuler-25.03/) 分支,即将参数 `-k/--kernel` 设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git`,`-b/--branch` 设置为 `openEuler-25.03`,`-c/--config` 设置为空 `""`。
|
||||
>6. 根据需要设置 -s/--spec,其具体意义见该参数的介绍部分。
|
||||
|
||||
构建镜像需执行命令:
|
||||
|
||||
`sudo bash build-image-common.sh -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO -s SPEC --cores N`
|
||||
|
||||
脚本运行结束后,会提示镜像的存储位置,镜像默认保存在脚本运行所在目录的 `raspi_output/img/` 下。
|
||||
|
||||
各个参数意义:
|
||||
|
||||
1. -n, --name IMAGE_NAME
|
||||
|
||||
构建的镜像名称。
|
||||
|
||||
例如,`openEuler-20.03-LTS-SP1.img`。默认为`openEuler-raspi-aarch64.img`,或者根据 `-n, --name IMAGE_NAME` 参数自动生成。
|
||||
|
||||
2. -k, --kernel KERNEL_URL
|
||||
|
||||
内核源码仓库的项目地址,默认为 `https://gitee.com/openeuler/raspberrypi-kernel.git`。可根据需要设置为 `git@gitee.com:openeuler/raspberrypi-kernel.git` 或 `git@gitee.com:openeuler/kernel.git`。
|
||||
|
||||
3. -b, --branch KERNEL_BRANCH
|
||||
|
||||
内核源码的对应分支,默认为 `openEuler-20.03-LTS`,推荐使用分支 `openEuler-21.09`、`openEuler-20.03-LTS` 或 `openEuler-20.09`。
|
||||
|
||||
4. -c, --config KERNEL_DEFCONFIG
|
||||
|
||||
内核编译使用的配置文件名称或路径,默认为 `openeuler-raspi_defconfig`。如果该参数为配置文件名称,请确保该文件在内核源码的目录 arch/arm64/configs 下。
|
||||
|
||||
5. -r, --repo REPO_INFO
|
||||
|
||||
开发源 repo 文件的 URL 或者路径,也可以是开发源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。
|
||||
|
||||
下面分别举例:
|
||||
- 开发源 repo 文件的 URL,如 `https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS-SP1/generic.repo`
|
||||
- 开发源的 repo 文件路径:
|
||||
- `./openEuler-20.03-LTS-SP1.repo`:生成 openEuler 20.03 LTS SP1 版本的镜像,该文件内容参考 <https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS-SP1/generic.repo>。
|
||||
- 资源库的 baseurl 列表,如 `"http://repo.openeuler.org/openEuler-20.03-LTS-SP1/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS-SP1/EPOL/aarch64/"`。
|
||||
|
||||
6. -s, --spec SPEC
|
||||
|
||||
构建的镜像版本:
|
||||
- `headless`,无图形界面版的镜像。
|
||||
- `xfce`,带 Xfce 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `ukui`,带 UKUI 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `dde`,带 DDE 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `gnome`,带 GNOME 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `devstation`,带 GNOME 桌面、中文字体、输入法、大量开发工具和 IDE 等配套软件。
|
||||
- rpmlist 文件路径,该文件包含镜像中要安装的软件列表,内容参考 [rpmlist](../scripts/raspberrypi/config-common/rpmlist)。
|
||||
|
||||
默认使用 `headless` 选项。
|
||||
|
||||
7. --cores N
|
||||
|
||||
并行编译的数量,根据运行脚本的宿主机 CPU 实际数目设定,默认为可用的 CPU 总数。
|
||||
|
||||
#### Docker 容器内构建
|
||||
|
||||
构建镜像需执行命令:
|
||||
|
||||
`sudo bash build-image-docker.sh -d DOCKER_FILE -n IMAGE_NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO --cores N`
|
||||
`sudo bash build-image-docker.sh -d DOCKER_FILE --board BOARD_CONFIG -n NAME -k KERNEL_URL -b KERNEL_BRANCH -c KERNEL_DEFCONFIG -r REPO_INFO -s SPEC --cores N`
|
||||
|
||||
脚本运行结束后,镜像默认保存在脚本运行所在目录的 `raspi_output/img/` 下。
|
||||
脚本运行结束后,会提示镜像的存储位置,镜像默认保存在脚本运行所在目录的 `build/YYYY-MM-DD/` 下。
|
||||
|
||||
注意!!!运行该脚本前,需安装 Docker 运行环境。该脚本会自动将 `-d DOCKER_FILE` 参数对应的 Docker 镜像导入本机系统中。
|
||||
|
||||
除参数 `-d DOCKER_FILE` 外,剩余参数与 [快速构建(无需编译内核,推荐)](#快速构建无需编译内核推荐) 或 [完全构建(包括编译内核)](#完全构建包括编译内核) 中对应参数一致:
|
||||
除参数 `-d DOCKER_FILE` 外,其余参数与 [构建镜像章节](#构建镜像) 中 [build.sh](../scripts/build.sh) 对应参数一致:
|
||||
|
||||
1. -d, --docker DOCKER_FILE
|
||||
|
||||
|
||||
@ -9,8 +9,10 @@
|
||||
- [最新镜像](#最新镜像)
|
||||
- [镜像构建](#镜像构建)
|
||||
- [准备环境](#准备环境)
|
||||
- [一次构建](#一次构建)
|
||||
- [构建完整镜像](#构建完整镜像)
|
||||
- [Docker 容器内构建](#docker-容器内构建)
|
||||
- [使用脚本构建镜像需执行命令:](#使用脚本构建镜像需执行命令)
|
||||
- [使用 Docker 分步构建](#使用-docker-分步构建)
|
||||
- [顺序构建](#顺序构建)
|
||||
- [刷写镜像](#刷写镜像)
|
||||
- [刷写到 SD 卡](#刷写到-sd-卡)
|
||||
@ -25,7 +27,7 @@
|
||||
- [openEuler镜像的构建](rockchip/openEuler镜像的构建.md)
|
||||
- [刷写EMMC镜像](rockchip/刷写EMMC镜像.md)
|
||||
- [顺序构建](rockchip/顺序构建.md)
|
||||
- [一次构建命令列举](rockchip/一次构建命令列举.md)
|
||||
- [构建完整镜像命令列举](rockchip/构建完整镜像命令列举.md)
|
||||
- [基于Firefly-SDK编译Firefly-RK3399的内核镜像](rockchip/基于Firefly-SDK编译Firefly-RK3399的内核镜像.md)
|
||||
- [打包 ITX-RK3588J 一体化烧写镜像](rockchip/打包ITX-RK3588J一体化烧写镜像.md)
|
||||
- [设置 SELinux](rockchip/设置SELinux.md)
|
||||
@ -33,12 +35,12 @@
|
||||
- [openEuler 适配指南](rockchip/openEuler适配指南.md)
|
||||
- [在openEuler上使用RKNPU](rockchip/在openEuler上使用RKNPU.md)
|
||||
- [在openEuler上运行RKLLM](rockchip/在openEuler上运行RKLLM.md)
|
||||
- [scripts](../scripts/rockchip): 构建 openEuler RK3399 等开发板镜像的脚本
|
||||
- [一次构建脚本](../scripts/rockchip/build.sh)
|
||||
- [boot 镜像构建脚本](../scripts/rockchip/build_boot.sh)
|
||||
- [rootfs 镜像构建脚本](../scripts/rockchip/build_rootfs.sh)
|
||||
- [u-boot 编译脚本](../scripts/rockchip/build_u-boot.sh)
|
||||
- [可启动镜像生成脚本](../scripts/rockchip/gen_image.sh)
|
||||
- [scripts](../scripts): 构建 openEuler 树莓派、RK3399 等开发板镜像的脚本
|
||||
- [构建完整镜像](scripts/build.sh)
|
||||
- [使用 Docker 构建完整镜像](./scripts/build-image-docker.sh)
|
||||
- [构建 boot 镜像](scripts/build_boot.sh)
|
||||
- [构建 rootfs 镜像](scripts/build_rootfs.sh)
|
||||
- [将 u-boot、boot、rootfs 合并成一个完整镜像](scripts/gen_image.sh)
|
||||
|
||||
## 最新镜像
|
||||
|
||||
@ -65,9 +67,9 @@
|
||||
|
||||
详细过程参见 [openEuler 镜像的构建](rockchip/openEuler镜像的构建.md)。
|
||||
|
||||
构建脚本见 [scripts/rockchip](../scripts/rockchip)。
|
||||
构建脚本见 [scripts](../scripts)。
|
||||
|
||||
### 一次构建
|
||||
### 构建完整镜像
|
||||
|
||||
构建镜像需执行命令:
|
||||
|
||||
@ -91,13 +93,13 @@
|
||||
|
||||
1. --board BOARD_CONFIG
|
||||
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/rockchip/boards) 文件夹中,示例文件 [sample.conf](../scripts/rockchip/boards/sample.conf),默认为 `firefly-rk3399`。
|
||||
适用的开发板的版型配置文件在 [boards](../scripts/boards) 文件夹中,示例文件 [sample.conf](../scripts/boards/sample.conf),默认为 `firefly-rk3399`。
|
||||
|
||||
其包括的配置参数意义如下:
|
||||
|
||||
- platform=PLATFORM
|
||||
|
||||
开发板所使用的平台,目前支持的平台有:rockchip、phytium,默认为 `rockchip`。
|
||||
开发板所使用的平台,目前支持的平台有:broadcom、rockchip、phytium,默认为 `rockchip`。
|
||||
|
||||
- device-tree=DTB_NAME
|
||||
|
||||
@ -105,7 +107,7 @@
|
||||
|
||||
- ubootconfig=UBOOT_DEFCONFIG
|
||||
|
||||
开发板对应的 defconfig 的文件名称,对应 [u-boot/configs](https://github.com/u-boot/u-boot/tree/master/configs) 下 `UBOOT_DEFCONFIG` 文件,默认为 `firefly-rk3399_defconfig`;如需在 RK3588 开发板上使用预编译的 u-boot,可以将此项设置为 `none`。
|
||||
开发板对应的 defconfig 的文件名称,对应 [u-boot/configs](https://github.com/u-boot/u-boot/tree/master/configs) 下 `UBOOT_DEFCONFIG` 文件,默认为 `firefly-rk3399_defconfig`;如需在 RK3588 开发板上使用预编译的 u-boot,可以将此项设置为空:`ubootconfig=`。
|
||||
|
||||
2. -n, --name IMAGE_NAME
|
||||
|
||||
@ -130,11 +132,11 @@
|
||||
|
||||
6. -r, --repo REPO_INFO
|
||||
|
||||
开发源 repo 文件的 URL 或者路径,也可以是开发源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。
|
||||
软件源 repo 文件的 URL 或者路径,也可以是软件源中资源库的 baseurl 列表。注意,如果该参数为资源库的 baseurl 列表,该参数需要使用双引号,各个 baseurl 之间以空格隔开。
|
||||
下面分别举例:
|
||||
|
||||
- 开发源 repo 文件的 URL,如 `https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS/generic.repo`。
|
||||
- 开发源的 repo 文件路径:
|
||||
- 软件源 repo 文件的 URL,如 `https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS/generic.repo`。
|
||||
- 软件源的 repo 文件路径:
|
||||
|
||||
`./openEuler-20.03-LTS.repo`:生成 openEuler 20.03 LTS 版本的镜像,该文件内容参考 <https://gitee.com/src-openeuler/openEuler-repos/blob/openEuler-20.03-LTS/generic.repo>。
|
||||
|
||||
@ -147,7 +149,7 @@
|
||||
- `xfce`,带 Xfce 桌面以及中文字体、输入法等全部配套软件。
|
||||
- `ukui`,带 UKUI 桌面及必要的配套软件(不包括中文字体以及输入法)。
|
||||
- `dde`,带 DDE 桌面及必要的配套软件(不包括中文字体以及输入法)。
|
||||
- rpmlist 文件路径,其中包含镜像中要安装的软件列表,内容参考 [rpmlist](../scripts/rockchip/configs/rpmlist)。
|
||||
- rpmlist 文件路径,其中包含镜像中要安装的软件列表,内容参考 [rpmlist](../scripts/configs/rpmlist)。
|
||||
|
||||
默认使用 `headless` 选项。
|
||||
|
||||
@ -173,84 +175,84 @@
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://wiki.t-firefly.com/zh_CN/Firefly-RK3399/index.html">Firefly Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Rockchip RK3399</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 20.03 LTS, openEuler 22.03 LTS SP2, openEuler 22.03 LTS SP3, openEuler 24.03 LTS</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#firefly-rk3399">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#firefly-rk3399">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Radxa Rock Pi 4A</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://docs.radxa.com/rock4/rock4ab">Radxa Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Rockchip RK3399</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 20.03 LTS, openEuler 22.03 LTS</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#radxa-rockpi-4a">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#radxa-rockpi-4a">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Firefly ROC-RK3566-PC</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://wiki.t-firefly.com/zh_CN/ROC-RK3566-PC/">Firefly Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Rockchip RK3566</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 22.03 LTS SP2, openEuler 22.03 LTS SP3, openEuler 24.03 LTS</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#firefly-roc-rk3566-pc">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#firefly-roc-rk3566-pc">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Firefly ROC-RK3568-PC-SE</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://wiki.t-firefly.com/zh_CN/ROC-RK3568-PC-SE/">Firefly Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Rockchip RK3568</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 22.03 LTS SP2, openEuler 22.03 LTS SP3</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#firefly-roc-rk3568-pc-se">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#firefly-roc-rk3568-pc-se">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Firefly ROC-RK3568-PC</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://wiki.t-firefly.com/zh_CN/ROC-RK3568-PC/">Firefly Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Rockchip RK3568</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 22.03 LTS SP2, openEuler 22.03 LTS SP3</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#firefly-roc-rk3568-pc">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#firefly-roc-rk3568-pc">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>BananaPi Armsom-Sige5</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://docs.armsom.org/armsom-sige5">Armsom Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Rockchip RK3576</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 22.03 LTS SP3</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#bananapi-armsom-sige5">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#bananapi-armsom-sige5">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Firefly ITX-3588J</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://wiki.t-firefly.com/zh_CN/Core-3588J/index.html">Firefly Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Rockchip RK3588</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 22.03 LTS SP3</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#firefly-itx-3588j">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#firefly-itx-3588j">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Firefly ROC-RK3588S-PC</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://wiki.t-firefly.com/zh_CN/ROC-RK3588S-PC/index.html">Firefly Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Rockchip RK3588</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 22.03 LTS SP2, openEuler 22.03 LTS SP3</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#firefly-roc-rk3588s-pc">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#firefly-roc-rk3588s-pc">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Radxa Rock-5B</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://docs.radxa.com/rock5/rock5b">Radxa Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Rockchip RK3588</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 22.03 LTS SP2, openEuler 22.03 LTS SP3</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#radxa-rock-5b">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#radxa-rock-5b">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Phytium Pi 4GB</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://www.phytium.com.cn/homepage/phytium_pie/">Phytium Website</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Phytium</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 22.03 LTS SP3, openEuler 24.03 LTS</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#phytium-pi-4gb">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#phytium-pi-4gb">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Orange Pi Zero 2</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="http://www.orangepi.cn/orangepiwiki/index.php/Orange_Pi_Zero_2">OrangePi Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Allwinner H616</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 20.03 LTS, openEuler 24.03 LTS</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#orange-pi-zero-2">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#orange-pi-zero-2">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
<tbody><tr>
|
||||
<td class="cellrowborder" valign="top" width="10%"><ul><li>Longan Pi 3H</li></ul></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="https://wiki.sipeed.com/hardware/zh/longan/h618/lpi3h/1_intro.html">Sipeed Wiki</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>Allwinner H618</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 24.03 LTS</p></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/一次构建命令列举.md#longan-pi-3h">一次构建命令</a></td>
|
||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#longan-pi-3h">构建完整镜像命令</a></td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
||||
@ -265,7 +267,7 @@
|
||||
|
||||
注意!!!运行该脚本前,需安装 Docker 运行环境。该脚本会自动将 DOCKER_FILE 参数对应的 Docker 镜像导入本机系统中。
|
||||
|
||||
除参数 DOCKER_FILE 外,剩余参数与[一次构建](#一次构建)中对应参数一致:
|
||||
除参数 DOCKER_FILE 外,剩余参数与[构建完整镜像](#构建完整镜像)中对应参数一致:
|
||||
|
||||
1. -d, --docker DOCKER_FILE
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/armsom-sige5
|
||||
dtb_name=rk3576-armsom-sige5
|
||||
platform=rockchip
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3588
|
||||
dtb_name=rk3588-firefly-itx-3588j
|
||||
platform=rockchip
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3566
|
||||
dtb_name=rk3566-roc-pc
|
||||
platform=rockchip
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3568
|
||||
dtb_name=rk3568-roc-pc-se
|
||||
platform=rockchip
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3568
|
||||
dtb_name=rk3568-roc-pc
|
||||
platform=rockchip
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3588
|
||||
dtb_name=rk3588s-roc-pc
|
||||
platform=rockchip
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/longanpi-3h
|
||||
dtb_name=sun50i-h618-longanpi-3h
|
||||
platform=allwinner
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/orangepi-zero2
|
||||
dtb_name=sun50i-h616-orangepi-zero2
|
||||
platform=allwinner
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/phytiumpi
|
||||
dtb_name=phytiumpi_firefly
|
||||
platform=phytium
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ubootconfig=none
|
||||
ubootconfig=
|
||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/radxa-rock5b
|
||||
dtb_name=rk3588-rock-5b
|
||||
platform=rockchip
|
||||
|
||||
11
scripts/boards/raspberrypi.conf
Normal file
11
scripts/boards/raspberrypi.conf
Normal file
@ -0,0 +1,11 @@
|
||||
ubootconfig=
|
||||
dtb_name=bcm2711-rpi-4-b
|
||||
platform=broadcom
|
||||
soc_name=
|
||||
arch=arm64
|
||||
part_table=msdos
|
||||
|
||||
POST_BOARD_OVERLAY() {
|
||||
echo "Put ${board} firmware into rootfs..."
|
||||
echo "Nothing to do..."
|
||||
}
|
||||
@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
__usage="
|
||||
Usage: build-image-docker [OPTIONS]
|
||||
Build board image.
|
||||
Build openEuler image.
|
||||
|
||||
Options:
|
||||
--board BOARD_CONFIG Required! The config of target board in the boards folder.
|
||||
@ -14,7 +14,7 @@ Options:
|
||||
-b, --branch KERNEL_BRANCH The branch name of kernel source's repository, which defaults to openEuler-22.03-LTS-SP3.
|
||||
-c, --config KERNEL_DEFCONFIG The name/path of defconfig file when compiling kernel, which defaults to openeuler_rockchip_defconfig.
|
||||
-r, --repo REPO_INFO Required! The URL/path of target repo file or list of repo's baseurls which should be a space separated list.
|
||||
-s, --spec SPEC The image's specification: headless, xfce, ukui, dde or the file path of rpmlist. The default is headless.
|
||||
-s, --spec SPEC The image's specification: headless, xfce, ukui, dde, gnome, devstation or the file path of rpmlist. The default is headless.
|
||||
--cores N The number of cpu cores to be used during making.
|
||||
-h, --help Show command help.
|
||||
"
|
||||
@ -100,6 +100,11 @@ builddate=${buildid:0:8}
|
||||
make_cores=$(nproc)
|
||||
log_dir=${workdir}/log
|
||||
if [ ! -d ${log_dir} ];then mkdir -p ${log_dir}; fi
|
||||
if [ "x${board}" == "xraspberrypi" ]; then
|
||||
config_dir=${cur_dir}/configs-rpi
|
||||
else
|
||||
config_dir=${cur_dir}/configs
|
||||
fi
|
||||
|
||||
parseargs "$@" || help $?
|
||||
|
||||
@ -123,7 +128,7 @@ docker_img_name=${docker_img_name##*: }
|
||||
|
||||
LOG build board image with docker: ${docker_file}.
|
||||
|
||||
(echo "FROM $docker_img_name" && grep -v FROM ${cur_dir}/configs/Dockerfile) | \
|
||||
(echo "FROM $docker_img_name" && grep -v FROM ${config_dir}/Dockerfile) | \
|
||||
docker build -t ${docker_img_name}-${buildid} \
|
||||
--build-arg board=${board} \
|
||||
--build-arg docker_file=${docker_file} \
|
||||
@ -134,7 +139,7 @@ LOG build board image with docker: ${docker_file}.
|
||||
--build-arg repo_file=${repo_file} \
|
||||
--build-arg spec_param=${spec_param} \
|
||||
--build-arg make_cores=${make_cores} \
|
||||
--no-cache -f- ${cur_dir}/configs
|
||||
--no-cache -f- ${config_dir}
|
||||
|
||||
echo docker run --rm --privileged=true \
|
||||
-v ${cur_dir}:/work \
|
||||
|
||||
@ -1,18 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
__usage="
|
||||
Usage: build [OPTIONS]
|
||||
Build Rockchip bootable images.
|
||||
Build openEuler bootable images.
|
||||
The target bootable compressed images will be generated in the build/YYYY-MM-DD folder of the directory where the build script is located.
|
||||
|
||||
Options:
|
||||
--board BOARD_CONFIG Required! The config of target board in the boards folder, which defaults to firefly-rk3399.
|
||||
-n, --name IMAGE_NAME The Rockchip image name to be built.
|
||||
-n, --name IMAGE_NAME The openEuler image name to be built.
|
||||
-k, --kernel KERNEL_URL The URL of kernel source's repository, which defaults to https://gitee.com/openeuler/rockchip-kernel.git.
|
||||
-b, --branch KERNEL_BRANCH The branch name of kernel source's repository, which defaults to openEuler-20.03-LTS.
|
||||
-c, --config KERNEL_DEFCONFIG The name/path of defconfig file when compiling kernel, which defaults to openeuler_rockchip_defconfig.
|
||||
-r, --repo REPO_INFO The URL/path of target repo file or list of repo's baseurls which should be a space separated list.
|
||||
-s, --spec SPEC The image's specification: headless, xfce, ukui, dde or the file path of rpmlist. The default is headless.
|
||||
-s, --spec SPEC The image's specification: headless, xfce, ukui, dde, gnome, devstation or the file path of rpmlist. The default is headless.
|
||||
--cores N The number of cpu cores to be used during making.
|
||||
-h, --help Show command help.
|
||||
"
|
||||
@ -43,17 +45,17 @@ default_param() {
|
||||
branch=openEuler-20.03-LTS
|
||||
repo_file="https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS/generic.repo"
|
||||
kernel_url="https://gitee.com/openeuler/rockchip-kernel.git"
|
||||
workdir=$cur_dir/build
|
||||
workdir=${cur_dir}/build
|
||||
name=${branch}-${board}-aarch64-alpha1
|
||||
make_cores=$(nproc)
|
||||
}
|
||||
|
||||
save_param() {
|
||||
if [ -f $workdir/.param_last ]; then
|
||||
rm $workdir/.param_last
|
||||
if [ -f ${workdir}/.param_last ]; then
|
||||
rm ${workdir}/.param_last
|
||||
fi
|
||||
if [ -f $workdir/.param ]; then
|
||||
mv $workdir/.param $workdir/.param_last
|
||||
if [ -f ${workdir}/.param ]; then
|
||||
mv ${workdir}/.param ${workdir}/.param_last
|
||||
fi
|
||||
echo "board=$board
|
||||
default_defconfig=$default_defconfig
|
||||
@ -63,7 +65,7 @@ platform=$platform
|
||||
branch=$branch
|
||||
repo_file=$repo_file
|
||||
kernel_url=$kernel_url
|
||||
spec_param=$spec_param" > $workdir/.param
|
||||
spec_param=$spec_param" > ${workdir}/.param
|
||||
}
|
||||
|
||||
oe_deppkg_install() {
|
||||
@ -148,8 +150,8 @@ LOG "DeviceTree name: ${dtb_name}."
|
||||
LOG "Target platform: ${platform}."
|
||||
|
||||
used_param
|
||||
if [ ! -d $workdir ]; then
|
||||
mkdir $workdir
|
||||
if [ ! -d ${workdir} ]; then
|
||||
mkdir ${workdir}
|
||||
fi
|
||||
|
||||
# Firefly Toolchain Repo
|
||||
@ -160,15 +162,15 @@ host_arch=$(arch)
|
||||
save_param
|
||||
log_dir=${workdir}/log
|
||||
if [ ! -d ${log_dir} ];then mkdir -p ${log_dir}; fi
|
||||
if [ -f $workdir/.done ];then
|
||||
if [ -f ${workdir}/.done ];then
|
||||
LOG "Checking the previous build."
|
||||
if [[ $(cat $workdir/.done | grep u-boot) == "u-boot" && \
|
||||
$(cat $workdir/.done | grep bootimg) == "bootimg" && \
|
||||
$(cat $workdir/.done | grep rootfs) == "rootfs" && \
|
||||
$(cat $workdir/.done | grep image) == "image" ]];then
|
||||
if [[ $(cat ${workdir}/.done | grep u-boot) == "u-boot" && \
|
||||
$(cat ${workdir}/.done | grep bootimg) == "bootimg" && \
|
||||
$(cat ${workdir}/.done | grep rootfs) == "rootfs" && \
|
||||
$(cat ${workdir}/.done | grep image) == "image" ]];then
|
||||
LOG "Found complete build, clean build flag."
|
||||
rm $workdir/.done
|
||||
touch $workdir/.done
|
||||
rm ${workdir}/.done
|
||||
touch ${workdir}/.done
|
||||
fi
|
||||
else
|
||||
oe_deppkg_install
|
||||
@ -179,18 +181,18 @@ else
|
||||
else
|
||||
LOG "You are running this script on a ${host_arch} mechine, progress...."
|
||||
fi
|
||||
touch $workdir/.done
|
||||
touch ${workdir}/.done
|
||||
fi
|
||||
|
||||
if [[ $(cat $workdir/.done | grep u-boot) != "u-boot" ]];then
|
||||
if [[ $(cat ${workdir}/.done | grep u-boot) != "u-boot" ]];then
|
||||
bash ${cur_dir}/build_u-boot.sh
|
||||
fi
|
||||
|
||||
if [[ $(cat $workdir/.done | grep bootimg) != "bootimg" ]];then
|
||||
if [[ $(cat ${workdir}/.done | grep bootimg) != "bootimg" ]];then
|
||||
bash ${cur_dir}/build_boot.sh
|
||||
fi
|
||||
|
||||
if [[ $(cat $workdir/.done | grep rootfs) != "rootfs" ]];then
|
||||
if [[ $(cat ${workdir}/.done | grep rootfs) != "rootfs" ]];then
|
||||
if [[ "${host_arch}" == "x86_64" && "${arch}" == "arm64" ]];then
|
||||
LOG "You are running this script on a ${host_arch} mechine, installing qemu-user-static...."
|
||||
sudo rpm -ivh ${cur_dir}/bin/qemu-user-static-aarch64-x86_64.rpm
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
__usage="
|
||||
Usage: build_boot [OPTIONS]
|
||||
@ -21,30 +23,30 @@ help()
|
||||
}
|
||||
|
||||
default_param() {
|
||||
workdir=$cur_dir/build
|
||||
workdir=${cur_dir}/build
|
||||
branch=openEuler-20.03-LTS
|
||||
default_defconfig=openeuler_rockchip_defconfig
|
||||
board=firefly-rk3399
|
||||
dtb_name=rk3399-firefly
|
||||
platform=rockchip
|
||||
kernel_url="https://gitee.com/openeuler/rockchip-kernel.git"
|
||||
boot_dir=$workdir/boot
|
||||
log_dir=$workdir/log
|
||||
boot_dir=${workdir}/boot
|
||||
log_dir=${workdir}/log
|
||||
make_cores=$(nproc)
|
||||
}
|
||||
|
||||
local_param(){
|
||||
if [ -f $workdir/.param ]; then
|
||||
branch=$(cat $workdir/.param | grep branch)
|
||||
if [ -f ${workdir}/.param ]; then
|
||||
branch=$(cat ${workdir}/.param | grep branch)
|
||||
branch=${branch:7}
|
||||
|
||||
default_defconfig=$(cat $workdir/.param | grep default_defconfig)
|
||||
default_defconfig=$(cat ${workdir}/.param | grep default_defconfig)
|
||||
default_defconfig=${default_defconfig:18}
|
||||
|
||||
board=$(cat $workdir/.param | grep board)
|
||||
board=$(cat ${workdir}/.param | grep board)
|
||||
board=${board:6}
|
||||
|
||||
kernel_url=$(cat $workdir/.param | grep kernel_url)
|
||||
kernel_url=$(cat ${workdir}/.param | grep kernel_url)
|
||||
kernel_url=${kernel_url:11}
|
||||
fi
|
||||
}
|
||||
@ -101,50 +103,50 @@ LOG(){
|
||||
|
||||
LOSETUP_D_IMG(){
|
||||
set +e
|
||||
if [ -d $workdir/boot_emmc ]; then
|
||||
if grep -q "$workdir/boot_emmc " /proc/mounts ; then
|
||||
umount $workdir/boot_emmc
|
||||
if [ -d ${workdir}/boot_emmc ]; then
|
||||
if grep -q "${workdir}/boot_emmc " /proc/mounts ; then
|
||||
umount ${workdir}/boot_emmc
|
||||
fi
|
||||
fi
|
||||
if [ -d $workdir/boot_emmc ]; then
|
||||
rm -rf $workdir/boot_emmc
|
||||
if [ -d ${workdir}/boot_emmc ]; then
|
||||
rm -rf ${workdir}/boot_emmc
|
||||
fi
|
||||
set -e
|
||||
}
|
||||
|
||||
clone_and_check_kernel_source() {
|
||||
cd $workdir
|
||||
pushd ${workdir}
|
||||
if [ -d kernel ]; then
|
||||
if [ -f $workdir/.param_last ]; then
|
||||
last_branch=$(cat $workdir/.param_last | grep branch)
|
||||
if [ -f ${workdir}/.param_last ]; then
|
||||
last_branch=$(cat ${workdir}/.param_last | grep branch)
|
||||
last_branch=${last_branch:7}
|
||||
|
||||
last_default_defconfig=$(cat $workdir/.param_last | grep default_defconfig)
|
||||
last_default_defconfig=$(cat ${workdir}/.param_last | grep default_defconfig)
|
||||
last_default_defconfig=${last_default_defconfig:18}
|
||||
|
||||
last_dtb_name=$(cat $workdir/.param_last | grep dtb_name)
|
||||
last_dtb_name=$(cat ${workdir}/.param_last | grep dtb_name)
|
||||
last_dtb_name=${last_dtb_name:9}
|
||||
|
||||
last_platform_name=$(cat $workdir/.param_last | grep platform)
|
||||
last_platform_name=${last_dtb_name:9}
|
||||
last_platform_name=$(cat ${workdir}/.param_last | grep platform)
|
||||
last_platform_name=${last_platform_name:9}
|
||||
|
||||
last_kernel_url=$(cat $workdir/.param_last | grep kernel_url)
|
||||
last_kernel_url=$(cat ${workdir}/.param_last | grep kernel_url)
|
||||
last_kernel_url=${last_kernel_url:11}
|
||||
|
||||
cd $workdir/kernel
|
||||
pushd ${workdir}/kernel
|
||||
git remote -v update
|
||||
lastest_kernel_version=$(git rev-parse @{u})
|
||||
local_kernel_version=$(git rev-parse @)
|
||||
cd $workdir
|
||||
popd
|
||||
|
||||
if [[ ${last_branch} != ${branch} || \
|
||||
${last_default_defconfig} != ${default_defconfig} || \
|
||||
${last_dtb_name} != ${dtb_name} || \
|
||||
${last_kernel_url} != ${kernel_url} || \
|
||||
${lastest_kernel_version} != ${local_kernel_version} ]]; then
|
||||
if [ -d $workdir/kernel ];then rm -rf $workdir/kernel; fi
|
||||
if [ -d $workdir/boot ];then rm -rf $workdir/boot; fi
|
||||
if [ -f $workdir/boot.img ];then rm $workdir/boot.img; fi
|
||||
if [ -d ${workdir}/kernel ];then rm -rf ${workdir}/kernel; fi
|
||||
if [ -d ${workdir}/boot ];then rm -rf ${workdir}/boot; fi
|
||||
if [ -f ${workdir}/boot.img ];then rm ${workdir}/boot.img; fi
|
||||
git clone --depth=1 -b $branch $kernel_url kernel
|
||||
LOG "clone kernel source done."
|
||||
fi
|
||||
@ -153,94 +155,146 @@ clone_and_check_kernel_source() {
|
||||
git clone --depth=1 -b $branch $kernel_url kernel
|
||||
LOG "clone kernel source done."
|
||||
fi
|
||||
popd
|
||||
}
|
||||
|
||||
make_kernel(){
|
||||
LOG "make kernel(${default_defconfig}) begin..."
|
||||
kernel_dir_tmp=$1
|
||||
cd "${kernel_dir_tmp}"
|
||||
if [ "x${kernel_defconfig:0:1}" != "x/" ]; then
|
||||
if [ ! -f arch/arm64/configs/${kernel_defconfig} ]; then
|
||||
ERROR "config file ${kernel_defconfig} can not be found in kernel source".
|
||||
exit 2
|
||||
pushd "${kernel_dir_tmp}"
|
||||
if [ -n "${kernel_defconfig}" ]; then
|
||||
if [ "x${kernel_defconfig:0:1}" != "x/" ]; then
|
||||
if [ ! -f arch/arm64/configs/${kernel_defconfig} ]; then
|
||||
ERROR "config file ${kernel_defconfig} can not be found in kernel source".
|
||||
exit 2
|
||||
fi
|
||||
kernel_defconfig=arch/arm64/configs/${kernel_defconfig}
|
||||
fi
|
||||
kernel_defconfig=arch/arm64/configs/${kernel_defconfig}
|
||||
fi
|
||||
|
||||
if [ ! -z "${cross_compile}" ]; then
|
||||
export CROSS_COMPILE=${cross_compile}
|
||||
fi
|
||||
make distclean
|
||||
kernel_ver=""
|
||||
if [ "x${board}" == "xraspberrypi" ]; then
|
||||
kernel_ver=$(awk '/^VERSION = / {v=$3} /^PATCHLEVEL = / {p=$3} /^SUBLEVEL = / {s=$3} /^EXTRAVERSION = / {e=$3} END {print v"."p"."s (e ? "-" e : "") "+"}' Makefile)
|
||||
if [ -z "${kernel_defconfig}" ]; then
|
||||
if [ "x${branch}" == "xOLK-6.6" ]; then
|
||||
make ARCH=arm64 -j${make_cores} O=output/v8 bcm2711_defconfig
|
||||
make ARCH=arm64 -j${make_cores} O=output/v8 KERNELRELEASE=${kernel_ver}-v8
|
||||
|
||||
make ARCH=arm64 -j${make_cores} O=output/2712 bcm2712_defconfig
|
||||
make ARCH=arm64 -j${make_cores} O=output/2712 KERNELRELEASE=${kernel_ver}-2712
|
||||
|
||||
cp output/2712/arch/arm64/boot/Image arch/arm64/boot/Image
|
||||
cp output/2712/arch/arm64/boot/dts/${platform}/${dtb_name}.dtb arch/arm64/boot/dts/${platform}/${dtb_name}.dtb
|
||||
LOG "make kernel(bcm2711_defconfig, bcm2712_defconfig) for Raspberry Pi end."
|
||||
return
|
||||
else
|
||||
kernel_defconfig="arch/arm64/configs/bcm2711_defconfig"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
cp ${kernel_defconfig} .config
|
||||
make ARCH=arm64 olddefconfig
|
||||
kernel_defconfig=${kernel_defconfig##*/}
|
||||
make ARCH=arm64 -j${make_cores}
|
||||
LOG "make kernel(${default_defconfig}) end."
|
||||
popd
|
||||
}
|
||||
|
||||
install_kernel() {
|
||||
if [ ! -f $workdir/kernel/arch/arm64/boot/Image ]; then
|
||||
if [ ! -f ${workdir}/kernel/arch/arm64/boot/Image ]; then
|
||||
ERROR "kernel Image can not be found!"
|
||||
exit 2
|
||||
else
|
||||
LOG "make kernel done."
|
||||
fi
|
||||
if [ -d $workdir/kernel/kernel-modules ];then rm -rf $workdir/kernel/kernel-modules; fi
|
||||
if [ -d ${workdir}/kernel/kernel-modules ];then rm -rf ${workdir}/kernel/kernel-modules; fi
|
||||
if [ -d ${boot_dir} ];then rm -rf ${boot_dir}; fi
|
||||
mkdir -p ${boot_dir}
|
||||
mkdir -p $workdir/kernel/kernel-modules
|
||||
cd $workdir/kernel
|
||||
mkdir -p ${workdir}/kernel/kernel-modules
|
||||
pushd ${workdir}/kernel
|
||||
|
||||
if [ ! -z "${cross_compile}" ]; then
|
||||
export CROSS_COMPILE=${cross_compile}
|
||||
fi
|
||||
make ARCH=arm64 install INSTALL_PATH=${boot_dir}
|
||||
make ARCH=arm64 modules_install INSTALL_MOD_PATH=$workdir/kernel/kernel-modules
|
||||
LOG "device tree name is ${dtb_name}.dtb"
|
||||
cp arch/arm64/boot/dts/${platform}/${dtb_name}.dtb ${boot_dir}
|
||||
cp arch/arm64/boot/Image ${boot_dir}
|
||||
if [ "x${board}" == "xraspberrypi" ]; then
|
||||
mkdir -p ${boot_dir}/overlays
|
||||
if [ -z "${kernel_defconfig}" ] && [ "x${branch}" == "xOLK-6.6" ]; then
|
||||
rpi_version=("v8" "2712")
|
||||
for rpi in "${rpi_version[@]}"; do
|
||||
pushd output/${rpi}
|
||||
make ARCH=arm64 -j${make_cores} modules_install INSTALL_MOD_PATH=${workdir}/kernel/kernel-modules
|
||||
cp arch/arm64/boot/Image ${boot_dir}/Image-${rpi}
|
||||
cp .config ${boot_dir}/config-${rpi}
|
||||
cp System.map ${boot_dir}/System.map-${rpi}
|
||||
popd
|
||||
done
|
||||
mv ${boot_dir}/Image-v8 ${boot_dir}/kernel8.img
|
||||
mv ${boot_dir}/Image-2712 ${boot_dir}/kernel_2712.img
|
||||
cp output/2712/arch/arm64/boot/dts/${platform}/*.dtb ${boot_dir}
|
||||
cp output/2712/arch/arm64/boot/dts/overlays/*.dtb* ${boot_dir}/overlays/
|
||||
else
|
||||
make ARCH=arm64 -j${make_cores} modules_install INSTALL_MOD_PATH=${workdir}/kernel/kernel-modules
|
||||
cp arch/arm64/boot/Image ${boot_dir}/kernel8.img
|
||||
cp .config ${boot_dir}/config
|
||||
cp System.map ${boot_dir}/System.map
|
||||
cp arch/arm64/boot/dts/${platform}/*.dtb ${boot_dir}
|
||||
cp arch/arm64/boot/dts/overlays/*.dtb* ${boot_dir}/overlays/
|
||||
fi
|
||||
else
|
||||
make ARCH=arm64 install INSTALL_PATH=${boot_dir}
|
||||
make ARCH=arm64 -j${make_cores} modules_install INSTALL_MOD_PATH=${workdir}/kernel/kernel-modules
|
||||
cp arch/arm64/boot/Image ${boot_dir}
|
||||
cp arch/arm64/boot/dts/${platform}/*.dtb ${boot_dir}
|
||||
fi
|
||||
rm -rf ${workdir}/kernel/kernel-modules/lib/modules/*/source ${workdir}/kernel/kernel-modules/lib/modules/*/build
|
||||
LOG "prepare kernel done."
|
||||
popd
|
||||
}
|
||||
|
||||
mk_boot() {
|
||||
LOG "start make bootimg..."
|
||||
mkdir -p ${boot_dir}/extlinux
|
||||
if [ "x${board}" != "xraspberrypi" ]; then
|
||||
mkdir -p ${boot_dir}/extlinux
|
||||
|
||||
LOG "start gen initrd..."
|
||||
dracut --no-kernel ${boot_dir}/initrd.img
|
||||
LOG "gen initrd done."
|
||||
LOG "start gen initrd..."
|
||||
dracut --no-kernel ${boot_dir}/initrd.img
|
||||
LOG "gen initrd done."
|
||||
|
||||
dtb_name=$(ls $boot_dir | grep dtb)
|
||||
LOG "gen extlinux config for $dtb_name"
|
||||
if [ "${platform}" == "rockchip" ];then
|
||||
bootargs=${rockchip_bootargs}
|
||||
elif [ "${platform}" == "phytium" ];then
|
||||
bootargs=${phytium_bootargs}
|
||||
elif [ "${platform}" == "allwinner" ];then
|
||||
bootargs=${allwinner_bootargs}
|
||||
else
|
||||
echo "Unsupported platform"
|
||||
exit 2
|
||||
dtb_name=$(ls ${boot_dir} | grep dtb)
|
||||
LOG "gen extlinux config for $dtb_name"
|
||||
if [ "${platform}" == "rockchip" ];then
|
||||
bootargs=${rockchip_bootargs}
|
||||
elif [ "${platform}" == "phytium" ];then
|
||||
bootargs=${phytium_bootargs}
|
||||
elif [ "${platform}" == "allwinner" ];then
|
||||
bootargs=${allwinner_bootargs}
|
||||
else
|
||||
echo "Unsupported platform"
|
||||
exit 2
|
||||
fi
|
||||
echo "label openEuler
|
||||
kernel /Image
|
||||
initrd /initrd.img
|
||||
fdt /${dtb_name}
|
||||
append ${bootargs}" \
|
||||
> ${boot_dir}/extlinux/extlinux.conf
|
||||
|
||||
LOG "gen extlinux config done."
|
||||
fi
|
||||
echo "label openEuler
|
||||
kernel /Image
|
||||
initrd /initrd.img
|
||||
fdt /${dtb_name}
|
||||
append ${bootargs}" \
|
||||
> ${boot_dir}/extlinux/extlinux.conf
|
||||
dd if=/dev/zero of=${workdir}/boot.img bs=1M count=240 status=progress
|
||||
mkfs.vfat -n boot ${workdir}/boot.img
|
||||
if [ -d ${workdir}/boot_emmc ];then rm -rf ${workdir}/boot_emmc; fi
|
||||
mkdir ${workdir}/boot_emmc
|
||||
mount ${workdir}/boot.img ${workdir}/boot_emmc/
|
||||
cp -r ${boot_dir}/* ${workdir}/boot_emmc/
|
||||
umount ${workdir}/boot.img
|
||||
rmdir ${workdir}/boot_emmc
|
||||
|
||||
LOG "gen extlinux config done."
|
||||
|
||||
dd if=/dev/zero of=$workdir/boot.img bs=1M count=240 status=progress
|
||||
mkfs.vfat -n boot $workdir/boot.img
|
||||
if [ -d $workdir/boot_emmc ];then rm -rf $workdir/boot_emmc; fi
|
||||
mkdir $workdir/boot_emmc
|
||||
mount $workdir/boot.img $workdir/boot_emmc/
|
||||
cp -r ${boot_dir}/* $workdir/boot_emmc/
|
||||
umount $workdir/boot.img
|
||||
rmdir $workdir/boot_emmc
|
||||
|
||||
if [ -f $workdir/boot.img ]; then
|
||||
if [ -f ${workdir}/boot.img ]; then
|
||||
LOG "make boot image done."
|
||||
else
|
||||
ERROR "make boot image failed!"
|
||||
@ -257,19 +311,23 @@ cur_dir=$(cd $(dirname $0);pwd)
|
||||
default_param
|
||||
local_param
|
||||
parseargs "$@" || help $?
|
||||
set -e
|
||||
|
||||
rockchip_bootargs="earlyprintk console=ttyS2,1500000 rw root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootfstype=ext4 init=/sbin/init rootwait"
|
||||
phytium_bootargs="console=ttyAMA1,115200 earlycon=pl011,0x2800d000 rw root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootfstype=ext4 rootwait cma=256m"
|
||||
allwinner_bootargs="console=tty0 console=ttyS0,115200 rw root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootfstype=ext4 rootwait earlycon clk_gnore_unused"
|
||||
|
||||
if [ ! -f $default_defconfig ] ; then
|
||||
LOG "kernel defconfig is : ${default_defconfig}"
|
||||
kernel_defconfig=$default_defconfig
|
||||
elif [ -f $default_defconfig ]; then
|
||||
LOG "use local kernel defconfig..."
|
||||
cp $default_defconfig ${workdir}/
|
||||
kernel_defconfig=${workdir}/${default_defconfig##*/}
|
||||
if [ -n "${default_defconfig}" ]; then
|
||||
if [ ! -f $default_defconfig ] ; then
|
||||
LOG "kernel defconfig is : ${default_defconfig}"
|
||||
kernel_defconfig=$default_defconfig
|
||||
else
|
||||
LOG "use local kernel defconfig..."
|
||||
cp $default_defconfig ${workdir}/
|
||||
kernel_defconfig=${workdir}/${default_defconfig##*/}
|
||||
fi
|
||||
elif [ "x${board}" != "xraspberrypi" ]; then
|
||||
LOG "default_defconfig is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cross_compile=""
|
||||
@ -282,26 +340,37 @@ else
|
||||
LOG "You are running this script on a ${host_arch} mechine, progress...."
|
||||
fi
|
||||
|
||||
if [ ! -d $workdir ]; then
|
||||
mkdir $workdir
|
||||
if [ ! -d ${workdir} ]; then
|
||||
mkdir ${workdir}
|
||||
fi
|
||||
|
||||
source $cur_dir/boards/${board}.conf
|
||||
source ${cur_dir}/boards/${board}.conf
|
||||
|
||||
if [ ! -d ${log_dir} ];then mkdir -p ${log_dir}; fi
|
||||
if [ ! -f $workdir/.done ];then
|
||||
touch $workdir/.done
|
||||
if [ ! -f ${workdir}/.done ];then
|
||||
touch ${workdir}/.done
|
||||
fi
|
||||
sed -i 's/bootimg//g' $workdir/.done
|
||||
sed -i 's/bootimg//g' ${workdir}/.done
|
||||
LOG "build boot..."
|
||||
|
||||
if [ "x${board}" == "xraspberrypi" ] && [ -z "${kernel_url}" ]; then
|
||||
LOG "build an empty boot.img for Raspberry Pi."
|
||||
rm -rf ${workdir}/kernel || LOG "remove kernel source."
|
||||
dd if=/dev/zero of=${workdir}/boot.img bs=1M count=10 status=progress
|
||||
mkfs.vfat -n boot ${workdir}/boot.img
|
||||
LOG "The boot.img is generated in the ${workdir}."
|
||||
echo "bootimg" >> ${workdir}/.done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
clone_and_check_kernel_source
|
||||
|
||||
if [[ -f $workdir/kernel/arch/arm64/boot/dts/${platform}/${dtb_name}.dtb && -f $workdir/kernel/arch/arm64/boot/Image ]];then
|
||||
if [[ -f ${workdir}/kernel/arch/arm64/boot/dts/${platform}/${dtb_name}.dtb && -f ${workdir}/kernel/arch/arm64/boot/Image ]];then
|
||||
LOG "kernel is the latest"
|
||||
else
|
||||
make_kernel $workdir/kernel
|
||||
make_kernel ${workdir}/kernel
|
||||
fi
|
||||
if [[ -f $workdir/boot.img && $(cat $workdir/.done | grep bootimg) == "bootimg" ]];then
|
||||
if [[ -f ${workdir}/boot.img && $(cat ${workdir}/.done | grep bootimg) == "bootimg" ]]; then
|
||||
LOG "boot is the latest"
|
||||
else
|
||||
trap 'LOSETUP_D_IMG' EXIT
|
||||
@ -310,4 +379,4 @@ else
|
||||
mk_boot
|
||||
fi
|
||||
LOG "The boot.img is generated in the ${workdir}."
|
||||
echo "bootimg" >> $workdir/.done
|
||||
echo "bootimg" >> ${workdir}/.done
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set +x
|
||||
|
||||
__usage="
|
||||
Usage: build_rootfs [OPTIONS]
|
||||
@ -10,7 +12,7 @@ Options:
|
||||
--board, BOARD_CONFIG Required! The config of target board in the boards folder, which defaults to firefly-rk3399.
|
||||
-r, --repo REPO_INFO The URL/path of target repo file or list of repo's baseurls which should be a space separated list.
|
||||
-b, --branch KERNEL_BRANCH The branch name of kernel source's repository, which defaults to openEuler-20.03-LTS.
|
||||
-s, --spec SPEC The image's specification: headless, xfce, ukui, dde or the file path of rpmlist. The default is headless.
|
||||
-s, --spec SPEC The image's specification: headless, xfce, ukui, dde, gnome, devstation or the file path of rpmlist. The default is headless.
|
||||
-h, --help Show command help.
|
||||
"
|
||||
|
||||
@ -23,28 +25,33 @@ help()
|
||||
default_param() {
|
||||
board=firefly-rk3399
|
||||
repo_file="https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS/generic.repo"
|
||||
workdir=${cur_dir}/build
|
||||
tmp_dir=${workdir}/tmp
|
||||
workdir=$cur_dir/build
|
||||
branch=openEuler-20.03-LTS
|
||||
rootfs_arch=aarch64
|
||||
nonfree_bin_dir=${workdir}/../bin
|
||||
nonfree_bin_dir=${cur_dir}/bin
|
||||
config_dir=${cur_dir}/configs
|
||||
rootfs_dir=${workdir}/rootfs
|
||||
log_dir=${workdir}/log
|
||||
rootfs_mnt=${workdir}/rootfs_tmp
|
||||
}
|
||||
|
||||
local_param(){
|
||||
if [ -f $workdir/.param ]; then
|
||||
board=$(cat $workdir/.param | grep board)
|
||||
if [ -f ${workdir}/.param ]; then
|
||||
board=$(cat ${workdir}/.param | grep board)
|
||||
board=${board:6}
|
||||
|
||||
repo_file=$(cat $workdir/.param | grep repo_file)
|
||||
repo_file=$(cat ${workdir}/.param | grep repo_file)
|
||||
repo_file=${repo_file:10}
|
||||
|
||||
branch=$(cat $workdir/.param | grep branch)
|
||||
branch=$(cat ${workdir}/.param | grep branch)
|
||||
branch=${branch:7}
|
||||
|
||||
spec_param=$(cat $workdir/.param | grep spec_param)
|
||||
spec_param=$(cat ${workdir}/.param | grep spec_param)
|
||||
spec_param=${spec_param:11}
|
||||
|
||||
kernel_url=$(cat ${workdir}/.param | grep kernel_url)
|
||||
kernel_url=${kernel_url:11}
|
||||
fi
|
||||
}
|
||||
|
||||
@ -96,13 +103,13 @@ LOG(){
|
||||
|
||||
LOSETUP_D_IMG(){
|
||||
set +e
|
||||
if [ -d ${workdir}/rootfs_tmp ]; then
|
||||
if grep -q "${workdir}/rootfs_tmp " /proc/mounts ; then
|
||||
umount ${workdir}/rootfs_tmp
|
||||
if [ -d ${rootfs_mnt} ]; then
|
||||
if grep -q "${rootfs_mnt} " /proc/mounts ; then
|
||||
umount ${rootfs_mnt}
|
||||
fi
|
||||
fi
|
||||
if [ -d ${workdir}/rootfs_tmp ]; then
|
||||
rm -rf ${workdir}/rootfs_tmp
|
||||
if [ -d ${rootfs_mnt} ]; then
|
||||
rm -rf ${rootfs_mnt}
|
||||
fi
|
||||
set -e
|
||||
}
|
||||
@ -140,14 +147,17 @@ INSTALL_PACKAGES(){
|
||||
ERROR can not install $item.
|
||||
fi
|
||||
done
|
||||
if [ "x${board}" == "xraspberrypi" ] && [ -z "${kernel_url}" ]; then
|
||||
chroot ${rootfs_dir}/ dnf ${tmp_repo_info} --disablerepo="*" install -y raspberrypi-kernel --nogpgcheck
|
||||
if [ $? == 0 ]; then
|
||||
LOG install raspberrypi-kernel.
|
||||
else
|
||||
ERROR can not install raspberrypi-kernel.
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
build_rootfs() {
|
||||
trap 'UMOUNT_ALL' EXIT
|
||||
cd $workdir
|
||||
if [ -d rootfs ];then rm -rf rootfs; fi
|
||||
mkdir rootfs
|
||||
|
||||
if [ ! -d ${tmp_dir} ]; then
|
||||
mkdir -p ${tmp_dir}
|
||||
else
|
||||
@ -156,8 +166,8 @@ build_rootfs() {
|
||||
|
||||
if [ "x$spec_param" == "xheadless" ] || [ "x$spec_param" == "x" ]; then
|
||||
:
|
||||
elif [ "x$spec_param" == "xxfce" ] || [ "x$spec_param" == "xukui" ] || [ "x$spec_param" == "xdde" ]; then
|
||||
CONFIG_RPM_LIST=$workdir/../configs/rpmlist-${spec_param}
|
||||
elif [ "x$spec_param" == "xxfce" ] || [ "x$spec_param" == "xukui" ] || [ "x$spec_param" == "xdde" ] || [ "x$spec_param" == "xgnome" ] || [ "x$spec_param" == "xdevstation" ]; then
|
||||
CONFIG_RPM_LIST=${config_dir}/rpmlist-${spec_param}
|
||||
elif [ -f ${spec_param} ]; then
|
||||
cp ${spec_param} ${tmp_dir}/
|
||||
spec_file_name=${spec_param##*/}
|
||||
@ -166,16 +176,13 @@ build_rootfs() {
|
||||
echo `date` - ERROR, please check your params in option -s or --spec.
|
||||
exit 2
|
||||
fi
|
||||
|
||||
mkdir -p ${rootfs_dir}/var/lib/rpm
|
||||
rpm --root ${rootfs_dir}/ --initdb
|
||||
echo $(pwd)
|
||||
|
||||
if [ "x$repo_file" == "x" ] ; then
|
||||
echo `date` - ERROR, \"-r REPO_INFO or --repo REPO_INFO\" missing.
|
||||
help 2
|
||||
elif [ "x${repo_file:0:4}" == "xhttp" ]; then
|
||||
if [ "x${repo_file:0-5}" == "x.repo" ]; then
|
||||
repo_url=${repo_file}
|
||||
wget ${repo_file} -P ${tmp_dir}/
|
||||
repo_file_name=${repo_file##*/}
|
||||
repo_file=${tmp_dir}/${repo_file_name}
|
||||
@ -186,7 +193,7 @@ build_rootfs() {
|
||||
for baseurl in ${repo_file// / }
|
||||
do
|
||||
echo [repo${index}] >> ${repo_file_tmp}
|
||||
echo name=repo${index} to build rk3399 image >> ${repo_file_tmp}
|
||||
echo name=repo${index} to build ${board} image >> ${repo_file_tmp}
|
||||
echo baseurl=${baseurl} >> ${repo_file_tmp}
|
||||
echo enabled=1 >> ${repo_file_tmp}
|
||||
echo gpgcheck=0 >> ${repo_file_tmp}
|
||||
@ -222,12 +229,12 @@ build_rootfs() {
|
||||
done
|
||||
|
||||
os_release_name="openEuler-release"
|
||||
dnf ${repo_info} --disablerepo="*" --downloaddir=${workdir}/ download ${os_release_name} --forcearch ${rootfs_arch}
|
||||
dnf ${repo_info} --disablerepo="*" --downloaddir=${tmp_dir}/ download ${os_release_name} --forcearch ${rootfs_arch}
|
||||
if [ $? != 0 ]; then
|
||||
ERROR "Fail to download ${os_release_name}!"
|
||||
exit 2
|
||||
fi
|
||||
os_release_name=`ls -r ${workdir}/${os_release_name}*.rpm 2>/dev/null| head -n 1`
|
||||
os_release_name=`ls -r ${tmp_dir}/${os_release_name}*.rpm 2>/dev/null| head -n 1`
|
||||
if [ -z "${os_release_name}" ]; then
|
||||
ERROR "${os_release_name} can not be found!"
|
||||
exit 2
|
||||
@ -235,6 +242,16 @@ build_rootfs() {
|
||||
LOG "Success to download ${os_release_name}."
|
||||
fi
|
||||
|
||||
LOG "make rootfs for ${repo_file} begin..."
|
||||
trap 'UMOUNT_ALL' EXIT
|
||||
if [ -d ${rootfs_dir} ]; then
|
||||
UMOUNT_ALL
|
||||
rm -rf ${rootfs_dir}
|
||||
fi
|
||||
mkdir ${rootfs_dir}
|
||||
|
||||
mkdir -p ${rootfs_dir}/var/lib/rpm
|
||||
rpm --root ${rootfs_dir}/ --initdb
|
||||
rpm -ivh --nodeps --root ${rootfs_dir}/ ${os_release_name} --ignorearch
|
||||
|
||||
mkdir -p ${rootfs_dir}/etc/rpm
|
||||
@ -248,52 +265,41 @@ build_rootfs() {
|
||||
mount --bind /dev ${rootfs_dir}/dev
|
||||
mount -t proc /proc ${rootfs_dir}/proc
|
||||
mount -t sysfs /sys ${rootfs_dir}/sys
|
||||
|
||||
set +e
|
||||
INSTALL_PACKAGES ${CONFIG_RPM_LIST} "${repo_info}"
|
||||
cat ${rootfs_dir}/etc/systemd/timesyncd.conf | grep "^NTP=*"
|
||||
if [ $? -ne 0 ]; then
|
||||
sed -i -e '/^#NTP=/cNTP=0.cn.pool.ntp.org' ${rootfs_dir}/etc/systemd/timesyncd.conf
|
||||
sed -i -e 's/#FallbackNTP=/FallbackNTP=1.asia.pool.ntp.org 2.asia.pool.ntp.org /g' ${rootfs_dir}/etc/systemd/timesyncd.conf
|
||||
fi
|
||||
set -e
|
||||
|
||||
rm -rf ${rootfs_dir}/*.core
|
||||
rm ${workdir}/*rpm
|
||||
|
||||
for dns in $default_dns
|
||||
do
|
||||
echo " nameserver ${dns}" >> "${rootfs_dir}/etc/resolv.conf"
|
||||
done
|
||||
cp -Lp ${config_dir}/resolv.conf ${rootfs_dir}/etc/resolv.conf
|
||||
|
||||
if [ ! -d ${rootfs_dir}/etc/sysconfig/network-scripts ]; then mkdir "${rootfs_dir}/etc/sysconfig/network-scripts"; fi
|
||||
echo " TYPE=Ethernet
|
||||
PROXY_METHOD=none
|
||||
BROWSER_ONLY=no
|
||||
BOOTPROTO=dhcp
|
||||
DEFROUTE=yes
|
||||
IPV4_FAILURE_FATAL=no
|
||||
IPV6INIT=yes
|
||||
IPV6_AUTOCONF=yes
|
||||
IPV6_DEFROUTE=yes
|
||||
IPV6_FAILURE_FATAL=no
|
||||
IPV6_ADDR_GEN_MODE=stable-privacy
|
||||
NAME=eth0
|
||||
UUID=851a6f36-e65c-3a43-8f4a-78fd0fc09dc9
|
||||
ONBOOT=yes
|
||||
AUTOCONNECT_PRIORITY=-999
|
||||
DEVICE=eth0" > "${rootfs_dir}/etc/sysconfig/network-scripts/ifup-eth0"
|
||||
cp -Lp ${config_dir}/ifcfg-eth0 ${rootfs_dir}/etc/sysconfig/network-scripts/ifcfg-eth0
|
||||
|
||||
LOG "Configure network done."
|
||||
|
||||
cp $nonfree_bin_dir/../bin/extend-root.sh ${rootfs_dir}/etc/rc.d/init.d/extend-root.sh
|
||||
if [ "x${board}" == "xraspberrypi" ]; then
|
||||
mkdir -p ${rootfs_dir}/lib/udev/rules.d
|
||||
if [ ! -d ${rootfs_dir}/usr/share/licenses/raspi ]; then mkdir -p ${rootfs_dir}/usr/share/licenses/raspi; fi
|
||||
cp ${config_dir}/hosts ${rootfs_dir}/etc/hosts
|
||||
cp ${config_dir}/*.rules ${rootfs_dir}/lib/udev/rules.d/
|
||||
cp ${config_dir}/LICENCE.* ${rootfs_dir}/usr/share/licenses/raspi/
|
||||
fi
|
||||
|
||||
if [ ! -d ${rootfs_dir}/etc/rc.d/init.d ]; then mkdir -p ${rootfs_dir}/etc/rc.d/init.d; fi
|
||||
cp -Lp ${config_dir}/extend-root.sh ${rootfs_dir}/etc/rc.d/init.d/extend-root.sh
|
||||
chmod +x ${rootfs_dir}/etc/rc.d/init.d/extend-root.sh
|
||||
echo net.ipv4.conf.wlan0.rp_filter=0 >> ${rootfs_dir}/etc/sysctl.conf
|
||||
|
||||
set +e
|
||||
sed -i -e '/^#NTP=/cNTP=0.cn.pool.ntp.org' ${rootfs_dir}/etc/systemd/timesyncd.conf
|
||||
sed -i -e 's/#FallbackNTP=/FallbackNTP=1.asia.pool.ntp.org 2.asia.pool.ntp.org /g' ${rootfs_dir}/etc/systemd/timesyncd.conf
|
||||
set -e
|
||||
cp -Lp ${config_dir}/chroot.sh ${rootfs_dir}/chroot.sh
|
||||
chmod +x ${rootfs_dir}/chroot.sh
|
||||
|
||||
cat << EOF | chroot ${rootfs_dir} /bin/bash
|
||||
echo 'openeuler' | passwd --stdin root
|
||||
echo openEuler > /etc/hostname
|
||||
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
chkconfig --add extend-root.sh
|
||||
chkconfig extend-root.sh on
|
||||
EOF
|
||||
chroot ${rootfs_dir} /bin/bash -c "echo 'Y' | /chroot.sh ${spec_param}"
|
||||
|
||||
LOG "Set NTP and auto expand rootfs done."
|
||||
|
||||
@ -304,11 +310,13 @@ EOF
|
||||
POST_BOARD_OVERLAY
|
||||
|
||||
UMOUNT_ALL
|
||||
rm ${rootfs_dir}/chroot.sh
|
||||
LOG "make rootfs for ${repo_file} end."
|
||||
|
||||
}
|
||||
|
||||
mk_rootfsimg() {
|
||||
trap 'LOSETUP_D_IMG' EXIT
|
||||
cd $workdir
|
||||
rootfs_size=`du -sh --block-size=1MiB ${rootfs_dir} | cut -f 1 | xargs`
|
||||
mod_size=`du -sh --block-size=1MiB ${workdir}/kernel/kernel-modules/lib/modules | cut -f 1 | xargs`
|
||||
size=$(($rootfs_size+$mod_size+100))
|
||||
@ -316,17 +324,17 @@ mk_rootfsimg() {
|
||||
dd if=/dev/zero of=${rootfs_img} bs=1MiB count=$size status=progress && sync
|
||||
mkfs.ext4 -L rootfs ${workdir}/rootfs.img
|
||||
|
||||
if [ -d ${workdir}/rootfs_tmp ];then rm -rf ${workdir}/rootfs_tmp; fi
|
||||
mkdir ${workdir}/rootfs_tmp
|
||||
mount ${workdir}/rootfs.img ${workdir}/rootfs_tmp
|
||||
if [ -d ${rootfs_mnt} ];then rm -rf ${rootfs_mnt}; fi
|
||||
mkdir ${rootfs_mnt}
|
||||
mount ${workdir}/rootfs.img ${rootfs_mnt}
|
||||
|
||||
rsync -avHAXq ${rootfs_dir}/* ${workdir}/rootfs_tmp
|
||||
rsync -avHAXq ${rootfs_dir}/* ${rootfs_mnt}
|
||||
sync
|
||||
sleep 10
|
||||
|
||||
LOSETUP_D_IMG
|
||||
|
||||
if [ -f $workdir/rootfs.img ]; then
|
||||
if [ -f ${workdir}/rootfs.img ]; then
|
||||
LOG "make rootfs image done."
|
||||
else
|
||||
ERROR "make rootfs image failed!"
|
||||
@ -343,7 +351,10 @@ default_param
|
||||
local_param
|
||||
parseargs "$@" || help $?
|
||||
|
||||
CONFIG_RPM_LIST=$workdir/../configs/rpmlist
|
||||
if [ "x${board}" == "xraspberrypi" ]; then
|
||||
config_dir=${cur_dir}/configs-rpi
|
||||
fi
|
||||
CONFIG_RPM_LIST=${config_dir}/rpmlist
|
||||
|
||||
POST_BOARD_OVERLAY() {
|
||||
echo "Initial POST_BOARD_OVERLAY function" # It will be overwritten by board.conf.
|
||||
@ -353,44 +364,39 @@ if [[ "x$arch" == "arm64" ]]; then
|
||||
rootfs_arch="aarch64"
|
||||
fi
|
||||
|
||||
default_dns="8.8.8.8 8.8.4.4 114.114.114.114"
|
||||
|
||||
if [ ! -d $workdir ]; then
|
||||
mkdir $workdir
|
||||
if [ ! -d ${workdir} ]; then
|
||||
mkdir ${workdir}
|
||||
fi
|
||||
|
||||
source $cur_dir/boards/${board}.conf
|
||||
source ${cur_dir}/boards/${board}.conf
|
||||
|
||||
if [ ! -d ${log_dir} ];then mkdir -p ${log_dir}; fi
|
||||
if [ ! -f $workdir/.done ];then
|
||||
touch $workdir/.done
|
||||
if [ ! -f ${workdir}/.done ];then
|
||||
touch ${workdir}/.done
|
||||
fi
|
||||
cd $workdir
|
||||
sed -i 's/rootfs//g' $workdir/.done
|
||||
sed -i 's/rootfs//g' ${workdir}/.done
|
||||
LOG "build rootfs..."
|
||||
if [ -d rootfs ]; then
|
||||
if [[ -f $workdir/rootfs.img && $(cat $workdir/.done | grep rootfs) == "rootfs" ]];then
|
||||
if [ -f $workdir/.param_last ];then
|
||||
last_branch=$(cat $workdir/.param_last | grep branch)
|
||||
if [ -d ${rootfs_dir} ]; then
|
||||
if [[ -f ${workdir}/rootfs.img && $(cat ${workdir}/.done | grep rootfs) == "rootfs" ]];then
|
||||
if [ -f ${workdir}/.param_last ];then
|
||||
last_branch=$(cat ${workdir}/.param_last | grep branch)
|
||||
last_branch=${last_branch:7}
|
||||
|
||||
last_board=$(cat $workdir/.param_last | grep board)
|
||||
last_board=$(cat ${workdir}/.param_last | grep board)
|
||||
last_board=${last_board:6}
|
||||
|
||||
last_repo_file=$(cat $workdir/.param_last | grep repo_file)
|
||||
last_repo_file=$(cat ${workdir}/.param_last | grep repo_file)
|
||||
last_repo_file=${last_repo_file:10}
|
||||
|
||||
last_spec_param=$(cat $workdir/.param_last | grep spec_param)
|
||||
last_spec_param=$(cat ${workdir}/.param_last | grep spec_param)
|
||||
last_spec_param=${last_spec_param:11}
|
||||
|
||||
if [[ ${last_branch} != ${branch} || ${last_board} != ${board} || ${last_repo_file} != ${repo_file} || ${last_spec_param} != ${spec_param} ]]; then
|
||||
rm -rf rootfs
|
||||
build_rootfs
|
||||
mk_rootfsimg
|
||||
fi
|
||||
fi
|
||||
else
|
||||
rm -rf rootfs
|
||||
build_rootfs
|
||||
mk_rootfsimg
|
||||
fi
|
||||
@ -399,4 +405,4 @@ else
|
||||
mk_rootfsimg
|
||||
fi
|
||||
LOG "The rootfs.img is generated in the ${workdir}."
|
||||
echo "rootfs" >> $workdir/.done
|
||||
echo "rootfs" >> ${workdir}/.done
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
__usage="
|
||||
Usage: build_u-boot [OPTIONS]
|
||||
@ -19,17 +21,17 @@ help()
|
||||
|
||||
default_param() {
|
||||
board=firefly-rk3399
|
||||
workdir=$cur_dir/build
|
||||
workdir=${cur_dir}/build
|
||||
u_boot_url="https://gitlab.arm.com/systemready/firmware-build/u-boot.git"
|
||||
rk3399_bl31_url="https://github.com/rockchip-linux/rkbin/raw/master/bin/rk33/rk3399_bl31_v1.36.elf"
|
||||
log_dir=$workdir/log
|
||||
nonfree_bin_dir=${workdir}/../bin
|
||||
log_dir=${workdir}/log
|
||||
nonfree_bin_dir=${cur_dir}/bin
|
||||
make_cores=$(nproc)
|
||||
}
|
||||
|
||||
local_param(){
|
||||
if [ -f $workdir/.param ]; then
|
||||
board=$(cat $workdir/.param | grep board)
|
||||
if [ -f ${workdir}/.param ]; then
|
||||
board=$(cat ${workdir}/.param | grep board)
|
||||
board=${board:6}
|
||||
fi
|
||||
}
|
||||
@ -73,14 +75,14 @@ LOG(){
|
||||
}
|
||||
|
||||
build_u-boot() {
|
||||
cd $workdir
|
||||
if [ -d u-boot ];then
|
||||
cd u-boot
|
||||
pushd ${workdir}
|
||||
if [ -d ${workdir}/u-boot ];then
|
||||
pushd ${workdir}/u-boot
|
||||
remote_url_exist=`git remote -v | grep "origin"`
|
||||
remote_url=`git ls-remote --get-url origin`
|
||||
popd
|
||||
if [[ ${remote_url_exist} = "" || ${remote_url} != ${u_boot_url} ]]; then
|
||||
cd ../
|
||||
rm -rf $workdir/u-boot
|
||||
rm -rf ${workdir}/u-boot
|
||||
git clone --depth=1 -b ${u_boot_ver} ${u_boot_url}
|
||||
if [[ $? -eq 0 ]]; then
|
||||
LOG "clone u-boot done."
|
||||
@ -93,8 +95,9 @@ build_u-boot() {
|
||||
git clone --depth=1 -b ${u_boot_ver} ${u_boot_url}
|
||||
LOG "clone u-boot done."
|
||||
fi
|
||||
cd $workdir/u-boot
|
||||
if [[ -f $workdir/u-boot/u-boot.itb && -f $workdir/u-boot/idbloader.img ]];then
|
||||
popd
|
||||
pushd ${workdir}/u-boot
|
||||
if [[ -f ${workdir}/u-boot/u-boot.itb && -f ${workdir}/u-boot/idbloader.img ]];then
|
||||
LOG "u-boot is the latest"
|
||||
else
|
||||
if [ -f bl31.elf ];then rm bl31.elf; fi
|
||||
@ -116,23 +119,24 @@ build_u-boot() {
|
||||
ERROR "make u-boot failed!"
|
||||
exit 2
|
||||
fi
|
||||
popd
|
||||
|
||||
}
|
||||
|
||||
use_prebuild_u-boot() {
|
||||
if [ -d $workdir/u-boot ]; then
|
||||
rm -rf $workdir/u-boot
|
||||
if [ -d ${workdir}/u-boot ]; then
|
||||
rm -rf ${workdir}/u-boot
|
||||
fi
|
||||
|
||||
mkdir $workdir/u-boot
|
||||
mkdir ${workdir}/u-boot
|
||||
if [[ "x${platform}" == "xrockchip" ]]; then
|
||||
cp ${local_uboot_dir}/* $workdir/u-boot
|
||||
cp ${local_uboot_dir}/* ${workdir}/u-boot
|
||||
elif [[ "x${platform}" == "xphytium" ]]; then
|
||||
cp ${local_uboot_dir}/fip-all-sd-boot.bin $workdir/u-boot
|
||||
mkenvimage -s 0x1000 -o $workdir/u-boot/env.bin ${local_uboot_dir}/env.txt
|
||||
dd if=$workdir/u-boot/env.bin of=$workdir/u-boot/fip-all-sd-boot.bin bs=1k seek=1472 conv=notrunc
|
||||
cp ${local_uboot_dir}/fip-all-sd-boot.bin ${workdir}/u-boot
|
||||
mkenvimage -s 0x1000 -o ${workdir}/u-boot/env.bin ${local_uboot_dir}/env.txt
|
||||
dd if=${workdir}/u-boot/env.bin of=${workdir}/u-boot/fip-all-sd-boot.bin bs=1k seek=1472 conv=notrunc
|
||||
elif [[ "x${platform}" == "xallwinner" ]]; then
|
||||
cp ${local_uboot_dir}/* $workdir/u-boot
|
||||
cp ${local_uboot_dir}/* ${workdir}/u-boot
|
||||
else
|
||||
echo "target u-boot can not found!"
|
||||
exit 2
|
||||
@ -156,24 +160,28 @@ else
|
||||
LOG "You are running this script on a ${host_arch} mechine, progress...."
|
||||
fi
|
||||
|
||||
if [ ! -d $workdir ]; then
|
||||
mkdir $workdir
|
||||
if [ ! -d ${workdir} ]; then
|
||||
mkdir ${workdir}
|
||||
fi
|
||||
|
||||
source $cur_dir/boards/${board}.conf
|
||||
source ${cur_dir}/boards/${board}.conf
|
||||
|
||||
if [ ! -d ${log_dir} ];then mkdir -p ${log_dir}; fi
|
||||
if [ ! -f $workdir/.done ];then
|
||||
touch $workdir/.done
|
||||
if [ ! -f ${workdir}/.done ];then
|
||||
touch ${workdir}/.done
|
||||
fi
|
||||
sed -i 's/u-boot//g' $workdir/.done
|
||||
sed -i 's/u-boot//g' ${workdir}/.done
|
||||
LOG "build u-boot..."
|
||||
|
||||
if [ "x$ubootconfig" == "xnone" ]; then
|
||||
use_prebuild_u-boot
|
||||
if [ "x${board}" == "xraspberrypi" ]; then
|
||||
LOG "Skip build u-boot for Raspberry Pi."
|
||||
else
|
||||
build_u-boot
|
||||
if [ "x$ubootconfig" == "x" ]; then
|
||||
use_prebuild_u-boot
|
||||
else
|
||||
build_u-boot
|
||||
fi
|
||||
LOG "The bootloader files are generated in the ${workdir}/u-boot."
|
||||
fi
|
||||
|
||||
LOG "The bootloader files are generated in the ${workdir}/u-boot."
|
||||
echo "u-boot" >> $workdir/.done
|
||||
echo "u-boot" >> ${workdir}/.done
|
||||
|
||||
61
scripts/configs-rpi/99-com.rules
Normal file
61
scripts/configs-rpi/99-com.rules
Normal file
@ -0,0 +1,61 @@
|
||||
SUBSYSTEM=="input", GROUP="input", MODE="0660"
|
||||
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
|
||||
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
|
||||
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"
|
||||
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660"
|
||||
|
||||
KERNEL=="vcsm-cma", GROUP="video", MODE="0660"
|
||||
SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"
|
||||
|
||||
SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
|
||||
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
|
||||
chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
|
||||
chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
|
||||
chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
|
||||
'"
|
||||
|
||||
SUBSYSTEM=="pwm*", PROGRAM="/bin/sh -c '\
|
||||
chown -R root:gpio /sys/class/pwm && chmod -R 770 /sys/class/pwm;\
|
||||
chown -R root:gpio /sys/devices/platform/soc/*.pwm/pwm/pwmchip* && chmod -R 770 /sys/devices/platform/soc/*.pwm/pwm/pwmchip*\
|
||||
'"
|
||||
|
||||
KERNEL=="ttyAMA0", PROGRAM="/bin/sh -c '\
|
||||
ALIASES=/proc/device-tree/aliases; \
|
||||
if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
|
||||
echo 0;\
|
||||
elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
|
||||
echo 1; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi\
|
||||
'", SYMLINK+="serial%c"
|
||||
|
||||
KERNEL=="ttyAMA1", PROGRAM="/bin/sh -c '\
|
||||
ALIASES=/proc/device-tree/aliases; \
|
||||
if [ -e /dev/ttyAMA0 ]; then \
|
||||
exit 1; \
|
||||
elif cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
|
||||
echo 0;\
|
||||
elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
|
||||
echo 1; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi\
|
||||
'", SYMLINK+="serial%c"
|
||||
|
||||
KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
|
||||
ALIASES=/proc/device-tree/aliases; \
|
||||
if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \
|
||||
echo 0; \
|
||||
elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \
|
||||
echo 1; \
|
||||
else \
|
||||
exit 1; \
|
||||
fi \
|
||||
'", SYMLINK+="serial%c"
|
||||
|
||||
ACTION=="add", SUBSYSTEM=="vtconsole", KERNEL=="vtcon1", RUN+="/bin/sh -c '\
|
||||
if echo RPi-Sense FB | cmp -s /sys/class/graphics/fb0/name; then \
|
||||
echo 0 > /sys$devpath/bind; \
|
||||
fi; \
|
||||
'"
|
||||
1
scripts/configs-rpi/Dockerfile
Symbolic link
1
scripts/configs-rpi/Dockerfile
Symbolic link
@ -0,0 +1 @@
|
||||
../configs/Dockerfile
|
||||
13
scripts/configs-rpi/Dockerfile_makeraspi
Normal file
13
scripts/configs-rpi/Dockerfile_makeraspi
Normal file
@ -0,0 +1,13 @@
|
||||
FROM openeuler-20.03-lts-sp1:latest
|
||||
|
||||
RUN dnf clean expire-cache
|
||||
|
||||
RUN dnf -y install cmake gdb gcc gcc-c++ libstdc++-static ncurses ncurses-devel make python bash coreutils && \
|
||||
dnf -y clean all
|
||||
|
||||
RUN dnf -y install module-init-tools git openssl-devel bc bison flex dnf-plugins-core dosfstools parted wget device-mapper-multipath grep xz kpartx
|
||||
RUN dnf -y install rsync passwd diffutils
|
||||
ENV SHELL=/bin/bash
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/work/build-image.sh"]
|
||||
|
||||
32
scripts/configs-rpi/LICENCE.raspberrypi-sys-mods
Normal file
32
scripts/configs-rpi/LICENCE.raspberrypi-sys-mods
Normal file
@ -0,0 +1,32 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: raspberrypi-sys-mods
|
||||
Source: https://github.com/RPi-Distro/raspberrypi-sys-mods
|
||||
|
||||
Files: *
|
||||
Copyright: 2015 Raspberry Pi Foundation
|
||||
License: BSD-3-Clause
|
||||
|
||||
License: BSD-3-Clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
53
scripts/configs-rpi/chroot.sh
Executable file
53
scripts/configs-rpi/chroot.sh
Executable file
@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
systemctl enable sshd
|
||||
systemctl enable systemd-timesyncd
|
||||
systemctl enable hciuart
|
||||
systemctl enable haveged
|
||||
echo openEuler > /etc/hostname
|
||||
echo "openeuler" | passwd --stdin root
|
||||
useradd -m -G "wheel" -s "/bin/bash" pi
|
||||
echo "raspberry" | passwd --stdin pi
|
||||
if [ -f /usr/share/zoneinfo/Asia/Shanghai ]; then
|
||||
if [ -f /etc/localtime ]; then
|
||||
rm -f /etc/localtime
|
||||
fi
|
||||
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
fi
|
||||
if [ -f /etc/rc.d/rc.local ]; then
|
||||
chmod +x /etc/rc.d/rc.local
|
||||
fi
|
||||
if [ "x$1" == "xxfce" ]; then
|
||||
echo "user-session=xfce" >> /etc/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
|
||||
sed -i -e 's/^background=/#background=/' /etc/lightdm/lightdm-gtk-greeter.conf
|
||||
sed -i -e '/^#background=/cbackground=/usr/share/backgrounds/xfce/xfce-blue.jpg' /etc/lightdm/lightdm-gtk-greeter.conf
|
||||
elif [ "x$1" == "xdde" ]; then
|
||||
if id openeuler; then
|
||||
userdel -r openeuler
|
||||
fi
|
||||
fi
|
||||
cd /etc/rc.d/init.d
|
||||
chmod +x extend-root.sh
|
||||
chkconfig --add extend-root.sh
|
||||
chkconfig extend-root.sh on
|
||||
cd -
|
||||
ln -s /lib/firmware /etc/firmware
|
||||
if [ -f /etc/locale.conf ]; then
|
||||
sed -i -e "s/^LANG/#LANG/" /etc/locale.conf
|
||||
fi
|
||||
if [ "x$1" == "xxfce" ] || [ "x$1" == "xukui" ] || [ "x$1" == "xdde" ] || [ "x$1" == "xgnome" ] || [ "x$1" == "xdevstation" ]; then
|
||||
echo 'LANG="zh_CN.UTF-8"' >> /etc/locale.conf
|
||||
cat << EOF > /etc/X11/xorg.conf.d/99-vc4.conf
|
||||
Section "OutputClass"
|
||||
Identifier "vc4"
|
||||
MatchDriver "vc4"
|
||||
Driver "modesetting"
|
||||
Option "PrimaryGPU" "true"
|
||||
EndSection
|
||||
EOF
|
||||
systemctl set-default graphical.target
|
||||
else
|
||||
echo 'LANG="en_US.utf8"' >> /etc/locale.conf
|
||||
fi
|
||||
if [ "x$1" == "xgnome" ] || [ "x$1" == "xdevstation" ]; then
|
||||
systemctl enable gdm
|
||||
fi
|
||||
51
scripts/configs-rpi/config.txt
Normal file
51
scripts/configs-rpi/config.txt
Normal file
@ -0,0 +1,51 @@
|
||||
# For more options and information see
|
||||
# http://rptl.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
# Additional overlays and parameters are documented
|
||||
# /boot/firmware/overlays/README
|
||||
|
||||
# Automatically load overlays for detected cameras
|
||||
camera_auto_detect=1
|
||||
|
||||
# Automatically load overlays for detected DSI displays
|
||||
display_auto_detect=1
|
||||
|
||||
# Automatically load initramfs files, if found
|
||||
auto_initramfs=1
|
||||
|
||||
# Enable DRM VC4 V3D driver
|
||||
dtoverlay=vc4-kms-v3d
|
||||
max_framebuffers=2
|
||||
|
||||
# Don't have the firmware create an initial video= setting in cmdline.txt.
|
||||
# Use the kernel's default instead.
|
||||
disable_fw_kms_setup=1
|
||||
|
||||
# Run in 64-bit mode
|
||||
arm_64bit=1
|
||||
|
||||
# Disable compensation for displays with overscan
|
||||
disable_overscan=1
|
||||
|
||||
# Run as fast as firmware / board allows
|
||||
arm_boost=1
|
||||
|
||||
[cm4]
|
||||
# Enable host mode on the 2711 built-in XHCI USB controller.
|
||||
# This line should be removed if the legacy DWC2 controller is required
|
||||
# (e.g. for USB device mode) or if USB support is not required.
|
||||
otg_mode=1
|
||||
|
||||
[cm5]
|
||||
dtoverlay=dwc2,dr_mode=host
|
||||
|
||||
[all]
|
||||
49
scripts/configs-rpi/extend-root.sh
Executable file
49
scripts/configs-rpi/extend-root.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
# chkconfig: - 99 10
|
||||
# description: extend root
|
||||
|
||||
set -e
|
||||
|
||||
extend_root(){
|
||||
ROOT_PART="$(findmnt / -o source -n)" # /dev/mmcblk0p3
|
||||
ROOT_DEV="/dev/$(lsblk -no pkname "$ROOT_PART")" # /dev/mmcblk0
|
||||
PART_NUM="$(echo "$ROOT_PART" | grep -o "[[:digit:]]*$")" # 3
|
||||
|
||||
PART_INFO=$(parted "$ROOT_DEV" -ms unit s p)
|
||||
# BYT;
|
||||
# /dev/mmcblk0:31116288s:sd/mmc:512:512:msdos:SD SC16G:;
|
||||
# 1:8192s:593919s:585728s:fat16::boot, lba;
|
||||
# 2:593920s:1593343s:999424s:linux-swap(v1)::;
|
||||
# 3:1593344s:31116287s:29522944s:ext4::;
|
||||
LAST_PART_NUM=$(echo "$PART_INFO" | tail -n 1 | cut -f 1 -d:) # 3
|
||||
PART_START=$(echo "$PART_INFO" | grep "^${PART_NUM}" | cut -f 2 -d: | sed 's/[^0-9]//g') # 1593344
|
||||
PART_END=$(echo "$PART_INFO" | grep "^${PART_NUM}" | cut -f 3 -d: | sed 's/[^0-9]//g') # XXXX < 31116288
|
||||
ROOT_END=$(echo "$PART_INFO" | grep "^/dev"| cut -f 2 -d: | sed 's/[^0-9]//g') # 31116288
|
||||
((ROOT_END--)) # 31116287
|
||||
|
||||
if [ $PART_END -lt $ROOT_END ]; then
|
||||
fdisk "$ROOT_DEV" <<EOF
|
||||
p
|
||||
d
|
||||
$PART_NUM
|
||||
n
|
||||
p
|
||||
$PART_NUM
|
||||
$PART_START
|
||||
|
||||
p
|
||||
w
|
||||
EOF
|
||||
resize2fs $ROOT_PART
|
||||
echo "Extend $ROOT_PART finished." >> /var/log/extend-root.log
|
||||
else
|
||||
echo "Already the largest! Do not need extend any more!" >> /var/log/extend-root.log
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
if extend_root; then
|
||||
rm -f /etc/rc.d/init.d/extend-root.sh
|
||||
else
|
||||
echo "Fail to root!" >> /var/log/extend-root.log
|
||||
fi
|
||||
2
scripts/configs-rpi/hosts
Normal file
2
scripts/configs-rpi/hosts
Normal file
@ -0,0 +1,2 @@
|
||||
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
|
||||
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
|
||||
1
scripts/configs-rpi/ifcfg-eth0
Symbolic link
1
scripts/configs-rpi/ifcfg-eth0
Symbolic link
@ -0,0 +1 @@
|
||||
../configs/ifcfg-eth0
|
||||
1
scripts/configs-rpi/resolv.conf
Symbolic link
1
scripts/configs-rpi/resolv.conf
Symbolic link
@ -0,0 +1 @@
|
||||
../configs/resolv.conf
|
||||
27
scripts/configs-rpi/rpmlist
Normal file
27
scripts/configs-rpi/rpmlist
Normal file
@ -0,0 +1,27 @@
|
||||
dnf
|
||||
alsa-utils
|
||||
haveged
|
||||
wpa_supplicant
|
||||
vim
|
||||
net-tools
|
||||
iproute
|
||||
iputils
|
||||
NetworkManager
|
||||
NetworkManager-wifi
|
||||
NetworkManager-wwan
|
||||
NetworkManager-bluetooth
|
||||
NetworkManager-ovs
|
||||
NetworkManager-ppp
|
||||
openssh-server
|
||||
openssh-clients
|
||||
passwd
|
||||
hostname
|
||||
bluez
|
||||
pulseaudio-module-bluetooth
|
||||
parted
|
||||
raspberrypi-firmware
|
||||
raspberrypi-bluetooth
|
||||
sudo
|
||||
bc
|
||||
systemd-timesyncd
|
||||
openEuler-repos
|
||||
30
scripts/configs-rpi/rpmlist-dde
Normal file
30
scripts/configs-rpi/rpmlist-dde
Normal file
@ -0,0 +1,30 @@
|
||||
dnf
|
||||
alsa-utils
|
||||
haveged
|
||||
wpa_supplicant
|
||||
vim
|
||||
net-tools
|
||||
iproute
|
||||
iputils
|
||||
NetworkManager
|
||||
NetworkManager-wifi
|
||||
NetworkManager-wwan
|
||||
NetworkManager-bluetooth
|
||||
NetworkManager-ovs
|
||||
NetworkManager-ppp
|
||||
openssh-server
|
||||
openssh-clients
|
||||
passwd
|
||||
hostname
|
||||
bluez
|
||||
pulseaudio-module-bluetooth
|
||||
parted
|
||||
raspberrypi-firmware
|
||||
raspberrypi-bluetooth
|
||||
sudo
|
||||
dde
|
||||
ibus-libpinyin
|
||||
firefox
|
||||
bc
|
||||
systemd-timesyncd
|
||||
openEuler-repos
|
||||
1014
scripts/configs-rpi/rpmlist-devstation
Normal file
1014
scripts/configs-rpi/rpmlist-devstation
Normal file
File diff suppressed because it is too large
Load Diff
1280
scripts/configs-rpi/rpmlist-devstation-24.03-LTS-SP2
Normal file
1280
scripts/configs-rpi/rpmlist-devstation-24.03-LTS-SP2
Normal file
File diff suppressed because it is too large
Load Diff
1034
scripts/configs-rpi/rpmlist-devstation-24.09
Normal file
1034
scripts/configs-rpi/rpmlist-devstation-24.09
Normal file
File diff suppressed because it is too large
Load Diff
1265
scripts/configs-rpi/rpmlist-devstation-25.03
Normal file
1265
scripts/configs-rpi/rpmlist-devstation-25.03
Normal file
File diff suppressed because it is too large
Load Diff
194
scripts/configs-rpi/rpmlist-gnome
Normal file
194
scripts/configs-rpi/rpmlist-gnome
Normal file
@ -0,0 +1,194 @@
|
||||
dnf
|
||||
alsa-utils
|
||||
haveged
|
||||
wpa_supplicant
|
||||
vim
|
||||
net-tools
|
||||
iproute
|
||||
iputils
|
||||
NetworkManager
|
||||
NetworkManager-wifi
|
||||
NetworkManager-wwan
|
||||
NetworkManager-bluetooth
|
||||
NetworkManager-ovs
|
||||
NetworkManager-ppp
|
||||
openssh-server
|
||||
openssh-clients
|
||||
passwd
|
||||
hostname
|
||||
bluez
|
||||
pulseaudio-module-bluetooth
|
||||
parted
|
||||
raspberrypi-firmware
|
||||
raspberrypi-bluetooth
|
||||
sudo
|
||||
firefox
|
||||
bc
|
||||
systemd-timesyncd
|
||||
dejavu-fonts
|
||||
liberation-fonts
|
||||
gnu-*-fonts
|
||||
google-*-fonts
|
||||
xorg-x11-apps
|
||||
xorg-x11-drivers
|
||||
xorg-x11-drv-ati
|
||||
xorg-x11-drv-dummy
|
||||
xorg-x11-drv-evdev
|
||||
xorg-x11-drv-fbdev
|
||||
xorg-x11-drv-intel
|
||||
xorg-x11-drv-libinput
|
||||
xorg-x11-drv-nouveau
|
||||
xorg-x11-drv-qxl
|
||||
xorg-x11-drv-synaptics-legacy
|
||||
xorg-x11-drv-v4l
|
||||
xorg-x11-drv-vesa
|
||||
xorg-x11-drv-vmware
|
||||
xorg-x11-drv-wacom
|
||||
xorg-x11-fonts
|
||||
xorg-x11-fonts-others
|
||||
xorg-x11-font-utils
|
||||
xorg-x11-server
|
||||
xorg-x11-server-utils
|
||||
xorg-x11-server-Xephyr
|
||||
xorg-x11-server-Xspice
|
||||
xorg-x11-util-macros
|
||||
xorg-x11-utils
|
||||
xorg-x11-xauth
|
||||
xorg-x11-xbitmaps
|
||||
xorg-x11-xinit
|
||||
xorg-x11-xkb-utils
|
||||
adwaita-icon-theme
|
||||
atk
|
||||
atkmm
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
baobab
|
||||
abattis-cantarell-fonts
|
||||
cheese
|
||||
clutter
|
||||
clutter-gst3
|
||||
clutter-gtk
|
||||
cogl
|
||||
dconf
|
||||
dconf-editor
|
||||
devhelp
|
||||
eog
|
||||
epiphany
|
||||
evince
|
||||
evolution-data-server
|
||||
file-roller
|
||||
folks
|
||||
gcab
|
||||
gcr
|
||||
gdk-pixbuf2
|
||||
gdm
|
||||
gedit
|
||||
geocode-glib
|
||||
gfbgraph
|
||||
gjs
|
||||
glib2
|
||||
glibmm24
|
||||
glib-networking
|
||||
gmime30
|
||||
gnome-autoar
|
||||
gnome-backgrounds
|
||||
gnome-bluetooth
|
||||
gnome-boxes
|
||||
gnome-builder
|
||||
gnome-calculator
|
||||
gnome-calendar
|
||||
gnome-characters
|
||||
gnome-clocks
|
||||
gnome-color-manager
|
||||
gnome-contacts
|
||||
gnome-control-center
|
||||
gnome-desktop3
|
||||
gnome-disk-utility
|
||||
gnome-font-viewer
|
||||
gnome-getting-started-docs
|
||||
gnome-initial-setup
|
||||
gnome-keyring
|
||||
gnome-logs
|
||||
gnome-menus
|
||||
gnome-music
|
||||
gnome-online-accounts
|
||||
gnome-online-miners
|
||||
gnome-photos
|
||||
gnome-remote-desktop
|
||||
gnome-screenshot
|
||||
gnome-session
|
||||
gnome-settings-daemon
|
||||
gnome-shell
|
||||
gnome-shell-extensions
|
||||
gnome-software
|
||||
gnome-system-monitor
|
||||
gnome-terminal
|
||||
gnome-tour
|
||||
gnome-user-docs
|
||||
gnome-user-share
|
||||
gnome-video-effects
|
||||
gnome-weather
|
||||
gobject-introspection
|
||||
gom
|
||||
grilo
|
||||
grilo-plugins
|
||||
gsettings-desktop-schemas
|
||||
gsound
|
||||
gspell
|
||||
gssdp
|
||||
gtk3
|
||||
gtk4
|
||||
gtk-doc
|
||||
gtkmm30
|
||||
gtksourceview4
|
||||
gtk-vnc2
|
||||
gupnp
|
||||
gupnp-av
|
||||
gupnp-dlna
|
||||
gvfs
|
||||
json-glib
|
||||
libchamplain
|
||||
libdazzle
|
||||
libgdata
|
||||
libgee
|
||||
libgnomekbd
|
||||
libgsf
|
||||
libgtop2
|
||||
libgweather
|
||||
libgxps
|
||||
libhandy
|
||||
libmediaart
|
||||
libnma
|
||||
libnotify
|
||||
libpeas
|
||||
librsvg2
|
||||
libsecret
|
||||
libsigc++20
|
||||
libsoup
|
||||
mm-common
|
||||
mutter
|
||||
nautilus
|
||||
orca
|
||||
pango
|
||||
pangomm
|
||||
libphodav
|
||||
python3-pyatspi
|
||||
python3-gobject
|
||||
rest
|
||||
rygel
|
||||
simple-scan
|
||||
sushi
|
||||
sysprof
|
||||
tepl
|
||||
totem
|
||||
totem-pl-parser
|
||||
tracker3
|
||||
tracker3-miners
|
||||
vala
|
||||
vte291
|
||||
yelp
|
||||
yelp-tools
|
||||
yelp-xsl
|
||||
zenity
|
||||
ibus-libpinyin
|
||||
openEuler-repos
|
||||
29
scripts/configs-rpi/rpmlist-ukui
Normal file
29
scripts/configs-rpi/rpmlist-ukui
Normal file
@ -0,0 +1,29 @@
|
||||
dnf
|
||||
alsa-utils
|
||||
haveged
|
||||
wpa_supplicant
|
||||
vim
|
||||
net-tools
|
||||
iproute
|
||||
iputils
|
||||
NetworkManager
|
||||
NetworkManager-wifi
|
||||
NetworkManager-wwan
|
||||
NetworkManager-bluetooth
|
||||
NetworkManager-ovs
|
||||
NetworkManager-ppp
|
||||
openssh-server
|
||||
openssh-clients
|
||||
passwd
|
||||
hostname
|
||||
bluez
|
||||
pulseaudio-module-bluetooth
|
||||
parted
|
||||
raspberrypi-firmware
|
||||
raspberrypi-bluetooth
|
||||
sudo
|
||||
ukui
|
||||
firefox
|
||||
bc
|
||||
systemd-timesyncd
|
||||
openEuler-repos
|
||||
46
scripts/configs-rpi/rpmlist-xfce
Normal file
46
scripts/configs-rpi/rpmlist-xfce
Normal file
@ -0,0 +1,46 @@
|
||||
dnf
|
||||
alsa-utils
|
||||
haveged
|
||||
wpa_supplicant
|
||||
vim
|
||||
net-tools
|
||||
iproute
|
||||
iputils
|
||||
NetworkManager
|
||||
NetworkManager-wifi
|
||||
NetworkManager-wwan
|
||||
NetworkManager-bluetooth
|
||||
NetworkManager-ovs
|
||||
NetworkManager-ppp
|
||||
openssh-server
|
||||
openssh-clients
|
||||
passwd
|
||||
hostname
|
||||
bluez
|
||||
pulseaudio-module-bluetooth
|
||||
parted
|
||||
raspberrypi-firmware
|
||||
raspberrypi-bluetooth
|
||||
sudo
|
||||
dejavu-fonts
|
||||
liberation-fonts
|
||||
gnu-*-fonts
|
||||
google-*-fonts
|
||||
xorg-*
|
||||
xfwm4
|
||||
xfdesktop
|
||||
xfce4-*
|
||||
xfce4-*-plugin
|
||||
network-manager-applet
|
||||
*fonts
|
||||
fcitx
|
||||
fcitx-qt5
|
||||
fcitx-cloudpinyin
|
||||
fcitx-sunpinyin
|
||||
fcitx-configtool
|
||||
lightdm
|
||||
lightdm-gtk
|
||||
firefox
|
||||
bc
|
||||
systemd-timesyncd
|
||||
openEuler-repos
|
||||
7
scripts/configs/chroot.sh
Normal file
7
scripts/configs/chroot.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo 'openeuler' | passwd --stdin root
|
||||
echo openEuler > /etc/hostname
|
||||
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
chkconfig --add extend-root.sh
|
||||
chkconfig extend-root.sh on
|
||||
0
scripts/bin/extend-root.sh → scripts/configs/extend-root.sh
Normal file → Executable file
0
scripts/bin/extend-root.sh → scripts/configs/extend-root.sh
Normal file → Executable file
16
scripts/configs/ifcfg-eth0
Normal file
16
scripts/configs/ifcfg-eth0
Normal file
@ -0,0 +1,16 @@
|
||||
TYPE=Ethernet
|
||||
PROXY_METHOD=none
|
||||
BROWSER_ONLY=no
|
||||
BOOTPROTO=dhcp
|
||||
DEFROUTE=yes
|
||||
IPV4_FAILURE_FATAL=no
|
||||
IPV6INIT=yes
|
||||
IPV6_AUTOCONF=yes
|
||||
IPV6_DEFROUTE=yes
|
||||
IPV6_FAILURE_FATAL=no
|
||||
IPV6_ADDR_GEN_MODE=stable-privacy
|
||||
NAME=eth0
|
||||
UUID=851a6f36-e65c-3a43-8f4a-78fd0fc09dc9
|
||||
ONBOOT=yes
|
||||
AUTOCONNECT_PRIORITY=-999
|
||||
DEVICE=eth0
|
||||
3
scripts/configs/resolv.conf
Normal file
3
scripts/configs/resolv.conf
Normal file
@ -0,0 +1,3 @@
|
||||
nameserver 8.8.8.8
|
||||
nameserver 8.8.4.4
|
||||
nameserver 114.114.114.114
|
||||
6
scripts/gen_image-x86_64.sh
Normal file → Executable file
6
scripts/gen_image-x86_64.sh
Normal file → Executable file
@ -1,8 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
__usage="
|
||||
Usage: gen_image [OPTIONS]
|
||||
Generate Rockchip bootable image.
|
||||
Generate openEuler bootable image.
|
||||
The target compressed bootable images will be generated in the build/YYYY-MM-DD folder of the directory where the gen_image.sh script is located.
|
||||
|
||||
Options:
|
||||
@ -79,4 +81,4 @@ default_param
|
||||
prepare_bin
|
||||
prepare_img
|
||||
make_img
|
||||
echo "image" >> $workdir/.done
|
||||
echo "image" >> ${workdir}/.done
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
__usage="
|
||||
Usage: gen_image [OPTIONS]
|
||||
Generate Rockchip bootable image.
|
||||
Generate openEuler bootable image.
|
||||
The target compressed bootable images will be generated in the build/YYYY-MM-DD folder of the directory where the gen_image.sh script is located.
|
||||
|
||||
Options:
|
||||
-n, --name IMAGE_NAME The Rockchip image name to be built.
|
||||
-n, --name IMAGE_NAME The openEuler image name to be built.
|
||||
--board BOARD_CONFIG Required! The config of target board in the boards folder, which defaults to firefly-rk3399.
|
||||
-h, --help Show command help.
|
||||
"
|
||||
@ -24,6 +26,8 @@ default_param() {
|
||||
board=firefly-rk3399
|
||||
soc_name=rk3399
|
||||
platform=rockchip
|
||||
nonfree_bin_dir=${cur_dir}/bin
|
||||
config_dir=${cur_dir}/configs
|
||||
rootfs_dir=${workdir}/rootfs
|
||||
boot_dir=${workdir}/boot
|
||||
uboot_dir=${workdir}/u-boot
|
||||
@ -47,6 +51,9 @@ parseargs()
|
||||
shift
|
||||
elif [ "x$1" == "x-n" -o "x$1" == "x--name" ]; then
|
||||
name=`echo $2`
|
||||
if [ "x${name:0-4}" == "x.img" ]; then
|
||||
name=${name::-4}
|
||||
fi
|
||||
shift
|
||||
shift
|
||||
elif [ "x$1" == "x--board" ]; then
|
||||
@ -122,15 +129,13 @@ LOG(){
|
||||
}
|
||||
|
||||
make_img(){
|
||||
cd $workdir
|
||||
|
||||
if [[ -f $workdir/boot.img && $(cat $workdir/.done | grep bootimg) == "bootimg" ]];then
|
||||
if [[ -f ${workdir}/boot.img && $(cat ${workdir}/.done | grep bootimg) == "bootimg" ]];then
|
||||
LOG "boot.img check done."
|
||||
else
|
||||
ERROR "boot.img check failed, please re-run build_boot.sh."
|
||||
exit 2
|
||||
fi
|
||||
if [[ -f $workdir/rootfs.img && $(cat $workdir/.done | grep rootfs) == "rootfs" ]];then
|
||||
if [[ -f ${workdir}/rootfs.img && $(cat ${workdir}/.done | grep rootfs) == "rootfs" ]];then
|
||||
LOG "rootfs.img check done."
|
||||
else
|
||||
ERROR "rootfs.img check failed, please re-run build_rootfs.sh."
|
||||
@ -143,16 +148,25 @@ make_img(){
|
||||
size=$(($size+1100))
|
||||
losetup -D
|
||||
img_file=${workdir}/${name}.img
|
||||
LOG create ${img_file} size of ${size}MiB
|
||||
dd if=/dev/zero of=${img_file} bs=1MiB count=$size status=progress && sync
|
||||
|
||||
LOG "create ${part_table} partition table."
|
||||
parted ${img_file} mklabel ${part_table} mkpart primary fat32 32768s 524287s
|
||||
|
||||
if [ "x${board}" == "xraspberrypi" ]; then
|
||||
section1_start=16384
|
||||
section1_end=1064959
|
||||
else
|
||||
section1_start=32768
|
||||
section1_end=524287
|
||||
fi
|
||||
parted ${img_file} mklabel ${part_table} mkpart primary fat32 ${section1_start}s ${section1_end}s
|
||||
parted ${img_file} -s set 1 boot on
|
||||
parted ${img_file} mkpart primary ext4 524288s 100%
|
||||
parted ${img_file} mkpart primary ext4 $(($section1_end+1))s 100%
|
||||
|
||||
device=`losetup -f --show -P ${img_file}`
|
||||
LOG "after losetup: ${device}"
|
||||
trap 'LOSETUP_D_IMG' EXIT
|
||||
LOG "image ${img_file} created and mounted as ${device}"
|
||||
kpartx -va ${device}
|
||||
loopX=${device##*\/}
|
||||
partprobe ${device}
|
||||
@ -170,25 +184,40 @@ make_img(){
|
||||
|
||||
if [ -d ${rootfs_dir} ];then rm -rf ${rootfs_dir}; fi
|
||||
mkdir ${rootfs_dir}
|
||||
mount $workdir/rootfs.img ${rootfs_dir}
|
||||
mount ${workdir}/rootfs.img ${rootfs_dir}
|
||||
if [ -d ${boot_dir} ];then rm -rf ${boot_dir}; fi
|
||||
mkdir ${boot_dir}
|
||||
mount $workdir/boot.img ${boot_dir}
|
||||
mount ${workdir}/boot.img ${boot_dir}
|
||||
|
||||
cp -rfp ${boot_dir}/* ${boot_mnt} || LOG "${boot_dir} is empty."
|
||||
|
||||
cp -rfp ${boot_dir}/* ${boot_mnt}
|
||||
line=$(blkid | grep $rootp)
|
||||
uuid=${line#*UUID=\"}
|
||||
uuid=${uuid%%\"*}
|
||||
sed -i "s|UUID=614e0000-0000-4b53-8000-1d28000054a9|UUID=${uuid}|g" ${boot_mnt}/extlinux/extlinux.conf
|
||||
if [ "x${board}" == "xraspberrypi" ]; then
|
||||
if [ -d ${rootfs_dir}/boot/grub2 ]; then
|
||||
rm -rf ${rootfs_dir}/boot/grub2
|
||||
fi
|
||||
cp -rfp ${rootfs_dir}/boot/* ${boot_mnt}/ || LOG "no file in ${rootfs_dir}/boot/"
|
||||
cp ${config_dir}/config.txt ${boot_mnt}/
|
||||
|
||||
partuuid=${line#*PARTUUID=\"}
|
||||
partuuid=${partuuid%%\"*}
|
||||
echo "console=serial0,115200 console=tty1 root=PARTUUID=${partuuid} rootfstype=ext4 elevator=deadline rootwait net.ifnames=0" > ${boot_mnt}/cmdline.txt
|
||||
else
|
||||
uuid=${line#*UUID=\"}
|
||||
uuid=${uuid%%\"*}
|
||||
sed -i "s|UUID=614e0000-0000-4b53-8000-1d28000054a9|UUID=${uuid}|g" ${boot_mnt}/extlinux/extlinux.conf
|
||||
fi
|
||||
|
||||
rsync -avHAXq ${rootfs_dir}/* ${root_mnt}
|
||||
sync
|
||||
sleep 10
|
||||
LOG "copy openEuler-root done."
|
||||
|
||||
if [ -d ${root_mnt}/lib/modules ];then rm -rf ${root_mnt}/lib/modules; fi
|
||||
cp -rfp $workdir/kernel/kernel-modules/lib/modules ${root_mnt}/lib
|
||||
LOG "install kernel modules done."
|
||||
if [ -d ${workdir}/kernel/kernel-modules/lib/modules ]; then
|
||||
if [ -d ${root_mnt}/lib/modules ];then rm -rf ${root_mnt}/lib/modules; fi
|
||||
cp -rfp ${workdir}/kernel/kernel-modules/lib/modules ${root_mnt}/lib
|
||||
LOG "install kernel modules done."
|
||||
fi
|
||||
|
||||
umount $rootp
|
||||
umount $bootp
|
||||
@ -230,7 +259,7 @@ make_img(){
|
||||
ERROR "allwinner u-boot file can not be found!"
|
||||
exit 2
|
||||
fi
|
||||
else
|
||||
elif [ "${platform}" != "broadcom" ];then
|
||||
echo "Unsupported platform"
|
||||
fi
|
||||
|
||||
@ -241,18 +270,12 @@ make_img(){
|
||||
}
|
||||
|
||||
outputd(){
|
||||
cd $workdir
|
||||
|
||||
if [ -f $outputdir ];then
|
||||
img_name_check=$(ls $outputdir | grep $name)
|
||||
if [ "x$img_name_check" != "x" ]; then
|
||||
rm ${name}.img*
|
||||
rm ${name}.tar.gz*
|
||||
fi
|
||||
if [ -d ${outputdir} ];then
|
||||
find ${outputdir} -name "${name}.img" -o -name "${name}.tar.gz" -o -name "${name}.img.xz" -delete
|
||||
else
|
||||
mkdir -p $outputdir
|
||||
fi
|
||||
mv ${name}.img ${outputdir}
|
||||
mv ${workdir}/${name}.img ${outputdir}
|
||||
LOG "xz openEuler image begin..."
|
||||
xz ${outputdir}/${name}.img
|
||||
if [ ! -f ${outputdir}/${name}.img.xz ]; then
|
||||
@ -264,11 +287,11 @@ outputd(){
|
||||
|
||||
if [[ "x$soc_name" == "xrk3399" && "x$platform" == "xrockchip" ]]; then
|
||||
LOG "tar openEuler image begin..."
|
||||
cp $workdir/../bin/rk3399_loader.bin $workdir
|
||||
cp $workdir/../bin/rk3399_parameter.gpt $workdir
|
||||
cp $workdir/u-boot/idbloader.img $workdir
|
||||
cp $workdir/u-boot/u-boot.itb $workdir
|
||||
cd $workdir
|
||||
cp ${nonfree_bin_dir}/rk3399_loader.bin ${workdir}
|
||||
cp ${nonfree_bin_dir}/rk3399_parameter.gpt ${workdir}
|
||||
cp ${workdir}/u-boot/idbloader.img ${workdir}
|
||||
cp ${workdir}/u-boot/u-boot.itb ${workdir}
|
||||
pushd ${workdir}
|
||||
tar -zcvf ${outputdir}/${name}.tar.gz \
|
||||
rk3399_loader.bin \
|
||||
rk3399_parameter.gpt \
|
||||
@ -276,24 +299,27 @@ outputd(){
|
||||
u-boot.itb \
|
||||
boot.img \
|
||||
rootfs.img
|
||||
popd
|
||||
if [ ! -f ${outputdir}/${name}.tar.gz ]; then
|
||||
ERROR "tar openEuler image failed!"
|
||||
exit 2
|
||||
else
|
||||
LOG "tar openEuler image success."
|
||||
fi
|
||||
rm $workdir/rk3399_loader.bin
|
||||
rm $workdir/rk3399_parameter.gpt
|
||||
rm $workdir/idbloader.img
|
||||
rm $workdir/u-boot.itb
|
||||
rm ${workdir}/rk3399_loader.bin
|
||||
rm ${workdir}/rk3399_parameter.gpt
|
||||
rm ${workdir}/idbloader.img
|
||||
rm ${workdir}/u-boot.itb
|
||||
|
||||
cd $outputdir
|
||||
pushd $outputdir
|
||||
sha256sum ${name}.tar.gz >> ${name}.tar.gz.sha256sum
|
||||
popd
|
||||
fi
|
||||
cd $outputdir
|
||||
pushd $outputdir
|
||||
sha256sum ${name}.img.xz >> ${name}.img.xz.sha256sum
|
||||
popd
|
||||
|
||||
LOG "The target images are generated in the ${outputdir}."
|
||||
LOG "The target images: ${outputdir}/${name}.img.xz."
|
||||
}
|
||||
|
||||
set -e
|
||||
@ -301,18 +327,22 @@ cur_dir=$(cd $(dirname $0);pwd)
|
||||
default_param
|
||||
parseargs "$@" || help $?
|
||||
|
||||
if [ ! -d $workdir ]; then
|
||||
mkdir $workdir
|
||||
if [ "x${board}" == "xraspberrypi" ]; then
|
||||
config_dir=${cur_dir}/configs-rpi
|
||||
fi
|
||||
|
||||
source $cur_dir/boards/${board}.conf
|
||||
if [ ! -d ${workdir} ]; then
|
||||
mkdir ${workdir}
|
||||
fi
|
||||
|
||||
source ${cur_dir}/boards/${board}.conf
|
||||
|
||||
if [ ! -d ${log_dir} ];then mkdir -p ${log_dir}; fi
|
||||
if [ ! -f $workdir/.done ];then
|
||||
touch $workdir/.done
|
||||
if [ ! -f ${workdir}/.done ];then
|
||||
touch ${workdir}/.done
|
||||
fi
|
||||
sed -i 's/image//g' $workdir/.done
|
||||
sed -i 's/image//g' ${workdir}/.done
|
||||
LOG "gen image..."
|
||||
make_img
|
||||
outputd
|
||||
echo "image" >> $workdir/.done
|
||||
echo "image" >> ${workdir}/.done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user