raspiduino / waq

Run Windows 10 for ARM64 on QEMU
MIT License
78 stars 8 forks source link

Wheire is "startup.nsh"? #13

Open kunisuzaki opened 3 weeks ago

kunisuzaki commented 3 weeks ago

Dear,

I run the following commd on Ubuntu 2204 amd64 and met the message.

qemu-system-aarch64 -name "Windows 10 on ARM64" -M virt -cpu cortex-a72 -smp 3 --accel tcg,thread=multi -m 2048 -drive file="QEMU_EFI.img",format=raw,if=pflash -drive file="QEMU_VARS.img",format=raw,if=pflash -device VGA -device nec-usb-xhci -device usb-kbd -device usb-mouse -device usb-storage,drive=boot -drive if=none,id=boot,file="woa_17134.img",format=raw -device usb-storage,drive=drivercdrom -drive file="virtio-win-0.1.185.iso",media=cdrom,if=none,id=drivercdrom

Wheire is "startup.nsh"? should I change the *.img fies? image

raspiduino commented 3 weeks ago

You don't need that file. Type exit, then you should get to a menu. Select Boot Device or thing like that, then select your boot drive.

kunisuzaki commented 2 weeks ago

Thank you for your reply. It was very useful. I could go to the BIOS mode and change the boot device as shown the following photo. image_1

However, I could not boot normal Win10. It went to the following. I could not contine normally and go to torubleshoot. image

Fortunately, I could run command prompt mode.

image

Could you help me to boot normal Win10 on QEMU?

raspiduino commented 2 weeks ago

WHAT? You gave it 2048 MB of RAM and it still says Not enough memory resources are available to process this command???

kunisuzaki commented 2 weeks ago

I changed the memory size 4096 MB, but the message was same.

qemu-system-aarch64 -name "Windows 10 on ARM64" -M virt -cpu cortex-a72 -smp 3 --accel tcg,thread=multi -m 4096 -drive file="QEMU_EFI.img",format=raw,if=pflash -drive file="QEMU_VARS.img",format=raw,if=pflash -device VGA -device nec-usb-xhci -device usb-kbd -device usb-mouse -device usb-storage,drive=boot -drive if=none,id=boot,file="woa_17134.img",format=raw -device usb-storage,drive=drivercdrom -drive file="virtio-win-0.1.185.iso",media=cdrom,if=none,id=drivercdrom

The QEMU setting is as follows.

$ qemu-system-aarch64 -version
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.21)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

The same messge was found on QEMU on Rasberry Pi 4. Why?

raspiduino commented 2 weeks ago

Hmm, maybe you should try -M virt-2.11?

kunisuzaki commented 2 weeks ago

Thank you for your suggestion. However, the situation has not changed.

I noticed an interesting issue: the QEMU BIOS shows "0 MB RAM". Could this be causing a problem?

image

raspiduino commented 2 weeks ago

Hi, maybe try newer EDK2 firmware at https://retrage.github.io/edk2-nightly/ ?

kunisuzaki commented 1 week ago

I tried to use "RELEASEAARCH64_QEMU_EFI.fd" in https://retrage.github.io/edk2-nightly/

 dd if=/dev/zero bs=1M count=64 of=flash0.img
 dd if=RELEASEAARCH64_QEMU_EFI.fd bs=1M of=flash0.img conv=notrunc

And I replaced QEMU_EFI.img with the "flash0.img"

qemu-system-aarch64 -name "Windows 10 on ARM64" -M virt-2.11 -cpu cortex-a72 -smp 3 --accel tcg,thread=multi -m 2048 -drive file="flash0.img",format=raw,if=pflash -drive file="QEMU_VARS.img",format=raw,if=pflash -device VGA -device nec-usb-xhci -device usb-kbd -device usb-mouse -device usb-storage,drive=boot -drive if=none,id=boot,file="woa_17134.img",format=raw -device usb-storage,drive=drivercdrom -drive file="virtio-win-0.1.185.iso",media=cdrom,if=none,id=drivercdrom

