From 866e95b4c3ec199290b2713448696943f9e4afda Mon Sep 17 00:00:00 2001 From: mintsuki Date: Sat, 29 Aug 2020 20:02:16 +0200 Subject: [PATCH] Rebranding --- .gitignore | 3 ++- CONFIG.md | 4 +-- Makefile | 18 ++++++++------ README.md | 31 +++++++++++------------ qloader2-install.c => limine-install.c | 2 +- qloader2.bin => limine.bin | Bin 32768 -> 32768 bytes qloader2-install | 33 ------------------------- screenshot.png | Bin 11628 -> 6754 bytes src/Makefile | 6 ++--- src/bootsect/bootsect.asm | 8 +++--- src/lib/config.c | 4 +-- src/limine.h | 6 +++++ src/main.c | 4 +-- src/menu.c | 4 +-- src/protos/stivale2.c | 6 ++--- src/qloader2.h | 6 ----- test/limine.cfg | 9 +++++++ test/qloader2.cfg | 24 ------------------ 18 files changed, 62 insertions(+), 106 deletions(-) rename qloader2-install.c => limine-install.c (92%) rename qloader2.bin => limine.bin (65%) delete mode 100755 qloader2-install create mode 100644 src/limine.h delete mode 100644 src/qloader2.h create mode 100644 test/limine.cfg delete mode 100644 test/qloader2.cfg diff --git a/.gitignore b/.gitignore index 0065763d..59833ad8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /bochsout.txt /bx_enh_dbg.ini .vscode -!/qloader2.bin +/limine-install +!/limine.bin diff --git a/CONFIG.md b/CONFIG.md index d8b67969..529cdebf 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -1,6 +1,6 @@ -# qloader2 configuration file +# Limine configuration file -The qloader2 configuration file is comprised of *assignments* and *entries*. +The Limine configuration file is comprised of *assignments* and *entries*. *Entries* describe boot *entries* which the user can select in the *boot menu*. diff --git a/Makefile b/Makefile index f2bebc75..33d055d5 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,18 @@ OS := $(shell uname) +CC = cc .PHONY: all clean echfs-test ext2-test test.img all: $(MAKE) -C src all - cp src/qloader2.bin ./ + cp src/limine.bin ./ clean: $(MAKE) -C src clean +limine-install: limine-install.c + $(CC) limine-install.c -o limine-install + test.img: rm -f test.img dd if=/dev/zero bs=1M count=0 seek=4096 of=test.img @@ -26,8 +30,8 @@ echfs-test: test.img all $(MAKE) -C test echfs-utils -m -p0 test.img quick-format 32768 echfs-utils -m -p0 test.img import test/test.elf boot/test.elf - echfs-utils -m -p0 test.img import test/qloader2.cfg qloader2.cfg - ./qloader2-install src/qloader2.bin test.img + echfs-utils -m -p0 test.img import test/limine.cfg limine.cfg + ./limine-install src/limine.bin test.img qemu-system-x86_64 -hda test.img -debugcon stdio ext2-test: test.img all @@ -40,12 +44,12 @@ ext2-test: test.img all sudo mount `cat loopback_dev`p1 test_image sudo mkdir test_image/boot sudo cp test/test.elf test_image/boot/ - sudo cp test/qloader2.cfg test_image/ + sudo cp test/limine.cfg test_image/ sync sudo umount test_image/ sudo losetup -d `cat loopback_dev` rm -rf test_image loopback_dev - ./qloader2-install src/qloader2.bin test.img + ./limine-install src/limine.bin test.img qemu-system-x86_64 -hda test.img -debugcon stdio fat32-test: test.img all @@ -64,7 +68,7 @@ else ifeq ($(OS), FreeBSD) endif sudo mkdir test_image/boot sudo cp test/test.elf test_image/boot/ - sudo cp test/qloader2.cfg test_image/ + sudo cp test/limine.cfg test_image/ sync sudo umount test_image/ ifeq ($(OS), Linux) @@ -73,5 +77,5 @@ else ifeq ($(OS), FreeBSD) sudo mdconfig -d -u md9 endif rm -rf test_image loopback_dev - ./qloader2-install src/qloader2.bin test.img + ./limine-install src/limine.bin test.img qemu-system-x86_64 -hda test.img -debugcon stdio diff --git a/README.md b/README.md index ec2c8537..dad4d225 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# qloader2 +# Limine x86/x86_64 BIOS Bootloader ![Reference screenshot](/screenshot.png?raw=true "Reference screenshot") ### Supported boot protocols * Linux -* stivale and stivale2 (qloader2's native boot protocols, see STIVALE{,2}.md for details) +* stivale and stivale2 (Limine's native boot protocols, see STIVALE{,2}.md for details) ### Supported filesystems * ext2 @@ -17,14 +17,13 @@ x86/x86_64 BIOS Bootloader * GPT ## How to use -This repository contains a prebuilt version of qloader2 so building it won't -be necessary. +This repository contains a prebuilt version of Limine so building it won't be necessary. -In order to install qloader2 on a MBR device (which can just be a raw image file), -run the provided `qloader2-install` script as such: +In order to install Limine on a MBR device (which can just be a raw image file), build the +`limine-install` program using `make limine-install`, then run the resulting executable as such: ```bash -./qloader2-install ./qloader2.bin +./limine-install ./limine.bin ``` If using a GPT formatted device, it will be necessary to create an extra partition @@ -33,20 +32,20 @@ the install script where this partition is located by specifying the start secto ```bash fdisk # Create bootloader partition using your favourite method -./qloader2-install ./qloader2.bin +./limine-install ./limine.bin ``` Then make sure the device/image contains at least 1 partition formatted in -a supported filesystem containing a `/qloader2.cfg` or `/boot/qloader2.cfg` file +a supported filesystem containing a `/limine.cfg` or `/boot/limine.cfg` file and the kernel/modules one wants to load. -An example `qloader2.cfg` file can be found in `test/qloader2.cfg`. +An example `limine.cfg` file can be found in `test/limine.cfg`. -More info on the format of `qloader2.cfg` can be found in `CONFIG.md`. +More info on the format of `limine.cfg` can be found in `CONFIG.md`. For example, to create an empty image file of 64MiB in size, 1 echfs partition on the image spanning the whole device, format it, copy the relevant files over, -and install qloader2, one can do: +and install Limine, one can do: ```bash dd if=/dev/zero bs=1M count=0 seek=64 of=test.img @@ -55,18 +54,18 @@ parted -s test.img mkpart primary 1 100% parted -s test.img set 1 boot on # Workaround for buggy BIOSes echfs-utils -m -p0 test.img quick-format 32768 -echfs-utils -m -p0 test.img import path/to/qloader2.cfg qloader2.cfg +echfs-utils -m -p0 test.img import path/to/limine.cfg limine.cfg echfs-utils -m -p0 test.img import path/to/kernel.elf kernel.elf echfs-utils -m -p0 test.img import ... -./qloader2-install $THIS_REPO/qloader2.bin test.img +./limine-install $THIS_REPO/limine.bin test.img ``` One can get `echfs-utils` by installing https://github.com/qword-os/echfs. ## Building from source -In order to hack qloader2, one must build the GCC toolchain from source first. +In order to hack Limine, one must build the GCC toolchain from source first. To do so, run the `make_toolchain.sh` script from within the `toolchain` directory; keep in mind that the script takes `MAKEFLAGS` as an argument. @@ -77,7 +76,7 @@ cd toolchain ``` After that is done, simply run `make` in the root of the repo to generate -`src/qloader2.bin`. +`limine.bin`. ## Discord server We have a Discord server if you need support, info, or you just want to diff --git a/qloader2-install.c b/limine-install.c similarity index 92% rename from qloader2-install.c rename to limine-install.c index 98d7af39..6afd3187 100644 --- a/qloader2-install.c +++ b/limine-install.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) { if (argc < 3) { - printf("Usage: %s [stage2 start sector]\n", argv[0]); + printf("Usage: %s [stage2 start sector]\n", argv[0]); return 1; } diff --git a/qloader2.bin b/limine.bin similarity index 65% rename from qloader2.bin rename to limine.bin index db2355a5db7b4f756cb33e21e2e122c2b460edb4..6b707945e67e0e290648e3246b96f607e53a7c3b 100644 GIT binary patch delta 4573 zcma)A4OCRu5q@{sg#{Nu5m-=k$s+$Ch(J+MqO78b?DDgKh?*bG6Eu?JB3eb(tXN(a zQq!AMt2SX>(_?CK8oLtLpV$?xi>W!q)HWm zy(b^*w;2#I(@e)GBK*)9m)SLx2(X0Zn)NCy;aWjDPCLbEpKt zTbmx9MkBT!stTBxgKHO5*LWDP2dJ@>J8sE6gStVRAIcb}J+Eh~f1}14xC^kl5dlHR zT%?C1wym@=ps*Rilkn?SY=!Yv`1Q>8!TfCpk}(Ci72QB!IMzV)bfg1Ft~>psd;L=+ zQIo=s8l|O45-ZI5f0kN9C97SQuy52G0}rdgW2Wl`@Z);#R+zK4A8Qcool9xI|=LaSRp;hEP zJ7Iv<{8eCLGnVU62k=m=Tl!jtUjiXO2MguiW@;08(u$(TyWT) zkdYC4LAPe$>{-iIw!QR#HZ>Aa=`dNY1=q^O1|`2AYI^#Ft(QL3j*09Av2`o%i_>dP z@P7xHwJb*79(chqG3ITVtnUu(iwzI#12xM@O}a}M%O0ZgxcMk3i(81(pW~7xwYcRt z6~=3Es*hhOuzX`dytLr8WelsmieN00-7j+d)UsJIkd;zs8 z2xXYc1!5+GVkQ_U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TdS?AZdc7$bIy8KJo@~cuLGTbU!}>y!Oy6I>mYk!H oZAeeYl=|a$=a>iE37-S-8w!(-fA|v [stage2 start sector]" - exit 1 -fi - -# Variables. -DEVICE="$2" -MBR="$(mktemp)" -BINARY_SECT_SRC="$(mktemp)" -BINARY_SECT_BIN="$(mktemp)" -QLOADER2="$1" - -if [ -z "$3" ]; then - STAGE2_SECT=1 -else - STAGE2_SECT="$3" -fi - -echo "dd $STAGE2_SECT" > "$BINARY_SECT_SRC" -nasm "$BINARY_SECT_SRC" -f bin -o "$BINARY_SECT_BIN" - -# Copy the loader to the device. -dd if="$DEVICE" of="$MBR" bs=1 count=64 skip=446 2>/dev/null -dd if="$QLOADER2" of="$DEVICE" bs=512 count=1 conv=notrunc 2>/dev/null -dd if="$QLOADER2" of="$DEVICE" bs=512 count=63 skip=1 seek=$(( $STAGE2_SECT )) conv=notrunc 2>/dev/null -dd if="$BINARY_SECT_BIN" of="$DEVICE" bs=1 count=4 seek=$(( 0x1b0 )) conv=notrunc 2>/dev/null -dd if="$MBR" of="$DEVICE" bs=1 count=64 seek=446 conv=notrunc 2>/dev/null - -rm "$MBR" "$BINARY_SECT_SRC" "$BINARY_SECT_BIN" diff --git a/screenshot.png b/screenshot.png index 4dbe73fc787bd1818a4e6c3d0f9c47c30d4b22f2..debe18ba9b021a5df816efcab2323672091cbe95 100644 GIT binary patch literal 6754 zcmeHMc~sM9mqsd9M4;-pun4wPT3IV8K{f%gT0sOg1Y+16Ng@dWAp-^lGSL>=5`_;5 z7$5=050xz-NmyiUscc!G0*NFcVKIp%AWH;f%|sIBoH^$^XZqL7`R4dna`N8y_df4) zpZnbVJNY@_!dd-Y#=Eq%wDiw?fBKS^mUf?(*0#)@+Nxh{ip%$?K0d*mItSXhbEja; ze^g7$*!bLOFA#Ry^zglysRsQW{VB??8Z#j!Rt@3DpcAAM4~lNz`K|c-U$XrN68hI= z<{sO3es;w3-?g@BfBf>-NqGMy-UGK$rYt;s+=Nq(Smq^?{RFS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~rnD4ci^81n6dZiVn#|p{85S=WNXJMdcnwZ8f<$zO_Kb}n$T+X^%Q4ACSg+N` znL-DZe0tM8u(+4m2s?9~*v=*=#4`v>O&Hy<8mJqxJ~$!$^I8 z_K7}nz`ll$X0q)ty!MqBy<)CDh3ZPl>mWs}L927Rw8VA5I;dQ{-P<<9c3DZTeV%j- zP94`-NSXtgW}j%;XSd3M&p7v-}^ZL!qu!2T%E z&0RGE`B;Oi#0A>e>y&3p+ZK`MwED)HNeJw=6*3lYah2tPVCp2mo72;&`)y*eFOg2R z=BmD5F}9+|uAIHdoL9+=jS12LyK*tWmP}@Pp5hs1$WuZe+km*$z^P|G)PpU@TQKQ4 zeL;@4jqq?A+N4Uw+ww|Wl)ZgMpBWDB(Lxq6Pv4ud**^aPZd0pmV(bGnQOwOjnC_q~nF z+hPoi5*D3m695>fhEhsdhJsjdwI^aB$SADn_Lz5|JJNXIwr5xOvkhkj>x4^XQ?juh zflPxeY_52SLI467Yd=t$rEKBS zX_eS%hKEyqsn(vc+SutNT1WcFvQqh}k|J$)*|Y+kn2Tt{{CzsH?1I=^Z?A;oe)+EIcL89xFT~&9NLPUivAz|L z)>{Yd-+IXP*qyoHDOhL~luX?fV$Bl`V4m0#8(_6XKQ4i`d-9wZYoq*HNdoyg$|%@) zXLzXtBST%Cc`R#>|8pNV', 0x0D, 0x0A, 0x0A, 0x00 +LoadingMsg db 0x0D, 0x0A, 'Limine', 0x0D, 0x0A, 0x0A, 0x00 Stage2Msg db 'Loading stage2...', 0x00 ErrReadDiskMsg db 0x0D, 0x0A, 'Disk read error, system halted', 0x00 ErrEnableA20Msg db 0x0D, 0x0A, 'A20 enable error, system halted', 0x00 diff --git a/src/lib/config.c b/src/lib/config.c index e26139fc..5486d058 100644 --- a/src/lib/config.c +++ b/src/lib/config.c @@ -11,8 +11,8 @@ static char *config_addr; int init_config(int drive, int part) { struct file_handle f; - if (fopen(&f, drive, part, "/qloader2.cfg")) { - if (fopen(&f, drive, part, "/boot/qloader2.cfg")) { + if (fopen(&f, drive, part, "/limine.cfg")) { + if (fopen(&f, drive, part, "/boot/limine.cfg")) { return -1; } } diff --git a/src/limine.h b/src/limine.h new file mode 100644 index 00000000..6f9e2c11 --- /dev/null +++ b/src/limine.h @@ -0,0 +1,6 @@ +#ifndef __LIMINE_H__ +#define __LIMINE_H__ + +#define LIMINE_VERSION "0.4" + +#endif diff --git a/src/main.c b/src/main.c index ea2e2d1f..480ba396 100644 --- a/src/main.c +++ b/src/main.c @@ -13,7 +13,7 @@ ASM_BASIC( "jmp main\n\t" ); -#include +#include #include #include #include @@ -35,7 +35,7 @@ void main(int boot_drive) { // Initial prompt. init_vga_textmode(); - print("qloader2 " QLOADER2_VERSION "\n\n"); + print("Limine " LIMINE_VERSION "\n\n"); print("Boot drive: %x\n", boot_drive); diff --git a/src/menu.c b/src/menu.c index 5ee2a762..8766c147 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,7 +32,7 @@ char *menu(void) { refresh: text_clear(); - print("\n\n \e[44m qloader\e[33m2\e[37m " QLOADER2_VERSION " \e[40m\n\n\n"); + print("\n\n \e[36m Limine " LIMINE_VERSION " \e[37m\n\n\n"); print("Select an entry:\n\n"); diff --git a/src/protos/stivale2.c b/src/protos/stivale2.c index bfa59fd8..a5bef8ec 100644 --- a/src/protos/stivale2.c +++ b/src/protos/stivale2.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include @@ -247,8 +247,8 @@ void stivale2_load(char *cmdline, int boot_drive) { print("stivale2: Top used address in ELF: %X\n", top_used_addr); - strcpy(stivale2_struct.bootloader_brand, "qloader2"); - strcpy(stivale2_struct.bootloader_version, QLOADER2_VERSION); + strcpy(stivale2_struct.bootloader_brand, "Limine"); + strcpy(stivale2_struct.bootloader_version, LIMINE_VERSION); ////////////////////////////////////////////// // Create firmware struct tag diff --git a/src/qloader2.h b/src/qloader2.h deleted file mode 100644 index c4a02ae7..00000000 --- a/src/qloader2.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __QLOADER2_H__ -#define __QLOADER2_H__ - -#define QLOADER2_VERSION "0.4" - -#endif diff --git a/test/limine.cfg b/test/limine.cfg new file mode 100644 index 00000000..2492b4d2 --- /dev/null +++ b/test/limine.cfg @@ -0,0 +1,9 @@ +TIMEOUT=3 + +:MyOS + +PROTOCOL=stivale2 + +KERNEL_PARTITION=0 +KERNEL_PATH=boot/test.elf +KERNEL_CMDLINE=something diff --git a/test/qloader2.cfg b/test/qloader2.cfg deleted file mode 100644 index 00e0a846..00000000 --- a/test/qloader2.cfg +++ /dev/null @@ -1,24 +0,0 @@ -TIMEOUT=3 - -:Test kernel - -PROTOCOL=stivale2 - -KERNEL_PARTITION=0 -KERNEL_PATH=boot/test.elf -KERNEL_CMDLINE=something - -MODULE_PARTITION=0 -MODULE_PATH=qloader2.cfg -MODULE_STRING=something here - -:Test 2 - -KERNEL_PARTITION=0 -KERNEL_PATH=/boot/test.elf -KERNEL_PROTO=stivale -KERNEL_CMDLINE=none - -MODULE_PARTITION=0 -MODULE_PATH=qloader2.cfg -MODULE_STRING=something here