電源の USB-C の上にある BOOT ボタンを押しながら、USB-C を PC の USB-C に接続すれば T-HEAD USB download gadget として認識されるはずです。
自分は PC に Ubuntu/ThinkPad を使っているので dmesglsusb は次のようになります。
$ sudo dmesg | tail -5
[ 2827.718195] usb 6-1: new high-speed USB device number 4 using xhci_hcd
[ 2827.882776] usb 6-1: New USB device found, idVendor=2345, idProduct=7654, bcdDevice= 2.23
[ 2827.882787] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2827.882791] usb 6-1: Product: USB download gadget
[ 2827.882794] usb 6-1: Manufacturer: T-HEAD
$ lsusb | grep 2345
Bus 006 Device 004: ID 2345:7654 T-HEAD USB download gadget
Windows の方は先程のダウンロード先にドライバーと fastboot バイナリーがあります。
認識できたらアーカイブ内の burn_gnome_gpu.sh を実行すれば OK です。イメージ同梱の fastboot コマンドは Linux バイナリで、burn_gnome_gpu.sh もシェルスクリプトなので、Windows の方も WSL2 の Ubuntu でやったほうが簡単かもしれません。ドライバーも入れる必要がありません(認識のさせ方を記事の最後の「関連」に記載しておきます)
$ sudo dmesg | tail -20
[23502.628598] usb 6-1: new high-speed USB device number 4 using xhci_hcd
[23502.793534] usb 6-1: New USB device found, idVendor=2345, idProduct=7654, bcdDevice= 2.23
[23502.793545] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[23502.793549] usb 6-1: Product: USB download gadget
[23502.793552] usb 6-1: Manufacturer: T-HEAD
[23546.038600] usb 6-1: USB disconnect, device number 4
# ここで書き込み終了
[23547.584600] usb 6-1: new high-speed USB device number 5 using xhci_hcd
[23547.749402] usb 6-1: New USB device found, idVendor=1234, idProduct=8888, bcdDevice= 2.23
[23547.749415] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[23547.749419] usb 6-1: Product: USB download gadget
[23547.749422] usb 6-1: Manufacturer: U-Boot-THEAD
$ lsusb | grep 1234
Bus 006 Device 005: ID 1234:8888 Brain Actuated Technologies USB download gadget
起動
イメージが焼けたら HDMI をしっかり接続して USB-C 電源に接続すれば、ファンが始動し始め GUI が表示されると思います。ちなみにうちの 2560 x 1440 HDMI モニターだとログイン GDM から 2560 x 480 みたいな解像度で起動しました。w
$ cat /etc/debian_version
12.0
$ uname -a
Linux lpi4a 5.10.113-gbb4691fe5572 #1 SMP PREEMPT Wed May 10 14:16:50 UTC 2023 riscv64 GNU/Linux
$ arch
riscv64
$ cat /proc/cpuinfo | grep -e 'isa' -e 'freq'
isa : rv64imafdcvsu
cpu-freq : 1.848Ghz
isa : rv64imafdcvsu
cpu-freq : 1.848Ghz
isa : rv64imafdcvsu
cpu-freq : 1.848Ghz
isa : rv64imafdcvsu
cpu-freq : 1.848Ghz
echo "sipeed ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/users
あとこれは趣味ですが、デフォルトエディタを vim にしています。
$ sudo update-alternatives --config editor
There are 3 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
0 /bin/nano 40 auto mode
1 /bin/nano 40 manual mode
* 2 /usr/bin/vim.basic 30 manual mode
3 /usr/bin/vim.tiny 15 manual mode
Press <enter> to keep the current choice[*], or type selection number:
$ sudo apt install pkg-config libfontconfig-dev
$ time cargo install --target-dir /mnt/ssd/home/sipeed/tmp alacritty
...(snip)..
Installed package `alacritty v0.12.0` (executable `alacritty`)
real 16m22.428s
user 60m41.044s
sys 1m26.451s
起動ですが(予想はしていましたが)恐らく GPU ドライバーが未完成のため(GPU のせいでなくてフォントが描けてなさそう)真っ黒画面でした。コマンドを打つとカーソルは動いているのが見えるので動作はしていそうです。(スクリーンショット右下で CPU が MAX になっているのは偶然です)
Zellij
ターミナルマルチプレクサ・ワークスペースである Zellij のビルド。こちらも Rust 製。
$ time cargo install --target-dir /mnt/ssd/home/sipeed/tmp zellij
real 51m20.308s
user 127m50.878s
sys 2m56.126s
$ zellij
Error occurred in server:
× Thread 'async-std/runtime' panicked.
├─▶ At /home/sipeed/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-cranelift-2.3.0/src/config.rs:73:45
╰─▶ construct Cranelift ISA for triple: Unsupported
$ git colne https://github.com/smasher164/pw-volume.git
$ cd pw-volume
$ cargo build --release
$ target/release/pw-volume --help
pw-volume
Basic interface to PipeWire volume controls
USAGE:
pw-volume <SUBCOMMAND>
OPTIONS:
-h, --help Prints help information
SUBCOMMANDS:
change adjusts volume by decimal percentage, e.g. '+1%', '-0.5%'
mute mutes audio [possible values: on, off, toggle]
status get volume and mute information
$ cp -p target/release/pw-volume ~/.local/bin/
$ pw-volume status
{"percentage":6, "tooltip":"6.3997%"}
$ sudo apt install vulkan-tools
$ vulkaninfo
ERROR: [Loader Message] Code 0 : vkCreateInstance: Found no drivers!
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
ERROR at ./vulkaninfo/vulkaninfo.h:674:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER
$ sudo systemctl status pvrsrvkm.service
× pvrsrvkm.service - Imagination GPU BXM-4-64 driver init Service.
Loaded: loaded (/etc/systemd/system/pvrsrvkm.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-05-26 14:50:32 UTC; 1 day 23h ago
Duration: 192ms
Process: 385 ExecStart=sh usr/share/gpu/insmod.sh (code=exited, status=1/FAILURE)
Main PID: 385 (code=exited, status=1/FAILURE)
CPU: 171ms
May 26 14:50:32 lpi4a systemd[1]: Started pvrsrvkm.service - Imagination GPU BXM-4-64 driver init Service..
May 26 14:50:32 lpi4a sh[387]: insmod: ERROR: could not insert module /lib/modules/5.10.113-gbb4691fe5572/extra/pvrsrvkm.ko: File exists
May 26 14:50:32 lpi4a systemd[1]: pvrsrvkm.service: Main process exited, code=exited, status=1/FAILURE
May 26 14:50:32 lpi4a systemd[1]: pvrsrvkm.service: Failed with result 'exit-code'.
$ ls -alF /lib/firmware/rgx*
-rwxr-xr-x 1 debian debian 122880 May 26 14:14 /lib/firmware/rgx.fw.36.52.104.182*
-rwxr-xr-x 1 debian debian 306660 May 26 14:14 /lib/firmware/rgx.sh.36.52.104.182*
$ sudo modinfo pvrsrvkm
filename: /lib/modules/5.10.113-gbb4691fe5572/extra/pvrsrvkm.ko
license: Dual MIT/GPL
author: Imagination Technologies Ltd. <gpl-support@imgtec.com>
alias: platform:rgxthead
alias: of:N*T*Cimg,gpuC*
alias: of:N*T*Cimg,gpu
depends:
name: pvrsrvkm
vermagic: 5.10.113-gbb4691fe5572 SMP preempt mod_unload riscv
parm: gPVRDebugLevel:Sets the level of debug output (default 0x7) (uint)
sipeed@lpi4a:~/devel/riscv/debian/mame/mame-mame0255$ gdb mame core
GNU gdb (Debian 13.2-1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "riscv64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mame...
warning: Can't open file /memfd:xshmfence (deleted) during file-backed mapping note processing
[New LWP 70725]
[New LWP 70724]
[New LWP 70726]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/riscv64-linux-gnu/libthread_db.so.1".
Core was generated by `./mame -video bgfx -window'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000003fe0807522 in ?? () from /lib/libVK_IMG.so
[Current thread is 1 (Thread 0x3fe13a7060 (LWP 70725))]
(gdb)