ajxs / uefi-elf-bootloader Goto Github PK
View Code? Open in Web Editor NEWUEFI ELF Bootloader example
License: GNU General Public License v3.0
UEFI ELF Bootloader example
License: GNU General Public License v3.0
Recently, I wanted to start developing some kind of simple combination of bootloader and kernel in ZIG (https://ziglang.org) and I searched for an example. Because of that, I found this really cool repo and rewrote it in ZIG.
But, as I executed it, there was the error "NotFound", which, after some research, was obvious to be in src/booloader/src/loader.c:62. Because I have zero experience about programming bootloaders and I wanted (as described above) to have a good example, it would be wonderful to implement physical address handling.
Or is there anything I could read about that on OSDev?
i'm using a moderately modified version of your bootloader:
https://github.com/microNET-OS/microCORE/tree/stable/src/bootloader
and I don't know if it's a me problem or a you problem but the GOP works and shit i got that working i passed framebuffer info to my kernel so I've accomplished graphics. yay. anyway the bootloader doesn't work when i use a computer that doesn't have an active serial port for some reason. i tested it on my pc which has a serial port but it isn't active and it failed to init serial io. i disabled that conditional and made it just spit a warning and then it got like fucked up bad. the memory map failed (buffer too small) and the text was all over the place. any idea why?
Hello,
I am a bit new to bootloaders and have just come across your elf bootloader and wanted to know if there is an easy way to test it with an existing x86_64 elf kernel that I have without having to re-work a number of things in your make files?
Any help would be greatly appreciated.
I'm attempting to run run
but I get these errors:
ld: src/error.o:(.bss+0x0): multiple definition of `graphics_service'; src/elf.o:(.bss+0x0): first defined here
ld: src/error.o:(.bss+0x10): multiple definition of `file_system_service'; src/elf.o:(.bss+0x10): first defined here
ld: src/error.o:(.bss+0x18): multiple definition of `serial_service'; src/elf.o:(.bss+0x18): first defined here
ld: src/fs.o:(.bss+0x0): multiple definition of `graphics_service'; src/elf.o:(.bss+0x0): first defined here
ld: src/fs.o:(.bss+0x10): multiple definition of `file_system_service'; src/elf.o:(.bss+0x10): first defined here
ld: src/fs.o:(.bss+0x18): multiple definition of `serial_service'; src/elf.o:(.bss+0x18): first defined here
ld: src/graphics.o:(.bss+0x0): multiple definition of `graphics_service'; src/elf.o:(.bss+0x0): first defined here
ld: src/graphics.o:(.bss+0x10): multiple definition of `file_system_service'; src/elf.o:(.bss+0x10): first defined here
ld: src/graphics.o:(.bss+0x18): multiple definition of `serial_service'; src/elf.o:(.bss+0x18): first defined here
ld: src/loader.o:(.bss+0x0): multiple definition of `graphics_service'; src/elf.o:(.bss+0x0): first defined here
ld: src/loader.o:(.bss+0x10): multiple definition of `file_system_service'; src/elf.o:(.bss+0x10): first defined here
ld: src/loader.o:(.bss+0x18): multiple definition of `serial_service'; src/elf.o:(.bss+0x18): first defined here
ld: src/main.o:(.bss+0x0): multiple definition of `graphics_service'; src/elf.o:(.bss+0x0): first defined here
ld: src/main.o:(.bss+0x10): multiple definition of `file_system_service'; src/elf.o:(.bss+0x10): first defined here
ld: src/main.o:(.bss+0x18): multiple definition of `serial_service'; src/elf.o:(.bss+0x18): first defined here
ld: src/serial.o:(.bss+0x0): multiple definition of `graphics_service'; src/elf.o:(.bss+0x0): first defined here
ld: src/serial.o:(.bss+0x10): multiple definition of `file_system_service'; src/elf.o:(.bss+0x10): first defined here
ld: src/serial.o:(.bss+0x18): multiple definition of `serial_service'; src/elf.o:(.bss+0x18): first defined here
make[1]: *** [makefile:85: build/bootx64.so] Error 1
make[1]: Leaving directory '/home/user/uefi/uefi-elf-bootloader/src/bootloader'
make: *** [makefile:65: bootloader/build/bootx64.efi] Error 2
make: Leaving directory '/home/user/uefi/uefi-elf-bootloader/src'
I've got GCC 12.1.0 x86_64 ELF cross-compiler with binutils 2.38.
GNU EFI and OVMF are latest ones from Arch repositories.
Am I doing something wrong?
When you allocate memory for the segments, you use AllocateAnyPages, which means it will ignore the value of segment_virtual_address and will instead pick the pages randomly.
I dont know if this was on purpose but a couple lines above you printed "Allocating memory at address x".
"Allocation requests of Type AllocateAnyPages allocate any available range of pages that satisfies the
request. On input, the address pointed to by Memory is ignored. "
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.