User:Xenos/UEFI Bare Bones: Difference between revisions

Content deleted Content added
Xenos (talk | contribs)
→‎Linker script: Improved output sections.
Xenos (talk | contribs)
→‎Running: Added instructions for running in VirtualBox.
Line 484:
-drive if=pflash,format=raw,unit=1,file=OVMF_VARS-pure-efi.fd \
-drive if=ide,format=raw,file=fat.img</source>
 
=== VirtualBox ===
 
[[VirtualBox]] can boot in UEFI mode and run the "Hello world" application created in this tutorial in both 32 and 64 bit mode. A virtual machine with the appropriate settings can be created with the following commands.
 
==== i386 ====
 
Create the virtual machine:
 
<source lang="bash">VBoxManage createvm --name UEFI32 --ostype "Other" --register
VBoxManage modifyvm UEFI32 --ioapic on
VBoxManage modifyvm UEFI32 --boot1 floppy
VBoxManage modifyvm UEFI32 --memory 256 --vram 16
VBoxManage modifyvm UEFI32 --firmware efi32
VBoxManage storagectl UEFI32 --name "Floppy" --add floppy
VBoxManage storageattach UEFI32 --storagectl "Floppy" --port 0 --device 0 --type fdd --medium "fat.img"</source>
 
Run:
 
<source lang="bash">VBoxManage startvm UEFI32</source>
==== x86_64 ====
 
Create the virtual machine:
 
<source lang="bash">VBoxManage createvm --name UEFI64 --ostype "Other_64" --register
VBoxManage modifyvm UEFI64 --ioapic on
VBoxManage modifyvm UEFI64 --boot1 floppy
VBoxManage modifyvm UEFI64 --memory 256 --vram 16
VBoxManage modifyvm UEFI64 --firmware efi64
VBoxManage storagectl UEFI64 --name "Floppy" --add floppy
VBoxManage storageattach UEFI64 --storagectl "Floppy" --port 0 --device 0 --type fdd --medium "fat.img"</source>
 
Run:
 
<source lang="bash">VBoxManage startvm UEFI64</source>