Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Jan 24, 2024
0 parents commit 86a0837
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -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
...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.cutekit
Binary file added doc/logo.webp
Binary file not shown.
21 changes: 21 additions & 0 deletions license.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 16 additions & 0 deletions project.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
13 changes: 13 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<br/>
<br/>
<br/>
<p align="center">
<img src="doc/logo.webp" width="200" height="200">
</p>
<h1 align="center">BooBoot</h1>
<p align="center">
The Scawy Bootloadew
</p>
<br/>
<br/>
<br/>
6 changes: 6 additions & 0 deletions src/booboot/base.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once

#include <ce-efi/base.h>
#include <ce-panic.h>

#define efi_assert_success(status) ({ if (EFI_ERROR(status)) { ce_panic("efi error"); } })
11 changes: 11 additions & 0 deletions src/booboot/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <ce-efi/st.h>

#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;
}

0 comments on commit 86a0837

Please sign in to comment.