misc: Add copyright notice at boot

This commit is contained in:
mintsuki 2021-08-22 18:29:18 +02:00
parent 712f4c02e6
commit 483cb4655d
7 changed files with 16 additions and 2 deletions

1
stage23/LICENSE.md Symbolic link
View File

@ -0,0 +1 @@
../LICENSE.md

View File

@ -48,6 +48,7 @@ E9_OUTPUT = false
BUILD_ID := $(shell dd if=/dev/urandom count=8 bs=1 2>/dev/null | od -An -t x4 | sed 's/^ /0x/g;s/ //g')
LIMINE_VERSION := $(shell cat ../version 2>/dev/null || ( git describe --exact-match --tags `git log -n1 --pretty='%h'` 2>/dev/null || ( git log -n1 --pretty='%h' && echo -n "(`git branch --show-current`)" ) ) )
LIMINE_COPYRIGHT := $(shell grep Copyright LICENSE.md)
WERROR = -Werror
CFLAGS ?= -O3 -g -pipe -Wall -Wextra $(WERROR)
@ -71,6 +72,7 @@ INTERNAL_CFLAGS := \
-MMD \
-DBUILD_ID=$(BUILD_ID) \
-DLIMINE_VERSION='"$(LIMINE_VERSION)"' \
-DLIMINE_COPYRIGHT='"$(LIMINE_COPYRIGHT)"' \
-DCOM_OUTPUT=$(COM_OUTPUT) \
-DE9_OUTPUT=$(E9_OUTPUT) \
-I. \

View File

@ -75,7 +75,7 @@ void entry(uint8_t boot_drive, int boot_from) {
term_textmode();
print("Limine " LIMINE_VERSION "\n\n");
copyright_notice();
if (!a20_enable())
panic("Could not enable A20 line");

View File

@ -58,7 +58,7 @@ void uefi_entry(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
term_vbe(0, 0);
early_term = true;
print("Limine " LIMINE_VERSION "\n\n");
copyright_notice();
disk_create_index();

View File

@ -23,6 +23,8 @@ extern bool efi_boot_services_exited;
bool efi_exit_boot_services(void);
#endif
void copyright_notice(void);
extern struct volume *boot_volume;
#if bios == 1

View File

@ -1,6 +1,13 @@
#include <stdint.h>
#include <stddef.h>
#include <lib/blib.h>
#include <lib/print.h>
void copyright_notice(void) {
print("Limine " LIMINE_VERSION "\n");
print(LIMINE_COPYRIGHT "\n");
print("This bootloader is distributed under the terms of the BSD-2-Clause license.\n\n");
}
uint8_t bcd_to_int(uint8_t val) {
return (val & 0x0f) + ((val & 0xf0) >> 4) * 10;

View File

@ -539,6 +539,8 @@ char *menu(char **cmdline) {
if (menu_resolution != NULL)
parse_resolution(&req_width, &req_height, &req_bpp, menu_resolution);
print("menu: Loading...");
term_vbe(req_width, req_height);
}