Binary release v4.20230207.0
This commit is contained in:
parent
df86a91bba
commit
d0c6c69036
|
@ -2,3 +2,5 @@ limine-deploy
|
||||||
limine-deploy.exe
|
limine-deploy.exe
|
||||||
limine-version
|
limine-version
|
||||||
limine-version.exe
|
limine-version.exe
|
||||||
|
limine-enroll-config
|
||||||
|
limine-enroll-config.exe
|
||||||
|
|
BIN
BOOTAA64.EFI
BIN
BOOTAA64.EFI
Binary file not shown.
BIN
BOOTIA32.EFI
BIN
BOOTIA32.EFI
Binary file not shown.
BIN
BOOTX64.EFI
BIN
BOOTX64.EFI
Binary file not shown.
8
Makefile
8
Makefile
|
@ -6,7 +6,7 @@ PREFIX ?= /usr/local
|
||||||
CFLAGS ?= -g -O2 -pipe -Wall -Wextra
|
CFLAGS ?= -g -O2 -pipe -Wall -Wextra
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: limine-deploy limine-version
|
all: limine-deploy limine-version limine-enroll-config
|
||||||
|
|
||||||
.PHONY: install-data
|
.PHONY: install-data
|
||||||
install-data: all
|
install-data: all
|
||||||
|
@ -26,20 +26,26 @@ install: install-data
|
||||||
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
|
||||||
$(INSTALL) limine-deploy '$(DESTDIR)$(PREFIX)/bin/'
|
$(INSTALL) limine-deploy '$(DESTDIR)$(PREFIX)/bin/'
|
||||||
$(INSTALL) limine-version '$(DESTDIR)$(PREFIX)/bin/'
|
$(INSTALL) limine-version '$(DESTDIR)$(PREFIX)/bin/'
|
||||||
|
$(INSTALL) limine-enroll-config '$(DESTDIR)$(PREFIX)/bin/'
|
||||||
|
|
||||||
.PHONY: install-strip
|
.PHONY: install-strip
|
||||||
install-strip: install-data
|
install-strip: install-data
|
||||||
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
|
||||||
$(INSTALL) -s limine-deploy '$(DESTDIR)$(PREFIX)/bin/'
|
$(INSTALL) -s limine-deploy '$(DESTDIR)$(PREFIX)/bin/'
|
||||||
$(INSTALL) -s limine-version '$(DESTDIR)$(PREFIX)/bin/'
|
$(INSTALL) -s limine-version '$(DESTDIR)$(PREFIX)/bin/'
|
||||||
|
$(INSTALL) -s limine-enroll-config '$(DESTDIR)$(PREFIX)/bin/'
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f limine-deploy limine-deploy.exe
|
rm -f limine-deploy limine-deploy.exe
|
||||||
rm -f limine-version limine-version.exe
|
rm -f limine-version limine-version.exe
|
||||||
|
rm -f limine-enroll-config limine-enroll-config.exe
|
||||||
|
|
||||||
limine-deploy: limine-deploy.c limine-hdd.h
|
limine-deploy: limine-deploy.c limine-hdd.h
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -std=c99 -D__USE_MINGW_ANSI_STDIO limine-deploy.c $(LIBS) -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -std=c99 -D__USE_MINGW_ANSI_STDIO limine-deploy.c $(LIBS) -o $@
|
||||||
|
|
||||||
limine-version: limine-version.c
|
limine-version: limine-version.c
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -std=c99 -D__USE_MINGW_ANSI_STDIO limine-version.c $(LIBS) -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -std=c99 -D__USE_MINGW_ANSI_STDIO limine-version.c $(LIBS) -o $@
|
||||||
|
|
||||||
|
limine-enroll-config: limine-enroll-config.c
|
||||||
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -std=c99 -D__USE_MINGW_ANSI_STDIO limine-enroll-config.c $(LIBS) -o $@
|
||||||
|
|
Binary file not shown.
BIN
limine-cd.bin
BIN
limine-cd.bin
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,92 @@
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define CONFIG_B2SUM_SIGNATURE "++CONFIG_B2SUM_SIGNATURE++"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
int ret = 1;
|
||||||
|
|
||||||
|
char *bootloader = NULL;
|
||||||
|
FILE *bootloader_file = NULL;
|
||||||
|
|
||||||
|
if (argc <= 2) {
|
||||||
|
fprintf(stderr, "usage: %s <Limine bootloader executable> <128-byte BLAKE2B of config file>\n", argv[0]);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(argv[2]) != 128) {
|
||||||
|
fprintf(stderr, "ERROR: BLAKE2B specified is not 128 characters long\n");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
bootloader_file = fopen(argv[1], "r+b");
|
||||||
|
if (bootloader_file == NULL) {
|
||||||
|
perror("ERROR");
|
||||||
|
goto cleanup;;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fseek(bootloader_file, 0, SEEK_END) != 0) {
|
||||||
|
perror("ERROR");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
size_t bootloader_size = ftell(bootloader_file);
|
||||||
|
rewind(bootloader_file);
|
||||||
|
|
||||||
|
bootloader = malloc(bootloader_size);
|
||||||
|
if (bootloader == NULL) {
|
||||||
|
perror("ERROR");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fread(bootloader, bootloader_size, 1, bootloader_file) != 1) {
|
||||||
|
perror("ERROR");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *checksum_loc = NULL;
|
||||||
|
size_t checked_count = 0;
|
||||||
|
const char *config_b2sum_sign = CONFIG_B2SUM_SIGNATURE;
|
||||||
|
for (size_t i = 0; i < bootloader_size; i++) {
|
||||||
|
if (bootloader[i] != config_b2sum_sign[checked_count]) {
|
||||||
|
checked_count = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
checked_count++;
|
||||||
|
|
||||||
|
if (checked_count == sizeof(CONFIG_B2SUM_SIGNATURE) - 1) {
|
||||||
|
checksum_loc = &bootloader[i + 1];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (checksum_loc == NULL) {
|
||||||
|
fprintf(stderr, "ERROR: Checksum location not found in provided executable\n");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(checksum_loc, argv[2], 128);
|
||||||
|
|
||||||
|
if (fseek(bootloader_file, 0, SEEK_SET) != 0) {
|
||||||
|
perror("ERROR");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
if (fwrite(bootloader, bootloader_size, 1, bootloader_file) != 1) {
|
||||||
|
perror("ERROR");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(stderr, "Config file BLAKE2B successfully enrolled!\n");
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
if (bootloader != NULL) {
|
||||||
|
free(bootloader);
|
||||||
|
}
|
||||||
|
if (bootloader_file != NULL) {
|
||||||
|
fclose(bootloader_file);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
Binary file not shown.
2331
limine-hdd.h
2331
limine-hdd.h
File diff suppressed because it is too large
Load Diff
BIN
limine-pxe.bin
BIN
limine-pxe.bin
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define LIMINE_VERSION "4.20230120.0"
|
#define LIMINE_VERSION "4.20230207.0"
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
puts(LIMINE_VERSION);
|
puts(LIMINE_VERSION);
|
||||||
|
|
2
limine.h
2
limine.h
|
@ -1,6 +1,6 @@
|
||||||
/* BSD Zero Clause License */
|
/* BSD Zero Clause License */
|
||||||
|
|
||||||
/* Copyright (C) 2022 mintsuki and contributors.
|
/* Copyright (C) 2022-2023 mintsuki and contributors.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted.
|
* purpose with or without fee is hereby granted.
|
||||||
|
|
BIN
limine.sys
BIN
limine.sys
Binary file not shown.
Loading…
Reference in New Issue