rCore-Tutorial-Book-v3 icon indicating copy to clipboard operation
rCore-Tutorial-Book-v3 copied to clipboard

rCore-Tutorial-Book-v3/chapter1/0intro

Open utterances-bot opened this issue 3 years ago • 28 comments

引言 — rCore-Tutorial-Book-v3 0.1 文档

https://rcore-os.github.io/rCore-Tutorial-Book-v3/chapter1/0intro.html

utterances-bot avatar Feb 19 '21 16:02 utterances-bot

将 Maix 系列开发**~~版~~板**连接到 PC

Joeyscat avatar Feb 19 '21 16:02 Joeyscat

make run

[rustsbi] RustSBI version 0.1.1 .______ __ __ .___________. .. __ | _ \ | | | | / | | / || _ \ | | | |) | | | | | | (-------| |----| (----| |_) || | | / | | | | \ \ | | \ \ | _ < | | | |\ \----.| --' |.----) | | | .----) | | |) || | | | `.| _/ |/ || |_/ |/ ||

[rustsbi] Platform: QEMU (Version 0.1.0) [rustsbi] misa: RV64ACDFIMSU [rustsbi] mideleg: 0x222 [rustsbi] medeleg: 0xb1ab [rustsbi-dtb] Hart count: cluster0 with 1 cores [rustsbi] Kernel entry: 0x80200000 [rustsbi-panic] hart 0 panicked at 'invalid instruction, mepc: 000000008000150e, instruction: 0000000030200073', platform/qemu/src/main.rs:458:17 [rustsbi-panic] system shutdown scheduled due to RustSBI panic

why rustsbi-panic?

SocialistDalao avatar Feb 25 '21 07:02 SocialistDalao

Found reason: qemu version not match

rust-sbi don't support qemu 5.2.50, but when I use qemu 5.0.0, it works the same as mentioned in this tutorial in every single word.

SocialistDalao avatar Feb 26 '21 06:02 SocialistDalao

QEMU-5.0.0 + WSL2 + RustSBI 0.2.0-alpha.1

➜  os git:(ch1) qemu-system-riscv64 -version
QEMU emulator version 5.0.0
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
➜  os git:(ch1) uname -a
Linux DESKTOP-U9V9V76 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
➜  os git:(ch1) make run
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf
riscv64gc-unknown-none-elf (installed)
cargo install cargo-binutils --vers ~0.2
    Updating `git://mirrors.ustc.edu.cn/crates.io-index` index
     Ignored package `cargo-binutils v0.2.0` is already installed, use --force to override
rustup component add rust-src
info: component 'rust-src' is up to date
rustup component add llvm-tools-preview
info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date
Platform: qemu
    Finished release [optimized] target(s) in 0.00s
[rustsbi] RustSBI version 0.2.0-alpha.1
.______       __    __      _______.___________.  _______..______   __
|   _  \     |  |  |  |    /       |           | /       ||   _  \ |  |
|  |_)  |    |  |  |  |   |   (----`---|  |----`|   (----`|  |_)  ||  |
|      /     |  |  |  |    \   \       |  |      \   \    |   _  < |  |
|  |\  \----.|  `--'  |.----)   |      |  |  .----)   |   |  |_)  ||  |
| _| `._____| \______/ |_______/       |__|  |_______/    |______/ |__|

[rustsbi] Platform: QEMU (Version 0.2.0)
[rustsbi] misa: RV64ACDFIMSU
[rustsbi] mideleg: 0x222
[rustsbi] medeleg: 0xb1ab
[rustsbi-dtb] Hart count: cluster0 with 1 cores
[rustsbi] Kernel entry: 0x80200000
Hello, world!
.text [0x80200000, 0x80202000)
.rodata [0x80202000, 0x80203000)
.data [0x80203000, 0x80203000)
boot_stack [0x80203000, 0x80213000)
.bss [0x80213000, 0x80213000)
Panicked at src/main.rs:46 Shutdown machine!

Joeyscat avatar May 22 '21 05:05 Joeyscat

在用docker 运行的时候如果报错 error[E0433]: failed to resolve: could not find addr_ofinptr``, 可以参考 https://github.com/rcore-os/rCore-Tutorial-v3/issues/14 来修正

zhaobenx avatar Jul 20 '21 14:07 zhaobenx

引用了过时的API error[E0557]: feature has been removed --> src/main.rs:6:12 | 6 | #![feature(const_in_array_repeat_expressions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed | = note: removed due to causing promotable bugs

fdiskdc avatar Jul 30 '21 03:07 fdiskdc

make run (rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf riscv64gc-unknown-none-elf (installed) cargo install cargo-binutils --vers ~0.2 Updating git://mirrors.ustc.edu.cn/crates.io-index index Ignored package cargo-binutils v0.2.0 is already installed, use --force to override rustup component add rust-src info: component 'rust-src' is up to date rustup component add llvm-tools-preview info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date Platform: qemu Finished release [optimized] target(s) in 0.01s [rustsbi] RustSBI version 0.2.0-alpha.1 .______ __ __ .___________. .. __ | _ \ | | | | / | | / || _ \ | | | |) | | | | | | (-------| |----| (----| |_) || | | / | | | | \ \ | | \ \ | _ < | | | |\ \----.| --' |.----) | | | .----) | | |) || | | | `.| _/ |/ || |_/ |/ ||

[rustsbi] Platform: QEMU (Version 0.2.0) [rustsbi] misa: RV64ACDFIMSU [rustsbi] mideleg: 0x222 [rustsbi] medeleg: 0xb1ab [rustsbi-dtb] Hart count: cluster0 with 1 cores [rustsbi] Kernel entry: 0x80200000 Hello, world! .text [0x80200000, 0x80202000) .rodata [0x80202000, 0x80203000) .data [0x80203000, 0x80203000) boot_stack [0x80203000, 0x80213000) .bss [0x80213000, 0x80213000) Panicked at src/main.rs:46 Shutdown machine!

tanjiaguo avatar Aug 16 '21 08:08 tanjiaguo

由于操作系统代码无法 ~象~ (像)应用软件那样,可以有方便的调试(Debug)功能。 倒数第二段第一句好像有错别字

duny31030 avatar Aug 28 '21 05:08 duny31030

请教各路大神,下面的log中这行[qemu-system-riscv64: clint: invalid write: 00000004 ],这个是什么问题,看着也能跑完,多谢。 系统:xubuntu 20.04.1: chris@chris-VirtualBox:~/ucore-os-kernel/rCore-Tutorial-v3/os$ uname -a Linux chris-VirtualBox 5.13.0-35-generic #40~20.04.1-Ubuntu SMP Mon Mar 7 09:18:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux chris@chris-VirtualBox:~/ucore-os-kernel/rCore-Tutorial-v3/os$ rustc --version rustc 1.60.0-nightly (9ad5d82f8 2022-01-18) chris@chris-VirtualBox:~/ucore-os-kernel/rCore-Tutorial-v3/os$ cargo --version cargo 1.60.0-nightly (358e79fe5 2022-01-04)

chris@chris-VirtualBox:~/ucore-os-kernel/rCore-Tutorial-v3$ cd os/ chris@chris-VirtualBox:~/ucore-os-kernel/rCore-Tutorial-v3/os$ make run (rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf info: syncing channel updates for 'nightly-2022-01-19-x86_64-unknown-linux-gnu' info: latest update on 2022-01-19, rust version 1.60.0-nightly (9ad5d82f8 2022-01-18) info: downloading component 'cargo' info: downloading component 'clippy' info: downloading component 'rust-docs' info: downloading component 'rust-std' info: downloading component 'rustc' info: downloading component 'rustfmt' info: installing component 'cargo' info: installing component 'clippy' info: installing component 'rust-docs' info: installing component 'rust-std' info: installing component 'rustc' info: installing component 'rustfmt' info: downloading component 'rust-std' for 'riscv64gc-unknown-none-elf' info: installing component 'rust-std' for 'riscv64gc-unknown-none-elf' 7.7 MiB / 7.7 MiB (100 %) 6.1 MiB/s in 1s ETA: 0s cargo install cargo-binutils --vers =0.3.3 Ignored package cargo-binutils v0.3.3 is already installed, use --force to override rustup component add rust-src info: downloading component 'rust-src' info: installing component 'rust-src' rustup component add llvm-tools-preview info: downloading component 'llvm-tools-preview' info: installing component 'llvm-tools-preview' 22.0 MiB / 22.0 MiB (100 %) 8.0 MiB/s in 2s ETA: 0s (which last-qemu) || (rm -f last-k210 && touch last-qemu && make clean) make[1]: Entering directory '/home/chris/ucore-os-kernel/rCore-Tutorial-v3/os' make[1]: Leaving directory '/home/chris/ucore-os-kernel/rCore-Tutorial-v3/os' Platform: qemu Compiling os v0.1.0 (/home/chris/ucore-os-kernel/rCore-Tutorial-v3/os) Finished release [optimized] target(s) in 2.03s [rustsbi] RustSBI version 0.2.0-alpha.6 .______ __ __ .___________. .. __ | _ \ | | | | / | | / || _ \ | | | |) | | | | | | (-------| |----| (----| |_) || | | / | | | | \ \ | | \ \ | _ < | | | |\ \----.| --' |.----) | | | .----) | | |) || | | | `.| _/ |/ || |_/ |/ ||

[rustsbi] Implementation: RustSBI-QEMU Version 0.0.2 [rustsbi-dtb] Hart count: cluster0 with 1 cores [rustsbi] misa: RV64ACDFIMSU [rustsbi] mideleg: ssoft, stimer, sext (0x222) [rustsbi] medeleg: ima, ia, bkpt, la, sa, uecall, ipage, lpage, spage (0xb1ab) [rustsbi] pmp0: 0x10000000 ..= 0x10001fff (rwx) [rustsbi] pmp1: 0x80000000 ..= 0x8fffffff (rwx) [rustsbi] pmp2: 0x0 ..= 0xffffffffffffff (---) qemu-system-riscv64: clint: invalid write: 00000004 [rustsbi] enter supervisor 0x80200000 Hello, world! .text [0x80200000, 0x80202000) .rodata [0x80202000, 0x80203000) .data [0x80203000, 0x80203000) boot_stack [0x80203000, 0x80213000) .bss [0x80213000, 0x80213000) Panicked at src/main.rs:46 Shutdown machine!

chriswuhao avatar Mar 22 '22 02:03 chriswuhao

追加qemu版本信息:

chris@chris-VirtualBox:~/ucore-os-kernel/rCore-Tutorial-v3/os$ qemu-riscv64 --version qemu-riscv64 version 5.0.0 Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers

chriswuhao avatar Mar 22 '22 02:03 chriswuhao

WSL平台。编译后无任何输出,只能从qemu退出。

ZhangTianrong avatar Jun 26 '22 23:06 ZhangTianrong

quem-5.0.0 编译后卡死,更新为7.0.0后解决[rustsbi] RustSBI version 0.2.2, adapting to RISC-V SBI v1.0.0 .______ __ __ .___________. .. __ | _ \ | | | | / | | / || _ \ | | | |) | | | | | | (-------| |----| (----| |_) || | | / | | | | \ \ | | \ \ | _ < | | | |\ \----.| --' |.----) | | | .----) | | |) || | | | `.| _/ |/ || |_/ |/ || [rustsbi] Implementation : RustSBI-QEMU Version 0.1.1 [rustsbi] Platform Name : riscv-virtio,qemu [rustsbi] Platform SMP : 1 [rustsbi] Platform Memory : 0x80000000..0x88000000 [rustsbi] Boot HART : 0 [rustsbi] Device Tree Region : 0x87000000..0x87000ef2 [rustsbi] Firmware Address : 0x80000000 [rustsbi] Supervisor Address : 0x80200000 [rustsbi] pmp01: 0x00000000..0x80000000 (-wr) [rustsbi] pmp02: 0x80000000..0x80200000 (---) [rustsbi] pmp03: 0x80200000..0x88000000 (xwr) Hello, world! .text [0x80200000, 0x80202000) .rodata [0x80202000, 0x80203000) .data [0x80203000, 0x80204000) boot_stack [0x80204000, 0x80214000) .bss [0x80214000, 0x80214000)

zhuiYeah avatar Jul 01 '22 18:07 zhuiYeah

ch1的例子没跑通,卡住了。 本机环境

   ubuntu20.04,
   kernel 5.11  
   rustc 1.64.0-nightly (9a7b7d5e5 2022-07-19)  
   QEMU emulator version 5.0.0

make run 之后就卡死,没有任何输出

-> % make run
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf
riscv64gc-unknown-none-elf (installed)
cargo install cargo-binutils
    Updating crates.io index
     Ignored package `cargo-binutils v0.3.6` is already installed, use --force to override
rustup component add rust-src
info: component 'rust-src' is up to date
rustup component add llvm-tools-preview
info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date
(which last-qemu) || (rm -f last-k210 && touch last-qemu && make clean)
make[1]: Entering directory '/home/pw0rld/pw/rCore-Tutorial-v3/os'
make[1]: Leaving directory '/home/pw0rld/pw/rCore-Tutorial-v3/os'
Platform: qemu
   Compiling os v0.1.0 (/home/pw0rld/pw/rCore-Tutorial-v3/os)
    Finished release [optimized + debuginfo] target(s) in 0.47s

我自己的解决办法:替换SBI 打开Makefile,修改 BOOTLOADER := ../bootloader/$(SBI)-$(BOARD).bin 改成 BOOTLOADER := default 使用qemu默认的SBI。

(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf
riscv64gc-unknown-none-elf (installed)
cargo install cargo-binutils
    Updating crates.io index
     Ignored package `cargo-binutils v0.3.6` is already installed, use --force to override
rustup component add rust-src
info: component 'rust-src' is up to date
rustup component add llvm-tools-preview
info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date
(which last-qemu) || (rm -f last-k210 && touch last-qemu && make clean)
make[1]: Entering directory '/home/pw0rld/pw/rCore-Tutorial-v3/os'
make[1]: Leaving directory '/home/pw0rld/pw/rCore-Tutorial-v3/os'
Platform: qemu
   Compiling os v0.1.0 (/home/pw0rld/pw/rCore-Tutorial-v3/os)
    Finished release [optimized + debuginfo] target(s) in 0.46s
default

OpenSBI v0.6
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name          : QEMU Virt Machine
Platform HART Features : RV64ACDFIMSU
Platform Max HARTs     : 8
Current Hart           : 0
Firmware Base          : 0x80000000
Firmware Size          : 120 KB
Runtime SBI Version    : 0.2

MIDELEG : 0x0000000000000222
MEDELEG : 0x000000000000b109
PMP0    : 0x0000000080000000-0x000000008001ffff (A)
PMP1    : 0x0000000000000000-0xffffffffffffffff (A,R,W,X)
Hello, world!
.text [0x80200000, 0x80202000)
.rodata [0x80202000, 0x80203000)
.data [0x80203000, 0x80204000)
boot_stack [0x80204000, 0x80214000)
.bss [0x80214000, 0x80214000)

pw0rld avatar Sep 21 '22 10:09 pw0rld

@pw0rld 如果使用项目内自带的RustSBI的话,请使用Qemu7.0.0版本。

wyfcyx avatar Sep 21 '22 10:09 wyfcyx

@pw0rld 如果使用项目内自带的RustSBI的话,请使用Qemu7.0.0版本。

不行。我尝试把Qemu升级成7.0

-> % /home/pw0rld/pw/qemu/qemu-7.0.0/build/qemu-system-riscv64 --version
QEMU emulator version 7.0.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers

Makefile

ifeq ($(BOARD),qemu)
	@/home/pw0rld/pw/qemu/qemu-7.0.0/build/qemu-system-riscv64 \
		-machine virt \
		-nographic \
		-bios $(BOOTLOADER) \
		-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA)

使用项目的BOOTLOADER := ../bootloader/$(SBI)-$(BOARD).bin 还是进不去 image

如果改成BOOTLOADER :=default, 则是卡在这个界面,也是进不去 image

如果使用qemu 5.0,在ch5,使用getchar就会出现异常字符,不知道是不是因为Qemu版本的原因

-> % qemu-system-riscv64 --version
QEMU emulator version 5.0.0
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers

输出 image

pw0rld avatar Sep 30 '22 03:09 pw0rld

@pw0rld 首先请检查一下ch1分支是否更新到最新版本。如果不是的话,感觉我也遇到过同样的情况(即使用Qemu7.0.0仍然卡死),猜测可能是我安装了kvm,这个是我能想到的唯一一处不同之处了。请问您是否安装过kvm呢?

wyfcyx avatar Sep 30 '22 09:09 wyfcyx

wakk@wakk-ubuntu:~/rCore-Tutorial-v3/os$ make run
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf
riscv64gc-unknown-none-elf (installed)
cargo install cargo-binutils
    Updating `ustc` index
     Ignored package `cargo-binutils v0.3.6` is already installed, use --force to override
rustup component add rust-src
info: component 'rust-src' is up to date
rustup component add llvm-tools-preview
info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date
Platform: qemu
   Compiling cfg-if v1.0.0
error[E0463]: can't find crate for `core`
  |
  = note: the `riscv64gc-unknown-none-elf` target may not be installed
  = help: consider downloading the target with `rustup target add riscv64gc-unknown-none-elf`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to 2 previous errors
make: *** [Makefile:42:kernel] 错误 101

环境配置的步骤都执行过了,这是为啥呀

wakk3107 avatar Feb 05 '23 16:02 wakk3107

[root@openEuler1 rCore-Tutorial-v3]# ls bootloader Dockerfile Makefile README.md dev-env-info.md LICENSE os rust-toolchain.toml [root@openEuler1 rCore-Tutorial-v3]# cd os [root@openEuler1 os]# make run (rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf riscv64gc-unknown-none-elf (installed) cargo install cargo-binutils Updating tuna index Ignored package cargo-binutils v0.3.6 is already installed, use --force to override rustup component add rust-src info: component 'rust-src' is up to date rustup component add llvm-tools-preview info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date Platform: qemu Updating tuna index Compiling log v0.4.17 Compiling cfg-if v1.0.0 Compiling os v0.1.0 (/root/rCore-Tutorial-v3/os) Finished release [optimized + debuginfo] target(s) in 27.26s[rustsbi] RustSBI version 0.3.0-alpha.4, adapting to RISC-V SBI v1.0.0 .______ __ __ .___________. .. __ | _ \ | | | | / | | / || _ \ | | | |) | | | | | | (-------| |----| (----| |_) || | | / | | | | \ \ | | \ \ | _ < | | | |\ \----.| --' |.----) | | | .----) | | |) || | | | `.| _/ |/ || |_/ |/ || [rustsbi] Implementation : RustSBI-QEMU Version 0.2.0-alpha.2 [rustsbi] Platform Name : riscv-virtio,qemu [rustsbi] Platform SMP : 1 [rustsbi] Platform Memory : 0x80000000..0x88000000 [rustsbi] Boot HART : 0 [rustsbi] Device Tree Region : 0x87000000..0x87000ef2 [rustsbi] Firmware Address : 0x80000000 [rustsbi] Supervisor Address : 0x80200000 [rustsbi] pmp01: 0x00000000..0x80000000 (-wr) [rustsbi] pmp02: 0x80000000..0x80200000 (---) [rustsbi] pmp03: 0x80200000..0x88000000 (xwr) [rustsbi] pmp04: 0x88000000..0x00000000 (-wr) [kernel] Hello, world! [root@openEuler1 os]#

v1ncente777 avatar Feb 08 '23 04:02 v1ncente777

[root@openEuler1 os]# make run (rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf riscv64gc-unknown-none-elf (installed) cargo install cargo-binutils Updating tuna index Ignored package cargo-binutils v0.3.6 is already installed, use --force to override rustup component add rust-src info: component 'rust-src' is up to date rustup component add llvm-tools-preview info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date Platform: qemu Finished release [optimized + debuginfo] target(s) in 0.00s [rustsbi] RustSBI version 0.3.0-alpha.4, adapting to RISC-V SBI v1.0.0 .______ __ __ .___________. .. __ | _ \ | | | | / | | / || _ \ | | | |) | | | | | | (-------| |----| (----| |_) || | | / | | | | \ \ | | \ \ | _ < | | | |\ \----.| --' |.----) | | | .----) | | |) || | | | `.| _/ |/ || |_/ |/ || [rustsbi] Implementation : RustSBI-QEMU Version 0.2.0-alpha.2 [rustsbi] Platform Name : riscv-virtio,qemu [rustsbi] Platform SMP : 1 [rustsbi] Platform Memory : 0x80000000..0x88000000 [rustsbi] Boot HART : 0 [rustsbi] Device Tree Region : 0x87000000..0x87000ef2 [rustsbi] Firmware Address : 0x80000000 [rustsbi] Supervisor Address : 0x80200000 [rustsbi] pmp01: 0x00000000..0x80000000 (-wr) [rustsbi] pmp02: 0x80000000..0x80200000 (---) [rustsbi] pmp03: 0x80200000..0x88000000 (xwr) [rustsbi] pmp04: 0x88000000..0x00000000 (-wr) [kernel] Hello, world! [root@openEuler1 os]#

v1ncente777 avatar Feb 08 '23 04:02 v1ncente777

@pw0rld 可以尝试从rustsbi项目下下载最新的release替换掉老的文件

readlnh avatar Mar 06 '23 06:03 readlnh

@readlnh 感谢提供帮助,这个问题我们已经解决了

pw0rld avatar Mar 07 '23 02:03 pw0rld

上面的那位wsl看不到输出只能退出的兄弟,虽然过了一年了,不过这里你无法运行大概率是qemu版本不对,检查which qemu-system-riscv64 ,看一下是不是/path/to/qemu7.0.0/build里的那个,大概率是因为你变成了/usr/bin/qemu-system-riscv64这个,调一下path优先级变成export PATH=/path/to/qemu-7.0.0/build:$PATH

coolwx avatar Sep 02 '23 15:09 coolwx

ch1 分支编译失败:

error: the item `log` is imported redundantly
  --> src/logging.rs:7:11
   |
7  | use log::{self, Level, LevelFilter, Log, Metadata, Record};
   |           ^^^^ the item `log` is already defined here
   |

rustc version is rustc 1.78.0-nightly (c475e2303 2024-02-28)

移除导入的 self 后可以正常运行。

ou-bing avatar Feb 29 '24 14:02 ou-bing

@ou-bing https://github.com/rcore-os/rCore-Tutorial-v3/issues/145 应该近期更新Rust版本吧。

wyfcyx avatar Feb 29 '24 15:02 wyfcyx

@pw0rld 你好,我最近将ubuntu从18.04升级到20.04后也遇到了这个问题,请问你是如何解决的

wangfp1145834208 avatar Mar 02 '24 02:03 wangfp1145834208

@coolwx 感谢提供的思路,用你的方法解决问题了~

wangfp1145834208 avatar Mar 02 '24 02:03 wangfp1145834208

@coolwx 的方法有效的

Wsgamer7 avatar Mar 14 '24 10:03 Wsgamer7