Added build type detection, simplified legacy BIOS booting on x86_64
This commit is contained in:
parent
0236209e95
commit
1fc97f9c5f
18 changed files with 298 additions and 107 deletions
|
@ -17,8 +17,6 @@
|
|||
/* SOFTWARE. */
|
||||
/*********************************************************************************/
|
||||
|
||||
#include <config/config.h>
|
||||
#include <firmware/file.h>
|
||||
#include <lib/string.h>
|
||||
#include <print.h>
|
||||
#include <axboot.h>
|
||||
|
@ -35,12 +33,12 @@ char *config_paths[] = {
|
|||
|
||||
void config_init(void)
|
||||
{
|
||||
FILE *config_file;
|
||||
void *config_file;
|
||||
char *config_buffer;
|
||||
int filesize;
|
||||
|
||||
for (size_t i = 0; i < ARRAY_LENGTH(config_paths); i++) {
|
||||
config_file = fw_file_open(NULL, config_paths[i]);
|
||||
//config_file = fw_file_open(NULL, config_paths[i]);
|
||||
if (config_file != NULL) {
|
||||
break;
|
||||
}
|
||||
|
@ -52,18 +50,18 @@ void config_init(void)
|
|||
//console();
|
||||
}
|
||||
|
||||
filesize = fw_file_size(config_file);
|
||||
config_buffer = malloc(filesize);
|
||||
//filesize = fw_file_size(config_file);
|
||||
//config_buffer = malloc(filesize);
|
||||
if (config_buffer == NULL) {
|
||||
log("Entering console...\r\n\r\n");
|
||||
//console();
|
||||
}
|
||||
|
||||
fw_file_read(config_file, filesize, config_buffer);
|
||||
//fw_file_read(config_file, filesize, config_buffer);
|
||||
|
||||
// TODO: parse configuration file
|
||||
|
||||
free(config_buffer);
|
||||
//free(config_buffer);
|
||||
|
||||
/*
|
||||
if (config_errors != 0 || config_get_menu_root() == NULL) {
|
||||
|
@ -74,5 +72,5 @@ void config_init(void)
|
|||
}
|
||||
*/
|
||||
|
||||
fw_file_close(config_file);
|
||||
//fw_file_close(config_file);
|
||||
}
|
25
boot/common/menu/main_menu.c
Normal file
25
boot/common/menu/main_menu.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*********************************************************************************/
|
||||
/* Module Name: main_menu.c */
|
||||
/* Project: AurixOS */
|
||||
/* */
|
||||
/* Copyright (c) 2024-2025 Jozef Nagy */
|
||||
/* */
|
||||
/* This source is subject to the MIT License. */
|
||||
/* See License.txt in the root of this repository. */
|
||||
/* All other rights reserved. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/*********************************************************************************/
|
||||
|
||||
#include <menu/bootmenu.h>
|
||||
|
||||
void main_menu(void)
|
||||
{
|
||||
while (1);
|
||||
}
|
|
@ -19,14 +19,13 @@
|
|||
|
||||
#define NANOPRINTF_IMPLEMENTATION
|
||||
#define NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS 1
|
||||
#define NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS 1
|
||||
#define NANOPRINTF_USE_FLOAT_FORMAT_SPECIFIERS 1
|
||||
#define NANOPRINTF_USE_LARGE_FORMAT_SPECIFIERS 1
|
||||
#define NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS 0
|
||||
#define NANOPRINTF_USE_FLOAT_FORMAT_SPECIFIERS 0
|
||||
#define NANOPRINTF_USE_LARGE_FORMAT_SPECIFIERS 0
|
||||
#define NANOPRINTF_USE_BINARY_FORMAT_SPECIFIERS 0
|
||||
#define NANOPRINTF_USE_WRITEBACK_FORMAT_SPECIFIERS 0
|
||||
#include <nanoprintf.h>
|
||||
|
||||
#include <debug/serial.h>
|
||||
#include <print.h>
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue