Got rid of use of comma, updated flake to have mtools, gptfdisk

This commit is contained in:
Conál Paxton 2026-02-05 10:16:27 -05:00
parent 4b81def864
commit 0d15f5239f
8 changed files with 15 additions and 14 deletions

BIN
bin/os

Binary file not shown.

View File

@ -16,7 +16,8 @@
pkgs.clang
pkgs.gcc
pkgs.gnumake
pkgs.nasm
pkgs.mtools
pkgs.gptfdisk
];
};
};

BIN
image.hdd

Binary file not shown.

2
limine

@ -1 +1 @@
Subproject commit 7a6892a36f1fb6dbdd6e6f6d00b8062d5bcb813b
Subproject commit e0e61c946933696453f591da525ab1f8a66a553d

View File

@ -2,27 +2,27 @@
dd if=/dev/zero bs=1M count=0 seek=64 of=image.hdd
# Create a partition table.
, sgdisk image.hdd -n 1:2048 -t 1:ef00 -m 1
sgdisk image.hdd -n 1:2048 -t 1:ef00 -m 1
#rm -rf limine
rm -rf limine
# Download the latest Limine binary release for the 10.x branch.
#git clone https://codeberg.org/Limine/Limine.git limine --branch=v10.x-binary --depth=1
git clone https://codeberg.org/Limine/Limine.git limine --branch=v10.x-binary --depth=1
# Build "limine" utility.
#make -C limine
make -C limine
# Install the Limine BIOS stages onto the image.
./limine/limine bios-install image.hdd
# Format the image as fat32.
, mformat -i image.hdd@@1M
mformat -i image.hdd@@1M
# Make relevant subdirectories.
, mmd -i image.hdd@@1M ::/EFI ::/EFI/BOOT ::/boot ::/boot/limine
mmd -i image.hdd@@1M ::/EFI ::/EFI/BOOT ::/boot ::/boot/limine
# Copy over the relevant files.
, mcopy -i image.hdd@@1M bin/os ::/boot
, mcopy -i image.hdd@@1M limine.conf limine/limine-bios.sys ::/boot/limine
, mcopy -i image.hdd@@1M limine/BOOTX64.EFI ::/EFI/BOOT
, mcopy -i image.hdd@@1M limine/BOOTIA32.EFI ::/EFI/BOOT
mcopy -i image.hdd@@1M bin/os ::/boot
mcopy -i image.hdd@@1M limine.conf limine/limine-bios.sys ::/boot/limine
mcopy -i image.hdd@@1M limine/BOOTX64.EFI ::/EFI/BOOT
mcopy -i image.hdd@@1M limine/BOOTIA32.EFI ::/EFI/BOOT

Binary file not shown.

Binary file not shown.

View File

@ -4,7 +4,7 @@
#include "../include/limine.h"
u32 bg = 0x00000000;
u32 fg = 0xFFFFFFFF;
u32 fg = 0x00030200;
static size_t row;
static size_t col;
static size_t term_width, term_height;
@ -71,7 +71,7 @@ void put(int ch) {
for (size_t x = 0; x < TERM_WIDTH; x++) {
size_t off = (py + y) * fb_width + (px + x);
bool padding = (y == 0 || y == TERM_HEIGHT-1 || x == 0 || x == TERM_WIDTH-1);
fb_scr[off] = ((~glyph & 1) | padding )? bg : (x^y * off + y*term_width);
fb_scr[off] = ((~glyph & 1) | padding )? bg : (x^y * off + y*term_width) * fg;
glyph >>= !padding;
}
}