diff --git a/CMakeLists.txt b/CMakeLists.txt index f04e109..570398d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.31) -project(mango C ASM) +project(magenta C ASM) if (NOT BUILD_TOOLS_DIR) message(FATAL_ERROR "No build tools directory specified. Please run build.sh") @@ -9,8 +9,8 @@ set(CMAKE_C_STANDARD 17) set(kernel_arch x86_64) -set(kernel_name "Mango") -set(kernel_exe_name "mango_kernel") +set(kernel_name "Magenta") +set(kernel_exe_name "magenta_kernel") set(generic_src_dirs ds init kernel libc sched util vm syscall) set(kernel_sources "") @@ -38,7 +38,7 @@ add_executable(${kernel_exe_name} target_include_directories(${kernel_exe_name} PRIVATE include libc/include - libmango/include + libmagenta/include arch/${kernel_arch}/include) target_compile_options(${kernel_exe_name} PRIVATE -nostdlib -ffreestanding diff --git a/README b/README index d13b589..d64f86a 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Mango +Magenta ===== It's a kernel! diff --git a/arch/user/include/mango/machine/cpu.h b/arch/user/include/mango/machine/cpu.h index 832a005..76d3834 100644 --- a/arch/user/include/mango/machine/cpu.h +++ b/arch/user/include/mango/machine/cpu.h @@ -1,5 +1,5 @@ -#ifndef MANGO_USER_CPU_H_ -#define MANGO_USER_CPU_H_ +#ifndef MAGENTA_USER_CPU_H_ +#define MAGENTA_USER_CPU_H_ #ifdef __cplusplus extern "C" { diff --git a/arch/user/include/mango/machine/hwlock.h b/arch/user/include/mango/machine/hwlock.h index 526b238..6b670da 100644 --- a/arch/user/include/mango/machine/hwlock.h +++ b/arch/user/include/mango/machine/hwlock.h @@ -1,5 +1,5 @@ -#ifndef MANGO_USER_HWLOCK_H_ -#define MANGO_USER_HWLOCK_H_ +#ifndef MAGENTA_USER_HWLOCK_H_ +#define MAGENTA_USER_HWLOCK_H_ #define ML_HWLOCK_INIT (0) diff --git a/arch/user/include/mango/machine/init.h b/arch/user/include/mango/machine/init.h index a5364bb..ebd4bfa 100644 --- a/arch/user/include/mango/machine/init.h +++ b/arch/user/include/mango/machine/init.h @@ -1,5 +1,5 @@ -#ifndef MANGO_X86_64_INIT_H_ -#define MANGO_X86_64_INIT_H_ +#ifndef MAGENTA_X86_64_INIT_H_ +#define MAGENTA_X86_64_INIT_H_ #include #include diff --git a/arch/user/include/mango/machine/irq.h b/arch/user/include/mango/machine/irq.h index 0d47448..880b9d4 100644 --- a/arch/user/include/mango/machine/irq.h +++ b/arch/user/include/mango/machine/irq.h @@ -1,5 +1,5 @@ -#ifndef MANGO_X86_64_IRQ_H_ -#define MANGO_X86_64_IRQ_H_ +#ifndef MAGENTA_X86_64_IRQ_H_ +#define MAGENTA_X86_64_IRQ_H_ #endif diff --git a/arch/user/include/mango/machine/pmap.h b/arch/user/include/mango/machine/pmap.h index 3f084ee..ebb912b 100644 --- a/arch/user/include/mango/machine/pmap.h +++ b/arch/user/include/mango/machine/pmap.h @@ -1,5 +1,5 @@ -#ifndef MANGO_USER_PMAP_H_ -#define MANGO_USER_PMAP_H_ +#ifndef MAGENTA_USER_PMAP_H_ +#define MAGENTA_USER_PMAP_H_ #include diff --git a/arch/user/include/mango/machine/vm.h b/arch/user/include/mango/machine/vm.h index 0a75894..f9039fc 100644 --- a/arch/user/include/mango/machine/vm.h +++ b/arch/user/include/mango/machine/vm.h @@ -1,5 +1,5 @@ -#ifndef MANGO_USER_VM_H_ -#define MANGO_USER_VM_H_ +#ifndef MAGENTA_USER_VM_H_ +#define MAGENTA_USER_VM_H_ #include diff --git a/arch/x86_64/pmap.c b/arch/x86_64/pmap.c index d347336..75151fc 100644 --- a/arch/x86_64/pmap.c +++ b/arch/x86_64/pmap.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include /* some helpful datasize constants */ #define C_1GiB 0x40000000ULL diff --git a/arch/x86_64/toolchain.cmake b/arch/x86_64/toolchain.cmake index 84b3da7..90649af 100644 --- a/arch/x86_64/toolchain.cmake +++ b/arch/x86_64/toolchain.cmake @@ -1,5 +1,5 @@ # the name of the target operating system -set(CMAKE_SYSTEM_NAME Mango) +set(CMAKE_SYSTEM_NAME Magenta) # which compilers to use for C and C++ set(CMAKE_C_COMPILER x86_64-elf-gcc) diff --git a/include/kernel/arg.h b/include/kernel/arg.h index 93ad15b..0986cf3 100644 --- a/include/kernel/arg.h +++ b/include/kernel/arg.h @@ -1,7 +1,7 @@ #ifndef KERNEL_ARG_H_ #define KERNEL_ARG_H_ -#include +#include #include #define CMDLINE_MAX 4096 diff --git a/include/kernel/bsp.h b/include/kernel/bsp.h index f22e6d9..1e75c4b 100644 --- a/include/kernel/bsp.h +++ b/include/kernel/bsp.h @@ -2,7 +2,7 @@ #define KERNEL_BSP_H_ #include -#include +#include #include #include #include diff --git a/include/kernel/console.h b/include/kernel/console.h index c74e517..e2b887e 100644 --- a/include/kernel/console.h +++ b/include/kernel/console.h @@ -16,8 +16,8 @@ */ #include #include -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/kernel/equeue.h b/include/kernel/equeue.h index 8304548..cbe31df 100644 --- a/include/kernel/equeue.h +++ b/include/kernel/equeue.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #define EQUEUE_PACKET_MAX 100 diff --git a/include/kernel/futex.h b/include/kernel/futex.h index 84520c6..bb41685 100644 --- a/include/kernel/futex.h +++ b/include/kernel/futex.h @@ -3,7 +3,7 @@ #include #include -#include +#include struct task; struct address_space; diff --git a/include/kernel/handle.h b/include/kernel/handle.h index 61c7ab3..98c65de 100644 --- a/include/kernel/handle.h +++ b/include/kernel/handle.h @@ -2,8 +2,8 @@ #define KERNEL_HANDLE_H_ #include -#include -#include +#include +#include #include #include diff --git a/include/kernel/iovec.h b/include/kernel/iovec.h index 065c748..38075de 100644 --- a/include/kernel/iovec.h +++ b/include/kernel/iovec.h @@ -1,7 +1,7 @@ #ifndef KERNEL_IOVEC_H_ #define KERNEL_IOVEC_H_ -#include +#include #include struct address_space; diff --git a/include/kernel/msg.h b/include/kernel/msg.h index 1f660b8..8a3bd38 100644 --- a/include/kernel/msg.h +++ b/include/kernel/msg.h @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include struct port; struct thread; diff --git a/include/kernel/object.h b/include/kernel/object.h index 3444f3d..f0d529e 100644 --- a/include/kernel/object.h +++ b/include/kernel/object.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #ifdef __cplusplus diff --git a/include/kernel/percpu.h b/include/kernel/percpu.h index afff2f2..7a44f01 100644 --- a/include/kernel/percpu.h +++ b/include/kernel/percpu.h @@ -1,7 +1,7 @@ #ifndef KERNEL_PERCPU_H_ #define KERNEL_PERCPU_H_ -#include +#include #include #include diff --git a/include/kernel/pmap.h b/include/kernel/pmap.h index 5e6f292..b1c1f11 100644 --- a/include/kernel/pmap.h +++ b/include/kernel/pmap.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include #define PMAP_INVALID ML_PMAP_INVALID diff --git a/include/kernel/sched.h b/include/kernel/sched.h index 13b576d..5964259 100644 --- a/include/kernel/sched.h +++ b/include/kernel/sched.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include #define PRIO_MAX 32 diff --git a/include/kernel/syscall.h b/include/kernel/syscall.h index edbe5bf..60841e4 100644 --- a/include/kernel/syscall.h +++ b/include/kernel/syscall.h @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include #define validate_access(task, ptr, len, flags) \ __validate_access(task, (const void *)ptr, len, flags) diff --git a/include/kernel/types.h b/include/kernel/types.h index f72685a..853f36c 100644 --- a/include/kernel/types.h +++ b/include/kernel/types.h @@ -1,7 +1,7 @@ #ifndef KERNEL_TYPES_H_ #define KERNEL_TYPES_H_ -#include +#include #include #include diff --git a/include/kernel/util.h b/include/kernel/util.h index 2e07422..b5f88e7 100644 --- a/include/kernel/util.h +++ b/include/kernel/util.h @@ -1,7 +1,7 @@ #ifndef KERNEL_UTIL_H_ #define KERNEL_UTIL_H_ -#include +#include #include #include #include diff --git a/include/kernel/vm-controller.h b/include/kernel/vm-controller.h index 23d9ceb..aa50ef9 100644 --- a/include/kernel/vm-controller.h +++ b/include/kernel/vm-controller.h @@ -3,7 +3,7 @@ #include #include -#include +#include struct thread; struct equeue; diff --git a/include/kernel/vm.h b/include/kernel/vm.h index ef62403..fc5bb02 100644 --- a/include/kernel/vm.h +++ b/include/kernel/vm.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #ifdef __cplusplus diff --git a/init/main.c b/init/main.c index 2059af5..f79bac2 100644 --- a/init/main.c +++ b/init/main.c @@ -23,7 +23,7 @@ extern char __pstart[], __pend[]; void print_kernel_banner(void) { - printk("Mango kernel version " BUILD_ID); + printk("Magenta kernel version " BUILD_ID); } static void hang(void) diff --git a/kernel/arg.c b/kernel/arg.c index 1cc82a6..3d5a08f 100644 --- a/kernel/arg.c +++ b/kernel/arg.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include static char g_cmdline[CMDLINE_MAX + 1] = {0}; diff --git a/kernel/channel.c b/kernel/channel.c index aee168a..f0e48d0 100644 --- a/kernel/channel.c +++ b/kernel/channel.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #define CHANNEL_CAST(p) OBJECT_C_CAST(struct channel, c_base, &channel_type, p) diff --git a/kernel/futex.c b/kernel/futex.c index 41c408d..a586765 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #define FUTEX_CREATE 0x40u diff --git a/kernel/handle.c b/kernel/handle.c index 633c8b7..4c66dc3 100644 --- a/kernel/handle.c +++ b/kernel/handle.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include /* depth=3 gives a maximum of ~66.6 million handles */ #define MAX_TABLE_DEPTH 3 diff --git a/kernel/status.c b/kernel/status.c index d57da62..9bd1dda 100644 --- a/kernel/status.c +++ b/kernel/status.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #define ERROR_STRING_CASE(code) \ case code: \ diff --git a/libmango/CMakeLists.txt b/libmagenta/CMakeLists.txt similarity index 63% rename from libmango/CMakeLists.txt rename to libmagenta/CMakeLists.txt index 939b0be..8d63b4d 100644 --- a/libmango/CMakeLists.txt +++ b/libmagenta/CMakeLists.txt @@ -1,4 +1,4 @@ -file(GLOB headers ${CMAKE_CURRENT_SOURCE_DIR}/include/mango/*.h) +file(GLOB headers ${CMAKE_CURRENT_SOURCE_DIR}/include/magenta/*.h) file(GLOB asm_sources ${CMAKE_CURRENT_SOURCE_DIR}/arch/${CMAKE_SYSTEM_PROCESSOR}/*.S) @@ -6,7 +6,7 @@ set(public_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include-user) -add_library(libmango STATIC ${asm_sources}) -target_include_directories(libmango PUBLIC +add_library(libmagenta STATIC ${asm_sources}) +target_include_directories(libmagenta PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include-user) diff --git a/libmango/arch/x86_64/syscall.S b/libmagenta/arch/x86_64/syscall.S similarity index 99% rename from libmango/arch/x86_64/syscall.S rename to libmagenta/arch/x86_64/syscall.S index a31c6f2..2e54141 100644 --- a/libmango/arch/x86_64/syscall.S +++ b/libmagenta/arch/x86_64/syscall.S @@ -1,4 +1,4 @@ -#include "mango/syscall.h" +#include "magenta/syscall.h" # Registers: # rax = syscall ID + return value diff --git a/libmango/include-user/mango/config.h b/libmagenta/include-user/magenta/config.h similarity index 66% rename from libmango/include-user/mango/config.h rename to libmagenta/include-user/magenta/config.h index c27de5e..e571732 100644 --- a/libmango/include-user/mango/config.h +++ b/libmagenta/include-user/magenta/config.h @@ -1,8 +1,8 @@ -#ifndef MANGO_CONFIG_H_ -#define MANGO_CONFIG_H_ +#ifndef MAGENTA_CONFIG_H_ +#define MAGENTA_CONFIG_H_ -#include -#include +#include +#include #include extern kern_status_t kern_config_get( diff --git a/libmango/include-user/mango/equeue.h b/libmagenta/include-user/magenta/equeue.h similarity index 64% rename from libmango/include-user/mango/equeue.h rename to libmagenta/include-user/magenta/equeue.h index 5090a5f..f645ee9 100644 --- a/libmango/include-user/mango/equeue.h +++ b/libmagenta/include-user/magenta/equeue.h @@ -1,7 +1,7 @@ -#ifndef MANGO_EQUEUE_H_ -#define MANGO_EQUEUE_H_ +#ifndef MAGENTA_EQUEUE_H_ +#define MAGENTA_EQUEUE_H_ -#include +#include extern kern_status_t equeue_create(kern_handle_t *out); extern kern_status_t equeue_dequeue(kern_handle_t eq, equeue_packet_t *out); diff --git a/libmango/include-user/mango/futex.h b/libmagenta/include-user/magenta/futex.h similarity index 66% rename from libmango/include-user/mango/futex.h rename to libmagenta/include-user/magenta/futex.h index a8f774b..343fe19 100644 --- a/libmango/include-user/mango/futex.h +++ b/libmagenta/include-user/magenta/futex.h @@ -1,8 +1,8 @@ -#ifndef MANGO_FUTEX_H_ -#define MANGO_FUTEX_H_ +#ifndef MAGENTA_FUTEX_H_ +#define MAGENTA_FUTEX_H_ -#include -#include +#include +#include extern kern_status_t futex_wait( kern_futex_t *futex, diff --git a/libmango/include-user/mango/handle.h b/libmagenta/include-user/magenta/handle.h similarity index 79% rename from libmango/include-user/mango/handle.h rename to libmagenta/include-user/magenta/handle.h index ef71805..b02095a 100644 --- a/libmango/include-user/mango/handle.h +++ b/libmagenta/include-user/magenta/handle.h @@ -1,8 +1,8 @@ -#ifndef MANGO_HANDLE_H_ -#define MANGO_HANDLE_H_ +#ifndef MAGENTA_HANDLE_H_ +#define MAGENTA_HANDLE_H_ -#include -#include +#include +#include extern kern_status_t kern_handle_close(kern_handle_t handle); extern kern_status_t kern_handle_transfer( diff --git a/libmango/include-user/mango/log.h b/libmagenta/include-user/magenta/log.h similarity index 90% rename from libmango/include-user/mango/log.h rename to libmagenta/include-user/magenta/log.h index f6ee613..43e22f6 100644 --- a/libmango/include-user/mango/log.h +++ b/libmagenta/include-user/magenta/log.h @@ -1,8 +1,8 @@ -#ifndef MANGO_LOG_H_ -#define MANGO_LOG_H_ +#ifndef MAGENTA_LOG_H_ +#define MAGENTA_LOG_H_ -#include -#include +#include +#include #undef TRACE diff --git a/libmango/include-user/mango/msg.h b/libmagenta/include-user/magenta/msg.h similarity index 89% rename from libmango/include-user/mango/msg.h rename to libmagenta/include-user/magenta/msg.h index 51757d3..ef7df9d 100644 --- a/libmango/include-user/mango/msg.h +++ b/libmagenta/include-user/magenta/msg.h @@ -1,8 +1,8 @@ -#ifndef MANGO_MSG_H_ -#define MANGO_MSG_H_ +#ifndef MAGENTA_MSG_H_ +#define MAGENTA_MSG_H_ -#include -#include +#include +#include extern kern_status_t channel_create(unsigned int id, kern_handle_t *out); extern kern_status_t port_create(kern_handle_t *out); diff --git a/libmango/include-user/mango/object.h b/libmagenta/include-user/magenta/object.h similarity index 69% rename from libmango/include-user/mango/object.h rename to libmagenta/include-user/magenta/object.h index a76c938..7898732 100644 --- a/libmango/include-user/mango/object.h +++ b/libmagenta/include-user/magenta/object.h @@ -1,7 +1,7 @@ -#ifndef MANGO_OBJECT_H_ -#define MANGO_OBJECT_H_ +#ifndef MAGENTA_OBJECT_H_ +#define MAGENTA_OBJECT_H_ -#include +#include extern kern_status_t kern_object_wait(kern_wait_item_t *items, size_t nr_items); extern kern_status_t kern_object_query( diff --git a/libmango/include-user/mango/task.h b/libmagenta/include-user/magenta/task.h similarity index 93% rename from libmango/include-user/mango/task.h rename to libmagenta/include-user/magenta/task.h index a57d994..d52509a 100644 --- a/libmango/include-user/mango/task.h +++ b/libmagenta/include-user/magenta/task.h @@ -1,8 +1,8 @@ -#ifndef MANGO_TASK_H_ -#define MANGO_TASK_H_ +#ifndef MAGENTA_TASK_H_ +#define MAGENTA_TASK_H_ -#include -#include +#include +#include extern kern_status_t task_exit(int status); extern kern_status_t task_self(kern_handle_t *out); diff --git a/libmango/include-user/mango/vm.h b/libmagenta/include-user/magenta/vm.h similarity index 95% rename from libmango/include-user/mango/vm.h rename to libmagenta/include-user/magenta/vm.h index 2c16349..7931afe 100644 --- a/libmango/include-user/mango/vm.h +++ b/libmagenta/include-user/magenta/vm.h @@ -1,8 +1,8 @@ -#ifndef MANGO_VM_H_ -#define MANGO_VM_H_ +#ifndef MAGENTA_VM_H_ +#define MAGENTA_VM_H_ -#include -#include +#include +#include extern kern_status_t vm_object_create( const char *name, diff --git a/libmango/include/mango/signal.h b/libmagenta/include/magenta/signal.h similarity index 80% rename from libmango/include/mango/signal.h rename to libmagenta/include/magenta/signal.h index 0e720f6..f8891b4 100644 --- a/libmango/include/mango/signal.h +++ b/libmagenta/include/magenta/signal.h @@ -1,5 +1,5 @@ -#ifndef MANGO_SIGNAL_H_ -#define MANGO_SIGNAL_H_ +#ifndef MAGENTA_SIGNAL_H_ +#define MAGENTA_SIGNAL_H_ #define THREAD_SIGNAL_STOPPED 0x01u diff --git a/libmango/include/mango/status.h b/libmagenta/include/magenta/status.h similarity index 91% rename from libmango/include/mango/status.h rename to libmagenta/include/magenta/status.h index d70ea97..b5b183d 100644 --- a/libmango/include/mango/status.h +++ b/libmagenta/include/magenta/status.h @@ -1,5 +1,5 @@ -#ifndef MANGO_STATUS_H_ -#define MANGO_STATUS_H_ +#ifndef MAGENTA_STATUS_H_ +#define MAGENTA_STATUS_H_ #define KERN_OK (0) #define KERN_UNIMPLEMENTED (1) diff --git a/libmango/include/mango/syscall.h b/libmagenta/include/magenta/syscall.h similarity index 97% rename from libmango/include/mango/syscall.h rename to libmagenta/include/magenta/syscall.h index a446f64..d603da4 100644 --- a/libmango/include/mango/syscall.h +++ b/libmagenta/include/magenta/syscall.h @@ -1,5 +1,5 @@ -#ifndef MANGO_SYSCALL_H_ -#define MANGO_SYSCALL_H_ +#ifndef MAGENTA_SYSCALL_H_ +#define MAGENTA_SYSCALL_H_ #define SYS_KERN_LOG 1 #define SYS_KERN_HANDLE_CLOSE 2 diff --git a/libmango/include/mango/types.h b/libmagenta/include/magenta/types.h similarity index 99% rename from libmango/include/mango/types.h rename to libmagenta/include/magenta/types.h index 80644bc..dc354d4 100644 --- a/libmango/include/mango/types.h +++ b/libmagenta/include/magenta/types.h @@ -1,5 +1,5 @@ -#ifndef MANGO_TYPES_H_ -#define MANGO_TYPES_H_ +#ifndef MAGENTA_TYPES_H_ +#define MAGENTA_TYPES_H_ #include #include diff --git a/libmango/msg.c b/libmagenta/msg.c similarity index 100% rename from libmango/msg.c rename to libmagenta/msg.c diff --git a/sched/thread.c b/sched/thread.c index ec7025e..4127280 100644 --- a/sched/thread.c +++ b/sched/thread.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #define THREAD_CAST(p) OBJECT_C_CAST(struct thread, tr_base, &thread_type, p) diff --git a/syscall/object.c b/syscall/object.c index a9e1e80..ac24b14 100644 --- a/syscall/object.c +++ b/syscall/object.c @@ -4,8 +4,8 @@ #include #include #include -#include -#include +#include +#include kern_status_t sys_kern_object_wait(kern_wait_item_t *items, size_t nr_items) { diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index b4562a4..a473217 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.13) -project(mango-tools C) +project(magenta-tools C) set(tool_dirs e64patch) diff --git a/tools/bochsrc.bxrc b/tools/bochsrc.bxrc index 8153a48..099bbfd 100644 --- a/tools/bochsrc.bxrc +++ b/tools/bochsrc.bxrc @@ -10,7 +10,7 @@ floppy_bootsig_check: disabled=0 floppya: type=1_44 # no floppyb ata0: enabled=true, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14 -ata0-master: type=cdrom, path="build/mango-kernel.iso", status=inserted, model="Generic 1234", biosdetect=auto +ata0-master: type=cdrom, path="build/magenta-kernel.iso", status=inserted, model="Generic 1234", biosdetect=auto ata0-slave: type=none ata1: enabled=true, ioaddr1=0x170, ioaddr2=0x370, irq=15 ata1-master: type=none diff --git a/tools/boot-image/grub.cfg b/tools/boot-image/grub.cfg index 4e0db98..558b5c7 100644 --- a/tools/boot-image/grub.cfg +++ b/tools/boot-image/grub.cfg @@ -1,4 +1,4 @@ -menuentry "Mango Kernel" { - multiboot /boot/mango_kernel +menuentry "Magenta Kernel" { + multiboot /boot/magenta_kernel boot } diff --git a/tools/kernel-debug/debug_session.sh b/tools/kernel-debug/debug_session.sh index b0d29d7..0715d81 100755 --- a/tools/kernel-debug/debug_session.sh +++ b/tools/kernel-debug/debug_session.sh @@ -5,9 +5,9 @@ lldb_cfg=$2 shift 2 if command -v gdb &> /dev/null; then - printf " \033[93;1mGDB\033[0m boot/mango_kernel\n" + printf " \033[93;1mGDB\033[0m boot/magenta_kernel\n" tmux \ - new-session -d -s mango-debug "sleep 0.3; gdb -tui -x $gdb_cfg" \; \ + new-session -d -s magenta-debug "sleep 0.3; gdb -tui -x $gdb_cfg" \; \ split-window -h -l 80 \; \ split-window -v -l 25 "$@"\; \ select-pane -t 1 \; \ @@ -15,9 +15,9 @@ if command -v gdb &> /dev/null; then select-pane -t 0 elif command -v lldb &> /dev/null; then - printf " \033[93;1mLLDB\033[0m boot/mango_kernel\n" + printf " \033[93;1mLLDB\033[0m boot/magenta_kernel\n" tmux \ - new-session -d -s mango-debug "sleep 0.1; lldb --source $lldb_cfg" \; \ + new-session -d -s magenta-debug "sleep 0.1; lldb --source $lldb_cfg" \; \ split-window -h -l 160 \; \ split-window -v -l 25 "$@"\; \ select-pane -t 1 \; \ @@ -28,6 +28,6 @@ else exit -1 fi -tmux a -t mango-debug -tmux kill-session -t mango-debug +tmux a -t magenta-debug +tmux kill-session -t magenta-debug diff --git a/tools/kernel-debug/gdb_session_init b/tools/kernel-debug/gdb_session_init index c5fd706..5bba6c4 100644 --- a/tools/kernel-debug/gdb_session_init +++ b/tools/kernel-debug/gdb_session_init @@ -1,4 +1,4 @@ set confirm off -symbol-file mango_kernel.debug +symbol-file magenta_kernel.debug target remote localhost:1234 set confirm on diff --git a/tools/kernel-debug/lldb_session_init b/tools/kernel-debug/lldb_session_init index 258d050..5938340 100644 --- a/tools/kernel-debug/lldb_session_init +++ b/tools/kernel-debug/lldb_session_init @@ -1,2 +1,2 @@ -file mango_kernel.debug +file magenta_kernel.debug gdb-remote localhost:1234 diff --git a/tools/mango.buildid b/tools/magenta.buildid similarity index 100% rename from tools/mango.buildid rename to tools/magenta.buildid diff --git a/tools/mango.compiledb b/tools/magenta.compiledb similarity index 100% rename from tools/mango.compiledb rename to tools/magenta.compiledb diff --git a/tools/mango.install-cd b/tools/magenta.install-cd similarity index 98% rename from tools/mango.install-cd rename to tools/magenta.install-cd index ec1f687..8dae085 100755 --- a/tools/mango.install-cd +++ b/tools/magenta.install-cd @@ -116,7 +116,7 @@ def choice_options(num_devices): return '1-{}'.format(num_devices) -if not os.path.isfile('build/mango-kernel.iso'): +if not os.path.isfile('build/magenta-kernel.iso'): print('No system ISO image found.') print('Please run \'make cd\' to generate an ISO image') exit(-1) @@ -157,7 +157,7 @@ disk_prewrite(devices[choice][0]) dd_args = [ 'sudo', 'dd', - 'if=build/mango-kernel.iso', + 'if=build/magenta-kernel.iso', 'of={}'.format(devices[choice][0]), 'bs=1{}'.format('m' if sys.platform == 'darwin' else 'M') ] diff --git a/tools/mango.mkrescue b/tools/magenta.mkrescue similarity index 64% rename from tools/mango.mkrescue rename to tools/magenta.mkrescue index da91af2..0289f03 100755 --- a/tools/mango.mkrescue +++ b/tools/magenta.mkrescue @@ -7,22 +7,22 @@ import sys import os import shutil -kernel_src_path = os.path.join('build', 'mango_kernel') +kernel_src_path = os.path.join('build', 'magenta_kernel') grub_cfg_src_path = os.path.join('tools', 'boot-image', 'grub.cfg') -iso_build_dir = os.path.join('build', 'mango-kernel.iso-build') -iso_path = os.path.join('build', 'mango-kernel.iso') +iso_build_dir = os.path.join('build', 'magenta-kernel.iso-build') +iso_path = os.path.join('build', 'magenta-kernel.iso') def in_source_tree(): - return os.path.isfile('tools/mango.sync') + return os.path.isfile('tools/magenta.sync') if not in_source_tree(): - print('This script must be executed from the root of the Mango source tree') + print('This script must be executed from the root of the Magenta source tree') exit(-1) if not os.path.isdir('build'): - print('Please build the Mango kernel before using this tool') + print('Please build the Magenta kernel before using this tool') exit(-1) if os.path.isdir(iso_build_dir): @@ -33,7 +33,7 @@ os.mkdir(iso_build_dir) os.mkdir(os.path.join(iso_build_dir, 'boot')) os.mkdir(os.path.join(iso_build_dir, 'boot', 'grub')) -shutil.copyfile(kernel_src_path, os.path.join(iso_build_dir, 'boot', 'mango_kernel')) +shutil.copyfile(kernel_src_path, os.path.join(iso_build_dir, 'boot', 'magenta_kernel')) shutil.copyfile(grub_cfg_src_path, os.path.join(iso_build_dir, 'boot', 'grub', 'grub.cfg')) subprocess.run(['grub-mkrescue', '-o', iso_path, iso_build_dir]) diff --git a/tools/mango.sync b/tools/magenta.sync similarity index 96% rename from tools/mango.sync rename to tools/magenta.sync index 04de638..65da319 100755 --- a/tools/mango.sync +++ b/tools/magenta.sync @@ -16,7 +16,7 @@ rsync_path = os.getenv('RSYNC_PATH', default = 'rsync') def in_source_tree(): - return os.path.isfile('tools/mango.sync') + return os.path.isfile('tools/magenta.sync') def create_sample_config(): @@ -78,7 +78,7 @@ def print_available_targets(targets): if not in_source_tree(): - print('This script must be executed from the root of the Mango source tree') + print('This script must be executed from the root of the Magenta source tree') exit(-1) config = read_config() diff --git a/vm/address-space.c b/vm/address-space.c index da2a73b..fca0dc3 100644 --- a/vm/address-space.c +++ b/vm/address-space.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include /*** STATIC DATA + MACROS *****************************************************/ diff --git a/vm/bootstrap.c b/vm/bootstrap.c index 12b4b51..3e2906e 100644 --- a/vm/bootstrap.c +++ b/vm/bootstrap.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include diff --git a/vm/vm-controller.c b/vm/vm-controller.c index 41a2a30..f0e43af 100644 --- a/vm/vm-controller.c +++ b/vm/vm-controller.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include #define VM_CONTROLLER_CAST(p) \ OBJECT_C_CAST(struct vm_controller, vc_base, &vm_controller_type, p)