diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..de65c39 --- /dev/null +++ b/.clang-format @@ -0,0 +1,18 @@ +--- +BasedOnStyle: LLVM +UseTab: Never +IndentWidth: 4 +TabWidth: 4 +BreakBeforeBraces: Allman +AllowShortIfStatementsOnASingleLine: false +IndentCaseLabels: false +ColumnLimit: 0 +AccessModifierOffset: -4 +FixNamespaceComments: true +SpaceBeforeInheritanceColon: true +BreakInheritanceList: AfterColon +IndentPPDirectives: AfterHash +ForEachMacros: ["__dummy_foreach"] +AlignConsecutiveMacros: true +SpaceBeforeParens: ControlStatementsExceptForEachMacros +... diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c648ad5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.cutekit diff --git a/doc/logo.webp b/doc/logo.webp new file mode 100644 index 0000000..f04f45c Binary files /dev/null and b/doc/logo.webp differ diff --git a/license.md b/license.md new file mode 100644 index 0000000..00040ae --- /dev/null +++ b/license.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Cute Engineering + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/project.json b/project.json new file mode 100644 index 0000000..344e23f --- /dev/null +++ b/project.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://schemas.cute.engineering/stable/cutekit.manifest.project.v1", + "id": "cute-engineering/booboot", + "type": "project", + "description": "The scawy bootloadew", + "extern": { + "cute-engineering/ce-base": { + "git": "https://github.com/cute-engineering/ce-base.git", + "tag": "v0.1.0" + }, + "cute-engineering/ce-efi": { + "git": "https://github.com/cute-engineering/ce-efi.git", + "tag": "main" + } + } +} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..1f73b51 --- /dev/null +++ b/readme.md @@ -0,0 +1,13 @@ +
+
+
+

+ +

+

BooBoot

+

+ The Scawy Bootloadew +

+
+
+
diff --git a/src/booboot/base.h b/src/booboot/base.h new file mode 100644 index 0000000..fdb8dcd --- /dev/null +++ b/src/booboot/base.h @@ -0,0 +1,6 @@ +#pragma once + +#include +#include + +#define efi_assert_success(status) ({ if (EFI_ERROR(status)) { ce_panic("efi error"); } }) diff --git a/src/booboot/main.c b/src/booboot/main.c new file mode 100644 index 0000000..8dc7218 --- /dev/null +++ b/src/booboot/main.c @@ -0,0 +1,11 @@ +#include + +#include "base.h" + +efi_status efi_main(efi_handle, efi_system_table *st) +{ + efi_assert_success(st->boot_services->set_watchdog_timer(0, 0, 0, NULL)); + efi_assert_success(st->con_out->reset(st->con_out, 1)); + efi_assert_success(st->con_out->output_string(st->con_out, u"Hello, world!\r\n")); + return EFI_SUCCESS; +}