A Minimal Rust Kernel (zh-CN) #1019
Replies: 32 comments 40 replies
-
抱歉有一个疑问、文章中"设置默认目标"的一节、最后直接使用的命令是否应该是、
|
Beta Was this translation helpful? Give feedback.
-
cc @Rustin-Liu @luojia65 Maybe you can help here? (I don't speak Chinese) |
Beta Was this translation helpful? Give feedback.
-
是的,应该 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@luojia65 Thanks a lot for translating! Seems like this was fixed in #794. |
Beta Was this translation helpful? Give feedback.
-
似乎已经修好了,感谢。我的repo里也得改改(回头验证一下 |
Beta Was this translation helpful? Give feedback.
-
使用cargo bootimage 命令时候,需要在Cargo.toml中配置使用xbuild进行编译。如下: |
Beta Was this translation helpful? Give feedback.
-
when i use |
Beta Was this translation helpful? Give feedback.
-
@curtainp Looks like you somehow depend on the standard library. Did you set the |
Beta Was this translation helpful? Give feedback.
-
yes, and all step follow the blog, // no_std attribute disable automatic include std
#![no_std]
// disable runtime entry
#![no_main] with nightly version rust installed |
Beta Was this translation helpful? Give feedback.
-
Do you have your code online somewhere so that I can take a look? |
Beta Was this translation helpful? Give feedback.
-
You need to compile your code for the custom target. The command |
Beta Was this translation helpful? Give feedback.
-
yeah,i get it, thanks a lot |
Beta Was this translation helpful? Give feedback.
-
failed to run "cargo bootimage"
|
Beta Was this translation helpful? Give feedback.
-
抱歉有个疑问是 windows 下 qeum 运行无显示且报如下错误 Finished release [optimized + debuginfo] target(s) in 1.89s
Running: `qemu-system-x86_64 -drive format=raw,file=target\x86_64-blog_os\debug\bootimage-blog_os.bin`
(qemu:11736): Gtk-WARNING **: Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/bullet-symbolic.svg.
This may indicate that pixbuf loaders or the mime database could not be found. |
Beta Was this translation helpful? Give feedback.
-
i use the code-server (a vscode ide running in web) to study this blog. it's failure to run qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
Could not initialize SDL(No available video device) - exiting |
Beta Was this translation helpful? Give feedback.
-
Quick note: When I got to the 'Building our Kernel' section, I ran into an error and had to run |
Beta Was this translation helpful? Give feedback.
-
https://os.phil-opp.com/minimal-rust-kernel/#installing-rust-nightly |
Beta Was this translation helpful? Give feedback.
-
I am getting this error when I try to build, any suggestions on how to fix it ?. Also how to add the config.toml ? |
Beta Was this translation helpful? Give feedback.
-
想问下 大家有人用真机启动过这个嘛 |
Beta Was this translation helpful? Give feedback.
-
cargo install bootimage
|
Beta Was this translation helpful? Give feedback.
-
This error occurs when I run with the
|
Beta Was this translation helpful? Give feedback.
-
在mac上无法运行,也没有任何报错,同一个bin文件,Windows 10没有问题。 |
Beta Was this translation helpful? Give feedback.
-
请问怎么使用纯命令行执行qemu-system-x86_64 -drive format=raw,file=target/x86_64-blog_os/debug/bootimage-blog_os.bin里面的helloworld打印? 我使用nohup 和 -nographic , nohup.out 只会有bootstage,如何把qenu的东西定向出来? |
Beta Was this translation helpful? Give feedback.
-
使用QEMU运行时出现错误: |
Beta Was this translation helpful? Give feedback.
-
I got an error when I run with ^cargo xbuild --target x86.....json$,I can't complie rust-std-workspace-core v1.99.0,and the error message said "multiple candidate for tmeta depandency core found". |
Beta Was this translation helpful? Give feedback.
-
My friends made too many mistakes. I guarantee that I didn’t miss any step. Even the previous step json was still successful until cargo install bootimage and I stalled erro: % cargo bootimage --target x86_64-blog_os.json
error: data-layout for target `x86_64-bootloader-15639772412341111525`, `e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128`, differs from LLVM target's `x86_64-unknown-none-gnu` default layout, `e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128`
error: could not compile `rustc-std-workspace-core` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `core` (lib) due to 1 previous error
error: could not compile `compiler_builtins` (lib) due to 1 previous error
Error: Bootloader build failed.
Stderr: |
Beta Was this translation helpful? Give feedback.
-
qemu-system-x86_64 -drive format=raw,file=target/x86_64-blog_os/debug |
Beta Was this translation helpful? Give feedback.
-
cargo bootimage build error PS C:\Code\Rust\os-guide\blog_os> cargo bootimage
"C:\Develop\rust.cargo" is my CARGO_HOME |
Beta Was this translation helpful? Give feedback.
-
This is a general purpose comment thread for the “A Minimal Rust Kernel (zh-CN)” post.
Please note that I (@phil-opp) do not speak Chinese, so please comment in English if possible.
Beta Was this translation helpful? Give feedback.
All reactions