Start and mount tmpfs on boot
This commit is contained in:
parent
6a594dcefc
commit
f4ad6d177a
12
src/main.rs
12
src/main.rs
@ -75,6 +75,7 @@ fn main() {
|
|||||||
syslog_client.subscribe_to_text();
|
syslog_client.subscribe_to_text();
|
||||||
syslog_client.subscribe_to_binary("devfs".to_string(), vec![0, 1]);
|
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("tarfs".to_string(), vec![0]);
|
||||||
|
syslog_client.subscribe_to_binary("tmpfs".to_string(), vec![0]);
|
||||||
let mut msg_handler = SyslogMessageHandler::new();
|
let mut msg_handler = SyslogMessageHandler::new();
|
||||||
let proc_man_pid = run_initrd_proc(&initrd, "bin/proc_man");
|
let proc_man_pid = run_initrd_proc(&initrd, "bin/proc_man");
|
||||||
let proc_man_client = proc_man_rpc::Client::new(proc_man_pid);
|
let proc_man_client = proc_man_rpc::Client::new(proc_man_pid);
|
||||||
@ -96,6 +97,7 @@ fn main() {
|
|||||||
vfs_client
|
vfs_client
|
||||||
.mount(Path::new("/dummy"), "devfs", Path::new("/dev"))
|
.mount(Path::new("/dummy"), "devfs", Path::new("/dev"))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
run_initrd_proc(&initrd, "bin/tarfs");
|
run_initrd_proc(&initrd, "bin/tarfs");
|
||||||
loop {
|
loop {
|
||||||
let msg = msg_handler.get_message();
|
let msg = msg_handler.get_message();
|
||||||
@ -110,6 +112,16 @@ fn main() {
|
|||||||
vfs_client
|
vfs_client
|
||||||
.mount(Path::new("/dev/initrd"), "tarfs", Path::new("/"))
|
.mount(Path::new("/dev/initrd"), "tarfs", Path::new("/"))
|
||||||
.unwrap();
|
.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/partserv").spawn().unwrap();
|
||||||
Command::new("/bin/ext2").spawn().unwrap();
|
Command::new("/bin/ext2").spawn().unwrap();
|
||||||
Command::new("/bin/pci").spawn().unwrap();
|
Command::new("/bin/pci").spawn().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user