Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

硬件测试问题汇总 #376

Closed
shzhxh opened this issue Sep 22, 2022 · 2 comments
Closed

硬件测试问题汇总 #376

shzhxh opened this issue Sep 22, 2022 · 2 comments

Comments

@shzhxh
Copy link
Contributor

shzhxh commented Sep 22, 2022

commit id : ea7324f

D1

通过opensbi启动

❌ opensbi + 内存烧写,只进到opensbi无法进到zCore

通过rusbsbi启动

❌ rustsbi , 运行cargo bin --arch riscv64 --features "linux board-d1 link-user-img" --output z.bin编译出错

  • 在commit id : 5528f51 启动正常,libc-test通过

星光

❌ 运行cargo bin --arch riscv64 --features "linux board-visionfive link-user-img" --output z.bin编译出错

  • 在commit id : 5528f51 启动正常,但无法向串口写数据,所以无法进行libc-test测试

Unmatched

✔️ 远程启动正常,libc-test通过

@shzhxh shzhxh changed the title 硬件测试问题汇总(更新中) 硬件测试问题汇总 Sep 22, 2022
@yfblock
Copy link
Contributor

yfblock commented Sep 22, 2022

尝试修复了 zCore/build.rs 中的错误 本地目前可以编译通过

错误原因是std::env::var("PLATFORM")Err(NotPresent)unwrap 导致报错

目前测试指令 cargo bin --arch riscv64 --features "linux board-d1 link-user-img" --output z.bincargo bin --arch riscv64 --features "linux board-visionfive link-user-img" --output z.bin 可以通过

zCore/build.rs

        // let board = std::env::var("PLATFORM").unwrap();
        // let kernel_base_addr: u64 = if board.contains("fu740") {
        //     0xffffffe080200000
        // } else {
        //     0xffffffc080200000
        // };
        let board = std::env::var("PLATFORM");
        let kernel_base_addr: u64 = if board.map_or(false, |x| x.contains("fu740")) {
            0xffffffe080200000
        } else {
            0xffffffc080200000
        };

@shzhxh
Copy link
Contributor Author

shzhxh commented Sep 22, 2022

尝试修复了 zCore/build.rs 中的错误 本地目前可以编译通过

错误原因是std::env::var("PLATFORM")Err(NotPresent)unwrap 导致报错

目前测试指令 cargo bin --arch riscv64 --features "linux board-d1 link-user-img" --output z.bincargo bin --arch riscv64 --features "linux board-visionfive link-user-img" --output z.bin 可以通过

zCore/build.rs

        // let board = std::env::var("PLATFORM").unwrap();
        // let kernel_base_addr: u64 = if board.contains("fu740") {
        //     0xffffffe080200000
        // } else {
        //     0xffffffc080200000
        // };
        let board = std::env::var("PLATFORM");
        let kernel_base_addr: u64 = if board.map_or(false, |x| x.contains("fu740")) {
            0xffffffe080200000
        } else {
            0xffffffc080200000
        };

D1 rustsbi启动,星光开发板启动都没问题了。:+1:

@shzhxh shzhxh closed this as completed Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants