This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QEMU: allow us to run from QEMU for testing
This introduces a new KERNEL command line switch, nichromeroot if nichromeroot is in the command line, the uinit command will look for the parameter, e.g. nichromeroot=/dev/sda will cause uinit to grab the cpio from /dev/sda (not a typo! by using /dev/sda, not /dev/sda2, we don't have to mess with partitions in the qemu hard drive) This makes a certain amount of testing possible. We now run Xorg instead of Xfbdev and that works better. However we need to test on a Chromebook. This requires #845 from u-root. It will finally be possible to test NiChrome in qemu, unlike ChromeOS. This is tested and actually seems to work. QRUN is a sample QEMU usage. I replicate it here for history. First, we can do this: go run usb/*.go -dev=/tmp/t usb will create two files, /tmp/t2 and /tmp/t3. t3 is the cpio image. Then we can run qemu qemu-system-x86_64 \ -m 2048M \ -kernel linux-stable/arch/x86/boot/bzImage \ -s \ -monitor /dev/null \ -serial stdio \ -append 'nichromeroot=/dev/sda' \ -drive id=disk,file=/tmp/t3,if=none \ -device ich9-ahci,id=ahci \ -device ide-drive,drive=disk,bus=ahci.0 and /tmp/t3 is used as the disk. Note the nichromeroot switch. Signed-off-by: Ronald G. Minnich <[email protected]>
- Loading branch information