The QEMU tells "Guest has not initialized the dispay (yet). image

raspiduino commented 1 week ago

-device VGA

Replace this with -device ramfb

kunisuzaki commented 1 week ago

Thank you for your quick response. However, the sitiation is same. The QEMU tells "Guest has not initialized the dispay (yet)."

raspiduino commented 1 week ago

Hmm that's so weird, I have never seen messages like that. Maybe try -bios /usr/share/qemu/qemu-uefi-aarch64.bin? (I got that from https://gist.github.com/Vogtinator/293c4f90c5e92838f7e72610725905fd).

Honestly this repo is not maintained, and you should instead use the tutorial from https://gist.github.com/Vogtinator/293c4f90c5e92838f7e72610725905fd

kunisuzaki commented 1 week ago

Hmm that's so weird, I have never seen messages like that. Maybe try -bios /usr/share/qemu/qemu-uefi-aarch64.bin? (I got that from https://gist.github.com/Vogtinator/293c4f90c5e92838f7e72610725905fd).

Honestly this repo is not maintained, and you should instead use the tutorial from https://gist.github.com/Vogtinator/293c4f90c5e92838f7e72610725905fd

I could not find qemu-uefi-aarch64.bin and used /usr/share/qemu-efi-aarch64/QEMU_EFI.fd

$ qemu-system-aarch64 -name "Windows 10 on ARM64" -M virt-2.11 -cpu cortex-a72 -smp 3 --accel tcg,thread=multi -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -m 2048 -drive file="flash0.img",format=raw,if=pflash -drive file="QEMU_VARS.img",format=raw,if=pflash -device VGA -device nec-usb-xhci -device usb-kbd -device usb-mouse -device usb-storage,drive=boot -drive if=none,id=boot,file="woa_17134.img",format=raw -device usb-storage,drive=drivercdrom -drive file="virtio-win-0.1.185.iso",media=cdrom,if=none,id=drivercdrom
qemu-system-aarch64: The contents of the first flash device may be specified with -bios or with -drive if=pflash... but you cannot use both options at once

I removed two if=pflash and ran as follows

$ qemu-system-aarch64 -name "Windows 10 on ARM64" -M virt-2.11 -cpu cortex-a72 -smp 3 --accel tcg,thread=multi -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -m 2048 -drive file="flash0.img",format=raw -drive file="QEMU_VARS.img",format=raw -device VGA -device nec-usb-xhci -device usb-kbd -device usb-mouse -device usb-storage,drive=boot -drive if=none,id=boot,file="woa_17134.img",format=raw -device usb-storage,drive=drivercdrom -drive file="virtio-win-0.1.185.iso",media=cdrom,if=none,id=drivercdrom

Unfortuately, the situation was same. The QEMU tells "Guest has not initialized the dispay (yet)."

raspiduino commented 1 week ago

image

I tested on Ubuntu 22.04 with QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.21) and it works fine. Maybe check your version?

kunisuzaki commented 5 days ago

Thank you. I can confirmed the TianoCore with your options.

qemu-system-aarch64 -name "Windows 10 on ARM64" -M virt-2.11 -cpu cortex-a72 -smp 3 --accel tcg,thread=multi -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -m 2048 -device ramfb

However, I cannot boot Win10. I guess the woa_17134.img was broken. I will download the file again and try with it. Please wait.

raspiduino commented 5 days ago

However, I cannot boot Win10.

Can you elaborate more on the symptoms?

kunisuzaki commented 2 days ago

The situation was same. I could run command prompt mode which said Not enough memory resources are available to process this command . I upload the ArmQEMU-Win-WOA.tar.gz which are used my Ubuntu 2204. The file is not include woa_17134.img and the size is 326MB. If you have time, please try it. https://lab.iisec.ac.jp/~suzaki_lab/ArmQEMU-Win-WOA.tar.gz