DragonOS
DragonOS copied to clipboard
[开发环境]: 使用从源码编译的qemu启动内核失败(PVH模式识别成功) - acpi_init(): ACPI not provided by bootloader - mb_entry_info/HvmStartInfo rsdp_paddr = 0?
问题描述
- 代码构建 + 生成镜像正常
- qemu PVH模式识别成功
- qemu运行报错: acpi_init(): ACPI not provided by bootloader
- ubuntu构建的qemu系统包 可以运行并地址非0
环境
- ubuntu24.04
- qemu-10 (从源码构建
一些尝试和分析
自己编译安装的qemu 必须要用 vnc链接吗
似乎qemu传进来的时候 rsdp_addr 就是被设置成了0
这里 bios/uefi 在 -kernel下并不能执行初始化acpi?
期望/疑问
- 自己编译安装的qemu 必须要用 vnc链接吗
- acpi/rsdp_addr是0的原因是什么
- qemu PVH模式下, 默认就是要qemu提供地址呢, 还是自己提供acpitable然后通过内核命令行参数指定地址
acpi那个,应该是因为你的电脑上面,没有acpi的库,然后qemu默认就没有添加acpi支持。这里应该是文档写的不全,可以试试加一下--enable-slirp --enable-acpi看看呢
@fslongjin 安装了acpi工具链也有问题, 系统的qemu好像是下游加了很多非qemu官方和acpi相关的patch
- 1.目前
make qemu-nographic以 pvh 方式启动 hvm info 结构里传进来的 rsdp确实是0 - 2.使用
make qemu能识别acpi 并运行 (可能是bios固件中做了相关初始化?
make qemu 启动遇到的问题 (自己编译的 和 系统自带的 8.2 版本都是
默认使用 /bin/dragonreach 会报tty问题
[ DEBUG ] (src/driver/disk/ahci/mod.rs:93) <ahci_rust_init> Find a SATAPI type Disk.
[41m[ ERROR ] [0m(src/driver/disk/ahci/ahcidisk.rs:212) Read disk error
[41m[ ERROR ] [0m(src/init/initial_kthread.rs:44) ahci_init failed: EIO
[ INFO ] (src/filesystem/vfs/vcore.rs:122) Try to mount root fs...
[ DEBUG ] (src/driver/base/block/manager.rs:209) All gendisks: ["/dev/vda1"]
[ DEBUG ] (src/driver/block/cache/cached_block_device.rs:47) BlockCache Initialized!
[ INFO ] (src/filesystem/vfs/vcore.rs:67) VFS: Migrating filesystems...
[ INFO ] (src/filesystem/devpts/mod.rs:292) DevPtsFs mounted.
[ INFO ] (src/filesystem/vfs/vcore.rs:108) VFS: Migrate filesystems done!
[ INFO ] (src/filesystem/vfs/vcore.rs:153) Successfully migrate rootfs to FAT32!
[ DEBUG ] (src/net/net_core.rs:58) dhcp_query: net_face=eth0
[ DEBUG ] (src/net/net_core.rs:74) DHCP try round: 0
[ INFO ] (src/net/net_core.rs:102) Successfully allocated ip by Dhcpv4! Ip:10.0.2.15/24
[ DEBUG ] (src/init/initial_kthread.rs:58) initial kernel thread done.
[ INFO ] (src/init/initial_kthread.rs:92) Boot with specified init process: "/bin/dragonreach"
[ DEBUG ] (src/init/initial_kthread.rs:132) Trying to run init process at "/bin/dragonreach"
[1;33m[ WARN ] [0m(src/syscall/mod.rs:381) SYS_SIGALTSTACK has not yet been implemented
____ ___ ____
| _ \ _ __ __ _ __ _ ___ _ __ / _ \ / ___|
| | | || '__| / _` | / _` | / _ \ | '_ \ | | | |\___ \
| |_| || | | (_| || (_| || (_) || | | || |_| | ___) |
|____/ |_| \__,_| \__, | \___/ |_| |_| \___/ |____/
|___/
DragonOS - An opensource operating system.
Copyright: DragonOS Community. 2022-2024, All rights reserved.
Version: [1;32mV0.1.10
[0m Git commit SHA1:
Build time: Sep 2 2025 22:58:22
You can visit the project via:
[1;36m Official Website: https://DragonOS.org
[0m[1;33m GitHub: https://github.com/DragonOS-Community/DragonOS
[0m
Maintainer: longjin <[email protected]>
Get contact with the community: <[email protected]>
Join our development community:
[1;33m https://bbs.dragonos.org.cn
[0m
[1;33m[ WARN ] [0m(src/syscall/mod.rs:381) SYS_SIGALTSTACK has not yet been implemented
[1;33m[ WARN ] [0m(src/syscall/mod.rs:381) SYS_SIGALTSTACK has not yet been implemented
[92mroot@DragonOS[0m:[96m/[0m$ [ DEBUG ] (src/driver/tty/tty_job_control.rs:83) tty_check_change: orphaned pgrp
read char failed: I/O error (os error 5)
[ DEBUG ] (src/driver/tty/tty_job_control.rs:83) tty_check_change: orphaned pgrp
read char failed: I/O error (os error 5)
[ DEBUG ] (src/driver/tty/tty_job_control.rs:83) tty_check_change: orphaned pgrp
read char failed: I/O error (os error 5)
[ DEBUG ] (src/driver/tty/tty_job_control.rs:83) tty_check_change: orphaned pgrp
read char failed: I/O error (os error 5)
- serial_opt.txt
- 如果手动修改 grub 的 引导配置
dragonreach->busybox init可以进入sh
问题汇总
-
- nographic: -kernel + pvh 模式 rsdp 的值 会不会在执行内核代码前被设置, 受影响的因素是什么, 还是只是下游非qemu官方的patch设置的
-
make qemu默认dragonreach的tty问题