diff --git a/CONTRIBUTOR.md b/CONTRIBUTOR.md index 729ffffd80..58d64b17d7 100644 --- a/CONTRIBUTOR.md +++ b/CONTRIBUTOR.md @@ -7,8 +7,8 @@ The `kernel` / `u-boot` and other resources used by this system are mainly copie | Innovation and contributors | Record of achievements | | ---- | ---- | | [150balbes](https://github.com/150balbes) | He has made outstanding contributions and laid a good foundation for using Armbian in the Amlogic box. | -| [unifreq](https://github.com/unifreq) | Developed many Armbian and OpenWrt systems, provided s905d~s922x and many other SOC system boot and firmware production solutions, shared abundant resources and tutorials. The [u-boot](build-armbian/amlogic-u-boot), [dtb](build-armbian/amlogic-dtb), [kernel](https://github.com/ophub/kernel/tree/main/pub/stable), [script](build-armbian/common-files/files/usr/sbin) etc. used on this site all fully adopted his results, and he opened the door to the world of Armbian and OpenWrt from the TV box. | -| [NewbieOrange](https://github.com/NewbieOrange) | 01. [2021-11-14] He provided the [meson-gxm-t95z-plus.dtb](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/amlogic-dtb/meson-gxm-t95z-plus.dtb) file and [usage method](build-armbian/common-files/patches/boot/s912-t95z-plus) of the new device [T95Z-Plus](https://www.tokopedia.com/search?st=product&q=t95z%20plus) in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/22#issuecomment-968260448); Shared the [meson-gxl-s905l2-p281.dtb](build-armbian/amlogic-dtb/meson-gxl-s905l2-p281.dtb) file of s905l2 (p281 board) in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/29). | +| [unifreq](https://github.com/unifreq) | Developed many Armbian and OpenWrt systems, provided s905d~s922x and many other SOC system boot and firmware production solutions, shared abundant resources and tutorials. The [u-boot](build-armbian/amlogic-u-boot), [kernel](https://github.com/ophub/kernel/tree/main/pub/stable), [script](build-armbian/common-files/files/usr/sbin) etc. used on this site all fully adopted his results, and he opened the door to the world of Armbian and OpenWrt from the TV box. | +| [NewbieOrange](https://github.com/NewbieOrange) | 01. [2021-11-14] He provided the [meson-gxm-t95z-plus.dtb](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/common-files/patches/amlogic-dtb/meson-gxm-t95z-plus.dtb) file and [usage method](build-armbian/common-files/patches/boot/s912-t95z-plus) of the new device [T95Z-Plus](https://www.tokopedia.com/search?st=product&q=t95z%20plus) in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/22#issuecomment-968260448); Shared the `meson-gxl-s905l2-p281.dtb` file of s905l2 (p281 board) in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/29). Now called [meson-gxl-s905l2-x7-5g.dtb](build-armbian/common-files/patches/amlogic-dtb/meson-gxl-s905l2-x7-5g.dtb) | | [pulpoff](https://github.com/pulpoff) | 02. [2021-11-24] He shared how to adjust [dtb freq](https://github.com/armbian/build/commit/d0831a7ce191759011d8a0f23019acebc2348149) and add new [display resolution](https://github.com/tobetter/linux/commit/248da29964751908c36e2c5558385ec09aed87ad) in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/31#issuecomment-974982500), and provided test firmware [download](https://vp5.net/king/); In [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/36), the test method for `supporting sound` is shared; In [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/34), the test method for `enabling Bluetooth` is shared. | | [flymike](https://github.com/flymike) | 03. [2021-12-28] He shared the available `meson-gxbb-vega-s95-telos.dtb` and `u-boot-s905.bin` of the `Beelink-Mini-MX 2G` `s905` box in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/57) | | [martinlanger90](https://github.com/martinlanger90) | 04. [2022-01-01] He tested and shared the `MECOOL-KI-Pro 2G/16G` `s905d` box using armbian system in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/59). The available dtb is `meson-gxl-s905d-mecool-ki-pro.dtb`, u-boot is `u-boot-p201.bin`, and it can be used in `5.4`, `5.10`, and `5.15` kernels. | @@ -20,4 +20,6 @@ The `kernel` / `u-boot` and other resources used by this system are mainly copie | [darkliang](https://github.com/darkliang) | 10. [2022-02-18] He submitted support for `Khadas-VIM3` box with SoC `A311D` in [Pull](https://github.com/ophub/amlogic-s9xxx-openwrt/pull/210), provided mainline U-BOOT file(`khadas-vim3-u-boot.sd.bin`) and configuration information. After his feedback, this box supports writing to `eMMC` and supports `5.4.y` and `5.10.y` kernels. | | [atsdai](https://github.com/atsdai) | 11. [2022-03-01] He feedback the `Beelink-Mini-MX-2G` RTL8211F Ethernet TX fix in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/127). Now [unifreq](https://github.com/unifreq) has added this scheme to the default kernel ([5.4](https://github.com/unifreq/linux-5.4.y/commit/456817db17ec67621d347963e2100a331b5a089d) / [5.10](https://github.com/unifreq/linux-5.10.y/commit/86fb0e941db620ff8851ec95100d414dc95f13ad) / [5.15](https://github.com/unifreq/linux-5.15.y/commit/c4d36d65651570e0ef2d00541e3b9058f2182e93) / [5.16](https://github.com/unifreq/linux-5.16.y/commit/2cc6ab2ced2221235e39ef33e83b62b55bc3b28b) have been added), the name is: `meson-gxbb-beelink-mini-mx.dtb` | | [Calmact](https://github.com/Calmact/e900v22c) | 12. [2022-03-02] He shared the solution of using Armbian system in `Skyworth E900V22C/D` device in [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pull/129). After testing, the kernel 5.15 support `booting from USB` for use, support `100M wired network`, no wireless and Bluetooth. He plans to provide more support for this device, you can check the latest progress in his warehouse. | - +| [danboid](https://github.com/danboid) | 13. [2022-03-09] He shared the `openvfd LED display driver and related resources` in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/143). After debugging and sharing by [unifreq](https://github.com/unifreq), it is now [supported](https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/build-armbian/common-files/files/usr/share/openvfd) to be used in six devices through the [armbian-led](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/common-files/files/usr/sbin/armbian-led) command. | +| [parkjw0117](https://github.com/parkjw0117) | 14. [2022-03-12] After his test in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/158), in the `Mecool-M8S-PRO-L` `s912` box, the combination of `meson-gxm-q201.dtb` and `u-boot-s905x-s912.bin` can be used normally, supporting the `5.4/5.10 kernel`. The wired network is normal. Wireless and Bluetooth are not available. | +| [lx7741](https://github.com/lx7741) | 15. [2022-03-23] After his test in [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues/192), in the `X96 Air` `s905x3` box, the `x96air.conf` can be used normally. Same configuration as x96max.conf | diff --git a/README.cn.md b/README.cn.md index 56da0c0b9a..40f483815e 100644 --- a/README.cn.md +++ b/README.cn.md @@ -4,7 +4,7 @@ [Armbian](https://www.armbian.com/) 系统是基于 Debian/Ubuntu 而构建的专门用于 ARM 芯片的轻量级 Linux 系统。Armbian 系统精益、干净,并且 100% 兼容并继承了 Debian/Ubuntu 系统的功能和丰富的软件生态,可以安全稳定地运行在 TF/SD/USB 及设备的 eMMC 里。 -现在你可以将使用 Amlogic 芯片的电视盒子的安卓 TV 系统更换为 Armbian 系统,让他成为一台功能强大的服务器。本项目为 Amlogic s9xxx 电视盒子构建 Armbian 系统。支持写入 EMMC 中使用,支持更新内核等功能。支持的 Amlogic S9xxx 系列型号有 ***`a311d, s922x, s905x3, s905x2, s905l3a, s912, s905d, s905x, s905w, s905`*** 等,例如 ***`Belink GT-King, Belink GT-King Pro, UGOOS AM6 Plus, X96-Max+, HK1-Box, H96-Max-X3, Phicomm-N1, Octopus-Planet, Fiberhome HG680P, ZTE B860H`*** 等盒子。 +现在你可以将使用 Amlogic 芯片的电视盒子的安卓 TV 系统更换为 Armbian 系统,让他成为一台功能强大的服务器。本项目为 Amlogic s9xxx 电视盒子构建 Armbian 系统。支持写入 EMMC 中使用,支持更新内核等功能。支持的 Amlogic S9xxx 系列型号有 ***`a311d, s922x, s905x3, s905x2, s905l3a, s912, s905d, s905x, s905w, s905`*** 等,例如 ***`Belink GT-King, Belink GT-King Pro, UGOOS AM6 Plus, X96-Max+, HK1-Box, H96-Max-X3, Phicomm-N1, Octopus-Planet, Fiberhome HG680P, ZTE B860H`*** 等盒子。使用方法详见[Armbian 使用文档](build-armbian/armbian-docs)。 最新的 Armbian 固件可以在 [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) 中下载。欢迎 `Fork` 并进行个性化定制。如果对你有用,可以点仓库右上角的 `Star` 表示支持。 @@ -14,16 +14,16 @@ | ---- | ---- | ---- | ---- | | a311d | [Khadas-VIM3](https://www.gearbest.com/boards---shields/pp_3008145189226460.html) | 全部 | armbian_aml_a311d_*.img | | s922x | [Beelink-GT-King](https://tokopedia.link/RAgZmOM41db), [Beelink-GT-King-Pro](https://www.gearbest.com/tv-box/pp_3008857542462482.html), [Ugoos-AM6-Plus](https://tokopedia.link/pHGKXuV41db), [ODROID-N2](https://www.tokopedia.com/search?st=product&q=ODROID-N2) | 全部 | armbian_aml_s922x_*.img | -| s905x3 | [X96-Max+](https://tokopedia.link/uMaH09s41db), [HK1-Box](https://tokopedia.link/xhWeQgTuwfb), [H96-Max-X3](https://tokopedia.link/KuWvwoYuwfb), [Ugoos-X3](https://tokopedia.link/duoIXZpdGgb), [X96-Air](https://www.gearbest.com/tv-box/pp_3002885621272175.html), [A95XF3-Air](https://tokopedia.link/ByBL45jdGgb) | 全部 | armbian_aml_s905x3_*.img | +| s905x3 | [X96-Max+](https://tokopedia.link/uMaH09s41db), [HK1-Box](https://tokopedia.link/xhWeQgTuwfb), [H96-Max-X3](https://tokopedia.link/KuWvwoYuwfb), [Ugoos-X3](https://tokopedia.link/duoIXZpdGgb), [TX3](https://www.aliexpress.com/item/1005003772717802.html), [X96-Air](https://www.gearbest.com/tv-box/pp_3002885621272175.html), [A95XF3-Air](https://tokopedia.link/ByBL45jdGgb) | 全部 | armbian_aml_s905x3_*.img | | s905x2 | [X96Max-4G](https://tokopedia.link/HcfLaRzjqeb), [X96Max-2G](https://tokopedia.link/HcfLaRzjqeb), [MECOOL-KM3-4G](https://www.gearbest.com/tv-box/pp_3008133484979616.html) | 全部 | armbian_aml_s905x2_*.img | | s905l3a | [E900V22C/D](https://github.com/Calmact/e900v22c) | 全部 | armbian_aml_s905l3a_*.img | -| s912 | [H96-Pro-Plus](https://www.gearbest.com/tv-box-mini-pc/pp_503486.html), [Tanix-TX92](http://www.tanix-box.com/project-view/tanix-tx92-android-tv-box-powered-amlogic-s912/), [VORKE-Z6-Plus](http://www.vorke.com/project/vorke-z6-2/), [T95Z-Plus](https://www.tokopedia.com/search?st=product&q=t95z%20plus), Octopus-Planet | 全部 | armbian_aml_s912_*.img | +| s912 | [H96-Pro-Plus](https://www.gearbest.com/tv-box-mini-pc/pp_503486.html), [Tanix-TX92](http://www.tanix-box.com/project-view/tanix-tx92-android-tv-box-powered-amlogic-s912/), [VORKE-Z6-Plus](http://www.vorke.com/project/vorke-z6-2/), [Mecool-M8S-PRO-L](https://www.gearbest.com/tv-box/pp_3005746210753315.html), Octopus-Planet | 全部 | armbian_aml_s912_*.img | | s905d | [MECOOL-KI-Pro](https://www.gearbest.com/tv-box-mini-pc/pp_629409.html), Phicomm-N1 | 全部 | armbian_aml_s905d_*.img | | s905x | [HG680P](https://tokopedia.link/HbrIbqQcGgb), [B860H](https://www.zte.com.cn/global/products/cocloud/201707261551/IP-STB/ZXV10-B860H), [TBee-Box](https://www.tbee.com/product/tbee-box/) | 全部 | armbian_aml_s905x_*.img | | s905w | [X96-Mini](https://tokopedia.link/ro207Hsjqeb), [TX3-Mini](https://www.gearbest.com/tv-box/pp_009748238474.html) | 5.4.* | armbian_aml_s905w_*.img | | s905 | [Beelink-Mini-MX-2G](https://www.gearbest.com/tv-box-mini-pc/pp_321409.html), [MXQ-Pro+4K](https://www.gearbest.com/tv-box-mini-pc/pp_354313.html) | 全部 | armbian_aml_s905_*.img | -💡提示:当前 ***`s905`*** 的盒子只能在 `TF/SD/USB` 中使用,其他型号的盒子同时支持写入 `EMMC` 中使用。当前 ***`s905w`*** 系列的盒子只支持使用 `5.4` 内核,不能使用 5.10 或更高版本,其他型号的盒子可任选内核版本使用。每个盒子的 dtb 和 u-boot 请查阅[说明](build-armbian/amlogic-u-boot/README.md)。 +💡提示:当前 ***`s905`*** 的盒子只能在 `TF/SD/USB` 中使用,其他型号的盒子同时支持写入 `EMMC` 中使用。当前 ***`s905w`*** 系列的盒子只支持使用 `5.4` 内核,不能使用 5.10 或更高版本,其他型号的盒子可任选内核版本使用。每个盒子的 dtb 和 u-boot 请查阅[说明](build-armbian/armbian-docs/config_correspondence_of_amlogic_s9xxx_tv_box.md)。 ## 安装及升级 Armbian 的相关说明 @@ -83,6 +83,16 @@ armbian-config armbian-swap 1 ``` +- ### 控制 LED 显示 + +登录 Armbian 系统 → 输入命令: + +```yaml +armbian-led +``` + +根据 [LED 屏显示控制说明](build-armbian/armbian-docs/led_screen_display_control.md) 进行调试。 + - ### 在 TF/SD/USB 中使用 Armbian 激活 TF/SD/USB 的剩余空间,请登录 Armbian 系统 → 输入命令: @@ -151,11 +161,12 @@ armbian-ddbr | 参数 | 含义 | 说明 | | ---- | ---------- | ---------- | | -d | Defaults | 使用默认配置 | -| -b | BuildSoC | 指定电视盒子型号,如 `-b s905x3` . 多个型号使用 `_` 进行连接,如 `-b s905x3_s905d` . 可以指定的型号有: `a311d`, `s905x3`, `s905x2`, `s905l3a`, `s905x`, `s905w`, `s905d`, `s905d-ki`, `s905`, `s922x`, `s922x-n2`, `s912`, `s912-t95z` 。说明:`s922x-reva` 是 `s922x-gtking-pro-rev_a`,`s922x-n2` 是 `s922x-odroid-n2` ,`s912-t95z` 是 `s912-t95z-plus` ,`s905d-ki` 是 `s912-mecool-ki-pro`,`s905x2-km3` 是 `s905x2-mecool-km3` | +| -b | BuildSoC | 指定电视盒子型号,如 `-b s905x3` . 多个型号使用 `_` 进行连接,如 `-b s905x3_s905d` . 可以指定的型号有: `a311d`, `s905x3`, `s905x2`, `s905l3a`, `s905x`, `s905w`, `s905d`, `s905d-ki`, `s905`, `s922x`, `s922x-n2`, `s912`, `s912-m8s` 。说明:`s922x-reva` 是 `s922x-gtking-pro-rev_a`,`s922x-n2` 是 `s922x-odroid-n2` ,`s912-m8s` 是 `s912-mecool-m8s-pro-l` ,`s905d-ki` 是 `s912-mecool-ki-pro`,`s905x2-km3` 是 `s905x2-mecool-km3` | | -v | Version | 指定内核 [版本分支](https://github.com/ophub/kernel/tree/main/pub) 名称,如 `-v stable` 。指定的名称须与分支目录名称相同。默认使用 `stable` 分支版本。 | | -k | Kernel | 指定 [kernel](https://github.com/ophub/kernel/tree/main/pub/stable) 名称,如 `-k 5.4.180` . 多个内核使用 `_` 进行连接,如 `-k 5.15.25_5.4.180` | | -a | AutoKernel | 设置是否自动采用同系列最新版本内核。当为 `true` 时,将自动在内核库中查找在 `-k` 中指定的内核如 5.4.180 的 5.4 同系列是否有更新的版本,如有 5.4.180 之后的最新版本时,将自动更换为最新版。设置为 `false` 时将编译指定版本内核。默认值:`true` | | -s | Size | 对固件的 ROOTFS 分区大小进行设置,默认大小为 2748M, 固件大小必须大于 2000M. 例如: `-s 2748` | +| -t | RootfsType | 对固件的 ROOTFS 分区的文件系统类型进行设置,默认为 `ext4` 类型,可选项为 `ext4` 或 `btrfs` 类型。例如: `-t btrfs` | - `sudo ./rebuild -d` : 使用默认配置,对全部型号的电视盒子进行打包。 - `sudo ./rebuild -d -b s905x3 -k 5.4.180` : 推荐使用. 使用默认配置进行相关内核打包。 @@ -165,7 +176,7 @@ armbian-ddbr - `sudo ./rebuild -d -b s905x3_s905d` 使用默认配置,对多个型号的电视盒子进行全部内核打包, 使用 `_` 进行多型号连接。 - `sudo ./rebuild -d -k 5.15.25_5.4.180` : 使用默认配置,指定多个内核,进行全部型号电视盒子进行打包, 内核包使用 `_` 进行连接。 - `sudo ./rebuild -d -k 5.15.25_5.4.180 -a true` : 使用默认配置,指定多个内核,进行全部型号电视盒子进行打包, 内核包使用 `_` 进行连接。自动升级到同系列最新内核。 -- `sudo ./rebuild -d -s 2748 -k 5.4.180` : 使用默认配置,设置固件大小为 2748M, 并指定内核为 5.4.180 ,对全部型号电视盒子进行打包。 +- `sudo ./rebuild -d -t btrfs -s 2748 -k 5.4.180` : 使用默认配置,设置文件系统为 btrfs 格式,分区大小为 2748M, 并指定内核为 5.4.180 ,对全部型号电视盒子进行打包。 - ### 本地化打包 @@ -217,6 +228,7 @@ sudo apt-get install -y $(curl -fsSL git.io/ubuntu-2004-server) | armbian_kernel | 5.15.25_5.4.180 | 设置内核 [版本](https://github.com/ophub/kernel/tree/main/pub/stable),功能参考 `-k` | | auto_kernel | true | 设置是否自动采用同系列最新版本内核,功能参考 `-a` | | armbian_size | 2748 | 设置固件 ROOTFS 分区的大小,功能参考 `-s` | +| armbian_fstype | ext4 | 设置固件 ROOTFS 分区的文件系统类型,功能参考 `-t` | - GitHub Actions 输出变量说明 diff --git a/README.md b/README.md index 10ee436cc8..db39b54f7d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ View Chinese description | [查看中文说明](README.cn.md) The [Armbian](https://www.armbian.com/) system is a lightweight Linux system based on Debian/Ubuntu built specifically for ARM chips. The Armbian system is lean, clean, and 100% compatible and inherits the functions and rich software ecosystem of the Debian/Ubuntu system. It can run safely and stably in TF/SD/USB and the eMMC of the device. -Now you can replace the Android TV system of the TV box with the Amlogic chip with the Armbian system, making it a powerful server. This project builds Armbian system for Amlogic s9xxx TV box. including install to EMMC and update related functions. Support Amlogic s9xxx tv box are ***`a311d, s922x, s905x3, s905x2, s905l3a, s912, s905d, s905x, s905w, s905`***, etc. such as ***`Belink GT-King, Belink GT-King Pro, UGOOS AM6 Plus, X96-Max+, HK1-Box, H96-Max-X3, Phicomm-N1, Octopus-Planet, Fiberhome HG680P, ZTE B860H`***, etc. +Now you can replace the Android TV system of the TV box with the Amlogic chip with the Armbian system, making it a powerful server. This project builds Armbian system for Amlogic s9xxx TV box. including install to EMMC and update related functions. Support Amlogic s9xxx tv box are ***`a311d, s922x, s905x3, s905x2, s905l3a, s912, s905d, s905x, s905w, s905`***, etc. such as ***`Belink GT-King, Belink GT-King Pro, UGOOS AM6 Plus, X96-Max+, HK1-Box, H96-Max-X3, Phicomm-N1, Octopus-Planet, Fiberhome HG680P, ZTE B860H`***, etc. Please refer to the [Armbian Documentation](build-armbian/armbian-docs) for the usage method. The latest version of the Armbian firmware can be downloaded in [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases). Welcome to `Fork` and personalize it. If it is useful to you, you can click on the `Star` in the upper right corner of the warehouse to show your support. @@ -14,16 +14,16 @@ The latest version of the Armbian firmware can be downloaded in [Releases](https | ---- | ---- | ---- | ---- | | a311d | [Khadas-VIM3](https://www.gearbest.com/boards---shields/pp_3008145189226460.html) | All | armbian_aml_a311d_*.img | | s922x | [Beelink-GT-King](https://tokopedia.link/RAgZmOM41db), [Beelink-GT-King-Pro](https://www.gearbest.com/tv-box/pp_3008857542462482.html), [Ugoos-AM6-Plus](https://tokopedia.link/pHGKXuV41db), [ODROID-N2](https://www.tokopedia.com/search?st=product&q=ODROID-N2) | All | armbian_aml_s922x_*.img | -| s905x3 | [X96-Max+](https://tokopedia.link/uMaH09s41db), [HK1-Box](https://tokopedia.link/xhWeQgTuwfb), [H96-Max-X3](https://tokopedia.link/KuWvwoYuwfb), [Ugoos-X3](https://tokopedia.link/duoIXZpdGgb), [X96-Air](https://www.gearbest.com/tv-box/pp_3002885621272175.html), [A95XF3-Air](https://tokopedia.link/ByBL45jdGgb) | All | armbian_aml_s905x3_*.img | +| s905x3 | [X96-Max+](https://tokopedia.link/uMaH09s41db), [HK1-Box](https://tokopedia.link/xhWeQgTuwfb), [H96-Max-X3](https://tokopedia.link/KuWvwoYuwfb), [Ugoos-X3](https://tokopedia.link/duoIXZpdGgb), [TX3](https://www.aliexpress.com/item/1005003772717802.html), [X96-Air](https://www.gearbest.com/tv-box/pp_3002885621272175.html), [A95XF3-Air](https://tokopedia.link/ByBL45jdGgb) | All | armbian_aml_s905x3_*.img | | s905x2 | [X96Max-4G](https://tokopedia.link/HcfLaRzjqeb), [X96Max-2G](https://tokopedia.link/HcfLaRzjqeb), [MECOOL-KM3-4G](https://www.gearbest.com/tv-box/pp_3008133484979616.html) | All | armbian_aml_s905x2_*.img | | s905l3a | [E900V22C/D](https://github.com/Calmact/e900v22c) | All | armbian_aml_s905l3a_*.img | -| s912 | [H96-Pro-Plus](https://www.gearbest.com/tv-box-mini-pc/pp_503486.html), [Tanix-TX92](http://www.tanix-box.com/project-view/tanix-tx92-android-tv-box-powered-amlogic-s912/), [VORKE-Z6-Plus](http://www.vorke.com/project/vorke-z6-2/), [T95Z-Plus](https://www.tokopedia.com/search?st=product&q=t95z%20plus), Octopus-Planet | All | armbian_aml_s912_*.img | +| s912 | [H96-Pro-Plus](https://www.gearbest.com/tv-box-mini-pc/pp_503486.html), [Tanix-TX92](http://www.tanix-box.com/project-view/tanix-tx92-android-tv-box-powered-amlogic-s912/), [VORKE-Z6-Plus](http://www.vorke.com/project/vorke-z6-2/), [Mecool-M8S-PRO-L](https://www.gearbest.com/tv-box/pp_3005746210753315.html), Octopus-Planet | All | armbian_aml_s912_*.img | | s905d | [MECOOL-KI-Pro](https://www.gearbest.com/tv-box-mini-pc/pp_629409.html), Phicomm-N1 | All | armbian_aml_s905d_*.img | | s905x | [HG680P](https://tokopedia.link/HbrIbqQcGgb), [B860H](https://www.zte.com.cn/global/products/cocloud/201707261551/IP-STB/ZXV10-B860H), [TBee-Box](https://www.tbee.com/product/tbee-box/) | All | armbian_aml_s905x_*.img | | s905w | [X96-Mini](https://tokopedia.link/ro207Hsjqeb), [TX3-Mini](https://www.gearbest.com/tv-box/pp_009748238474.html) | 5.4.* | armbian_aml_s905w_*.img | | s905 | [Beelink-Mini-MX-2G](https://www.gearbest.com/tv-box-mini-pc/pp_321409.html), [MXQ-Pro+4K](https://www.gearbest.com/tv-box-mini-pc/pp_354313.html) | All | armbian_aml_s905_*.img | -💡Tip: The current box of ***`s905`*** can only be used in `TF/SD/USB`, and other types of boxes can also be used in `EMMC` at the same time. The ***`s905w`*** boxs currently only support `5.4` kernels, Cannot use kernel version 5.10 and above, Other devices can be freely selected. Please refer to the [instructions](build-armbian/amlogic-u-boot/README.md) for dtb and u-boot of each device. +💡Tip: The current box of ***`s905`*** can only be used in `TF/SD/USB`, and other types of boxes can also be used in `EMMC` at the same time. The ***`s905w`*** boxs currently only support `5.4` kernels, Cannot use kernel version 5.10 and above, Other devices can be freely selected. Please refer to the [instructions](build-armbian/armbian-docs/config_correspondence_of_amlogic_s9xxx_tv_box.md) for dtb and u-boot of each device. ## Install to EMMC and update instructions @@ -83,6 +83,16 @@ Login in to armbian → input command: armbian-swap 1 ``` +- ### Controlling the LED display + +Login in to armbian → input command: + +```yaml +armbian-led +``` + +Debug according to [LED screen display control instructions](build-armbian/armbian-docs/led_screen_display_control.md). + - ### Use Armbian in TF/SD/USB To activate the remaining space of TF/SD/USB, please login in to armbian → input command: @@ -151,11 +161,12 @@ According to the prompt, enter `b` to perform system backup, and enter `r` to pe | Parameter | Meaning | Description | | ------ | ---------- | ----------------------------------------- | | -d | Defaults | Compile all cores and all firmware types. | -| -b | BuildSoC | Specify the Build firmware type. Write the build firmware name individually, such as `-b s905x3` . Multiple firmware use `_` connect such as `-b s905x3_s905d` . You can use these codes: `a311d`, `s905x3`, `s905x2`, `s905l3a`, `s905x`, `s905w`, `s905d`, `s905d-ki`, `s905`, `s922x`, `s922x-n2`, `s912`, `s912-t95z` . Note: `s922x-reva` is `s922x-gtking-pro-rev_a`, `s922x-n2` is `s922x-odroid-n2`, `s912-t95z` is `s912-t95z-plus`, `s905d-ki` is `s912-mecool-ki-pro`, `s905x2-km3` is `s905x2-mecool-km3`. | +| -b | BuildSoC | Specify the Build firmware type. Write the build firmware name individually, such as `-b s905x3` . Multiple firmware use `_` connect such as `-b s905x3_s905d` . You can use these codes: `a311d`, `s905x3`, `s905x2`, `s905l3a`, `s905x`, `s905w`, `s905d`, `s905d-ki`, `s905`, `s922x`, `s922x-n2`, `s912`, `s912-m8s` . Note: `s922x-reva` is `s922x-gtking-pro-rev_a`, `s922x-n2` is `s922x-odroid-n2`, `s912-m8s` is `s912-mecool-m8s-pro-l`, `s905d-ki` is `s912-mecool-ki-pro`, `s905x2-km3` is `s905x2-mecool-km3`. | | -v | Version | Specify the [version branch](https://github.com/ophub/kernel/tree/main/pub), Such as `-v stable`. The specified name must be the same as the branch directory name. The `stable` branch version is used by default. | | -k | Kernel | Specify the [kernel version](https://github.com/ophub/kernel/tree/main/pub/stable), Such as `-k 5.4.180` . Multiple kernel use `_` connection such as `-k 5.15.25_5.4.180` | | -a | AutoKernel | Set whether to automatically adopt the latest version of the kernel of the same series. When it is `true`, it will automatically find in the kernel library whether there is an updated version of the kernel specified in `-k` such as 5.4.180 version. If there is the latest version of 5.4 same series, it will automatically Replace with the latest version. When set to `false`, the specified version of the kernel will be compiled. Default value: `true` | | -s | Size | Specify the size of the ROOTFS partition in MB. The default is 2748, and the specified size must be greater than 2000. Such as `-s 2748` | +| -t | RootfsType | Set the file system type of the ROOTFS partition of the firmware, the default is `ext4` type, and the options are `ext4` or `btrfs` type. Such as `-t btrfs` | - `sudo ./rebuild -d`: Use the default configuration to pack all boxes. - `sudo ./rebuild -d -b s905x3 -k 5.4.180`: recommend. Use the default configuration, specify a kernel and a firmware for compilation. @@ -165,7 +176,7 @@ According to the prompt, enter `b` to perform system backup, and enter `r` to pe - `sudo ./rebuild -d -b s905x3_s905d`: Use the default configuration, specify multiple firmware, use `_` to connect. compile all kernels. - `sudo ./rebuild -d -k 5.15.25_5.4.180`: Use the default configuration. Specify multiple cores, use `_` to connect. - `sudo ./rebuild -d -k 5.15.25_5.4.180 -a true`: Use the default configuration. Specify multiple cores, use `_` to connect. Auto update to the latest kernel of the same series. -- `sudo ./rebuild -d -s 2748 -k 5.4.180`: Use the default configuration and set the partition size to 2748m, and only compile the armbian firmware with the kernel version 5.4.180. +- `sudo ./rebuild -d -t btrfs -s 2748 -k 5.4.180`: Use the default configuration, set the file system to btrfs format and the partition size to 2748M, and only compile the armbian firmware with the kernel version 5.4.180. - ### Local build instructions @@ -217,6 +228,7 @@ For the related settings of GitHUB RELEASES_TOKEN, please refer to: [RELEASES_TO | armbian_kernel | 5.15.25_5.4.180 | Set kernel [version](https://github.com/ophub/kernel/tree/main/pub/stable), function reference `-k` | | auto_kernel | true | Set whether to automatically use the latest version of the same series of kernels, function reference `-a` | | armbian_size | 2748 | Set the size of the firmware ROOTFS partition, function reference `-s` | +| armbian_fstype | ext4 | Set the file system type of the firmware ROOTFS partition, function reference `-t` | - GitHub Actions Output variable description diff --git a/build-armbian/README.cn.md b/build-armbian/README.cn.md index c034437f47..8481b3e0a9 100644 --- a/build-armbian/README.cn.md +++ b/build-armbian/README.cn.md @@ -8,27 +8,27 @@ 这里存放的文件是打包 Armbian 时需要使用的相关文件。 -## amlogic-dtb - -这里收录了各种型号机顶盒使用的 .dtb 文件,当你在使用安装脚本 `armbian-install` 将 Armbian 写入 EMMC 时,当你选择 `0` 进行自选 .dtb 文件安装时,需要填写具体的 .dtb 文件名称,你可以从这里查阅准确的文件名并填写。 - ## amlogic-kernel 在 `amlogic-kernel` 目录下存放的是编译 Armbian 需要的内核文件,使用方法见 [amlogic-kernel/README.md](amlogic-kernel/README.md) ## amlogic-u-boot -当你使用 5.10 内核的 Armbian 时,需要将 overload 目录下对应的 u-boot 文件复制为 `u-boot.ext` ,在 EMMC 中使用时,需要将 u-boot 文件复制为 `u-boot.emmc` 。一些设备需要写入对应的 bootloader 文件。 +当你使用 5.10 内核的 Armbian 时,需要将 overload 目录下对应的 u-boot 文件复制为 `u-boot.ext` ,在 EMMC 中使用时,需要将 u-boot 文件复制为 `u-boot.emmc` 。一些设备需要写入对应的 bootloader 文件。这些复制工作在仓库的打包和安装/升级脚本中均已自动化完成,无需在人工复制。 -这些复制工作在仓库的打包和安装/升级脚本中均已自动化完成,无需在人工复制。各型号对应的具体文件详见 [amlogic-u-boot](amlogic-u-boot/README.md) +## armbian-docs + +这里存放的是 Armbian 使用文档。 ## common-files -- files: 这里存放的是 Armbian 固件的个性化配置文件,将在打包脚本 `sudo ./rebuild` 执行时自动将相关文件集成到你的固件里。相关目录及文件命名均须与 Armbian 中 ROOTFS 分区 ( 即在 TTYD 终端里输入: `cd / && ls .` 你所看到的目录及各目录里面的文件名称 ) 保持完全一致。 +- rootfs: 这里存放的是 Armbian 固件的个性化配置文件,将在打包脚本 `sudo ./rebuild` 执行时自动将相关文件集成到你的固件里。相关目录及文件命名均须与 Armbian 中 ROOTFS 分区 ( 即在 TTYD 终端里输入: `cd / && ls .` 你所看到的目录及各目录里面的文件名称 ) 保持完全一致。 ```yaml etc/network/interfaces usr/sbin ``` +- bootfs: 这里存放的是 Armbian 系统中 `/boot` 目录下的个性化配置文件。 + - patches: 这是补丁文件存放目录,你可以将扩展文件,补丁等放置在该目录。 diff --git a/build-armbian/README.md b/build-armbian/README.md index 6b8ee310c6..0984acf23a 100644 --- a/build-armbian/README.md +++ b/build-armbian/README.md @@ -8,28 +8,28 @@ Some files needed for compilation related to amlogic-s9xxx kernel are stored in The files stored here are related files that need to be used when packaging Armbian. -## amlogic-dtb - -For more Armbian firmware .dtb files are in the amlogic-dtb directory. When writing into EMMC through `armbian-install`, select `0`: Enter the dtb file name of your box. - ## amlogic-kernel The kernel files needed to compile Armbian are stored in the `amlogic-kernel` directory. For usage, see [amlogic-kernel/README.md](amlogic-kernel/README.md) ## amlogic-u-boot -When you use Armbian with 5.10 kernel, you need to copy the corresponding u-boot file in the overload directory as `u-boot.ext`, when using in EMMC, you need to copy the u-boot file as `u-boot.emmc ` . Some devices need to write the corresponding bootloader file. +When you use Armbian with 5.10 kernel, you need to copy the corresponding u-boot file in the overload directory as `u-boot.ext`, when using in EMMC, you need to copy the u-boot file as `u-boot.emmc ` . Some devices need to write the corresponding bootloader file. These duplications are automated in the repository's packaging and install/upgrade scripts, eliminating the need for manual duplication. -These duplications are automated in the repository's packaging and install/upgrade scripts, eliminating the need for manual duplication. For the specific files corresponding to each model, see [amlogic-u-boot](amlogic-u-boot/README.md) +## armbian-docs + +Here are the Armbian documentation. ## common-files -- files: The files in the `common-files/files` directory are custom files, which must be completely consistent with the structure and file naming and storage under the ***`ROOTFS`*** partiton in Armbian. If there are files in this directory, they will be automatically copied to the Armbian directory during `sudo ./rebuild`. E.g: +- rootfs: The files in the directory are custom files, which must be completely consistent with the structure and file naming and storage under the ***`ROOTFS`*** partiton in Armbian. If there are files in this directory, they will be automatically copied to the Armbian directory during `sudo ./rebuild`. E.g: ```yaml etc/network/interfaces usr/sbin ``` +- bootfs: This is the personalized configuration file in the `/boot` directory of the Armbian system. + - patches: This is the directory where patch files are stored. You can place extension files, patches, etc. in this directory. diff --git a/rebuild b/rebuild index 8a5d2663fc..9743cc6b35 100755 --- a/rebuild +++ b/rebuild @@ -47,7 +47,6 @@ armbian_outputpath="${make_path}/build/output/images" armbian_rebuild_file="${armbian_outputpath}/*.img" build_path="${make_path}/build-armbian" armbian_path="${build_path}/amlogic-armbian" -dtb_path="${build_path}/amlogic-dtb" kernel_path="${build_path}/amlogic-kernel" uboot_path="${build_path}/amlogic-u-boot" configfiles_path="${build_path}/common-files" @@ -56,21 +55,34 @@ tmp_outpath="${tmp_dir}/tmp_out" tmp_armbian="${tmp_dir}/tmp_armbian" tmp_build="${tmp_dir}/tmp_build" tmp_aml_image="${tmp_dir}/tmp_aml_image" -os_release_file="etc/os-release" # Get armbian ${VERSION_CODENAME}: such as [ focal ] -armbian_release_file="etc/armbian-release" # Set banner's ${BOARD_NAME}: such as [ s905x3 ] -ophub_release_file="etc/ophub-release" # Add custom armbian firmware information -build_armbian=("a311d" "s922x" "s922x-n2" "s922x-reva" "s905x3" "s905x2" "s905l3a" "s905x2-km3" "s912" "s912-t95z" "s905d" "s905d-ki" "s905x" "s905w" "s905") -# -# Latest kernel download repository +# Get armbian ${VERSION_CODENAME}: such as [ focal ] +os_release_file="etc/os-release" +# Set banner's ${BOARD_NAME}: such as [ s905x3 ] +armbian_release_file="etc/armbian-release" +# Add custom armbian firmware information +ophub_release_file="etc/ophub-release" +# Kernel files download repository kernel_repo="https://github.com/ophub/kernel/tree/main/pub" version_branch="stable" -build_kernel=("5.15.25" "5.4.180") auto_kernel="true" -# -# Set Armbian firmware size (BOOT_MB >= 256, ROOT_MB >= 2000) +build_kernel=("5.15.25" "5.4.180") +# Set supported SoC +build_armbian=( + "s922x" "s922x-n2" "s922x-reva" "a311d" + "s905x3" + "s905x2" "s905x2-km3" "s905l3a" + "s912" "s912-m8s" + "s905d" "s905d-ki" + "s905x" + "s905w" + "s905" +) +# Set Armbian firmware size (SKIP_MB >= 4, BOOT_MB >= 256, ROOT_MB >= 2000) SKIP_MB="68" BOOT_MB="256" ROOT_MB="2748" +# Set ROOTFS partition file system type, options: [ ext4 / btrfs ] +ROOTFS_TYPE="ext4" # #================================================================================== @@ -144,6 +156,14 @@ init_var() { error_msg "Invalid -s parameter [ ${2} ]!" fi ;; + -t | --rootfstype) + if [[ -n "${2}" ]]; then + ROOTFS_TYPE="${2}" + shift + else + error_msg "Invalid -t parameter [ ${2} ]!" + fi + ;; *) error_msg "Invalid option [ ${1} ]!" ;; @@ -308,8 +328,8 @@ confirm_version() { MAINLINE_UBOOT="" ANDROID_UBOOT="" ;; - s912-t95z | s912-t95z-plus) - FDTFILE="meson-gxm-t95z-plus.dtb" + s912-m8s | s912-m8s-pro) + FDTFILE="meson-gxm-q201.dtb" UBOOT_OVERLOAD="u-boot-s905x-s912.bin" MAINLINE_UBOOT="" ANDROID_UBOOT="" @@ -368,6 +388,14 @@ extract_armbian() { fi cd ${tmp_armbian} + + # Find ID in ${os_release_file}: such as [ubuntu/debian] + release_codeid="$(cat ${os_release_file} | grep -oE "^ID=.*" | cut -d"=" -f2)" + [ -z "${release_codeid}" ] && error_msg "The [ ${os_release_file}: ID ] is invalid." + # Find VERSION_CODENAME in ${os_release_file}: such as [focal/bullseye/buster] + release_codename="$(cat ${os_release_file} | grep -oE "^VERSION_CODENAME=.*" | cut -d"=" -f2)" + [ -z "${release_codename}" ] && error_msg "The [ ${os_release_file}: VERSION_CODENAME ] is invalid." + # Delete all files of /boot partition and replace it later rm -rf boot/* 2>/dev/null # Delete the kernel files and replace it later @@ -391,13 +419,11 @@ refactor_files() { cp -rf ${tmp_armbian}/* ${tag_rootfs} && sync # Unzip the relevant files - tar -xzf "${armbian_path}/boot-common.tar.gz" -C ${tag_bootfs} - tar -xzf "${armbian_path}/root-common.tar.gz" -C ${tag_rootfs} + tar -xJf "${armbian_path}/boot-common.tar.xz" -C ${tag_bootfs} + tar -xJf "${armbian_path}/firmware.tar.xz" -C ${tag_rootfs}/usr # Copy the same files of the release for ROOTFS - [[ "$(ls ${configfiles_path}/files 2>/dev/null | wc -w)" -ne "0" ]] && cp -rf ${configfiles_path}/files/* ${tag_rootfs} - # Copy the patches files - [ -f "${tag_rootfs}/usr/bin/uuidgen" ] || cp -f ${configfiles_path}/patches/rootfs/usr/bin/uuidgen ${tag_rootfs}/usr/bin + [[ "$(ls ${configfiles_path}/rootfs 2>/dev/null | wc -w)" -ne "0" ]] && cp -rf ${configfiles_path}/rootfs/* ${tag_rootfs} # Copy the bootloader files [ -d "${tag_rootfs}/usr/lib/u-boot" ] || mkdir -p ${tag_rootfs}/usr/lib/u-boot @@ -405,24 +431,6 @@ refactor_files() { # Copy the overload files cp -f ${uboot_path}/overload/* ${tag_bootfs} - # Find ID in ${os_release_file}: such as [ubuntu/debian] - release_codeid="$(cat ${tag_rootfs}/${os_release_file} | grep -oE "^ID=.*" | cut -d"=" -f2)" - [ -z "${release_codeid}" ] && error_msg "The [ ${os_release_file}: ID ] is invalid." - # Find VERSION_CODENAME in ${os_release_file}: such as [focal/bullseye/buster] - release_codename="$(cat ${tag_rootfs}/${os_release_file} | grep -oE "^VERSION_CODENAME=.*" | cut -d"=" -f2)" - [ -z "${release_codename}" ] && error_msg "The [ ${os_release_file}: VERSION_CODENAME ] is invalid." - # Copy the different files of the release for ROOTFS - diff_release_files="${configfiles_path}/release/${release_codename}" - if [[ -n "${release_codename}" && -d "${diff_release_files}" ]]; then - # Backup source - mv -f ${tag_rootfs}/etc/apt/sources.list ${tag_rootfs}/etc/apt/sources.list.bak - mv -f ${tag_rootfs}/etc/apt/sources.list.d/armbian.list ${tag_rootfs}/etc/apt/sources.list.d/armbian.list.bak - # Copy custom source - cp -rf ${diff_release_files}/* ${tag_rootfs} - fi - - sync && sleep 3 - # Replace the kernel build_boot=$(ls ${kernel_path}/${kernel}/boot-${kernel}-*.tar.gz 2>/dev/null | head -n 1) build_dtb=$(ls ${kernel_path}/${kernel}/dtb-amlogic-${kernel}-*.tar.gz 2>/dev/null | head -n 1) @@ -436,7 +444,6 @@ refactor_files() { (cd ${tag_bootfs} && cp -f uInitrd-* uInitrd && cp -f vmlinuz-* zImage && sync) # 02 For dtb files - cp -rf ${dtb_path}/* ${tag_bootfs}/dtb/amlogic && sync tar -xzf ${build_dtb} -C ${tag_bootfs}/dtb/amlogic && sync # 03 For usr/lib/modules/* @@ -447,6 +454,15 @@ refactor_files() { # 04 For header files, usr/local/include tar -xzf ${build_header} -C ${tag_rootfs}/usr/local && sync + # Set the type of file system + if [[ "${ROOTFS_TYPE}" == "btrfs" ]]; then + uenv_mount_string="UUID=${ROOTFS_UUID} rootflags=compress=zstd:6 rootfstype=btrfs" + fstab_mount_string="defaults,noatime,compress=zstd:6" + else + uenv_mount_string="UUID=${ROOTFS_UUID} rootflags=data=writeback rw rootfstype=ext4" + fstab_mount_string="defaults,noatime,errors=remount-ro" + fi + # Processing partition files: bootfs cd ${tag_bootfs} @@ -461,12 +477,11 @@ refactor_files() { fi # Edit the uEnv.txt - [ -f "uEnv.txt" ] || error_msg "The uEnv.txt File does not exist." - sed -i "s|LABEL=ROOTFS|UUID=${ROOTFS_UUID}|g" uEnv.txt - sed -i "s|meson.*.dtb|${FDTFILE}|g" uEnv.txt - - # For s912-t95z-plus /boot/extlinux/extlinux.conf - [ "${FDTFILE}" == "meson-gxm-t95z-plus.dtb" ] && cp -rf ${configfiles_path}/patches/boot/s912-t95z-plus/* . && sync + boot_conf_file="uEnv.txt" + cp -f ${configfiles_path}/bootfs/${boot_conf_file} . + [ -f "${boot_conf_file}" ] || error_msg "The [ ${boot_conf_file} ] file does not exist." + sed -i "s|LABEL=ROOTFS|${uenv_mount_string}|g" ${boot_conf_file} + sed -i "s|meson.*.dtb|${FDTFILE}|g" ${boot_conf_file} # Processing partition files: rootfs cd ${tag_rootfs} @@ -516,17 +531,22 @@ refactor_files() { # Edit the etc/fstab [ -f "etc/fstab" ] || error_msg "The etc/fstab File does not exist." - sed -i "s|LABEL=ROOTFS|UUID=${ROOTFS_UUID}|g" etc/fstab + sed -i '/LABEL=ROOTFS/d' etc/fstab 2>/dev/null + echo "UUID=${ROOTFS_UUID} / ${ROOTFS_TYPE} ${fstab_mount_string} 0 0" >>etc/fstab # Custom banner name sed -i "s|BOARD_NAME=.*|BOARD_NAME=\"Aml ${soc}\"|g" ${armbian_release_file} 2>/dev/null - # Make the .bashrc take effect - echo '[ -f "${HOME}/.bashrc" ] && . ${HOME}/.bashrc' >>etc/profile + # Make the .bashrc take effect, Default shell settings file: /etc/default/useradd + echo '[[ "${SHELL}" == *bash && -f "${HOME}/.bashrc" ]] && . ${HOME}/.bashrc' >>etc/profile + + # Reduce network latency [ A start job is running for raise network interfaces (5 mins 1 sec) ] + network_service="usr/lib/systemd/system/networking.service" + sed -i "s|TimeoutStartSec=.*|TimeoutStartSec=10sec|g" ${network_service} 2>/dev/null # Add tasks that need to be executed on initial startup armbian_firstrun="usr/lib/armbian/armbian-firstrun" - sed -i '/armbian-release/i\sudo apt-get -qq purge -y linux-image-current-meson64' ${armbian_firstrun} 2>/dev/null + sed -i '/armbian-release/i\[ -f "/usr/sbin/armbian-fix" ] && . /usr/sbin/armbian-fix' ${armbian_firstrun} 2>/dev/null # Get random macaddr mac_hexchars="0123456789ABCDEF" @@ -575,15 +595,18 @@ make_image() { parted -s ${build_image_file} mklabel msdos 2>/dev/null parted -s ${build_image_file} mkpart primary fat32 $((SKIP_MB))M $((SKIP_MB + BOOT_MB - 1))M 2>/dev/null - parted -s ${build_image_file} mkpart primary ext4 $((SKIP_MB + BOOT_MB))M 100% 2>/dev/null + parted -s ${build_image_file} mkpart primary ${ROOTFS_TYPE} $((SKIP_MB + BOOT_MB))M 100% 2>/dev/null sync loop_new=$(losetup -P -f --show "${build_image_file}") [ ${loop_new} ] || error_msg "losetup ${build_image_file} failed." mkfs.vfat -n "BOOT" ${loop_new}p1 >/dev/null 2>&1 - mkfs.ext4 -F -q -U ${ROOTFS_UUID} -L "ROOTFS" -m 0 ${loop_new}p2 >/dev/null 2>&1 - sync + if [[ "${ROOTFS_TYPE}" == "btrfs" ]]; then + mkfs.btrfs -f -U ${ROOTFS_UUID} -L "ROOTFS" -m single ${loop_new}p2 >/dev/null 2>&1 + else + mkfs.ext4 -F -q -U ${ROOTFS_UUID} -L "ROOTFS" -m 0 ${loop_new}p2 >/dev/null 2>&1 + fi # Write the bootloader if [[ -n "${MAINLINE_UBOOT}" && -f "${tag_rootfs}/usr/lib/u-boot/${MAINLINE_UBOOT}" ]]; then @@ -698,7 +721,8 @@ find_armbian # Download the latest kernel [ "${auto_kernel}" == "true" ] && download_kernel echo -e "Armbian SoC List: [ $(echo ${build_armbian[*]} | tr "\n" " ") ]" -echo -e "Kernel List: [ $(echo ${build_kernel[*]} | tr "\n" " ") ] \n" +echo -e "Kernel List: [ $(echo ${build_kernel[*]} | tr "\n" " ") ]" +echo -e "ROOTFS Type: [ ${ROOTFS_TYPE} ] \n" # Loop to rebuild armbian firmware loop_rebuild #