Skip to content

Commit

Permalink
Add actions support for s922x-odroid-n2
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Oct 21, 2021
1 parent 5e0b78a commit 2590925
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-armbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
if: steps.build.outputs.status == 'success'
run: |
sudo chmod +x make
sudo ./make s922x_s905x3_s905x2_s912_s905d 5.10.70_5.4.150
sudo ./make s922x_s922x-n2_s905x3_s905x2_s912_s905d 5.10.70_5.4.150
sudo ./make s905x_s905w 5.4.150
cd ./build/output/images && sudo gzip *.img && sync
echo "FILEPATH=$PWD" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/use-releases-file-to-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
[ -s DOWNLOAD_ARMBIAN ] && wget -q -P build/output/images https://github.com/${GITHUB_REPOSITORY}/releases/download/$(cat DOWNLOAD_ARMBIAN)
cd ./build/output/images && gzip -df *.img.gz && sync && cd ../../../
sudo chmod +x make
sudo ./make s922x_s905x3_s905x2_s912_s905d 5.10.70_5.4.150
sudo ./make s922x_s922x-n2_s905x3_s905x2_s912_s905d 5.10.70_5.4.150
sudo ./make s905x_s905w 5.4.150
cd ./build/output/images && sudo gzip *.img && sync
echo "FILEPATH=$PWD" >> $GITHUB_ENV
Expand Down
45 changes: 2 additions & 43 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

