Start and mount tmpfs on boot

This commit is contained in:
pjht 2024-11-19 11:24:59 -06:00
parent 6a594dcefc
commit f4ad6d177a
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -75,6 +75,7 @@ fn main() {
syslog_client.subscribe_to_text();
syslog_client.subscribe_to_binary("devfs".to_string(), vec![0, 1]);
syslog_client.subscribe_to_binary("tarfs".to_string(), vec![0]);
syslog_client.subscribe_to_binary("tmpfs".to_string(), vec![0]);
let mut msg_handler = SyslogMessageHandler::new();
let proc_man_pid = run_initrd_proc(&initrd, "bin/proc_man");
let proc_man_client = proc_man_rpc::Client::new(proc_man_pid);
@ -96,6 +97,7 @@ fn main() {
vfs_client
.mount(Path::new("/dummy"), "devfs", Path::new("/dev"))
.unwrap();
run_initrd_proc(&initrd, "bin/tarfs");
loop {
let msg = msg_handler.get_message();
@ -110,6 +112,16 @@ fn main() {
vfs_client
.mount(Path::new("/dev/initrd"), "tarfs", Path::new("/"))
.unwrap();
Command::new("/bin/tmpfs").spawn().unwrap();
loop {
let msg = msg_handler.get_message();
if msg.from == "tmpfs" {
break;
}
}
vfs_client
.mount(Path::new("/dummy"), "tmpfs", Path::new("/tmp"))
.unwrap();
Command::new("/bin/partserv").spawn().unwrap();
Command::new("/bin/ext2").spawn().unwrap();
Command::new("/bin/pci").spawn().unwrap();