LoginSignup
1
0

Milk-V Duo の U-Boot を調べる

Last updated at Posted at 2024-01-28

「milk-V Duo でシリアルコンソール」
https://qiita.com/nanbuwks/items/f2744a4c20748f0b13fe

では、Linux 起動前の U-Boot の起動メッセージが取得できました。

.
.
.
 U-Boot 2021.10 (Dec 23 2023 - 12:29:03 +0800)cvitek_cv180x

DRAM:  63.3 MiB
gd->relocaddr=0x82435000. offset=0x2235000
MMC:   cv-sd@4310000: 0
Loading Environment from <NULL>... OK
In:    serial
Out:   serial
Err:   serial
Net:   
Warning: ethernet@4070000 (eth0) using random MAC address - a6:c6:34:81:38:8b
eth0: ethernet@4070000
Hit any key to stop autoboot:  0 
Boot from SD ...
switch to partitions #0, OK
mmc0 is current device
2886632 bytes read in 130 ms (21.2 MiB/s)
.
.
.

今回は、Milk-V に移植された U-Boot を探ってみます。

ブートローダーとは

こういった組み込み機器では、ブートローダーがマイコン内部のFLASHなどに書き込まれています。そのブートローダーから、SDカードに入っている Linux カーネルをロードします。

PC だと、

  • BIOS
  • GRUB
  • Linux カーネル
  • init プログラム
    .
    .
    .

というように起動していきますが、BIOS と GRUB にあたるものがブートローダーとなります。
Linux カーネルを呼び出す方法としてはいろいろありますが、Milk-V Duo では Das U-Boot (以下 U-Boot ) を使っています。

RaspberryPi などは Das U-Boot ではない方法が使われています。

cf., 「Raspberry Pi で U-boot/vmlinux/initramfs を作ってブート」
https://qiita.com/nanbuwks/items/a9bf90fcd38af8adb73a

U-Boot は、先の実験では

 U-Boot 2021.10 (Dec 23 2023 - 12:29:03 +0800)cvitek_cv180x

DRAM:  63.3 MiB
gd->relocaddr=0x82435000. offset=0x2235000
MMC:   cv-sd@4310000: 0
Loading Environment from <NULL>... OK
In:    serial
Out:   serial
Err:   serial
Net:   
Warning: ethernet@4070000 (eth0) using random MAC address - a6:c6:34:81:38:8b
eth0: ethernet@4070000
Hit any key to stop autoboot:  0 

とありますが、ここでなにかキーを押すと対話的操作ができるようになり、環境変数や特定のプログラムのロード、実行などができるようになります。

この U-Boot はオープンソースで汎用的なのですが、このような U-Boot などを実行するためマイコンそれぞれに備わっているプログラムの起動指定方法があり、それらのコードがブートローダーの もう1つの片割れとなります。こちらを、わかりやすくミニブートローダーと呼ぶことにします。

U-Boot の在処

さて、ミニブートローダー、 u-boot, カーネル 、init はそれぞれどこに入っているのでしょうか?

SDカードを外して起動することで、どこまでがマイコン内部のFLASH、どこからが SD カードから読み出したFLASHがわかることになります。

早速、SDカードを外して起動してみると・・・

C.SCS/0/0.WD.URPL.C.SCS/0/0.WD.URPL.USBI.BS/EMMC.PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
 E:Boot failed (8).
 E:ra=0x440a264
 E:RESET:panic:-1
C.SCS/0/0.WD.URPL.USBI.BS/EMMC.PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
 E:Boot failed (8).
 E:ra=0x440a264
 E:RESET:panic:-1

あれっ? 最初の1行目でエラーが出ました。

SDカードを取り付けた時の該当箇所は以下のとおりです。

C.SCS/0/0.WD.URPL.SDI/25000000/6000000.BS/SD.PS.SD/0x0/0x1000/0x1000/0.PE.BS.SD/0x1000/0xba00/0xba00/0.BE.J.
FSBL Jb28g9:gdd82b6819-dirty:2023-12-23T12:29:09+08:00
st_on_reason=d0000
st_off_reason=800c0003
P2S/0x1000/0x3bc0da00.
SD/0xca00/0x1000/0x1000/0.P2E.
DPS/0xda00/0x2000.
SD/0xda00/0x2000/0x2000/0.DPE.
DDR init.
ddr_param[0]=0x78075562.
pkg_type=3
D3_1_4
DDR2-512M-QFN68
Data rate=1333.
DDR BIST PASS
PLLS.
PLLE.
C2S/0xfa00/0x83f40000/0x3600.
 R2TE:.00/0x3600/0x3600/0.RSC.
