build(cmake): added TERMOS_VERSION defenition
fix(kfetch): added correct versioning in kfetch
This commit is contained in:
+17
-3
@@ -6,15 +6,29 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
add_subdirectory(bootloader)
|
||||
add_subdirectory(kernel)
|
||||
|
||||
find_program(MCOPY_EXE mcopy)
|
||||
find_program(MKFS_EXE mkfs.fat)
|
||||
find_program(CPIO_EXE cpio)
|
||||
find_program(QEMU_EXE qemu-system-x86_64)
|
||||
set(OVMF_PATH "/usr/share/edk2/ovmf/OVMF_CODE.fd" CACHE FILEPATH "Path to OVMF bios")
|
||||
|
||||
execute_process(
|
||||
COMMAND git describe --tags --always --dirty
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE KERNEL_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if(NOT KERNEL_VERSION)
|
||||
set(KERNEL_VERSION "unknown-version")
|
||||
endif()
|
||||
|
||||
message(STATUS "Building termOS version: ${KERNEL_VERSION}")
|
||||
add_compile_definitions(TERMOS_VERSION=\"${KERNEL_VERSION}\")
|
||||
|
||||
add_subdirectory(bootloader)
|
||||
add_subdirectory(kernel)
|
||||
|
||||
if(MCOPY_EXE AND MKFS_EXE AND CPIO_EXE)
|
||||
set(IMG_FILE "${CMAKE_BINARY_DIR}/termOS.img")
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ set(UEFI_COMPILE_OPTIONS
|
||||
-std=c23
|
||||
-target x86_64-unknown-windows-msvc
|
||||
-Wall -Wextra
|
||||
-fno-builtin
|
||||
$<$<CONFIG:Release>:-Werror>
|
||||
)
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ const char* fun_messages[] = {
|
||||
"fuck off",
|
||||
"Your GPU is now mining Ethereum for me. Thanks.",
|
||||
"Your PC is locked!\n\t\t\t\tPay a fee of 0.019082006 bitcoins to a wallet 1KtoProchitalTotSosal to get decryption key!",
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ void cmd_kfetch() {
|
||||
kprintf("\n\n");
|
||||
kprintf("^p %s ^!\t\t^g kernel^!@^gtermos\n^0", ascii_logo[0]);
|
||||
kprintf("^p %s ^!\t\t^!-------------\n^!", ascii_logo[1]);
|
||||
kprintf("^p %s ^!\t\t^gOS^!: termOS 0.0.1\n^!", ascii_logo[2]);
|
||||
kprintf("^p %s ^!\t\t^gOS^!: termOS %s\n^!", ascii_logo[2], TERMOS_VERSION);
|
||||
kprintf("^p %s ^!\t\t^gKernel^!: sucks\n^!", ascii_logo[3]);
|
||||
kprintf("^p %s ^!\t\t^gUptime^!: %d seconds\n^!", ascii_logo[4], uptime_s);
|
||||
kprintf("^p %s ^!\t\t^gShell^!: ksh\n^!", ascii_logo[5]);
|
||||
|
||||
Reference in New Issue
Block a user