!48 merge radxa-orion-o6 into master
添加 grub 支持,添加此芯 (Radxa Orion O6) 构建支持 Created-by: chainsx Commit-by: chainsx Merged-by: openeuler-ci-bot Description: 添加 grub 支持,添加此芯 (Radxa Orion O6) 构建支持 添加 boot_mode 参数,用来指定开发板的启动方式,已经在“openEuler 适配指南.md”添加说明。 开发板信息:https://docs.radxa.com/orion/o6 由于使用[此芯公开的内核](https://gitlab.com/cix-linux/cix_opensource/linux)会出现编译错误,所以使用 armbian 社区修复并托管的内核进行测试: https://github.com/armbian/linux-cix/tree/cix-6.6-2025q3 后期可根据需要基于 openEuler 内核来进行内核移植。 测试的构建命令: ``` bash build.sh --board radxa-orion-o6 \ -n openEuler-24.03-LTS-Radxa-Orion-O6-aarch64-alpha1 \ -k https://github.com/armbian/linux-cix.git \ -b cix-6.6-2025q3 \ -c cix-kernel-cix-6.6-2025q3.config \ -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo \ -s headless ``` 经过测试,以下功能正常: BIOS 使用 devicetree 模式能够正常启动,启动内核日志: https://pastebin.ubuntu.com/p/TKBwSCFZ4b/ PCIe 正常:  网络功能正常(5G 以太网 x2、m.2 无线网卡-QCNFA765):  储存功能正常(m.2 SSD):  HDMI 输出正常。 See merge request: openeuler/SBC-sig!48
This commit is contained in:
commit
59bf7f92b9
@ -269,6 +269,13 @@
|
|||||||
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 24.03 LTS</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#khadas-vim3">构建完整镜像命令</a></td>
|
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#khadas-vim3">构建完整镜像命令</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><ul><li>Radxa Orion O6</li></ul></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><a href="https://docs.radxa.com/orion/o6">Radxa Wiki</a></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><p>CIX P1 CD8180</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#radxa-orion-o6">构建完整镜像命令</a></td>
|
||||||
|
</tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
|
|
||||||
### Docker 容器内构建
|
### Docker 容器内构建
|
||||||
@ -399,3 +406,17 @@
|
|||||||
-r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo \
|
-r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo \
|
||||||
-s headless
|
-s headless
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- CIX: Radxa Orion O6
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo bash build-image-docker.sh \
|
||||||
|
--board radxa-orion-o6 \
|
||||||
|
-d https://repo.openeuler.org/openEuler-24.03-LTS/docker_img/aarch64/openEuler-docker.aarch64.tar.xz \
|
||||||
|
-n openEuler-24.03-LTS-Radxa-Orion-O6-aarch64-alpha1 \
|
||||||
|
-k https://github.com/armbian/linux-cix.git \
|
||||||
|
-b cix-6.6-2025q3 \
|
||||||
|
-c cix-kernel-cix-6.6-2025q3.config \
|
||||||
|
-r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo \
|
||||||
|
-s headless
|
||||||
|
```
|
||||||
@ -150,5 +150,12 @@ English | [简体中文](./compatibility-list.md)
|
|||||||
<td class="cellrowborder" valign="top" width="10%"><p style="color:yellow">Community Support</p></td>
|
<td class="cellrowborder" valign="top" width="10%"><p style="color:yellow">Community Support</p></td>
|
||||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#khadas-vim3">Build a unified system image</a></td>
|
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#khadas-vim3">Build a unified system image</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><a href="https://docs.radxa.com/orion/o6">Radxa Orion O6</a></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><p>CIX P1 CD8180</p></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 24.03 LTS(<a href="https://github.com/armbian/linux-cix/tree/cix-6.6-2025q3/">kernel version 6.6</a>)</p></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><p style="color:yellow">Community Support</p></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#radxa-orion-o6">Build a unified system image</a></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -150,5 +150,12 @@
|
|||||||
<td class="cellrowborder" valign="top" width="10%"><p style="color:yellow">社区支持</p></td>
|
<td class="cellrowborder" valign="top" width="10%"><p style="color:yellow">社区支持</p></td>
|
||||||
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#khadas-vim3">构建完整镜像</a></td>
|
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#khadas-vim3">构建完整镜像</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><a href="https://docs.radxa.com/orion/o6">Radxa Orion O6</a></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><p>CIX P1 CD8180</p></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><p>openEuler 24.03 LTS(<a href="https://github.com/armbian/linux-cix/tree/cix-6.6-2025q3/">内核版本 6.6</a>)</p></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><p style="color:yellow">社区支持</p></td>
|
||||||
|
<td class="cellrowborder" valign="top" width="10%"><a href="./rockchip/构建完整镜像命令列举.md#radxa-orion-o6">构建完整镜像</a></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -128,6 +128,14 @@ POST_BOARD_OVERLAY() {
|
|||||||
|
|
||||||
该参数为框架构建的 openEuler 根目录所在的路径,默认为 `${workdir}/rootfs`。
|
该参数为框架构建的 openEuler 根目录所在的路径,默认为 `${workdir}/rootfs`。
|
||||||
|
|
||||||
|
8. boot_mode
|
||||||
|
|
||||||
|
开发板所使用的启动方式,目前支持的有:
|
||||||
|
|
||||||
|
- extlinux: 使用 u-boot 解析 /boot/extlinux/extlinux.conf 启动配置文件进行启动
|
||||||
|
|
||||||
|
- grub: 使用 efi 启动
|
||||||
|
|
||||||
## 运行测试
|
## 运行测试
|
||||||
|
|
||||||
通过运行脚本 [构建完整镜像](../Rockchip.md#构建完整镜像),将 `--board` 参数设置为新增开发板的版型文件来运行测试。
|
通过运行脚本 [构建完整镜像](../Rockchip.md#构建完整镜像),将 `--board` 参数设置为新增开发板的版型文件来运行测试。
|
||||||
|
|||||||
@ -7,12 +7,14 @@
|
|||||||
- [适用的 RK3588 开发板](#适用的-rk3588-开发板)
|
- [适用的 RK3588 开发板](#适用的-rk3588-开发板)
|
||||||
- [适用的 Phytium 开发板](#适用的-phytium-开发板)
|
- [适用的 Phytium 开发板](#适用的-phytium-开发板)
|
||||||
- [适用的 Allwinner 开发板](#适用的-allwinner-开发板)
|
- [适用的 Allwinner 开发板](#适用的-allwinner-开发板)
|
||||||
|
- [适用的 Amlogic 开发板](#适用的-amlogic-开发板)
|
||||||
|
- [适用的 CIX 开发板](#适用的-cix-开发板)
|
||||||
|
|
||||||
## 描述
|
## 描述
|
||||||
|
|
||||||
本文档介绍了支持的开发板以及构建对应开发板完整镜像的命令。
|
本文档介绍了支持的开发板以及构建对应开发板完整镜像的命令。
|
||||||
|
|
||||||
### 适用的 RK3399 开发板:
|
### 适用的 RK3399 开发板
|
||||||
|
|
||||||
已经测试的开发板如下,其他类型 Rockchip 开发板适用情况待测试。
|
已经测试的开发板如下,其他类型 Rockchip 开发板适用情况待测试。
|
||||||
|
|
||||||
@ -48,7 +50,7 @@
|
|||||||
|
|
||||||
`sudo bash build.sh --board radxa-rockpi-4a -n openEuler-22.03-LTS-RockPi-4A-aarch64-alpha1 -k https://atomgit.com/openeuler/kernel.git -b openEuler-22.03-LTS -c openeuler_rockchip_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS/generic.repo -s headless`
|
`sudo bash build.sh --board radxa-rockpi-4a -n openEuler-22.03-LTS-RockPi-4A-aarch64-alpha1 -k https://atomgit.com/openeuler/kernel.git -b openEuler-22.03-LTS -c openeuler_rockchip_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS/generic.repo -s headless`
|
||||||
|
|
||||||
### 适用的 RK356X 开发板:
|
### 适用的 RK356X 开发板
|
||||||
|
|
||||||
已经测试的开发板如下,其他类型 RK356X 开发板适用情况待测试。
|
已经测试的开发板如下,其他类型 RK356X 开发板适用情况待测试。
|
||||||
|
|
||||||
@ -92,7 +94,7 @@
|
|||||||
|
|
||||||
`sudo bash build.sh --board firefly-roc-rk3568-pc -n openEuler-22.03-LTS-SP3-ROC-RK3568-PC-aarch64-alpha1 -k https://atomgit.com/openeuler/rockchip-kernel.git -b openEuler-22.03-LTS-SP3 -c openeuler_rockchip_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS-SP3/generic.repo -s headless`
|
`sudo bash build.sh --board firefly-roc-rk3568-pc -n openEuler-22.03-LTS-SP3-ROC-RK3568-PC-aarch64-alpha1 -k https://atomgit.com/openeuler/rockchip-kernel.git -b openEuler-22.03-LTS-SP3 -c openeuler_rockchip_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS-SP3/generic.repo -s headless`
|
||||||
|
|
||||||
### 适用的 RK3576 开发板:
|
### 适用的 RK3576 开发板
|
||||||
|
|
||||||
已经测试的开发板如下,其他类型 RK3576 开发板适用情况待测试。
|
已经测试的开发板如下,其他类型 RK3576 开发板适用情况待测试。
|
||||||
|
|
||||||
@ -112,7 +114,7 @@
|
|||||||
|
|
||||||
`sudo bash build.sh --board dshanpi-a1 -n openEuler-22.03-LTS-SP3-DShanPi-A1-aarch64-alpha1 -k https://github.com/dshanpi/dshanpi-a1-linux-kernel -b rk-6.1 -c rockchip_linux_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS-SP3/generic.repo -s headless`
|
`sudo bash build.sh --board dshanpi-a1 -n openEuler-22.03-LTS-SP3-DShanPi-A1-aarch64-alpha1 -k https://github.com/dshanpi/dshanpi-a1-linux-kernel -b rk-6.1 -c rockchip_linux_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS-SP3/generic.repo -s headless`
|
||||||
|
|
||||||
### 适用的 RK3588 开发板:
|
### 适用的 RK3588 开发板
|
||||||
|
|
||||||
已经测试的开发板如下,其他类型 RK3588 开发板适用情况待测试。
|
已经测试的开发板如下,其他类型 RK3588 开发板适用情况待测试。
|
||||||
|
|
||||||
@ -148,7 +150,7 @@
|
|||||||
|
|
||||||
`sudo bash build.sh --board radxa-rock-5b -n openEuler-22.03-LTS-SP3-Rock5B-aarch64-alpha1 -k https://atomgit.com/openeuler/rockchip-kernel.git -b openEuler-22.03-LTS-SP3 -c openeuler_rockchip_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS-SP3/generic.repo -s headless`
|
`sudo bash build.sh --board radxa-rock-5b -n openEuler-22.03-LTS-SP3-Rock5B-aarch64-alpha1 -k https://atomgit.com/openeuler/rockchip-kernel.git -b openEuler-22.03-LTS-SP3 -c openeuler_rockchip_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS-SP3/generic.repo -s headless`
|
||||||
|
|
||||||
### 适用的 Phytium 开发板:
|
### 适用的 Phytium 开发板
|
||||||
|
|
||||||
已经测试的开发板如下,其他类型 Phytium 开发板适用情况待测试。
|
已经测试的开发板如下,其他类型 Phytium 开发板适用情况待测试。
|
||||||
|
|
||||||
@ -164,7 +166,7 @@
|
|||||||
|
|
||||||
`sudo bash build.sh --board phytium-4gb -n openEuler-24.03-LTS-PhytiumPi-4GB-aarch64-alpha1 -k https://atomgit.com/openeuler/phytium-kernel.git -b openEuler-24.03-LTS-Phytium -c phytium_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo -s headless`
|
`sudo bash build.sh --board phytium-4gb -n openEuler-24.03-LTS-PhytiumPi-4GB-aarch64-alpha1 -k https://atomgit.com/openeuler/phytium-kernel.git -b openEuler-24.03-LTS-Phytium -c phytium_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo -s headless`
|
||||||
|
|
||||||
### 适用的 Allwinner 开发板:
|
### 适用的 Allwinner 开发板
|
||||||
|
|
||||||
已经测试的开发板如下,其他类型 Allwinner 开发板适用情况待测试。
|
已经测试的开发板如下,其他类型 Allwinner 开发板适用情况待测试。
|
||||||
|
|
||||||
@ -188,7 +190,7 @@
|
|||||||
|
|
||||||
`sudo bash build.sh --board longanpi-3h -n openEuler-24.03-LTS-LonganPi-3H-aarch64-alpha1 -k https://atomgit.com/openeuler/allwinner-kernel.git -b openEuler-24.03-LTS -c openeuler_allwinner_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo -s headless`
|
`sudo bash build.sh --board longanpi-3h -n openEuler-24.03-LTS-LonganPi-3H-aarch64-alpha1 -k https://atomgit.com/openeuler/allwinner-kernel.git -b openEuler-24.03-LTS -c openeuler_allwinner_defconfig -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo -s headless`
|
||||||
|
|
||||||
### 适用的 Amlogic 开发板:
|
### 适用的 Amlogic 开发板
|
||||||
|
|
||||||
已经测试的开发板如下,其他类型 Amlogic 开发板适用情况待测试。
|
已经测试的开发板如下,其他类型 Amlogic 开发板适用情况待测试。
|
||||||
|
|
||||||
@ -199,3 +201,15 @@
|
|||||||
- openEuler-24.03-LTS,构建命令如下:
|
- openEuler-24.03-LTS,构建命令如下:
|
||||||
|
|
||||||
`bash build.sh --board khadas-vim3 -n openEuler-24.03-LTS-Khadas-VIM3-aarch64-alpha1 -k https://atomgit.com/openeuler/kernel.git -b OLK-6.6 -c amlogic-kernel-OLK-6.6.config -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo -s headless`
|
`bash build.sh --board khadas-vim3 -n openEuler-24.03-LTS-Khadas-VIM3-aarch64-alpha1 -k https://atomgit.com/openeuler/kernel.git -b OLK-6.6 -c amlogic-kernel-OLK-6.6.config -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo -s headless`
|
||||||
|
|
||||||
|
### 适用的 CIX 开发板
|
||||||
|
|
||||||
|
已经测试的开发板如下,其他类型 CIX 开发板适用情况待测试。
|
||||||
|
|
||||||
|
#### Radxa Orion O6
|
||||||
|
|
||||||
|
已测试的版本如下:
|
||||||
|
|
||||||
|
- openEuler-24.03-LTS,构建命令如下:
|
||||||
|
|
||||||
|
`bash build.sh --board radxa-orion-o6 -n openEuler-24.03-LTS-Radxa-Orion-O6-aarch64-alpha1 -k https://github.com/armbian/linux-cix.git -b cix-6.6-2025q3 -c cix-kernel-cix-6.6-2025q3.config -r https://raw.atomgit.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo -s headless`
|
||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/armsom-sige5
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/armsom-sige5
|
||||||
dtb_name=rk3576-armsom-sige5
|
dtb_name=rk3576-armsom-sige5
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/dshanpi-a1
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/dshanpi-a1
|
||||||
dtb_name=rk3576-100ask-dshanpi-a1
|
dtb_name=rk3576-100ask-dshanpi-a1
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3588
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3588
|
||||||
dtb_name=rk3588-firefly-itx-3588j
|
dtb_name=rk3588-firefly-itx-3588j
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=firefly-rk3399_defconfig
|
ubootconfig=firefly-rk3399_defconfig
|
||||||
|
bootmode=extlinux
|
||||||
dtb_name=rk3399-firefly
|
dtb_name=rk3399-firefly
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
soc_name=rk3399
|
soc_name=rk3399
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3566
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3566
|
||||||
dtb_name=rk3566-roc-pc
|
dtb_name=rk3566-roc-pc
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3568
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3568
|
||||||
dtb_name=rk3568-roc-pc-se
|
dtb_name=rk3568-roc-pc-se
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3568
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3568
|
||||||
dtb_name=rk3568-roc-pc
|
dtb_name=rk3568-roc-pc
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3588
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3588
|
||||||
dtb_name=rk3588s-roc-pc
|
dtb_name=rk3588s-roc-pc
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/khadas-vim3
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/khadas-vim3
|
||||||
dtb_name=meson-g12b-a311d-khadas-vim3
|
dtb_name=meson-g12b-a311d-khadas-vim3
|
||||||
platform=amlogic
|
platform=amlogic
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/longanpi-3h
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/longanpi-3h
|
||||||
dtb_name=sun50i-h618-longanpi-3h
|
dtb_name=sun50i-h618-longanpi-3h
|
||||||
platform=allwinner
|
platform=allwinner
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/orangepi-zero2
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/orangepi-zero2
|
||||||
dtb_name=sun50i-h616-orangepi-zero2
|
dtb_name=sun50i-h616-orangepi-zero2
|
||||||
platform=allwinner
|
platform=allwinner
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/phytiumpi
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/phytiumpi
|
||||||
dtb_name=phytiumpi_firefly
|
dtb_name=phytiumpi_firefly
|
||||||
platform=phytium
|
platform=phytium
|
||||||
|
|||||||
14
scripts/boards/radxa-orion-o6.conf
Normal file
14
scripts/boards/radxa-orion-o6.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
ubootconfig=
|
||||||
|
bootmode=grub
|
||||||
|
local_uboot_dir=
|
||||||
|
dtb_name=sky1-orion-o6-40pin
|
||||||
|
platform=cix
|
||||||
|
soc_name=p1
|
||||||
|
arch=arm64
|
||||||
|
part_table=gpt
|
||||||
|
boot_size=256
|
||||||
|
|
||||||
|
POST_BOARD_OVERLAY() {
|
||||||
|
echo "Put ${board} firmware into rootfs..."
|
||||||
|
echo "Nothing to do..."
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=extlinux
|
||||||
local_uboot_dir=${nonfree_bin_dir}/u-boot/radxa-rock5b
|
local_uboot_dir=${nonfree_bin_dir}/u-boot/radxa-rock5b
|
||||||
dtb_name=rk3588-rock-5b
|
dtb_name=rk3588-rock-5b
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=rock-pi-4-rk3399_defconfig
|
ubootconfig=rock-pi-4-rk3399_defconfig
|
||||||
|
bootmode=extlinux
|
||||||
dtb_name=rk3399-rock-pi-4a
|
dtb_name=rk3399-rock-pi-4a
|
||||||
platform=rockchip
|
platform=rockchip
|
||||||
soc_name=rk3399
|
soc_name=rk3399
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=
|
ubootconfig=
|
||||||
|
bootmode=
|
||||||
dtb_name=bcm2711-rpi-4-b
|
dtb_name=bcm2711-rpi-4-b
|
||||||
platform=broadcom
|
platform=broadcom
|
||||||
soc_name=
|
soc_name=
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
ubootconfig=firefly-rk3399_defconfig #Required! The name of defconfig file when compiling u-boot, which defaults to firefly-rk3399_defconfig.
|
ubootconfig=firefly-rk3399_defconfig #Required! The name of defconfig file when compiling u-boot, which defaults to firefly-rk3399_defconfig.
|
||||||
|
bootmode=extlinux
|
||||||
dtb_name=rk3399-firefly #Required! The device tree name of target board, which defaults to rk3399-firefly.
|
dtb_name=rk3399-firefly #Required! The device tree name of target board, which defaults to rk3399-firefly.
|
||||||
platform=rockchip #Required! The platform of target board, which defaults to rockchip.
|
platform=rockchip #Required! The platform of target board, which defaults to rockchip.
|
||||||
soc_name=rk3399
|
soc_name=rk3399
|
||||||
|
|||||||
@ -259,7 +259,6 @@ install_kernel() {
|
|||||||
mk_boot() {
|
mk_boot() {
|
||||||
LOG "start make bootimg..."
|
LOG "start make bootimg..."
|
||||||
if [ "x${board}" != "xraspberrypi" ]; then
|
if [ "x${board}" != "xraspberrypi" ]; then
|
||||||
mkdir -p ${boot_dir}/extlinux
|
|
||||||
|
|
||||||
LOG "start gen initrd..."
|
LOG "start gen initrd..."
|
||||||
dracut --no-kernel ${boot_dir}/initrd.img
|
dracut --no-kernel ${boot_dir}/initrd.img
|
||||||
@ -274,18 +273,28 @@ mk_boot() {
|
|||||||
bootargs=${allwinner_bootargs}
|
bootargs=${allwinner_bootargs}
|
||||||
elif [ "${platform}" == "amlogic" ];then
|
elif [ "${platform}" == "amlogic" ];then
|
||||||
bootargs=${amlogic_bootargs}
|
bootargs=${amlogic_bootargs}
|
||||||
|
elif [ "${platform}" == "cix" ];then
|
||||||
|
bootargs=${cix_bootargs}
|
||||||
else
|
else
|
||||||
echo "Unsupported platform"
|
echo "Unsupported platform"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
echo "label openEuler
|
|
||||||
kernel /Image
|
|
||||||
initrd /initrd.img
|
|
||||||
fdt /${dtb_name}.dtb
|
|
||||||
append ${bootargs}" \
|
|
||||||
> ${boot_dir}/extlinux/extlinux.conf
|
|
||||||
|
|
||||||
LOG "gen extlinux config done."
|
if [ "x${bootmode}" == "xextlinux" ]; then
|
||||||
|
mkdir -p ${boot_dir}/extlinux
|
||||||
|
cp ${config_dir}/extlinux.conf ${boot_dir}/extlinux
|
||||||
|
sed -i "s|BOOTARGS|${bootargs}|g" ${boot_dir}/extlinux/extlinux.conf
|
||||||
|
sed -i "s|DEVICETREE|${dtb_name}.dtb|g" ${boot_dir}/extlinux/extlinux.conf
|
||||||
|
LOG "gen extlinux config done."
|
||||||
|
elif [ "x${bootmode}" == "xgrub" ]; then
|
||||||
|
echo ${bootargs} \
|
||||||
|
>> ${boot_dir}/grub-cmdline.txt
|
||||||
|
LOG "save grub cmdline done."
|
||||||
|
else
|
||||||
|
echo "Unsupported bootmode"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
dd if=/dev/zero of=${workdir}/boot.img bs=1M count=${boot_size} status=progress
|
dd if=/dev/zero of=${workdir}/boot.img bs=1M count=${boot_size} status=progress
|
||||||
mkfs.vfat -n boot ${workdir}/boot.img
|
mkfs.vfat -n boot ${workdir}/boot.img
|
||||||
@ -320,6 +329,7 @@ rockchip_bootargs="earlyprintk console=ttyS2,1500000 rw root=UUID=614e0000-0000-
|
|||||||
phytium_bootargs="console=ttyAMA1,115200 earlycon=pl011,0x2800d000 rw root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootfstype=ext4 rootwait cma=256m"
|
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"
|
allwinner_bootargs="console=tty0 console=ttyS0,115200 rw root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootfstype=ext4 rootwait earlycon clk_gnore_unused"
|
||||||
amlogic_bootargs="console=ttyAML0,115200 console=tty1 consoleblank=0 root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootwait rootfstype=ext4 splash=verbose coherent_pool=2M loglevel=8"
|
amlogic_bootargs="console=ttyAML0,115200 console=tty1 consoleblank=0 root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootwait rootfstype=ext4 splash=verbose coherent_pool=2M loglevel=8"
|
||||||
|
cix_bootargs="root=UUID=614e0000-0000-4b53-8000-1d28000054a9 loglevel=0 acpi=off kasan=off rootwait rw pcie_aspm=off console=tty0 console=ttyAMA2 splash=verbose"
|
||||||
|
|
||||||
if [ -n "${default_defconfig}" ]; then
|
if [ -n "${default_defconfig}" ]; then
|
||||||
if [ ! -f $default_defconfig ] ; then
|
if [ ! -f $default_defconfig ] ; then
|
||||||
|
|||||||
@ -142,7 +142,7 @@ INSTALL_PACKAGES(){
|
|||||||
do
|
do
|
||||||
chroot ${rootfs_dir}/ dnf ${tmp_repo_info} --disablerepo="*" install -y $item --nogpgcheck
|
chroot ${rootfs_dir}/ dnf ${tmp_repo_info} --disablerepo="*" install -y $item --nogpgcheck
|
||||||
if [ $? == 0 ]; then
|
if [ $? == 0 ]; then
|
||||||
LOG install $item.
|
LOG $item installed.
|
||||||
else
|
else
|
||||||
ERROR can not install $item.
|
ERROR can not install $item.
|
||||||
fi
|
fi
|
||||||
@ -155,6 +155,9 @@ INSTALL_PACKAGES(){
|
|||||||
ERROR can not install raspberrypi-kernel.
|
ERROR can not install raspberrypi-kernel.
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ "x${bootmode}" == "xgrub" ]; then
|
||||||
|
chroot ${rootfs_dir}/ dnf ${tmp_repo_info} --disablerepo="*" install -y grub2-efi-aa64 grub2-efi-aa64-modules efibootmgr --nogpgcheck
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
build_rootfs() {
|
build_rootfs() {
|
||||||
|
|||||||
@ -171,8 +171,8 @@ fi
|
|||||||
sed -i 's/u-boot//g' ${workdir}/.done
|
sed -i 's/u-boot//g' ${workdir}/.done
|
||||||
LOG "build u-boot..."
|
LOG "build u-boot..."
|
||||||
|
|
||||||
if [ "x${board}" == "xraspberrypi" ]; then
|
if [[ "x${ubootconfig}" == "x" && "x${local_uboot_dir}" == "x" ]]; then # RaspberryPi & Radxa-Orion-O6
|
||||||
LOG "Skip build u-boot for Raspberry Pi."
|
LOG "Skip build u-boot."
|
||||||
else
|
else
|
||||||
if [ "x$ubootconfig" == "x" ]; then
|
if [ "x$ubootconfig" == "x" ]; then
|
||||||
use_prebuild_u-boot
|
use_prebuild_u-boot
|
||||||
|
|||||||
9372
scripts/configs/rockchip/cix-kernel-cix-6.6-2025q3.config
Normal file
9372
scripts/configs/rockchip/cix-kernel-cix-6.6-2025q3.config
Normal file
File diff suppressed because it is too large
Load Diff
5
scripts/configs/rockchip/extlinux.conf
Normal file
5
scripts/configs/rockchip/extlinux.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
label openEuler
|
||||||
|
kernel /Image
|
||||||
|
initrd /initrd.img
|
||||||
|
fdt /DEVICETREE
|
||||||
|
append BOOTARGS
|
||||||
128
scripts/configs/rockchip/grub.cfg
Normal file
128
scripts/configs/rockchip/grub.cfg
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
### BEGIN /etc/grub.d/00_header ###
|
||||||
|
if [ -s $prefix/grubenv ]; then
|
||||||
|
set have_grubenv=true
|
||||||
|
load_env
|
||||||
|
fi
|
||||||
|
if [ "${next_entry}" ] ; then
|
||||||
|
set default="${next_entry}"
|
||||||
|
set next_entry=
|
||||||
|
save_env next_entry
|
||||||
|
set boot_once=true
|
||||||
|
else
|
||||||
|
set default="0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"${feature_menuentry_id}" = xy ]; then
|
||||||
|
menuentry_id_option="--id"
|
||||||
|
else
|
||||||
|
menuentry_id_option=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
export menuentry_id_option
|
||||||
|
|
||||||
|
if [ "${prev_saved_entry}" ]; then
|
||||||
|
set saved_entry="${prev_saved_entry}"
|
||||||
|
save_env saved_entry
|
||||||
|
set prev_saved_entry=
|
||||||
|
save_env prev_saved_entry
|
||||||
|
set boot_once=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
function savedefault {
|
||||||
|
if [ -z "${boot_once}" ]; then
|
||||||
|
saved_entry="${chosen}"
|
||||||
|
save_env saved_entry
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
function load_video {
|
||||||
|
if [ x$feature_all_video_module = xy ]; then
|
||||||
|
insmod all_video
|
||||||
|
else
|
||||||
|
insmod efi_gop
|
||||||
|
insmod efi_uga
|
||||||
|
insmod ieee1275_fb
|
||||||
|
insmod vbe
|
||||||
|
insmod vga
|
||||||
|
insmod video_bochs
|
||||||
|
insmod video_cirrus
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
serial
|
||||||
|
terminal_input serial console
|
||||||
|
terminal_output serial console
|
||||||
|
if [ "${recordfail}" = 1 ] ; then
|
||||||
|
set timeout=30
|
||||||
|
else
|
||||||
|
if [ x$feature_timeout_style = xy ] ; then
|
||||||
|
set timeout_style=menu
|
||||||
|
set timeout=3
|
||||||
|
# Fallback normal timeout code in case the timeout_style feature is
|
||||||
|
# unavailable.
|
||||||
|
else
|
||||||
|
set timeout=3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
### END /etc/grub.d/00_header ###
|
||||||
|
|
||||||
|
### BEGIN /etc/grub.d/05_debian_theme ###
|
||||||
|
set menu_color_normal=cyan/blue
|
||||||
|
set menu_color_highlight=white/blue
|
||||||
|
### END /etc/grub.d/05_debian_theme ###
|
||||||
|
|
||||||
|
### BEGIN /etc/grub.d/09_linux_with_dtb.sh ###
|
||||||
|
function gfxmode {
|
||||||
|
set gfxpayload="${1}"
|
||||||
|
}
|
||||||
|
set linux_gfx_mode=
|
||||||
|
export linux_gfx_mode
|
||||||
|
menuentry 'openEuler' --class gnu-linux --class gnu --class os $menuentry_id_option 'openEuler' {
|
||||||
|
load_video
|
||||||
|
insmod gzio
|
||||||
|
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
|
||||||
|
insmod part_gpt
|
||||||
|
insmod ext2
|
||||||
|
search --no-floppy --fs-uuid --set=root BOOT_UUID
|
||||||
|
echo 'Loading openEuler ...'
|
||||||
|
linux /Image BOOTARGS
|
||||||
|
echo 'Loading initial ramdisk ...'
|
||||||
|
initrd /initrd.img
|
||||||
|
echo 'Loading device tree blob...'
|
||||||
|
devicetree /DEVICETREE
|
||||||
|
}
|
||||||
|
|
||||||
|
### END /etc/grub.d/09_linux_with_dtb.sh ###
|
||||||
|
|
||||||
|
### BEGIN /etc/grub.d/25_bli ###
|
||||||
|
if [ "$grub_platform" = "efi" ]; then
|
||||||
|
insmod bli
|
||||||
|
fi
|
||||||
|
### END /etc/grub.d/25_bli ###
|
||||||
|
|
||||||
|
### BEGIN /etc/grub.d/30_os-prober ###
|
||||||
|
### END /etc/grub.d/30_os-prober ###
|
||||||
|
|
||||||
|
### BEGIN /etc/grub.d/30_uefi-firmware ###
|
||||||
|
if [ "$grub_platform" = "efi" ]; then
|
||||||
|
fwsetup --is-supported
|
||||||
|
if [ "$?" = 0 ]; then
|
||||||
|
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
|
||||||
|
fwsetup
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
### END /etc/grub.d/30_uefi-firmware ###
|
||||||
|
|
||||||
|
### BEGIN /etc/grub.d/40_custom ###
|
||||||
|
# This file provides an easy way to add custom menu entries. Simply type the
|
||||||
|
# menu entries you want to add after this comment. Be careful not to change
|
||||||
|
# the 'exec tail' line above.
|
||||||
|
### END /etc/grub.d/40_custom ###
|
||||||
|
|
||||||
|
### BEGIN /etc/grub.d/41_custom ###
|
||||||
|
if [ -f ${config_directory}/custom.cfg ]; then
|
||||||
|
source ${config_directory}/custom.cfg
|
||||||
|
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
|
||||||
|
source $prefix/custom.cfg
|
||||||
|
fi
|
||||||
|
### END /etc/grub.d/41_custom ###
|
||||||
3
scripts/configs/rockchip/grubenv
Executable file
3
scripts/configs/rockchip/grubenv
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
# GRUB Environment Block
|
||||||
|
# WARNING: Do not edit this file by tools other than grub-editenv!!!
|
||||||
|
##################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||||
@ -31,9 +31,8 @@ default_param() {
|
|||||||
rootfs_dir=${workdir}/rootfs
|
rootfs_dir=${workdir}/rootfs
|
||||||
boot_dir=${workdir}/boot
|
boot_dir=${workdir}/boot
|
||||||
uboot_dir=${workdir}/u-boot
|
uboot_dir=${workdir}/u-boot
|
||||||
boot_mnt=${workdir}/boot_tmp
|
|
||||||
emmc_boot_mnt=${workdir}/emmc_boot_tmp
|
|
||||||
root_mnt=${workdir}/root_tmp
|
root_mnt=${workdir}/root_tmp
|
||||||
|
boot_mnt=${workdir}/root_tmp/boot
|
||||||
log_dir=${workdir}/log
|
log_dir=${workdir}/log
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,24 +68,23 @@ parseargs()
|
|||||||
|
|
||||||
LOSETUP_D_IMG(){
|
LOSETUP_D_IMG(){
|
||||||
set +e
|
set +e
|
||||||
if [ -d ${root_mnt} ]; then
|
if grep -q "${root_mnt}/dev " /proc/mounts ; then
|
||||||
if grep -q "${root_mnt} " /proc/mounts ; then
|
umount -l ${root_mnt}/dev
|
||||||
umount ${root_mnt}
|
fi
|
||||||
fi
|
if grep -q "${root_mnt}/proc " /proc/mounts ; then
|
||||||
|
umount -l ${root_mnt}/proc
|
||||||
|
fi
|
||||||
|
if grep -q "${root_mnt}/sys " /proc/mounts ; then
|
||||||
|
umount -l ${root_mnt}/sys
|
||||||
fi
|
fi
|
||||||
if [ -d ${boot_mnt} ]; then
|
if [ -d ${boot_mnt} ]; then
|
||||||
if grep -q "${boot_mnt} " /proc/mounts ; then
|
if grep -q "${boot_mnt} " /proc/mounts ; then
|
||||||
umount ${boot_mnt}
|
umount ${boot_mnt}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -d ${emmc_boot_mnt} ]; then
|
if [ -d ${root_mnt} ]; then
|
||||||
if grep -q "${emmc_boot_mnt} " /proc/mounts ; then
|
if grep -q "${root_mnt} " /proc/mounts ; then
|
||||||
umount ${emmc_boot_mnt}
|
umount ${root_mnt}
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ -d ${rootfs_dir} ]; then
|
|
||||||
if grep -q "${rootfs_dir} " /proc/mounts ; then
|
|
||||||
umount ${rootfs_dir}
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -d ${boot_dir} ]; then
|
if [ -d ${boot_dir} ]; then
|
||||||
@ -94,6 +92,11 @@ LOSETUP_D_IMG(){
|
|||||||
umount ${boot_dir}
|
umount ${boot_dir}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ -d ${rootfs_dir} ]; then
|
||||||
|
if grep -q "${rootfs_dir} " /proc/mounts ; then
|
||||||
|
umount ${rootfs_dir}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [ "x$device" != "x" ]; then
|
if [ "x$device" != "x" ]; then
|
||||||
kpartx -d ${device}
|
kpartx -d ${device}
|
||||||
losetup -d ${device}
|
losetup -d ${device}
|
||||||
@ -102,18 +105,12 @@ LOSETUP_D_IMG(){
|
|||||||
if [ -d ${root_mnt} ]; then
|
if [ -d ${root_mnt} ]; then
|
||||||
rm -rf ${root_mnt}
|
rm -rf ${root_mnt}
|
||||||
fi
|
fi
|
||||||
if [ -d ${boot_mnt} ]; then
|
if [ -d ${boot_dir} ]; then
|
||||||
rm -rf ${boot_mnt}
|
rm -rf ${boot_dir}
|
||||||
fi
|
|
||||||
if [ -d ${emmc_boot_mnt} ]; then
|
|
||||||
rm -rf ${emmc_boot_mnt}
|
|
||||||
fi
|
fi
|
||||||
if [ -d ${rootfs_dir} ]; then
|
if [ -d ${rootfs_dir} ]; then
|
||||||
rm -rf ${rootfs_dir}
|
rm -rf ${rootfs_dir}
|
||||||
fi
|
fi
|
||||||
if [ -d ${boot_dir} ]; then
|
|
||||||
rm -rf ${boot_dir}
|
|
||||||
fi
|
|
||||||
set -e
|
set -e
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,9 +175,6 @@ make_img(){
|
|||||||
mkfs.vfat -n boot ${bootp}
|
mkfs.vfat -n boot ${bootp}
|
||||||
mkfs.ext4 -L rootfs ${rootp}
|
mkfs.ext4 -L rootfs ${rootp}
|
||||||
LOG "make filesystems done."
|
LOG "make filesystems done."
|
||||||
mkdir -p ${root_mnt} ${boot_mnt}
|
|
||||||
mount -t vfat -o uid=root,gid=root,umask=0000 ${bootp} ${boot_mnt}
|
|
||||||
mount -t ext4 ${rootp} ${root_mnt}
|
|
||||||
|
|
||||||
if [ -d ${rootfs_dir} ];then rm -rf ${rootfs_dir}; fi
|
if [ -d ${rootfs_dir} ];then rm -rf ${rootfs_dir}; fi
|
||||||
mkdir ${rootfs_dir}
|
mkdir ${rootfs_dir}
|
||||||
@ -189,6 +183,21 @@ make_img(){
|
|||||||
mkdir ${boot_dir}
|
mkdir ${boot_dir}
|
||||||
mount ${workdir}/boot.img ${boot_dir}
|
mount ${workdir}/boot.img ${boot_dir}
|
||||||
|
|
||||||
|
mkdir -p ${root_mnt}
|
||||||
|
mount -t ext4 ${rootp} ${root_mnt}
|
||||||
|
rsync -avHAXq ${rootfs_dir}/* ${root_mnt}
|
||||||
|
sync
|
||||||
|
sleep 10
|
||||||
|
LOG "copy openEuler-root 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
|
||||||
|
|
||||||
|
if [ ! -d ${boot_mnt} ];then mkdir ${boot_mnt}; fi
|
||||||
|
mount -t vfat -o uid=root,gid=root,umask=0000 ${bootp} ${boot_mnt}
|
||||||
cp -rfp ${boot_dir}/* ${boot_mnt} || LOG "${boot_dir} is empty."
|
cp -rfp ${boot_dir}/* ${boot_mnt} || LOG "${boot_dir} is empty."
|
||||||
|
|
||||||
line=$(blkid | grep $rootp)
|
line=$(blkid | grep $rootp)
|
||||||
@ -205,24 +214,42 @@ make_img(){
|
|||||||
else
|
else
|
||||||
uuid=${line#*UUID=\"}
|
uuid=${line#*UUID=\"}
|
||||||
uuid=${uuid%%\"*}
|
uuid=${uuid%%\"*}
|
||||||
sed -i "s|UUID=614e0000-0000-4b53-8000-1d28000054a9|UUID=${uuid}|g" ${boot_mnt}/extlinux/extlinux.conf
|
|
||||||
|
if [ "x${bootmode}" == "xextlinux" ]; then
|
||||||
|
sed -i "s|UUID=614e0000-0000-4b53-8000-1d28000054a9|UUID=${uuid}|g" ${boot_mnt}/extlinux/extlinux.conf
|
||||||
|
elif [ "x${bootmode}" == "xgrub" ]; then
|
||||||
|
efi_line=$(blkid | grep $bootp)
|
||||||
|
efi_uuid=${efi_line#*UUID=\"}
|
||||||
|
efi_uuid=${efi_uuid%%\"*}
|
||||||
|
cp -rfp ${rootfs_dir}/boot/* ${boot_mnt} || true
|
||||||
|
cp ${config_dir}/grub.cfg ${boot_mnt}/efi/EFI/openEuler
|
||||||
|
bootargs=$(cat ${boot_mnt}/grub-cmdline.txt)
|
||||||
|
sed -i "s|614e0000-0000-4b53-8000-1d28000054a9|${uuid}|g" ${boot_mnt}/efi/EFI/openEuler/grub.cfg
|
||||||
|
sed -i "s|BOOT_UUID|${efi_uuid}|g" ${boot_mnt}/efi/EFI/openEuler/grub.cfg
|
||||||
|
sed -i "s|BOOTARGS|${bootargs}|g" ${boot_mnt}/efi/EFI/openEuler/grub.cfg
|
||||||
|
sed -i "s|DEVICETREE|${dtb_name}.dtb|g" ${boot_mnt}/efi/EFI/openEuler/grub.cfg
|
||||||
|
mkdir -p ${boot_mnt}/efi/BOOT
|
||||||
|
cp ${boot_mnt}/efi/EFI/openEuler/grub.cfg ${boot_mnt}/grub2
|
||||||
|
cp ${config_dir}/grubenv ${boot_mnt}/grub2
|
||||||
|
rm ${boot_mnt}/grub-cmdline.txt
|
||||||
|
|
||||||
|
mount --bind /dev ${root_mnt}/dev
|
||||||
|
mount -t proc /proc ${root_mnt}/proc
|
||||||
|
mount -t sysfs /sys ${root_mnt}/sys
|
||||||
|
|
||||||
|
chroot ${root_mnt} grub2-install --target=arm64-efi --efi-directory=/boot/efi --bootloader-id=openEuler --no-nvram
|
||||||
|
cp ${root_mnt}/boot/efi/EFI/openEuler/grubaa64.efi ${root_mnt}/boot/efi/BOOT/BOOTAA64.EFI
|
||||||
|
|
||||||
|
umount ${root_mnt}/dev
|
||||||
|
umount ${root_mnt}/proc
|
||||||
|
umount ${root_mnt}/sys
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rsync -avHAXq ${rootfs_dir}/* ${root_mnt}
|
|
||||||
sync
|
|
||||||
sleep 10
|
|
||||||
LOG "copy openEuler-root 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
|
umount $bootp
|
||||||
umount ${rootfs_dir}
|
umount $rootp
|
||||||
umount ${boot_dir}
|
umount ${boot_dir}
|
||||||
|
umount ${rootfs_dir}
|
||||||
|
|
||||||
if [ "${platform}" == "rockchip" ];then
|
if [ "${platform}" == "rockchip" ];then
|
||||||
echo "Installing Rockchip U-Boot..."
|
echo "Installing Rockchip U-Boot..."
|
||||||
@ -268,7 +295,7 @@ make_img(){
|
|||||||
ERROR "amlogic u-boot file can not be found!"
|
ERROR "amlogic u-boot file can not be found!"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
elif [ "${platform}" != "broadcom" ];then
|
elif [[ "${platform}" != "broadcom" && "${platform}" != "cix" ]];then
|
||||||
echo "Unsupported platform"
|
echo "Unsupported platform"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user