File tree Expand file tree Collapse file tree 4 files changed +94
-10
lines changed Expand file tree Collapse file tree 4 files changed +94
-10
lines changed Original file line number Diff line number Diff line change 7
7
* 额,编译环境使用的nix和flake+direnv,我是在nixos下直接使用的
8
8
9
9
## 分两个部分
10
- ### 第一个部分是直接在rustsbi中判断hart0则直接运行embassy与hart1的u -boot并行运行
10
+ ### 第一个部分是直接在rustsbi中判断是hart0则直接运行embassy,与hart1的u -boot并行运行
11
11
* 在rustsbi的branch:` xingguang-embassy-in-rustsbi ` 里
12
12
* 这个rustsbi依赖特定的embassy,一并在submodule下面已经fork到我的仓库里,并进行了相应的修改(只添加了一个feature)
13
13
* 直接在` rustsbi/ ` 目录下编译rustsbi: ` cargo -vv prototyper --payload ../work/u-boot/u-boot.bin --fdt ../work/u-boot/arch/riscv/dts/starfive_visionfive2.dtb `
22
22
* mkimage同上
23
23
* 然后使用串口烧录即可
24
24
25
+
26
+ ## 2025-7-13 更新使用docker
27
+ ``` bash
28
+ # # 获取子仓库
29
+ git submodule init
30
+ git submodule update
31
+ cd project
32
+ # # build dockerfile
33
+ docker buildx build . -t async-summary
34
+ # # docker run
35
+ # # 注意proxy设置成自己的或者不设置
36
+ # # 注意-v后面接的目录设置成自己的async-summary目录
37
+ docker run -it -e http_proxy=" 192.168.1.100:7890" -e https_proxy=" 192.168.1.100:7890" --name async-summary --privileged -v /home/liu/async-summary:/home async-summary /bin/bash
38
+ # # 后续不需要重新run,再进入使用
39
+ # # docker start -ai async-summary
40
+ # # 下面在docker内部进行编译
41
+ # # 首先编译embassy_app的单独文件
42
+ cd /home/project/code/embassy_app
43
+ cargo build -Z build-std --release
44
+ # # 然后生成bin文件供给rustsbi加载
45
+ rust-objcopy --binary-architecture=riscv64 target/riscv64imc/release/embassy_app -O binary embassy_app.bin
46
+ # # 编译rustsbi
47
+ cd /home/project/code/rustsbi
48
+ cargo -vv prototyper --payload ../work/u-boot/u-boot.bin --fdt ../work/u-boot/arch/riscv/dts/starfive_visionfive2.dtb
49
+ # # 生成最终的镜像文件img
50
+ cd /home/project/code/
51
+ mkimage -f payload_image.its -A riscv -O u-boot -T firmware visionfive2_fw_payload.img
52
+ ```
53
+
54
+ ## 串口烧录文件visionfive2_fw_payload.img
55
+ * 使用工具[ Tera Term VT] ( https://teratermproject.github.io/index-en.html )
56
+ * 拨码拨到uart
57
+ * 按reset
58
+ * 文件->传输->XMODEM->发送, 选择jh7110-recovery-20230322.bin
59
+ * 选2
60
+ * 文件->传输->XMODEM->发送, 选择刚才编译出来的visionfive2_fw_payload.img
61
+ * 拨码拨回正常位置
62
+ * 按reset
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:24.04
2
2
3
- ENV HTTP_PROXY="http://172.17.0.1:20171"
4
- ENV HTTPS_PROXY="http://172.17.0.1:20171"
5
- ENV http_proxy="http://172.17.0.1:20171"
6
- ENV https_proxy="http://172.17.0.1:20171"
3
+
4
+ # 设置环境变量,避免交互式配置
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+
8
+ # 复制本地的 ubuntu.sources 到镜像中
9
+ COPY ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
7
10
8
11
RUN set -eux \
9
12
&& apt-get update \
10
13
&& apt-get -yq upgrade \
11
14
&& apt-get -yq install \
12
- build-essential automake libtool texinfo bison flex gawk g++ git xxd curl wget gdisk gperf cpio bc screen texinfo unzip libgmp-dev libmpfr-dev libmpc-dev libssl-dev libncurses-dev libglib2.0-dev libpixman-1-dev libyaml-dev patchutils python3-pip zlib1g-dev device-tree-compiler dosfstools mtools kpartx rsync \
15
+ build-essential u-boot-tools automake libtool texinfo bison flex gawk g++ git xxd curl wget gdisk gperf cpio bc screen texinfo unzip libgmp-dev libmpfr-dev libmpc-dev libssl-dev libncurses-dev libglib2.0-dev libpixman-1-dev libyaml-dev patchutils python3-pip zlib1g-dev device-tree-compiler dosfstools mtools kpartx rsync \
13
16
&& rm -rf /var/lib/apt/lists/* \
14
17
&& exit 0
15
18
19
+ # warning: 添加了自己的proxy用来加速rust
20
+ # ENV HTTP_PROXY="http://192.168.1.100:7890"
21
+ # ENV HTTPS_PROXY="http://192.168.1.100:7890"
22
+ # ENV http_proxy="http://192.168.1.100:7890"
23
+ # ENV https_proxy="http://192.168.1.100:7890"
24
+
16
25
RUN set -eux \
17
26
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
18
27
@@ -21,8 +30,6 @@ ENV PATH="/root/.cargo/bin:${PATH}"
21
30
RUN set -eux \
22
31
&& ls -lah /root/ && ls -lah /root/.cargo/ && rustc --version
23
32
24
- RUN set -eux \
25
- && rustup target add armv7-unknown-linux-gnueabihf
26
33
27
34
RUN set -eux \
28
- && rustup target add wasm32-unknown-unknown
35
+ && cargo install cargo-binutils
Original file line number Diff line number Diff line change
1
+ Types: deb
2
+ URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu
3
+ Suites: noble noble-updates noble-backports
4
+ Components: main restricted universe multiverse
5
+ Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
6
+
7
+ # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
8
+ Types: deb-src
9
+ URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu
10
+ Suites: noble noble-updates noble-backports
11
+ Components: main restricted universe multiverse
12
+ Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
13
+
14
+ # 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
15
+ Types: deb
16
+ URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu
17
+ Suites: noble-security
18
+ Components: main restricted universe multiverse
19
+ Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
20
+
21
+ Types: deb-src
22
+ URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu
23
+ Suites: noble-security
24
+ Components: main restricted universe multiverse
25
+ Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
26
+
27
+ # 预发布软件源,不建议启用
28
+
29
+ # Types: deb
30
+ # URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu
31
+ # Suites: noble-proposed
32
+ # Components: main restricted universe multiverse
33
+ # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
34
+
35
+ # Types: deb-src
36
+ # URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu
37
+ # Suites: noble-proposed
38
+ # Components: main restricted universe multiverse
39
+ # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
You can’t perform that action at this time.
0 commit comments