meta: rename kernel to Magenta
This commit is contained in:
+4
-4
@@ -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
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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 <stddef.h>
|
||||
#include <stdint.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
|
||||
|
||||
@@ -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 <stdint.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 <stdint.h>
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#include <kernel/types.h>
|
||||
#include <kernel/vm-object.h>
|
||||
#include <kernel/vm.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
|
||||
/* some helpful datasize constants */
|
||||
#define C_1GiB 0x40000000ULL
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef KERNEL_ARG_H_
|
||||
#define KERNEL_ARG_H_
|
||||
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define CMDLINE_MAX 4096
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define KERNEL_BSP_H_
|
||||
|
||||
#include <kernel/compiler.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
#include <kernel/types.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
#include <kernel/locks.h>
|
||||
#include <kernel/queue.h>
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <kernel/locks.h>
|
||||
#include <kernel/object.h>
|
||||
#include <kernel/sched.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
#define EQUEUE_PACKET_MAX 100
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <kernel/btree.h>
|
||||
#include <kernel/wait.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
struct task;
|
||||
struct address_space;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#define KERNEL_HANDLE_H_
|
||||
|
||||
#include <kernel/bitmap.h>
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef KERNEL_IOVEC_H_
|
||||
#define KERNEL_IOVEC_H_
|
||||
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct address_space;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include <kernel/btree.h>
|
||||
#include <kernel/locks.h>
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
struct port;
|
||||
struct thread;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <kernel/locks.h>
|
||||
#include <kernel/vm.h>
|
||||
#include <kernel/wait.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef KERNEL_PERCPU_H_
|
||||
#define KERNEL_PERCPU_H_
|
||||
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
#include <kernel/compiler.h>
|
||||
#include <kernel/sched.h>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <kernel/machine/pmap.h>
|
||||
#include <kernel/vm.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define PMAP_INVALID ML_PMAP_INVALID
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <kernel/locks.h>
|
||||
#include <kernel/queue.h>
|
||||
#include <kernel/types.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
|
||||
#define PRIO_MAX 32
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include <kernel/handle.h>
|
||||
#include <kernel/task.h>
|
||||
#include <kernel/vm.h>
|
||||
#include <mango/status.h>
|
||||
#include <mango/syscall.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/syscall.h>
|
||||
|
||||
#define validate_access(task, ptr, len, flags) \
|
||||
__validate_access(task, (const void *)ptr, len, flags)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef KERNEL_TYPES_H_
|
||||
#define KERNEL_TYPES_H_
|
||||
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef KERNEL_UTIL_H_
|
||||
#define KERNEL_UTIL_H_
|
||||
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <kernel/locks.h>
|
||||
#include <kernel/object.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
struct thread;
|
||||
struct equeue;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
#include <kernel/machine/vm.h>
|
||||
#include <kernel/queue.h>
|
||||
#include <kernel/types.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#include <kernel/arg.h>
|
||||
#include <kernel/libc/ctype.h>
|
||||
#include <kernel/libc/string.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
|
||||
static char g_cmdline[CMDLINE_MAX + 1] = {0};
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include <kernel/task.h>
|
||||
#include <kernel/thread.h>
|
||||
#include <kernel/util.h>
|
||||
#include <mango/signal.h>
|
||||
#include <magenta/signal.h>
|
||||
|
||||
#define CHANNEL_CAST(p) OBJECT_C_CAST(struct channel, c_base, &channel_type, p)
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
#include <kernel/futex.h>
|
||||
#include <kernel/sched.h>
|
||||
#include <kernel/task.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
|
||||
#define FUTEX_CREATE 0x40u
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
#include <kernel/sched.h>
|
||||
#include <kernel/util.h>
|
||||
#include <kernel/vm.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
/* depth=3 gives a maximum of ~66.6 million handles */
|
||||
#define MAX_TABLE_DEPTH 3
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
#define ERROR_STRING_CASE(code) \
|
||||
case code: \
|
||||
|
||||
@@ -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)
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "mango/syscall.h"
|
||||
#include "magenta/syscall.h"
|
||||
|
||||
# Registers:
|
||||
# rax = syscall ID + return value
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef MANGO_CONFIG_H_
|
||||
#define MANGO_CONFIG_H_
|
||||
#ifndef MAGENTA_CONFIG_H_
|
||||
#define MAGENTA_CONFIG_H_
|
||||
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
#include <stddef.h>
|
||||
|
||||
extern kern_status_t kern_config_get(
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef MANGO_EQUEUE_H_
|
||||
#define MANGO_EQUEUE_H_
|
||||
#ifndef MAGENTA_EQUEUE_H_
|
||||
#define MAGENTA_EQUEUE_H_
|
||||
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
extern kern_status_t equeue_create(kern_handle_t *out);
|
||||
extern kern_status_t equeue_dequeue(kern_handle_t eq, equeue_packet_t *out);
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef MANGO_FUTEX_H_
|
||||
#define MANGO_FUTEX_H_
|
||||
#ifndef MAGENTA_FUTEX_H_
|
||||
#define MAGENTA_FUTEX_H_
|
||||
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
extern kern_status_t futex_wait(
|
||||
kern_futex_t *futex,
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef MANGO_HANDLE_H_
|
||||
#define MANGO_HANDLE_H_
|
||||
#ifndef MAGENTA_HANDLE_H_
|
||||
#define MAGENTA_HANDLE_H_
|
||||
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
extern kern_status_t kern_handle_close(kern_handle_t handle);
|
||||
extern kern_status_t kern_handle_transfer(
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef MANGO_LOG_H_
|
||||
#define MANGO_LOG_H_
|
||||
#ifndef MAGENTA_LOG_H_
|
||||
#define MAGENTA_LOG_H_
|
||||
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
#undef TRACE
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef MANGO_MSG_H_
|
||||
#define MANGO_MSG_H_
|
||||
#ifndef MAGENTA_MSG_H_
|
||||
#define MAGENTA_MSG_H_
|
||||
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
extern kern_status_t channel_create(unsigned int id, kern_handle_t *out);
|
||||
extern kern_status_t port_create(kern_handle_t *out);
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef MANGO_OBJECT_H_
|
||||
#define MANGO_OBJECT_H_
|
||||
#ifndef MAGENTA_OBJECT_H_
|
||||
#define MAGENTA_OBJECT_H_
|
||||
|
||||
#include <mango/types.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
extern kern_status_t kern_object_wait(kern_wait_item_t *items, size_t nr_items);
|
||||
extern kern_status_t kern_object_query(
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef MANGO_TASK_H_
|
||||
#define MANGO_TASK_H_
|
||||
#ifndef MAGENTA_TASK_H_
|
||||
#define MAGENTA_TASK_H_
|
||||
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
extern kern_status_t task_exit(int status);
|
||||
extern kern_status_t task_self(kern_handle_t *out);
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef MANGO_VM_H_
|
||||
#define MANGO_VM_H_
|
||||
#ifndef MAGENTA_VM_H_
|
||||
#define MAGENTA_VM_H_
|
||||
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
extern kern_status_t vm_object_create(
|
||||
const char *name,
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef MANGO_TYPES_H_
|
||||
#define MANGO_TYPES_H_
|
||||
#ifndef MAGENTA_TYPES_H_
|
||||
#define MAGENTA_TYPES_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
#include <kernel/printk.h>
|
||||
#include <kernel/task.h>
|
||||
#include <kernel/thread.h>
|
||||
#include <mango/signal.h>
|
||||
#include <magenta/signal.h>
|
||||
|
||||
#define THREAD_CAST(p) OBJECT_C_CAST(struct thread, tr_base, &thread_type, p)
|
||||
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
#include <kernel/task.h>
|
||||
#include <kernel/thread.h>
|
||||
#include <kernel/wait.h>
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
#include <magenta/status.h>
|
||||
#include <magenta/types.h>
|
||||
|
||||
kern_status_t sys_kern_object_wait(kern_wait_item_t *items, size_t nr_items)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(mango-tools C)
|
||||
project(magenta-tools C)
|
||||
|
||||
set(tool_dirs e64patch)
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
menuentry "Mango Kernel" {
|
||||
multiboot /boot/mango_kernel
|
||||
menuentry "Magenta Kernel" {
|
||||
multiboot /boot/magenta_kernel
|
||||
boot
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
set confirm off
|
||||
symbol-file mango_kernel.debug
|
||||
symbol-file magenta_kernel.debug
|
||||
target remote localhost:1234
|
||||
set confirm on
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
file mango_kernel.debug
|
||||
file magenta_kernel.debug
|
||||
gdb-remote localhost:1234
|
||||
|
||||
@@ -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')
|
||||
]
|
||||
@@ -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])
|
||||
@@ -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()
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#include <kernel/util.h>
|
||||
#include <kernel/vm-controller.h>
|
||||
#include <kernel/vm-object.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
|
||||
/*** STATIC DATA + MACROS *****************************************************/
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include <kernel/vm-object.h>
|
||||
#include <kernel/vm.h>
|
||||
#include <limits.h>
|
||||
#include <mango/status.h>
|
||||
#include <magenta/status.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#include <kernel/util.h>
|
||||
#include <kernel/vm-controller.h>
|
||||
#include <kernel/vm-object.h>
|
||||
#include <mango/signal.h>
|
||||
#include <magenta/signal.h>
|
||||
|
||||
#define VM_CONTROLLER_CAST(p) \
|
||||
OBJECT_C_CAST(struct vm_controller, vc_base, &vm_controller_type, p)
|
||||
|
||||
Reference in New Issue
Block a user