Split BIOS/UEFI binaries for Pure64 #122
Replies: 2 comments 1 reply
-
|
Hello, Here is what I am running: ./clean.sh ./build.sh nasm -f bin kernel.asm -o kernel.bin -l kernel.lst dd if=/dev/zero of=disk.img count=128 bs=1048576 qemu-system-x86_64 -machine q35 -smp cpus=2 -serial file:serial.txt -m 4G -vga std -drive format=raw,file=disk.img |
Beta Was this translation helpful? Give feedback.
-
|
Great. I will try that.
Thank you.
…On Sat, Aug 23, 2025 at 11:59 AM Ian Seyler ***@***.***> wrote:
The issue here is that the BIOS version of Pure64 expects the software to
be on sector 262160 since it is meant for a hybrid disk image.
Technically this isn't required if you are doing BIOS-only.
This is configured in bios.asm:
%define DAP_STARTSECTOR 262160
1. Change that line in bios.asm to %define DAP_STARTSECTOR 16
2. ./build.sh
3. dd if=./bin/bios.sys of=disk.img conv=notrunc
For testing I used this:
kernel.asm:
[BITS 64]
[ORG 0x10000]
start:
nop
jmp start
I added this to the end of your qemu command:
-monitor telnet:localhost:8086,server,nowait
Then in another terminal execute:
telnet localhost 8086
Type info registers
You should see RIP in your kernel code (0x0000000000100000).
—
Reply to this email directly, view it on GitHub
<#122 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BWMG3WMWTN22HJ4673LKLFT3PCMVTAVCNFSM6AAAAABSPG2BJWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMJZG44DIMA>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Prior to a few moments ago there was only one main Pure64 file (pure64.sys). This file contained the necessary code for booting on a BIOS-based and UEFI-based system.
It's desirable to keep the binary size of Pure64 small (it's already 6KiB) so it made sense to separate the BIOS and UEFI bits.
After using NASM for more than 10 years now, I finally looked into how its Conditional Assembly works. We now have one Pure64 code that can be built in two different ways. This makes sense as the UEFI version of Pure64 doesn't need the floppy driver of the BIOS version.
ReturnInfinity/Pure64#88
Beta Was this translation helpful? Give feedback.
All reactions