.[M1.S4/705x173350]0P0r/e0x 8sy0s0t0e0m00 0in/i0tx 1db0o0ne0
R
 T: [1.481600]CVIRTOS Build Date:Dec 23 2023  (Time :12:29:09) 
RT: [1.487174]Post system init done
RT: [1.490253]create cvi task
RT: [1.492881][cvi_spinlock_init] succeess
RT: [1.496493]prvCmdQuRunTask run
SD/0x13000/0x1b000/0x1b000/0.ME.
L2/0x2e000.
SD/0x2e000/0x200/0x200/0.L2/0x414d3342/0xcafeb2ad/0x80200000/0x1fa00/0x1fa00
COMP/1.
SD/0x2e000/0x1fa00/0x1fa00/0.DCP/0x80200020/0x1000000/0x81500020/0x1fa00/1.
DCP/0x42c05/0.
Loader_2nd loaded.
Use internal 32k
Jump to monitor at 0x80000000.
OPENSBI: next_addr=0x80200020 arg1=0x80080000
OpenSBI v0.9
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name             : Cvitek. CV180X ASIC. C906.
Platform Features         : mfdeleg
Platform HART Count       : 1
Platform IPI Device       : clint
Platform Timer Device     : clint
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform SysReset Device  : ---
Firmware Base             : 0x80000000
Firmware Size             : 132 KB
Runtime SBI Version       : 0.3

Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*
Domain0 Region00          : 0x0000000074000000-0x000000007400ffff (I)
Domain0 Region01          : 0x0000000080000000-0x000000008003ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000080200020
Domain0 Next Arg1         : 0x0000000080080000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes

Boot HART ID              : 0
Boot HART Domain          : root
Boot HART ISA             : rv64imafdcvsux
Boot HART Features        : scounteren,mcounteren,time
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 38
Boot HART MHPM Count      : 8
Boot HART MHPM Count      : 8
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109


U-Boot 2021.10 (Dec 23 2023 - 12:29:03 +0800)cvitek_cv180x

