How to start programming under uefi

Programming, for all ages and all languages.
Post Reply
afx34
Posts: 1
Joined: Mon Sep 21, 2015 8:32 am

How to start programming under uefi

Post by afx34 »

I try to create simple project (just Hello World) under UEFI. But I can't understand where I can execute this. I downloaded edk2 with duel package for Debian Linux (gcc 4.9) but I can't understand what is next? What I need to do to create and execute hello world? How I should use this emulator?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How to start programming under uefi

Post by Combuster »

- Start with loading the proper BIOS image into Bochs or qemu, and see if you get to a prompt.
- Craft a partitioned disk with FAT and a few files on it and see if it likes that.
- Build an x86_64 PE toolchain
- Read the EFI documentation and write a hello world based on the examples out there.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: How to start programming under uefi

Post by jnc100 »

UEFI Bare Bones

Regards,
John.
wyj
Posts: 11
Joined: Thu Nov 27, 2014 8:23 pm

Re: How to start programming under uefi

Post by wyj »

Why not try uefi simple project which uses gnu-efi under visual studio ? It works really good.
Firstly it free you from EDK2 and its various types of files,
Secondly it free you from makefile and uefi_call_wrapper(),
Also you can work under vs under windows instead of gedit or vim under linux

And what is worth to mention is that you can use masm/nasm/yasm as custom assembly compile tools for vs, instead of gas grammar with inline assembly under gcc
useful feather if you want to modify GDTR or CRs.
intx13
Member
Member
Posts: 112
Joined: Wed Sep 07, 2011 3:34 pm

Re: How to start programming under uefi

Post by intx13 »

This is a little old, but I've been working on the wiki UEFI page pretty heavily over the past couple days, and I think it provides a slightly more gentle introduction now.
HoTT
Member
Member
Posts: 56
Joined: Tue Jan 21, 2014 10:16 am

Re: How to start programming under uefi

Post by HoTT »

Just today I was thinking if using UEFI would be a good idea and was very pleased by that page. Thank you!
Post Reply