Rename RD to SYS
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m40s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m40s
This commit is contained in:
@@ -27,7 +27,7 @@ void receiver (void* arg) {
|
|||||||
void app_main (void) {
|
void app_main (void) {
|
||||||
debug_printf ("Init process is running. Starting user shell...\n");
|
debug_printf ("Init process is running. Starting user shell...\n");
|
||||||
|
|
||||||
int ce_pid = exec ("RD", "ce");
|
int ce_pid = exec ("SYS", "/ce");
|
||||||
ce_pgid = get_procgroup (ce_pid);
|
ce_pgid = get_procgroup (ce_pid);
|
||||||
|
|
||||||
process_spawn (&receiver, NULL);
|
process_spawn (&receiver, NULL);
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ void bootmain (void) {
|
|||||||
struct reschedule_ctx rctx;
|
struct reschedule_ctx rctx;
|
||||||
memset (&rctx, 0, sizeof (rctx));
|
memset (&rctx, 0, sizeof (rctx));
|
||||||
|
|
||||||
struct device* rd0 = device_find ("RD0");
|
struct device* sys0 = device_find ("SYS0");
|
||||||
vfs_create_volume (thiscpu->kproc, &rctx, "RD", FS_TARFS, rd0, false);
|
vfs_create_volume (thiscpu->kproc, &rctx, "SYS", FS_TARFS, sys0, false);
|
||||||
|
|
||||||
struct device* temp0 = device_find ("TEMP0");
|
struct device* temp0 = device_find ("TEMP0");
|
||||||
vfs_create_volume (thiscpu->kproc, &rctx, "TEMP", FS_FAT16, temp0, true);
|
vfs_create_volume (thiscpu->kproc, &rctx, "TEMP", FS_FAT16, temp0, true);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ static void smp_bootstrap (struct limine_mp_info* mp_info) {
|
|||||||
struct reschedule_ctx rctx;
|
struct reschedule_ctx rctx;
|
||||||
memset (&rctx, 0, sizeof (rctx));
|
memset (&rctx, 0, sizeof (rctx));
|
||||||
|
|
||||||
struct proc* spin_proc = proc_from_file (thiscpu->kproc, "RD", "/spin", &rctx);
|
struct proc* spin_proc = proc_from_file (thiscpu->kproc, "SYS", "/spin", &rctx);
|
||||||
proc_register (spin_proc, thiscpu, &rctx);
|
proc_register (spin_proc, thiscpu, &rctx);
|
||||||
|
|
||||||
spin_lock (&spin_proc->cpu->lock, &fc);
|
spin_lock (&spin_proc->cpu->lock, &fc);
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ static void terminal_device_init (void) {
|
|||||||
thiscpu->kproc, &rctx);
|
thiscpu->kproc, &rctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ramdisk_device_init (void) {
|
static void sys_device_init (void) {
|
||||||
struct reschedule_ctx rctx;
|
struct reschedule_ctx rctx;
|
||||||
memset (&rctx, 0, sizeof (rctx));
|
memset (&rctx, 0, sizeof (rctx));
|
||||||
|
|
||||||
@@ -128,13 +128,13 @@ static void ramdisk_device_init (void) {
|
|||||||
|
|
||||||
struct limine_module_response* module = limine_module_request.response;
|
struct limine_module_response* module = limine_module_request.response;
|
||||||
|
|
||||||
const char* ramdisk_path = "/boot/mop3dist.tar.lz4";
|
const char* dist_path = "/boot/mop3dist.tar.lz4";
|
||||||
struct limine_file* file = NULL;
|
struct limine_file* file = NULL;
|
||||||
|
|
||||||
for (size_t i = 0; i < module->module_count; i++) {
|
for (size_t i = 0; i < module->module_count; i++) {
|
||||||
file = module->modules[i];
|
file = module->modules[i];
|
||||||
|
|
||||||
if (strncmp (file->path, ramdisk_path, strlen (ramdisk_path)) == 0)
|
if (strncmp (file->path, dist_path, strlen (dist_path)) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ static void ramdisk_device_init (void) {
|
|||||||
.sector_size = 512,
|
.sector_size = 512,
|
||||||
.buffer = unpack_buffer,
|
.buffer = unpack_buffer,
|
||||||
};
|
};
|
||||||
device_create ("RD0", ops, lengthof (ops), &ramdrv_init, &ramdrv_fini, &init, thiscpu->kproc,
|
device_create ("SYS0", ops, lengthof (ops), &ramdrv_init, &ramdrv_fini, &init, thiscpu->kproc,
|
||||||
&rctx);
|
&rctx);
|
||||||
|
|
||||||
LZ4F_freeDecompressionContext (dctx);
|
LZ4F_freeDecompressionContext (dctx);
|
||||||
@@ -197,7 +197,7 @@ void devices_init (void) {
|
|||||||
memset (&device_table, 0, sizeof (device_table));
|
memset (&device_table, 0, sizeof (device_table));
|
||||||
|
|
||||||
terminal_device_init ();
|
terminal_device_init ();
|
||||||
ramdisk_device_init ();
|
sys_device_init ();
|
||||||
temp_device_init ();
|
temp_device_init ();
|
||||||
debugconsole_device_init ();
|
debugconsole_device_init ();
|
||||||
|
|
||||||
|
|||||||
@@ -339,10 +339,10 @@ void proc_init (void) {
|
|||||||
struct reschedule_ctx rctx;
|
struct reschedule_ctx rctx;
|
||||||
memset (&rctx, 0, sizeof (rctx));
|
memset (&rctx, 0, sizeof (rctx));
|
||||||
|
|
||||||
struct proc* spin_proc = proc_from_file (thiscpu->kproc, "RD", "/spin", &rctx);
|
struct proc* spin_proc = proc_from_file (thiscpu->kproc, "SYS", "/spin", &rctx);
|
||||||
proc_register (spin_proc, thiscpu, &rctx);
|
proc_register (spin_proc, thiscpu, &rctx);
|
||||||
|
|
||||||
struct proc* init = proc_from_file (thiscpu->kproc, "RD", "/init", &rctx);
|
struct proc* init = proc_from_file (thiscpu->kproc, "SYS", "/init", &rctx);
|
||||||
proc_register (init, thiscpu, &rctx);
|
proc_register (init, thiscpu, &rctx);
|
||||||
|
|
||||||
spin_lock (&spin_proc->cpu->lock, &fc);
|
spin_lock (&spin_proc->cpu->lock, &fc);
|
||||||
|
|||||||
Reference in New Issue
Block a user