Skip to content

Instantly share code, notes, and snippets.

@tqh
Last active March 6, 2022 18:23
Show Gist options
  • Save tqh/acdb77d79189533fd50b97b63467ae2c to your computer and use it in GitHub Desktop.
Save tqh/acdb77d79189533fd50b97b63467ae2c to your computer and use it in GitHub Desktop.
My Haiku efi setup
  • In the haiku directory I have a directory efi/ and in it a link haiku_loader.efi -> ../generated/objects/haiku/x86_64/release/system/boot/efi/haiku_loader.efi

  • Haiku is configured with: ./configure --build-cross-tools x86_64 ../buildtools

  • Haiku EFI loader is build with: jam -q -sHAIKU_BOOT_PLATFORM=efi haiku_loader.efi

  • Haiku is built with: jam -q @nightly-anyboot

  • QEMU/kvm is started with (needs ovmf.fd):

    qemu-system-x86_64 -m 512M -cpu host -enable-kvm -nodefaults -smp 1,cores=2 \
        -vga std -net nic -net user -serial file:serial.log \
        -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \
        -device virtio-serial \
        -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \
        -no-reboot -usb -usbdevice tablet \
        -drive if=pflash,format=raw,file=OVMF.fd \
        -drive file=fat:efi/,format=raw,index=0 \
        -drive file=generated/haiku-nightly-anyboot.iso,media=cdrom,format=raw,index=1
    
  • I add haiku_loader.efi as a efi boot option in QEMU UEFI menus

@tqh
Copy link
Author

tqh commented Sep 30, 2018

Newer one:

qemu-system-x86_64 -m 512M -cpu host -enable-kvm -nodefaults -smp 1,cores=1 \
        -vga std -net nic -net user -serial file:serial.log \
        -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \
        -device virtio-serial \
        -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \
        -no-reboot -usb -device usb-tablet \
        -drive if=pflash,format=raw,file=OVMF.fd \
        -drive if=none,id=disk.0,file=fat:efi/,format=raw,readonly \
        -drive if=none,id=disk.1,file=generated/haiku-nightly-anyboot.iso,format=raw \
        -device virtio-scsi-pci,id=scsi \
        -device scsi-hd,drive=disk.0,scsi-id=0 \
        -device scsi-hd,drive=disk.1,scsi-id=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment