### Start Windows 10 Installation Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Launches the Windows 10 installer, allocating 4GB RAM and booting from the provided ISO. Networking is configured via user mode. ```bash qemu-system-x86_64 -m 4G -drive if=ide,index=0,media=disk,file=win10.qcow2 \ -drive if=ide,index=2,media=cdrom,file=win10.iso -boot order=d \ -serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0 ``` -------------------------------- ### Start Ubuntu Installation in QEMU Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Boots the QEMU VM from the Ubuntu ISO to begin the installation process. Ensure the `start.sh` script is executable and adjust RAM (`-m 4G`) as needed. ```bash qemu-system-x86_64 -m 4G -drive if=ide,index=0,media=disk,file=ubuntu.qcow2 \ -drive if=ide,index=2,media=cdrom,file=ubuntu.iso -boot order=d \ -serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0 ``` -------------------------------- ### Boot Installed Windows 10 Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Starts the installed Windows 10 VM after installation, booting from the hard disk with 4GB RAM and user-mode networking. ```bash qemu-system-x86_64 -m 4G -drive if=ide,index=0,media=disk,file=win10.qcow2 \ -boot order=c \ -serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0 ``` -------------------------------- ### Start Windows XP Installation Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Launches the Windows XP installer, allocating 4GB RAM and booting from the provided ISO. Networking is configured via user mode. ```bash qemu-system-i386 -m 4G -drive if=ide,index=0,media=disk,file=winxp.qcow2 \ -drive if=ide,index=2,media=cdrom,file=winxp.iso -boot order=d \ -serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0 ``` -------------------------------- ### Boot Installed Windows 11 with TPM Support Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Starts the installed Windows 11 VM after setup, booting from the hard disk with 8GB RAM, 2 SMP cores, tablet input, and user-mode networking. Assumes SWTPM is installed and configured. ```bash qemu-system-x86_64 -hda win11.qcow2 -boot c \ -smp 2 -m 8G -usbdevice tablet \ -serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0 ``` -------------------------------- ### Start Windows 11 Installation with Tablet Input Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Launches the Windows 11 installer, allocating 4GB RAM and booting from the ISO. Includes `-usbdevice tablet` for improved mouse pointer accuracy and user-mode networking. ```bash qemu-system-x86_64 -hda win11.qcow2 -cdrom win11.iso -boot d \ -smp 2 -m 4G -usbdevice tablet \ -serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0 ``` -------------------------------- ### Boot Installed Windows XP Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Starts the installed Windows XP VM after installation, booting from the hard disk with 4GB RAM and user-mode networking. ```bash qemu-system-i386 -m 4G -drive if=ide,index=0,media=disk,file=winxp.qcow2 \ -boot order=c \ -serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0 ``` -------------------------------- ### Boot Installed Ubuntu from Disk in QEMU Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Boots the QEMU VM from the installed Ubuntu system on the disk image after the installation is complete. The ISO is no longer needed. ```bash qemu-system-x86_64 -m 4G -drive if=ide,index=0,media=disk,file=ubuntu.qcow2 \ -boot order=c \ -serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0 ``` -------------------------------- ### Create QEMU Disk Image Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Creates a growable QCOW2 disk image for the Ubuntu installation. Use this command before starting the QEMU VM for the first time. ```bash qemu-img create -f qcow2 ubuntu.qcow2 80G ``` -------------------------------- ### Dependency Graph Example Source: https://github.com/asahilinux/docs/wiki/SW:AGX-driver-notes Visualizes the dependency graph for the command submission example, showing explicit and implied ordering. ```text [C*]->[R1]----+----\ [C1]------+|---vv [C2]-----+||->[R3]-v vvv [R4] [R2]------^ ``` -------------------------------- ### Install Homebrew package manager Source: https://github.com/asahilinux/docs/wiki/Tethered-boot-setup-on-macOS Installs the Homebrew package manager on macOS. This is the recommended way to install required software for the m1n1 setup. ```shell /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Create Windows 11 VM Startup Script Source: https://github.com/asahilinux/docs/blob/main/docs/sw/windows-11-vm.md This script configures and launches a Windows 11 ARM64 virtual machine using QEMU. It optimizes CPU core allocation, specifies VM hardware, and mounts ISOs for installation and drivers. Adjust ISO filenames if they differ. ```shell #!/bin/sh performance_cores=$(awk ' /^processor/ { proc=$3 } /^CPU part/ { if ($4 == "0x023" || $4 == "0x025" || $4 == "0x029" || $4 == "0x033" || $4 == "0x035" || $4 == "0x039") procs=procs ? procs","proc : proc } END { print procs } ' /proc/cpuinfo) taskset -c "$performance_cores" \ qemu-system-aarch64 \ -display sdl,gl=on \ -cpu host \ -M virt \ -enable-kvm \ -m 2G \ -smp 2 \ -bios /usr/share/edk2/aarch64/QEMU_EFI.fd \ -hda win11.qcow2 \ -device qemu-xhci \ -device ramfb \ -device usb-storage,drive=install \ -drive if=none,id=install,format=raw,media=cdrom,file=windows-11.iso \ -device usb-storage,drive=virtio-drivers \ -drive if=none,id=virtio-drivers,format=raw,media=cdrom,file=virtio-win.iso \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 \ -audio driver=pipewire,model=virtio \ -device usb-kbd \ -device usb-tablet \ -nic user,model=virtio-net-pci ``` -------------------------------- ### Install Konsole terminal emulator Source: https://github.com/asahilinux/docs/blob/main/docs/sw/linux-bringup-x11.md Installs Konsole, a feature-rich terminal emulator for the KDE desktop environment, usable with other X11 setups. ```bash apt install konsole ``` -------------------------------- ### Serve Documentation Locally with Zensical Source: https://github.com/asahilinux/docs/blob/main/README.md Run this command to build and serve the documentation locally for testing. Ensure Zensical is installed as a Python package. ```bash $ zensical serve ``` -------------------------------- ### Start X server Source: https://github.com/asahilinux/docs/blob/main/docs/sw/linux-bringup-x11.md Attempts to start the X Window System. If issues arise, check the Xorg log file for errors. ```bash startx ``` -------------------------------- ### Complete Debian Rootfs Setup Source: https://github.com/asahilinux/docs/blob/main/docs/sw/linux-bringup-usb.md After entering the chroot environment, run this command to finalize the debootstrap installation. ```bash /debootstrap/debootstrap --second-stage ``` -------------------------------- ### Parse Get Action List Response Source: https://github.com/asahilinux/docs/wiki/HW:USB-PD The response to the 'Get Action List' command contains the VDM header and a list of supported action IDs. This example shows a typical response from an M1 Mac Mini. ```text 5ac8010 >VDM 5AC8010 HW PT[235200000:235204000] -> RESERVED VUART PT[235204000:23b700420] -> HW PT[23b700420:23b700424] -> RESERVED PMU HACK PT[23b700424:23d280088] -> HW PT[23d280088:23d28008c] -> RESERVED PMU HACK PT[23d28008c:23d280098] -> HW PT[23d280098:23d28009c] -> RESERVED PMU HACK PT[23d28009c:700000000] -> HW Improving logo... Shutting down framebuffer... Enabling SPRR... Enabling GXF... Jumping to entrypoint at 0x81b118800 Pass: mrs x0, HID5_EL1 = 2082df50e700df14 (HID5_EL1) Pass: msr HID5_EL1, x0 = 2082df50e700df14 (OK) (HID5_EL1) Pass: mrs x0, EHID9_EL1 = 600000811 (EHID9_EL1) Pass: msr EHID9_EL1, x0 = 600000811 (OK) (EHID9_EL1) Pass: mrs x0, EHID10_EL1 = 3000528002788 (EHID10_EL1) Pass: msr EHID10_EL1, x0 = 3000528002788 (OK) (EHID10_EL1) Pass: mrs x0, EHID20_EL1 = 618100 (EHID20_EL1) Pass: msr EHID20_EL1, x0 = 618100 (OK) (EHID20_EL1) Pass: mrs x0, EHID20_EL1 = 618100 (EHID20_EL1) Pass: msr EHID20_EL1, x0 = 618100 (OK) (EHID20_EL1) ``` -------------------------------- ### Install img4tool using Homebrew tap Source: https://github.com/asahilinux/docs/wiki/Tethered-boot-setup-on-macOS Installs the img4tool utility by adding a custom Homebrew tap and then installing the package. This is an optional step. ```shell brew tap aderuelle/homebrew-tap brew install img4tool ``` -------------------------------- ### Build and Install libgeneral Source: https://github.com/asahilinux/docs/wiki/Tethered-boot-setup-on-macOS Clone, build, and install the libgeneral dependency. Ensure it's installed in the specified dependencies directory to avoid system conflicts. ```shell cd ~/asahi git clone https://github.com/tihmstar/libgeneral.git cd libgeneral ./autogen.sh ./configure --prefix=/Users/alexis/asahi/deps make && make install ``` -------------------------------- ### Format and Mount NVMe Partition Source: https://github.com/asahilinux/docs/blob/main/docs/sw/linux-bringup-nvme.md After creating a FAT32 partition on the NVMe drive, format it with ext4 and mount it. This example assumes the NVMe drive is /dev/nvme0n1 and the target partition is p4. ```bash fdisk -l /dev/nvme0n1 ``` ```bash mkfs.ext4 /dev/nvme0n1p4 ``` ```bash mount /dev/nvme0n1p4 /mnt ``` -------------------------------- ### Download and Prepare ReactOS ISO Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Downloads the ReactOS 32-bit nightly boot CD and extracts the ISO file. Ensure you have 7z installed (`sudo apt install p7zip-full`). ```bash wget reactos-32bit-bootcd-nightly.7z 7z x reactos-32bit-bootcd-nightly.7z mv reactos*.iso ReactOS.iso ``` -------------------------------- ### Install Python and Construct Package Source: https://github.com/asahilinux/docs/wiki/RE:Kernelcache Install pip for Python 3 and then use pip3 to install the 'construct' Python package, which is required for the machodump.py script. ```bash apt install python3-pip pip3 install construct ``` -------------------------------- ### Install QEMU and Dependencies on Ubuntu Asahi Source: https://github.com/asahilinux/docs/wiki/SW:Ubuntu-Asahi-Qemu Installs necessary packages for QEMU compilation and virtual machine management. Ensure you have sufficient disk space. ```bash sudo apt -y install git libglib2.0-dev libfdt-dev \ libpixman-1-dev zlib1g-dev ninja-build \ git-email libaio-dev libbluetooth-dev \ libcapstone-dev libbrlapi-dev libbz2-dev \ libcap-ng-dev libcurl4-gnutls-dev libgtk-3-dev \ libibverbs-dev libjpeg8-dev libncurses5-dev \ libnuma-dev librbd-dev librdmacm-dev \ libsasl2-dev libsdl2-dev libseccomp-dev \ libsnappy-dev libssh-dev \ libvde-dev libvdeplug-dev libvte-2.91-dev \ libxen-dev liblzo2-dev valgrind xfslibs-dev \ libnfs-dev libiscsi-dev flex bison meson \ qemu-utils virt-manager ``` -------------------------------- ### Install Python Dependencies on macOS (MacPorts) Source: https://github.com/asahilinux/docs/blob/main/docs/platform/dev-quickstart.md Alternatively, you can use MacPorts to install Python 3.9 and pip, then install the dependencies. MacPorts provides a native build for M1 architecture. ```shell $ sudo su - $ port install python39 py39-pip $ pip install pyserial construct ``` -------------------------------- ### Install U-Boot by Concatenating Binaries Source: https://github.com/asahilinux/docs/wiki/U-Boot Installs a custom U-Boot build by concatenating m1n1, DTBs, and U-Boot. This process requires root privileges and a backup of the original boot.bin. ```bash cat build/m1n1.bin /path/to/dtbs/*.dtb <(gzip -c /path/to/uboot/u-boot-nodtb.bin) > /boot/efi/m1n1/boot.bin ``` -------------------------------- ### Download Debian Installer Initrd Source: https://github.com/asahilinux/docs/blob/main/docs/sw/linux-bringup.md Download the 27MB initrd (initial RAM disk) for the Debian arm64 installer. This file is used to boot the Debian installer on the M1 Mac. ```bash wget https://deb.debian.org/debian/dists/buster/main/installer-arm64/current/images/netboot/debian-installer/arm64/initrd.gz ```