| 型号 | 盒子 | [可选内核](https://github.com/ophub/flippy-kernel/tree/main/library) | Armbian 固件 |
| ---- | ---- | ---- | ---- |
| s922x | [Belink](https://tokopedia.link/RAgZmOM41db), [Belink-Pro](https://tokopedia.link/sfTHlfS41db), [Ugoos-AM6-Plus](https://tokopedia.link/pHGKXuV41db) | 全部 | armbian_aml_s922x_buster_*.img |
| s922x | [Belink](https://tokopedia.link/RAgZmOM41db), [Belink-Pro](https://tokopedia.link/sfTHlfS41db), [Ugoos-AM6-Plus](https://tokopedia.link/pHGKXuV41db), [ODROID-N2](https://www.tokopedia.com/search?st=product&q=ODROID-N2) | 全部 | armbian_aml_s922x_buster_*.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://tokopedia.link/5WHiETbdGgb), [A95XF3-Air](https://tokopedia.link/ByBL45jdGgb) | 全部 | armbian_aml_s905x3_buster_*.img |
| s905x2 | [X96Max-4G](https://tokopedia.link/HcfLaRzjqeb), [X96Max-2G](https://tokopedia.link/HcfLaRzjqeb) | 全部 | armbian_aml_s905x2_buster_*.img |
| s912 | [H96-Pro-Plus](https://tokopedia.link/jb42fsBdGgb), Octopus-Planet | 全部 | armbian_aml_s912_buster_*.img |
Expand Down Expand Up @@ -63,50 +63,9 @@ armbian-config
armbian-tf
```

<details>
<summary>或者手动分配剩余空间 </summary>

#### 查看 [操作截图](https://user-images.githubusercontent.com/68696949/137860992-fbd4e2fa-e90c-4bbb-8985-7f5db9f49927.jpg)

```yaml
# 1. 根据空间大小确认 TF/USB 的名称,TF卡为 [ mmcblk ],USB 为[ sd ]
在命令行中: 输入 [ fdisk -l | grep "sd" ] 查看卡的名称

# 2. 获取剩余空间的起始值,复制并保存,下面使用(例如:5382144)
在命令行中: 输入 [ fdisk -l | grep "sd" | sed -n '$p' | awk '{print $3}' | xargs -i expr {} + 1 ] 得到剩余空间起始值

# 3. 开始分配未使用的空间(例如:sda、mmcblk0 或 mmcblk1)
在命令行中: 输入 [ fdisk /dev/sda ] 开始分配剩余空间
在命令行中: 输入 [ n ] 创建新分区
在命令行中: 输入 [ p ] 指定分区类型为主分区
在命令行中: 将分区号设置为 [ 3 ]
在命令行中: 分区的起始值,输入第二步得到的值 [ 5382144 ]
在命令行中: 分区的结束值,按 [ 回车 ] 使用默认值
在命令行中: 如果提示是否删除签名?[Y]es/[N]o: 输入 [ Y ]
在命令行中: 输入 [ t ] 指定分区类型
在命令行中: 输入分区编号 [ 3 ]
在命令行中: 指定分区类型为 Linux,输入代码 [ 83 ]
在命令行中: 输入 [ w ] 保存结果
在命令行中: 输入 [ reboot ] 重启

# 4. 重新启动后,格式化新分区
在命令行中: 输入 [ mkfs.ext4 -F -L SHARED /dev/sda3 ] 格式新分区

# 5. 为新分区设置挂载目录
在命令行中: 输入 [ mkdir -p /mnt/share ] 创建新分区的挂载目录
在命令行中: 输入 [ mount -t ext4 /dev/sda3 /mnt/share ] 进行挂载

# 6. 添加开机自动挂载
在命令行中: [ vi /etc/fstab ]
# 按 [ i ] 进入编译模式,将下面的代码复制,黏贴到文件的末尾处
/dev/sda3 /mnt/share ext4 defaults 0 0
# 按 [ esc ] 键退出,输入 [ :wq! ] 后按 [ 回车 ] 保存退出,结束设置。
```
</details>

## Armbian 固件制作方法

- 不同的 Amlogic armbian 固件,使用对应的 soc 代码生成。 请根据你的盒子的 soc 型号进行选择。支持 `s922x``s905x3``s905x2``s912``s905d``s905x``s905w`
- 不同的 Amlogic armbian 固件,使用对应的 soc 代码生成。 请根据你的盒子的 soc 型号进行选择。支持 `s922x``s922x-n2``s905x3``s905x2``s912``s905d``s905x``s905w` 。说明:`s922x-n2``s922x-odroid-n2`

- 编译单个盒子的 Armbian 时,输入对应的 soc 型号,如 `sudo ./make s905x3`。 如果同时编译多个不同盒子时,将对应的 soc 型号使用 `_` 连接, 如 `sudo ./make s922x_s905x3`

Expand Down
46 changes: 2 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The latest version of the Armbian firmware can be downloaded in [Releases](https

| Model | STB | [Optional kernel](https://github.com/ophub/flippy-kernel/tree/main/library) | Armbian Firmware |
| ---- | ---- | ---- | ---- |
| s922x | [Belink](https://tokopedia.link/RAgZmOM41db), [Belink-Pro](https://tokopedia.link/sfTHlfS41db), [Ugoos-AM6-Plus](https://tokopedia.link/pHGKXuV41db) | All | armbian_aml_s922x_buster_*.img |
| s922x | [Belink](https://tokopedia.link/RAgZmOM41db), [Belink-Pro](https://tokopedia.link/sfTHlfS41db), [Ugoos-AM6-Plus](https://tokopedia.link/pHGKXuV41db), [ODROID-N2](https://www.tokopedia.com/search?st=product&q=ODROID-N2) | All | armbian_aml_s922x_buster_*.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://tokopedia.link/5WHiETbdGgb), [A95XF3-Air](https://tokopedia.link/ByBL45jdGgb) | All | armbian_aml_s905x3_buster_*.img |
| s905x2 | [X96Max-4G](https://tokopedia.link/HcfLaRzjqeb), [X96Max-2G](https://tokopedia.link/HcfLaRzjqeb) | All | armbian_aml_s905x2_buster_*.img |
| s912 | [H96-Pro-Plus](https://tokopedia.link/jb42fsBdGgb), Octopus-Planet | All | armbian_aml_s912_buster_*.img |
Expand Down Expand Up @@ -63,51 +63,9 @@ Login in to armbian → input command:
armbian-tf
```

<details>
<summary>Or manually allocate the remaining space</summary>

#### View [Operation screenshot](https://user-images.githubusercontent.com/68696949/137860992-fbd4e2fa-e90c-4bbb-8985-7f5db9f49927.jpg)

```yaml
# 1. Confirm the name of the TF/USB according to the size of the space. The TF is [ `mmcblk` ], USB is [ `sd` ]
Command: Enter [ fdisk -l | grep "sd" ]

# 2. Get the starting value of the remaining space, Copy and save, used below (E.g: 5382144)
Command: Enter [ fdisk -l | grep "sd" | sed -n '$p' | awk '{print $3}' | xargs -i expr {} + 1 ]

# 3. Start allocating unused space (E.g: sda, mmcblk0 or mmcblk1)
Command: Enter [ fdisk /dev/sda ] Start allocating the remaining space
Command: Select [ n ] to create a partition
Command: Select [ p ] to specify the partition type as primary partition
Command: Set the partition number to [ 3 ]
Command: The start value of the partition, enter the value obtained in the second step, E.g: [ 5382144 ]
Command: End value, press [ Enter ] to use the default value
Command: If there is a hint: Do you want to remove the signature? [Y]es/[N]o: Enter [ Y ]
Command: Enter [ t ] to specify the partition type
Command: Enter Partition number [ 3 ]
Command: Enter Hex code (type L to list all codes): [ 83 ]
Command: Enter [ w ] to save
Command: Enter [ reboot ] to restart

# 4. After restarting, format the new partition
Command: Enter [ mkfs.ext4 -F -L SHARED /dev/sda3 ] to format the new partition

# 5. Set the mount directory for the new partition
Command: Enter [ mkdir -p /mnt/share ] to Create mount directory
Command: Enter [ mount -t ext4 /dev/sda3 /mnt/share ] to Mount the newly created partition to the directory

# 6. Add automatic mount at boot
Command: Enter [ vi /etc/fstab ]
# Press [ i ] to enter the input mode, copy the following values to the end of the file
/dev/sda3 /mnt/share ext4 defaults 0 0
# Press [ esc ] to exit, Input [ :wq! ] and [ Enter ] to Save, Finish.
```
</details>


## Armbian firmware make method

- Different amlogic armbian firmware, use the corresponding soc code to generate. Please choose according to your box soc model. Supported soc are `s922x`, `s905x3`, `s905x2`, `s912`, `s905d`, `s905x`, `s905w`.
- Different amlogic armbian firmware, use the corresponding soc code to generate. Please choose according to your box soc model. Supported soc are `s922x`, `s922x-n2`, `s905x3`, `s905x2`, `s912`, `s905d`, `s905x`, `s905w`. Note: `s922x-n2` is `s922x-odroid-n2`.

- compile `a single soc` can be directly input `sudo ./make s905x3`. When `multiple soc` is compiled at the same time, please use `_` to connect multiple soc, such as `sudo ./make s922x_s905x3`

Expand Down
9 changes: 8 additions & 1 deletion make
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ tmp_aml_image=${make_path}/tmp_aml_image
kernel_library="https://github.com/ophub/flippy-kernel/tree/main/library"
#kernel_library="https://github.com/ophub/flippy-kernel/trunk/library"

build_armbian=("s922x" "s905x3" "s905x2" "s912" "s905d" "s905x" "s905w")
build_armbian=("s922x" "s922x-n2" "s905x3" "s905x2" "s912" "s905d" "s905x" "s905w")
build_kernel=("default")
change_kernel="no"
#===== Do not modify the following parameter settings, End =======
Expand Down Expand Up @@ -280,6 +280,13 @@ copy_files() {
ANDROID_UBOOT=""
AMLOGIC_SOC="s922x"
;;
s922x-n2 | odroid-n2 | n2)
FDTFILE="meson-g12b-gtking-pro-rev_a.dtb"
UBOOT_OVERLOAD="u-boot-odroid-n2.bin"
MAINLINE_UBOOT="/lib/u-boot/odroid-n2-u-boot.bin.sd.bin"
ANDROID_UBOOT=""
AMLOGIC_SOC="s922x-n2"
;;
*)
die "Have no this soc: [ ${build_soc} ]"
;;
Expand Down

0 comments on commit 2590925

Please sign in to comment.