risc-v とは |
---|
https://www.youtube.com/watch?v=8mkX4_8k9O8 |
https://www.youtube.com/watch?v=NChfRKtKdvE&t=598s |
https://www.youtube.com/watch?v=iJuSlbLR1Nk&t=260s |
インストールそのものは 次のyoutubeの step3からです
また実際の動く姿は下で、タッチスクリーンが使えます
(某店で買った安タッチペンの性能がわるく もたついてます)
残念ながら emmc
そりゃあそうだ、SSDのは以下で
マニュアルは |
---|
https://github.com/DC-DeepComputing/DC-ROMA_Pad_II_RV-P1B/blob/main/DC-ROMA_Pad_II_Manual.pdf |
あ)ubuntu-24.04-desktop-k1-pad-10814-v2.0.1-upgradecard.zip がでました、これで長足の進歩を遂げました
このabemaの動画のときの負荷は
です
DC−ROMA 示唆は
http://120.92.155.32:8082/ui/native/virtOS/k1-107/
から
ubuntu-24.04-desktop-k1-pad-10814-v2.0.1-upgradecard.zipをダウンロードします。
書き込みツールは https://etcher.balena.io/ からのものです。
dpkg -i balena-etcher_1.19.25_amd64.deb
apt --fix-broken install
dpkg -i balena-etcher_1.19.25_amd64.deb
DSD/MMCスロットのある ノートPC(マウスパソコン)でしました
最後に
gdisk して p をしないとうまく マクロSDカードに書き込めなかったです
つまり こんなふうです
# gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.10
Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
と 警告出てます
Command (? for help): p
Disk /dev/sda: 30277632 sectors, 14.4 GiB
Model: Flash Reader
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): AE526D82-2B64-4968-8DA5-A3E3F6E78B71
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 62333918
Partitions will be aligned on 256-sector boundaries
Total free space is 49113354 sectors (23.4 GiB)
Number Start (sector) End (sector) Size Code Name
1 256 767 256.0 KiB 8300 fsbl
2 768 895 64.0 KiB 8300 env
3 2048 4095 1024.0 KiB 8300 opensbi
4 4096 8191 2.0 MiB 8300 uboot
5 8192 13221938 6.3 GiB 8300 bootfs
あとは w で終わりです
なお これは arch linux で
Download/balenaEtcher-linux-x64 のフォルダで
balena-etcher
をしただけです
このあと SD カードを DC-ROMA PAD の SD カード スロットに挿入します。
PAD の電源をいれると、自動的にイメージが EMMC に書き込まれます。
まだ microSDカードを スロットにさして しばらく待つと
これでできあがりです
apt update ; apt upgarede したあとは
https://github.com/DC-DeepComputing/DC-ROMA_Pad_II_RV-P1B/issues/6
に従って
resize2fs /dev/mmcblk2p6
にて
# df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 8142052 8 8142044 1% /dev/shm
tmpfs 8142052 16 8142036 1% /tmp
tmpfs 8142052 3776 8138276 1% /run
/dev/mmcblk2p6 119212488 4457836 109800576 4% /
tmpfs 5120 12 5108 1% /run/lock
tmpfs 1628408 148 1628260 1% /run/user/1000
と /dev/mmcblk2p6 の拡張できました。
以下な状態です
# cat /etc/apt/sources.list
# Ubuntu sources have moved to the /etc/apt/sources.list.d/ubuntu.sources
# file, which uses the deb822 format. Use deb822-formatted .sources files
# to manage package sources in the /etc/apt/sources.list.d/ directory.
# See the sources.list(5) manual page for details.
--------------
# ls -l /etc/apt/sources.list.d
total 8
-rw-r--r-- 1 root root 198 Oct 26 00:38 bianbu.sources
-rw-r--r-- 1 root root 2565 Oct 26 00:38 ubuntu.sources
# cat /etc/apt/sources.list.d/bianbu.sources
Types: deb
URIs: http://archive.spacemit.com/bianbu/
Suites: noble-porting/snapshots/v2.0.1
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/bianbu-archive-keyring.gpg
# cat /etc/apt/sources.list.d/ubuntu.sources
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
## Ubuntu distribution repository
##
## The following settings can be adjusted to configure which packages to use from Ubuntu.
## Mirror your choices (except for URIs and Suites) in the security section below to
## ensure timely security updates.
##
## Types: Append deb-src to enable the fetching of source package.
## URIs: A URL to the repository (you may add multiple URLs)
## Suites: The following additional suites can be configured
## <name>-updates - Major bug fix updates produced after the final release of the
## distribution.
## <name>-backports - software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
## Components: Aside from main, the following components can be added to the list
## restricted - Software that may not be under a free license, or protected by patents.
## universe - Community maintained packages. Software in this repository receives maintenance
## from volunteers in the Ubuntu community, or a 10 year security maintenance
## commitment from Canonical when an Ubuntu Pro subscription is attached.
## multiverse - Community maintained of restricted. Software from this repository is
## ENTIRELY UNSUPPORTED by the Ubuntu team, and may not be under a free
## licence. Please satisfy yourself as to your rights to use the software.
## Also, please note that software in multiverse WILL NOT receive any
## review or updates from the Ubuntu security team.
##
## See the sources.list(5) manual page for further settings.
Types: deb
URIs: http://mirrors.ustc.edu.cn/ubuntu-ports/
Suites: noble noble-updates noble-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
## Ubuntu security updates. Aside from URIs and Suites,
## this should mirror your choices in the previous section.
Types: deb
URIs: http://mirrors.ustc.edu.cn/ubuntu-ports/
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
い) risc-v で C言語で「Hello, world!」を出力する
cat hello.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
$ gcc hello.c -o hello
$ ls -l hello
-rwxrwxr-x 1 t2 t2 8552 Nov 20 03:59 hello
$ ./hello
Hello, world!
おー、できてます
当たり前の話ですが
このrisc-vでつくったhelloは linux x86マシンでは実行できません
bash: ./hello: バイナリファイルを実行できません: 実行形式エラー |
---|
逆もそうです |
$ ls -ltr hello-*
-rwxrwxr-x 1 t2 t2 8552 Nov 20 06:51 hello-riscv
-rwxr-xr-x 1 t2 t2 15440 Nov 20 06:53 hello-x86
なので できあがったバイナリフィルはずっとrisc-vのほうが小さい (すげえ!)
う)apt install build-essential できます
# aptitude search '~i' | grep gcc
i gcc - GNU C 编译器
i A gcc-13 - GNU C compiler
i A gcc-13-base - GCC, the GNU Compiler Collection (base package)
i A gcc-13-riscv64-linux-gnu - GNU C compiler for the riscv64-linux-gnu architecture
i gcc-14-base - GCC, the GNU Compiler Collection (base package)
i A gcc-riscv64-linux-gnu - GNU C compiler for the riscv64 architecture
i A libgcc-13-dev - GCC support library (development files)
i libgcc-s1 - GCC support library
i A libuno-cppuhelpergcc3-3t64 - LibreOffice UNO runtime environment -- CPPU helper library
i A libuno-purpenvhelpergcc3-3t64 - LibreOffice UNO runtime environment -- "purpose environment" helper
i A libuno-salhelpergcc3-3t64 - LibreOffice UNO runtime environment -- SAL helpers for C++ library
# aptitude search '~i' | grep clang
i clang - C、C++ 和 Objective-C 编译器(基于 LLVM),clang 二进制文件
i A clang-18 - C, C++ and Objective-C compiler
i A libclang-common-18-dev - Clang library - Common development package
i A libclang-cpp18 - C++ interface to the Clang library
i A libclang-rt-18-dev - Compiler-rt - development package
i A libclang1-18 - C interface to the Clang library
$ cat hello.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
$ clang hello.c -o hello
$ ./hello
Hello, world!
え)apache2
./comment-out.bat /etc/apache2/apache2.conf (もとのまま)
DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
# ./comment-out.bat ufw-only.bat
ufw disable
ufw enable
ufw default deny
ufw limit ssh/tcp
ufw allow 80/tcp
ufw status
ls /var/www/html/dir-1/
らしいジャズ.mp3
お)firefox
https://answers.launchpad.net/~mozillateam/+archive/ubuntu/firefox-next
より
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1-V2.0.1 LTS
Release: 24.04
Codename: noble
t2@t2:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1-V2.0.1 LTS
Release: 24.04
Codename: noble
sudo add-apt-repository ppa:mozillateam/firefox-next
sudo apt update
aptitude install firefox firefox-locale-ja
か) rust
geminiによると
Ubuntu で Rust を始めるために必要なもの
3. Rust インストーラー rustup
Rust のバージョン管理やツールチェーンのインストールを簡単に行うためのツールです。
-----
Rust のインストール手順
ターミナルを開く
以下のコマンドを実行
Bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
指示に従ってインストールを進める
シェルを再起動するか、以下のコマンドを実行して環境変数を設定します。
Bash
source $HOME/.cargo/env
インストールの確認
インストールが完了したら、以下のコマンドを実行して、Rust が正しくインストールされているか確認できます。
Bash
rustc --version
cargo --version
---
以上にて
~$ rustc --version
rustc 1.83.0 (90b35a623 2024-11-26)
$ cargo --version
cargo 1.83.0 (5ffbef321 2024-10-29)
実行は 以下に従うだけです
https://note.com/inagy/n/nacc4ec48f051
$ ls -l
total 3908
-rwxrwxr-x 1 t2 t2 3994784 Dec 16 04:57 main
-rw-rw-r-- 1 t2 t2 45 Dec 16 04:57 main.rs
$ ./main
Hello, world!
き) ログイン画面でオンスクリーンキーボードを使用する
Ubuntuのログイン画面では、画面右上にある人型アイコンをクリックし、(by gemini)
く)ベンチマーク
$ hyperfine --min-runs 10 'sleep 0.3'
Benchmark 1: sleep 0.3
Time (mean ± σ): 304.7 ms ± 0.2 ms [User: 1.8 ms, System: 3.5 ms]
Range (min … max): 304.4 ms … 305.1 ms 10 runs
比較として
hpの elite X2 g2 では
$ hyperfine --min-runs 10 'sleep 0.3'
Benchmark 1: sleep 0.3
Time (mean ± σ): 317.2 ms ± 7.2 ms [User: 10.0 ms, System: 6.3 ms]
Range (min … max): 300.6 ms … 327.6 ms 10 runs
unixbench は
System Benchmarks Index Score 402.1
け)GUI 起動
xfce4を いれて、なんやらかんやら してるうちに GUIが起動しなくなりました
そこで
crontab -e
の最後に
@reboot systemctl start gdm
の行を加えて なんとかしました
こ)
このあとは 古い情報です
森のくまさん |
---|
の原曲は |
https://www.worldfolksong.com/kids/song/bear.htm |
あの(恐ろしい)クマに出くわさない限りわね |
https://www.youtube.com/watch?v=m6u_4s1tJfU |
ある日
クマと出くわした
かなりデカい熊に
道の途中で
クマは僕を見て
僕も熊を見た
クマは僕を見定めて
僕も熊を見定めた
クマは言った
「逃げなくて大丈夫? (あなたには)銃も無いのに」
僕はクマに言った
「(逃げるのは)いい考えだ それじゃ早速 逃げるとしよう」
僕は走って 逃げ出した
でもすぐ後ろにはあのクマが (追ってくる)
道の先には
木があった
ああ ありがたい
低い枝でも3メートル
運にまかせて大ジャンプ
体は宙を舞ったけど
あの枝まではとどかない
倒れかけながらも
なんとか枝をつかめたんだ
僕の話はこれでおしまい
これ以上は何もないよ
またどこかであのクマに
出くわさない限りわね
1) 使用開始です(2024/10/20)
日本語locale は |
---|
https://server-network-note.net/2022/05/ubuntu-2204-lts-server-system-locale-ja/ |
みました |
ibus-mozcで 日本語できます
ブルーツースを掘る
$ bluetoothctl
[bluetooth]# default-agent
[bluetooth]# power on
[bluetooth]# scan on
[bluetooth]# pair DF:D0:63:8D:AE:67
####################
keyboard は
pair DF:D0:63:8D:AE:67
だからです
./comment-out.bat /etc/bluetooth/main.conf
[General]
DiscoverableTimeout = 0
[BR]
[LE]
[GATT]
[CSIS]
[AVDTP]
[Policy]
AutoEnable=true
[AdvMon]
これにて自動再接続です
ここがわかりやすい
70年前には 電卓すらなく あったのは そろばん だけ
米は かまどで炊いており、 プロパンガスも なかった
70年後には 今ないものが出現する
Z1) risc-v のmusebookのスペックは
MuseBookは、SpacemiT K1というRISC-Vプロセッサを搭載した、
世界初の量産可能なRISC-Vノートパソコンです。
このノートパソコンのスペックは、以下の通りです。
主なスペック
SoC: SpacemiT K1 オクタコア RISC-V X60コア
メモリ: 最大16GB 32bit LPDDR4-2400MT / 32bit LPDDR4X-2666MT
ストレージ: 64GB eMMCフラッシュ(デフォルト)/ 最大512GB M.2(PCIe Gen 2 2x)
ディスプレイ: 14.1インチ IPS 1920x1080、60Hz、72% NTSC
ネットワーク: RTL8852BEベースのWiFi 6モジュール
バッテリー: 36.48Wh/7.6V、USB PD 3.1対応
Z2) モニターへミラリング
waylandがアップデートされたのか、USB-c ドッキングを使ってできました
動画ではこんな感じ
https://www.youtube.com/watch?v=LbxjsaCPnSc
Z3
)