Protective MBR | GPT Disk Image | UEFI Dev (in C)

Queso Fuego
Queso Fuego
3.2 هزار بار بازدید - پارسال - Starting a C program to
Starting a C program to write valid GPT disk images to later load & boot EFI applications for an OS bootloader.
This video goes over writing LBA 0/CHS sector 1 of the disk image for a protective MBR, as a lighter intro.
The following videos will be a bit longer for adding GPT headers & tables, the EFI System partition with FAT32 filesystem, and adding various command line options. It gets sloppier after the next couple videos as I wasn't as experienced and tried new stuff and had to debug things for a while. But hopefully these next few videos are educational or interesting enough to show how someone could make a tool by reading different specs and a few web pages, as a mostly weekend-scoped project.

Notes:
- Going to use a separate variable for the image size in lbas when writing the mbr, as that value can/will be used elsewhere and won't be clamped to a 32 bit limit.

Links:
https://uefi.org/specifications (GPT & MBR covered in spec 2.10 chapter 5)
https://en.wikipedia.org/wiki/Master_...
https://www.rodsbooks.com/gdisk/
https://sourceforge.net/projects/gptf...

UEFI Programming playlist:
UEFI Programming in C

Git Repo:
https://github.com/queso-fuego/UEFI-G...

Repo state at the end of the video:
git clone -n https://github.com/queso-fuego/UEFI-G...
cd UEFI-GPT-image-creator
git checkout
8654aff6a29d09e8bfd8edaad0d7da701974004a

Repo state at the start of this video would be cloning the repo and starting from a new blank write_gpt.c file & makefile

Next video:
- Writing GPT headers and partition tables, including GUIDs & CRC32s.

Join the Community Discord: Discord: discord

Contact:
https://queso_fuego.srht.site/contact.html

- Let me know if there's anything specific you'd like to see!

Questions about setup/software/etc.?
Check the FAQ: https://queso_fuego.srht.site/about.html

Outline:
0:00 intro & disk image overview
7:29 grab repo, add makefile
10:24 start writing program
15:50 look at UEFI spec for MBR info
22:10 write MBR

Music credits:
Winter Night by Sakura Girl | SoundCloud: sakuragirl_official
Music promoted by https://www.chosic.com/free-music/all/
Creative Commons CC BY 3.0
https://creativecommons.org/licenses/...

#mbr #diskimage #cprogramming
پارسال در تاریخ 1402/03/05 منتشر شده است.
3,243 بـار بازدید شده
... بیشتر