Gigabit Ethernet の Android TV Box で linuxをインストールできそうなものを探していたところ、HDMIとUSB3はまだ使えないのですが、u-bootとmain line カーネルのサポートがあるとのことだったのでX96Q Pro Plusという機種をポチり、 パッチ類を集め armbian をインストールしたところ、殻割り・はんだ付け作業は必要なのですが、シリアルコンソールで動作確認できたので備忘録として載せておくことにしました。(2025/10/19追記:基板上のシリアルポートは2mmピッチのピンヘッダーで一般的な2.54mmピッチではありません。)
まず初めに、armbianを git clone します。
続いてメニューに対象機が選択できるようにしておきます。
続いて機種の選択を行いますが armbian のオフィシャルではないので、"Show CSC/WIP/EOS/TVB"を選択してください。すると、エクスパートモードの警告がでますので、よく読んでから"I understand and agree"を選択します。
これでようやく対象機がメニューにでてくるので(検索するには今回の場合 頭文字の x を3回ほど打つと見つけられます。)選択してOKとします。つづいてカーネルの選択なのですが、"edg Bleeding edge /latest possible (6.17) の 一択なのでOKを選択します。
次はOSの選択です。DebianとUbuntuの各バージョンが選択できるので好きなのを選んでOKをエンターしてください。すると"Image with console interface (server)"か"Image with desktop environment"が選択できるのですが、今回の場合だとシリアルコンソールしか使えないので、前者を選びます。
続いて"starndard image with console interface"か"Minimal image with console interface"のいずれかを選択してください。
このあとビルドが始まりますが、途中でカーネルソースがないのでgitするか訪ねてくるのでなにかキーをおしてください。
1. / を押して "rtl8192eu" をサーチを該当のb番号を入力し該当メニューへジャンプします。
2. 以下のようにモジュールの設定になっているのを非選択(Nを入力するかスペースキーでトグル)の状態にしてください。
今回は以上です。それでは。
2025/09/26追記:ストックファームウェアは こちらにあります。
2025/10/14追記:イーサネットが起動しない不具合を修正しました。下記のコマンドを実行すると output/debs 以下に dtb のパッケージが新規にできるので時刻でdebファイルを確認しMicroSDカードにコピーして起動後 dpkg -i 対象のdeb とし今一度再起動してください。
まず初めに、armbianを git clone します。
sudo mkdir -p /usr/src/armbian cd /usr/src/armbian sudo chown YourID . git clone https://github.com/armbian/build build-h728クローンしただけの状態だとパッチ類はなにも含まれていないので、パッチを適用できるようにしておきます。以下差分です。
cat > update-sun55iw3.conf-to-kernel-v6.17-rc3.patch <<'EOF'
--- a/config/sources/families/sun55iw3.conf 2025-09-16 19:37:17.079930911 +0900
+++ b/config/sources/families/sun55iw3.conf 2025-09-16 19:42:18.820215530 +0900
@@ -25,8 +25,8 @@
case "${BRANCH}" in
edge)
- declare -g KERNEL_MAJOR_MINOR="6.16" # Major and minor versions of this kernel.
- declare -g KERNELBRANCH="tag:v6.16"
+ declare -g KERNEL_MAJOR_MINOR="6.17" # Major and minor versions of this kernel.
+ declare -g KERNELBRANCH="tag:v6.17-rc3"
declare -g KERNELPATCHDIR="archive/sunxi-dev-${KERNEL_MAJOR_MINOR}"
;;
esac
EOF
patch -p1 < update-sun55iw3.conf-to-kernel-v6.17-rc3.patch
続いてパッチ類をコピーしておきます。パッチ類はこちらからダウンロードしました。画面右上の”コードボタン”をクリックして、"ソースコードをダウンロード"以下からダウンロードできます。
mkdir -p /usr/src/armbian/build-h728/patch/kernel/archive/sunxi-dev-6.17 cd /usr/src/armbian/build-h728/patch/kernel/archive/sunxi-dev-6.17 # ダウンロードし解凍したパッチ類をコピー cp -a ~/patches/????-*.patch .2025/10/14追記:イーサネットの不具合を修正するパッチについて、本稿下部に追記しました。
続いてメニューに対象機が選択できるようにしておきます。
cd /usr/src/armbian/build-h728
cat > config/boards/x96q-pro-plus.tvb <<'EOF'
# Allwinner H728 TVBox with 2 or 4 GB of RAM and EMMC
BOARD_NAME="x96q pro plus"
BOARDFAMILY="sun55iw3"
BOARD_MAINTAINER=""
BOOTCONFIG="x96q_pro_plus_defconfig"
OVERLAY_PREFIX="sun55i-a527"
BOOT_LOGO="desktop"
KERNEL_TARGET="edge"
function post_family_tweaks__x96q-pro-plus() {
display_alert "Applying wifi firmware"
pushd "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800D80" "aic8800_sdio" # use armbian-firmware
popd
}
EOF
これで準備はOKですのでビルドします。
./compile.shメニューが出てきますので、カーネルのコンフィグを変える場合は、"Show a kernel configuration menu before compilation"を選択してください。とりあえずそのままビルドする場合は、"Do not change the kernel configuration" を選択してください。今回はビルドエラーを避けるために前者を選択します。
続いて機種の選択を行いますが armbian のオフィシャルではないので、"Show CSC/WIP/EOS/TVB"を選択してください。すると、エクスパートモードの警告がでますので、よく読んでから"I understand and agree"を選択します。
これでようやく対象機がメニューにでてくるので(検索するには今回の場合 頭文字の x を3回ほど打つと見つけられます。)選択してOKとします。つづいてカーネルの選択なのですが、"edg Bleeding edge /latest possible (6.17) の 一択なのでOKを選択します。
次はOSの選択です。DebianとUbuntuの各バージョンが選択できるので好きなのを選んでOKをエンターしてください。すると"Image with console interface (server)"か"Image with desktop environment"が選択できるのですが、今回の場合だとシリアルコンソールしか使えないので、前者を選びます。
続いて"starndard image with console interface"か"Minimal image with console interface"のいずれかを選択してください。
このあとビルドが始まりますが、途中でカーネルソースがないのでgitするか訪ねてくるのでなにかキーをおしてください。
[🚸] Warning: no Kernel bare tree exists for version 6.17 - about to start downloading. [🌿] Armbian is going to use a 'full' git tree, which is around [ 2700MiB ] [🌿] This was decided due to [ fast storage device (/dev/sde1) and enough disk space (371052 MiB) ] [🌱] Benefits of using a 'full' git tree [ more useful over time, full history, single tree across all versions ] [🚸] Cons of using a 'full' git tree [ bigger download, more disk space consumed ] [🚸] You can abort now, and pass either KERNEL_GIT=full or KERNEL_GIT=shallow to force. [🚸] If you want to abort [ press Ctrl+C before the countdown ends in 60 seconds ] [🌿] If you agree with the decision to use a 'full' git tree [ press any other key to continue ] Counting down: 59... 58... 57... 56... 55... 54... 53... 52... 51... 50... 49... 48... 47... 46... 45... 44... 43... 42... 41... 40... 39... 38... 37... 36... 35... 34... 33... 32... 31... 30... 29... 28... 27... 26... 25... 24... [🌱] User pressed a key, continuing faster... [🌱] Preparing bare kernel git tree [ this might take a long time ]このあとカーネルのコンフィグ設定画面がでるはずなので、今回はビルドエラーを避けるため以下のようにします。
1. / を押して "rtl8192eu" をサーチを該当のb番号を入力し該当メニューへジャンプします。
2. 以下のようにモジュールの設定になっているのを非選択(Nを入力するかスペースキーでトグル)の状態にしてください。
│ │ <M> Realtek 8821C USB WiFi │ │ │ │ <M> Realtek 88XXau USB WiFi │ │ │ │ <M> Realtek 8192E USB WiFi │ │ │ │ <M> Realtek 8189F SDIO WiFi │ │ │ │ <M> Realtek 8189E SDIO WiFiコンフィグが済むとコンパイルなどが行われますので、イメージの作成が完了するまでしばらく待ってください。(初回だと20C40Tの機材では、ソースの取得も含まれるので30分ほどかかりました。)イメージの作成が終了すると output/images以下に作成されるのでdd等で Micro SD カードに書き込みしてください。
$ ls output/images Armbian-unofficial_25.11.0-trunk_X96q-pro-plus_trixie_edge_6.17.0-rc3_minimal.img sudo su cd output/images dd if=Armbian-unofficial_25.11.0-trunk_X96q-pro-plus_trixie_edge_6.17.0-rc3_minimal.img of=/dev/sdx # usbカードリーダを使っている場合書き込んだら対象機のスロットに挿入して起動します。イーサネットを接続して起動に成功したら以下のようになるはずです。
Welcome to Armbian-unofficial!
Documentation: https://docs.armbian.com/ | Community support: https://community.armbian.com/
IP address: 10.1.1.238
Create root password:
-- snip
_ _ _ __ __ _ _ _
/_\ _ _ _ __ | |__(_)__ _ _ _ ___ _ _ _ _ ___ / _|/ _(_)__(_)__ _| |
/ _ \| '_| ' \| '_ \ / _` | ' \___| || | ' \/ _ \ _| _| / _| / _` | |
/_/ \_\_| |_|_|_|_.__/_\__,_|_||_| \_,_|_||_\___/_| |_| |_\__|_\__,_|_|
v25.11 rolling for x96q pro plus running Armbian Linux 6.17.0-rc3-edge-sun55iw3
Packages: Debian stable (trixie)
Updates: Kernel upgrade enabled and 5 packages available for upgrade
Support: DIY (custom image)
IPv4: (LAN) 10.1.1.238 (WAN) xxx.xxx.xxx.xxx
IPv6: 2001:aaaa:bbbb:cccc:0:eeee:ffff:e5c5 (WAN) 2001:aaaa:bbbb:cccc:dddd:eeee:ffff:f520
Performance:
Load: 5% Uptime: 3 min
Memory usage: 3% of 3.83G
CPU temp: 46°C Usage of /: 16% of 7.0G
Commands:
Configuration : armbian-config
Upgrade : armbian-upgrade
Monitoring : htop
root@x96q-pro-plus:~#
一応 emmc の読み書きもできるので注意して作業を続けてください。筆者の場合、アンドロイドTVボックスとしても使いたいのでemmcはいじっていません。なおケースを開けると当然ながら保証対象外になるので注意してください。今回は以上です。それでは。
2025/09/26追記:ストックファームウェアは こちらにあります。
2025/10/14追記:イーサネットが起動しない不具合を修正しました。下記のコマンドを実行すると output/debs 以下に dtb のパッケージが新規にできるので時刻でdebファイルを確認しMicroSDカードにコピーして起動後 dpkg -i 対象のdeb とし今一度再起動してください。
cat > patch/kernel/archive/sunxi-dev-6.17/9999-x96qpro+-dts-ethernet-fix.patch <<EOF
--- a/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts 2025-10-14 00:29:42.939365386 +0900
+++ b/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts 2025-10-14 08:28:20.151587144 +0900
@@ -100,7 +100,7 @@
&mdio1 {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
- reg = <1>;
+ reg = <0>;
reset-gpios = <&pio 9 16 GPIO_ACTIVE_LOW>;
reset-assert-us = <10000>;
reset-deassert-us = <150000>;
EOF
./compile.sh BOARD=x96q-pro-plus KERNEL_MAJOR_MINOR=6.17 BRANCH=edge kernel
コメント
コメントを投稿