DRAM:  63.3 MiB
gd->relocaddr=0x82435000. offset=0x2235000
MMC:   cv-sd@4310000: 0
Loading Environment from <NULL>... OK
In:    serial
Out:   serial
Err:   serial
Net:   
Warning: ethernet@4070000 (eth0) using random MAC address - de:fc:25:b2:5f:c8
eth0: ethernet@4070000
Hit any key to stop autoboot:  0 
Boot from SD ...
switch to partitions #0, OK
mmc0 is current device
2886632 bytes read in 130 ms (21.2 MiB/s)
`
`
`


途中で OpenSBI と出ますね。これは RISC-V アーキテクチャで文字などを出力するための低レベルなインターフェースです。

OpenSBI 〜 U-Boot の流れも、Linux と同様に SDカードに収録されているのでしょうか?

SDカードの調査

Milk-V で起動する、SDカードの中身はこのようになっていました。

$ sudo fdisk -l /dev/mmcblk0
ディスク /dev/mmcblk0: 14.84 GiB, 15931539456 バイト, 31116288 セクタ
単位: セクタ (1 * 512 = 512 バイト)
セクタサイズ (論理 / 物理): 512 バイト / 512 バイト
I/O サイズ (最小 / 推奨): 512 バイト / 512 バイト
ディスクラベルのタイプ: dos
ディスク識別子: 0x00000000

デバイス       起動 開始位置 最後から  セクタ サイズ Id タイプ
/dev/mmcblk0p1 *           1   262144  262144   128M  c W95 FAT32 (LBA)
/dev/mmcblk0p2        262145  1835008 1572864   768M 83 Linux
/dev/mmcblk0p3       1835009  2359296  524288   256M  0 空
$ sudo e2label /dev/mmcblk0p1
e2label: Bad magic number in super-block while trying to open /dev/mmcblk0p1
/dev/mmcblk0p1 contains a vfat file system labelled 'boot'
$ sudo e2label /dev/mmcblk0p2
rootfs
$ sudo e2label /dev/mmcblk0p3
e2label: Bad magic number in super-block while trying to open /dev/mmcblk0p3

128MBytes の容量の第一パーティーションが boot となっていて、更に FAT フォーマットとなっていることがわかります。

その boot パーティーションの中には、2つのファイルが格納されていました。


-rw-r--r--  1 nanbuwks nanbuwks 2.8M 12月 23 21:45 boot.sd
-rw-r--r--  1 nanbuwks nanbuwks 311K 12月 23 21:45 fip.bin

これは何かな?

fip.bin

以下のように名前を変えてみました。

$ mv fip.bin fip_backup.bin
WD.C.SCS/0/0.WD.URPL.SDI/25000000/6000000.SNF.USBI.BS/EMMC.PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
PS. E:load param1 (-78)
 E:Boot failed (8).
 E:ra=0x440a264

おや、SDカードを外したときと同じ状態になりましたね。他の実験の結果も踏まえ、fip.bin が OpenSBI〜U-Boot を担っているようです。

Milk-V 用の U-Boot レポジトリ と buildroot レポジトリ

https://github.com/milkv-duo/milkv-duo-u-boot
こちらから、レポジトリをダウンロードしてみましたが・・・

どうも、ここからビルドするのがめんどくさそうです。

こちらも、ダウンロードしてみましたがめんどくさそうでした。

duo-buildroot-sdk

上記のコードは、こちらにまとめられているようです。
https://github.com/milkv-duo/duo-buildroot-sdk

以下からダウンロードします。

git clone https://github.com/milkv-duo/duo-buildroot-sdk.git ではエラーが出たので、zip でダウンロードしています。

$ unzip duo-buildroot-sdk-develop.zip 
$ cd duo-buildroot-sdk-develop/

必要なパッケージをインストールします。

$ sudo apt install -y pkg-config build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils jq python3-distutils scons parallel tree python3-dev python3-pip device-tree-compiler ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip dosfstools mtools tcl openssh-client cmake expect

Milk-V のためのビルドは、build.sh のコマンドでなされるように調整されています。

実行してみると、指定できるターゲットが表示されます。


$ ./build.sh
Usage:
./build.sh              - Show this menu
./build.sh lunch        - Select a board to build
./build.sh [board]      - Build [board] directly, supported boards as follows:
milkv-duo
milkv-duo-lite
milkv-duo-spinand
milkv-duo-spinor
milkv-duo256m
milkv-duo256m-lite
milkv-duos-emmc
milkv-duos-sd

ここから、標準的っぽい milkv-duo を指定してみます。

$ ./build.sh milkv-duo
Toolchain does not exist, download it now...
toolchain_url: https://sophon-file.sophon.cn/sophon-prod-s3/drive/23/03/07/16/host-tools.tar.gz
toolchain_file: host-tools.tar.gz
--2024-01-27 09:54:04--  https://sophon-file.sophon.cn/sophon-prod-s3/drive/23/03/07/16/host-tools.tar.gz
sophon-file.sophon.cn (sophon-file.sophon.cn) をDNSに問いあわせています... 163.181.129.186, 163.181.129.184, 163.181.129.185, ...
sophon-file.sophon.cn (sophon-file.sophon.cn)|163.181.129.186|:443 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 881401141 (841M) [application/x-gzip]
‘host-tools.tar.gz’ に保存中
.
.
.

初めての実行では、結構な大きさのパッケージをダウンロードが必要です。
かなり時間がかかって、エラー終了します。

.
.
.
2024-01-27T10:11:22 >>> host-gettext  Extracting
2024-01-27T10:11:22 >>> host-flex 2.6.4 Extracting
2024-01-27T10:11:22 >>> libnl 3.5.0 Extracting
2024-01-27T10:11:22 >>> libxml2 2.9.12 Extracting
2024-01-27T10:11:23 >>> libxslt 1.1.34 Extracting
2024-01-27T10:11:23 >>> host-patchelf 0.9 Extracting
2024-01-27T10:11:24 >>> host-python3-setuptools 44.0.0 Extracting
Done in 24s  (error code: 2)
make: *** [Makefile:604: br-rootfs-pack] エラー 2
Error: Build board milkv-duo failed!

途中、このようなエラーが出てました。これが問題かな?


make[1]: ディレクトリ '/home/nanbuwks/Downloads/duo-buildroot-sdk-develop/middleware/v2/sample/cipher' から出ます
~/Downloads/duo-buildroot-sdk-develop/build
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
 Run pack_boot() function 
~/Downloads/duo-buildroot-sdk-develop/build ~/Downloads/duo-buildroot-sdk-develop
rm -rf /home/nanbuwks/Downloads/duo-buildroot-sdk-develop/ramdisk/build/cv1800b_milkv_duo_sd/configs/*

fip.bin で実験

エラーが出たものの、U-boot のバイナリはできています。

$ ls -al ./install/soc_cv1800b_milkv_duo_sd/fip.bin
-rw-rw-r-- 1 nanbuwks nanbuwks 317952  1月 27 10:02 ./install/soc_cv1800b_milkv_duo_sd/fip.bin


もともとSDカードに入っていたものが以下の通りです。

$ ls /media/nanbuwks/boot/ -al
合計 3152
drwxr-xr-x  2 nanbuwks nanbuwks   16384  1月  1  1970 .
drwxr-x---+ 4 root     root        4096  1月 27 17:17 ..
-rw-r--r--  1 nanbuwks nanbuwks 2886632 12月 23 21:45 boot.sd
-rw-r--r--  1 nanbuwks nanbuwks  317952 12月 23 21:45 fip.bin

ファイルサイズが同じですね。メモリにロードするから固定サイズなのかな?
サイズは同じでも、中身は異なっているようです。

$ diff /home/nanbuwks/Downloads/duo-buildroot-sdk-develop/install/soc_cv1800b_milkv_duo_sd/fip.bin  /media/nanbuwks/boot/fip.bin 
バイナリーファイル /home/nanbuwks/Downloads/duo-buildroot-sdk-develop/install/soc_cv1800b_milkv_duo_sd/fip.bin と/media/nanbuwks/boot/fip.bin は異なります

作った fip.bin を SDカードに上書きして

$ cp fip.bin /media/nanbuwks/boot

起動すると、更新されていることがわかりました。


WD.C.SCS/0/0.WD.URPL.SDI/25000000/6000000.BS/SD.PS.SD/0x0/0x1000/0x1000/0.PE.BS.SD/0x1000/0xba00/0xba00/0.BE.J.
FSBL Jb28g9:g:2024-01-27T10:02:12+09:00
st_on_reason=80d0003
st_off_reason=0
P2S/0x1000/0x3bc0da00.
SD/0xca00/0x1000/0x1000/0.P2E.
DPS/0xda00/0x2000.
SD/0xda00/0x2000/0x2000/0.DPE.
DDR init.
ddr_param[0]=0x78075562.
pkg_type=3
D3_1_4
DDR2-512M-QFN68
Data rate=1333.
DDR BIST PASS
PLLS.
PLLE.
C2S/0xfa00/0x83f40000/0x3600.
CR2TE:. 0/0x3600/0x3600/0.RSC.
.M1.S4/605x419340]0P0r/e0 xs8y0s0t0e0m0 0i0n/i0tx 1dbo0n0e0

RT: [1.471813]CVIRTOS Build Date:Jan 27 2024  (Time :10:02:11) 
RT: [1.477817]Post system init done
RT: [1.481132]create cvi task
RT: [1.483958][cvi_spinlock_init] succeess
RT: [1.487852]prvCmdQuRunTask run
SD/0x13000/0x1b000/0x1b000/0.ME.
L2/0x2e000.
SD/0x2e000/0x200/0x200/0.L2/0x414d3342/0xcafe30ba/0x80200000/0x1fa00/0x1fa00
COMP/1.
SD/0x2e000/0x1fa00/0x1fa00/0.DCP/0x80200020/0x1000000/0x81500020/0x1fa00/1.
DCP/0x42c05/0.
Loader_2nd loaded.
Use internal 32k
Jump to monitor at 0x80000000.
OPENSBI: next_addr=0x80200020 arg1=0x80080000
OpenSBI v0.9
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|


以下のところを見ると更新しているのがわかりますね。

RT: [1.471813]CVIRTOS Build Date:Jan 27 2024  (Time :10:02:11) 

boot.sd

さて、 SDカードの boot.sd の名前を変更すると・・・


$ mv boot.sd boot_backup.sd

とするとu-boot 以降で止まりました。

.
.
.
U-Boot 2021.10 (Jan 27 2024 - 10:01:31 +0900)cvitek_cv180x

DRAM:  63.3 MiB
gd->relocaddr=0x82435000. offset=0x2235000
MMC:   cv-sd@4310000: 0
Loading Environment from <NULL>... OK
In:    serial
Out:   serial
Err:   serial
Net:   
Warning: ethernet@4070000 (eth0) using random MAC address - 4a:79:18:b5:b1:21
eth0: ethernet@4070000
Hit any key to stop autoboot:  0 
Boot from SD ...
switch to partitions #0, OK
mmc0 is current device
** Unable to read file boot.sd **
Failed to load 'boot.sd'

本来であれば、以下のようになります。


Boot from SD ...
switch to partitions #0, OK
mmc0 is current device
2886632 bytes read in 130 ms (21.2 MiB/s)
## Loading kernel from FIT Image at 81400000 ...
   Using 'config-cv1800b_milkv_duo_sd' configuration
   Trying 'kernel-1' kernel subimage
   Verifying Hash Integrity ... crc32+ OK
## Loading fdt from FIT Image at 81400000 ...
   Using 'config-cv1800b_milkv_duo_sd' configuration
   Trying 'fdt-cv1800b_milkv_duo_sd' fdt subimage
   Verifying Hash Integrity ... sha256+ OK
   Booting using the fdt blob at 0x816bb980
   Uncompressing Kernel Image
   Decompressing 6437376 bytes used 1053ms
   Loading Device Tree to 0000000081be5000, end 0000000081becd04 ... OK
.
.
.

ということは、boot.sd にカーネルが入っているぽいです。

U-boot プロンプト

cv180x_c906#

プロンプトが出てくるので、? でコマンド一覧を得ることができます。


cv180x_c906# ?
?         - alias for 'help'
base      - print or set address offset
bootm     - boot application image from memory
cmp       - memory compare
cp        - memory copy
cvi_update- cvi_update [eth, sd, usb]- check boot status and update if necessary

cvi_utask - bootloader control block command
echo      - echo args to console
efuser    - Read efuse
efuser_dump- Read/Dump efuse
efusew    - Write efuse
efusew_word- Write word to efuse
env       - environment handling commands
exit      - exit script
false     - do nothing, unsuccessfully
fatinfo   - print information about filesystem
fatload   - load binary file from a dos filesystem
fatls     - list files in a directory (default /)
fatmkdir  - create a directory
fatrm     - delete a file
fatsize   - determine a file's size
fatwrite  - write file into a dos filesystem
fstype    - Look up a filesystem type
fstypes   - List supported filesystem types
help      - print command description/usage
ln        - Create a symbolic link
load      - load binary file from a filesystem
loop      - infinite loop on address range
ls        - list files in a directory (default /)
md        - memory display
mm        - memory modify (auto-incrementing address)
mmc       - MMC sub system
mmcinfo   - display MMC info
mw        - memory write (fill)
net       - NET sub-system
nm        - memory modify (constant address)
panic     - Panic with optional message
part      - disk partition related commands
printenv  - print environment variables
random    - fill memory with random pattern
reset     - Perform RESET of the CPU
run       - run commands in an environment variable
save      - save file to a filesystem
setenv    - set environment variables
showvar   - print local hushshell variables
size      - determine a file's size
test      - minimal test like /bin/sh
true      - do nothing, successfully
version   - print monitor, compiler and linker version
cv180x_c906# 

ここで、操作ができそうですね!

U-boot 設定変更

U-boot を変更してビルドができることを確認してみます。

$ vim u-boot-2021.10/include/configs/cv180x-asic.h 

として、

        #define SD_BOOTM_COMMAND \
                                SET_BOOTARGS \
                                "echo Boot from SD ...;" \
                                "mmc dev 0 && fatload mmc 0 ${uImage_addr} boot.sd; " \
                                "if test $? -eq 0; then " \
                                UBOOT_VBOOT_BOOTM_COMMAND \
                                "fi;"



これを以下のように変更します。

        #define SD_BOOTM_COMMAND \
                                SET_BOOTARGS \
                                "echo Boot from boot_bak.sd in SD ...;" \
                                "mmc dev 0 && fatload mmc 0 ${uImage_addr} boot_bak.sd; " \
                                "if test $? -eq 0; then " \
                                UBOOT_VBOOT_BOOTM_COMMAND \
                                "fi;"

そうすると、boot.sd ではなく boot_bak.sd から起動できました。

起動待ち時間を変更する

設定箇所を u-boot-2021.10/の中を探して、あれれーと思ってましたが、ディレクトリ外にありました。
build/boards/cv180x/cv1800b_milkv_duo_sd/u-boot/
中にある
cvitek_cv1800b_milkv_duo_sd_defconfig の中に設定があります。

# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
CONFIG_BOOTDELAY=30
CONFIG_USE_BOOTCOMMAND=y
CONFIG_BOOTCOMMAND="run distro_bootcmd"
CONFIG_HUSH_PARSER=y
# CONFIG_CMDLINE_EDITING

ここを 30 にしました。

なお、build/cv1800b_milkv_duo_sd/u-boot.cfg にも

#define CONFIG_BOOTDELAY 1

という記述がありますが、これはビルド時にcvitek_cv1800b_milkv_duo_sd_defconfig の設定値で上書きされるようです。


@@C.SCS/0/0.WD.URPL.SDI/25000000/6000000.BS/SD.PS.SD/0x0/0x1000/0x1000/0.PE.BS.SD/0x1000/0xba00/0xba00/0.BE.J.
FSBL Jb28g9:g:2024-01-27T22:58:24+09:00
st_on_reason=d0000
st_off_reason=0
P2S/0x1000/0x3bc0da00.
SD/0xca00/0x1000/0x1000/0.P2E.
DPS/0xda00/0x2000.
SD/0xda00/0x2000/0x2000/0.DPE.
DDR init.
ddr_param[0]=0x78075562.
pkg_type=3
D3_1_4
DDR2-512M-QFN68
Data rate=1333.
DDR BIST PASS
PLLS.
PLLE.
C2S/0xfa00/0x83f40000/0x3600.
 2RET.:00/0x3600/0x3600/0.RSC.
 [M1S./406x21530030]0P/r0ex 8s0y0s0t0e0m0 0i/n0ixt1 bd0o0n0e.
R
 T: [1.468823]CVIRTOS Build Date:Jan 27 2024  (Time :22:58:23) 
RT: [1.474826]Post system init done
RT: [1.478141]create cvi task
RT: [1.480968][cvi_spinlock_init] succeess
RT: [1.484862]prvCmdQuRunTask run
SD/0x13000/0x1b000/0x1b000/0.ME.
L2/0x2e000.
SD/0x2e000/0x200/0x200/0.L2/0x414d3342/0xcafef98f/0x80200000/0x1fa00/0x1fa00
COMP/1.
SD/0x2e000/0x1fa00/0x1fa00/0.DCP/0x80200020/0x1000000/0x81500020/0x1fa00/1.
DCP/0x42c1d/0.
Loader_2nd loaded.
Use internal 32k
Jump to monitor at 0x80000000.
OPENSBI: next_addr=0x80200020 arg1=0x80080000
OpenSBI v0.9
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name             : Cvitek. CV180X ASIC. C906.
Platform Features         : mfdeleg
Platform HART Count       : 1
Platform IPI Device       : clint
Platform Timer Device     : clint
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform SysReset Device  : ---
Firmware Base             : 0x80000000
Firmware Size             : 132 KB
Runtime SBI Version       : 0.3

Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*
Domain0 Region00          : 0x0000000074000000-0x000000007400ffff (I)
Domain0 Region01          : 0x0000000080000000-0x000000008003ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000080200020
Domain0 Next Arg1         : 0x0000000080080000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes

Boot HART ID              : 0
Boot HART Domain          : root
Boot HART ISA             : rv64imafdcvsux
Boot HART Features        : scounteren,mcounteren,time
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 38
Boot HART MHPM Count      : 8
Boot HART MHPM Count      : 8
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109


U-Boot 2021.10 (Jan 27 2024 - 22:57:46 +0900)cvitek_cv180x

DRAM:  63.3 MiB
gd->relocaddr=0x82435000. offset=0x2235000
MMC:   cv-sd@4310000: 0
Loading Environment from <NULL>... OK
In:    serial
Out:   serial
Err:   serial
Net:   
Warning: ethernet@4070000 (eth0) using random MAC address - f2:ea:e3:97:01:4a
eth0: ethernet@4070000
Hit any key to stop autoboot: 29 

変更反映できてますね。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0