git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libc+AxWin3 - RichText rendering, scanf
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
system.c
diff --git
a/KernelLand/Kernel/system.c
b/KernelLand/Kernel/system.c
index
8fc2a1c
..
9224db5
100644
(file)
--- a/
KernelLand/Kernel/system.c
+++ b/
KernelLand/Kernel/system.c
@@
-4,14
+4,16
@@
* system.c
* - Architecture Independent System Init
*/
* system.c
* - Architecture Independent System Init
*/
-#define DEBUG
0
+#define DEBUG
1
#include <acess.h>
#include <acess.h>
+#include <hal_proc.h>
// === IMPORTS ===
extern void Arch_LoadBootModules(void);
extern int Modules_LoadBuiltins(void);
extern void Modules_SetBuiltinParams(char *Name, char *ArgString);
extern void Debug_SetKTerminal(const char *File);
// === IMPORTS ===
extern void Arch_LoadBootModules(void);
extern int Modules_LoadBuiltins(void);
extern void Modules_SetBuiltinParams(char *Name, char *ArgString);
extern void Debug_SetKTerminal(const char *File);
+extern void Timer_CallbackThread(void *);
// === PROTOTYPES ===
void System_Init(char *Commandline);
// === PROTOTYPES ===
void System_Init(char *Commandline);
@@
-29,6
+31,8
@@
char *argv[32];
// === CODE ===
void System_Init(char *CommandLine)
{
// === CODE ===
void System_Init(char *CommandLine)
{
+ Proc_SpawnWorker(Timer_CallbackThread, NULL);
+
// Parse Kernel's Command Line
System_ParseCommandLine(CommandLine);
// Parse Kernel's Command Line
System_ParseCommandLine(CommandLine);
@@
-41,7
+45,12
@@
void System_Init(char *CommandLine)
// - Execute the Config Script
Log_Log("Config", "Spawning init '%s'", gsInitBinary);
// - Execute the Config Script
Log_Log("Config", "Spawning init '%s'", gsInitBinary);
- Proc_Spawn(gsInitBinary);
+ if(Proc_Clone(CLONE_VM|CLONE_NOUSER) == 0)
+ {
+ const char *args[] = {gsInitBinary, 0};
+ Proc_Execve(gsInitBinary, args, &args[1], 0);
+ Log_KernelPanic("System", "Unable to spawn init '%s'", gsInitBinary);
+ }
// Set the debug to be echoed to the terminal
Log_Log("Config", "Kernel now echoes to VT7 (Ctrl-Alt-F8)");
// Set the debug to be echoed to the terminal
Log_Log("Config", "Kernel now echoes to VT7 (Ctrl-Alt-F8)");
@@
-153,7
+162,7
@@
void System_ParseVFS(char *Arg)
// - Symbolic Link <link>=<destination>
if(value[0] == '/')
{
// - Symbolic Link <link>=<destination>
if(value[0] == '/')
{
-
Log_Log("Config", "Symbolic link '%s' pointing to '%s'", Arg, value);
+
//
Log_Log("Config", "Symbolic link '%s' pointing to '%s'", Arg, value);
VFS_Symlink(Arg, value);
}
// - Mount <mountpoint>=<fs>:<device>
VFS_Symlink(Arg, value);
}
// - Mount <mountpoint>=<fs>:<device>
@@
-168,13
+177,13
@@
void System_ParseVFS(char *Arg)
}
// Create Mountpoint
if( (fd = VFS_Open(Arg, 0)) == -1 ) {
}
// Create Mountpoint
if( (fd = VFS_Open(Arg, 0)) == -1 ) {
-
Log_Log("Config", "Creating directory '%s'", Arg, value);
+
//
Log_Log("Config", "Creating directory '%s'", Arg, value);
VFS_MkDir( Arg );
} else {
VFS_Close(fd);
}
// Mount
VFS_MkDir( Arg );
} else {
VFS_Close(fd);
}
// Mount
-
Log_Log("Config", "Mounting '%s' to '%s' ('%s')", dev, Arg, value);
+
//
Log_Log("Config", "Mounting '%s' to '%s' ('%s')", dev, Arg, value);
VFS_Mount(dev, Arg, value, "");
}
}
VFS_Mount(dev, Arg, value, "");
}
}
UCC
git Repository :: git.ucc.asn.au