3 * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
4 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
30 #include <partition.h>
32 #include <net/socket.h>
33 #include <net/packet.h>
44 /* Command structure */
45 typedef unsigned int (init_handler_t
) ();
52 kprintf (" v" ZEXOS_MAJOR
"." ZEXOS_MINOR
"." ZEXOS_REVISION
" " ZEXOS_DATE
" " ZEXOS_ARCH
" " ZEXOS_COMPILER
"\n");
55 void oscmd (char *cmdline
)
66 if (cmdline
[x
] == ' ') {
69 if (!cstrcmp ("live", cmdline
+x
))
70 kernel_attr
|= KERNEL_LIVE
;
71 if (!cstrcmp ("noata", cmdline
+x
))
72 kernel_attr
|= KERNEL_NOATA
;
73 if (!cstrcmp ("18hz", cmdline
+x
))
74 kernel_attr
|= KERNEL_18HZ
;
75 if (!cstrcmp ("noeth", cmdline
+x
))
76 kernel_attr
|= KERNEL_NOETH
;
77 if (!cstrcmp ("novesa", cmdline
+x
))
78 kernel_attr
|= KERNEL_NOVESA
;
85 unsigned int checkinfo (char *msg
, int ret
)
109 settextcolor (15, 0);
114 unsigned int _init (init_handler_t
*handler
, char *msg
)
116 return checkinfo (msg
, handler ());
119 extern void calc_freqency ();
120 extern task_t
*_curr_task
;
121 int init (char *cmdline
)
126 _init (&init_arch
, NULL
);
130 _init (&init_video
, NULL
);
134 _init (&init_mm
, "Initialize mm");
135 _init (&init_smp
, "Initialize SMP");
137 _init (&init_keyboard
, "Initialize keyboard");
138 _init (&init_paging
, "Initialize paging");
140 _init (&init_env
, "Initialize env vars");
141 _init (&init_fd
, "Initialize file desc");
142 _init (&init_vfs
, "Initialize VFS");
143 _init (&init_fs
, "Initialize fs");
144 _init (&init_partition
, "Initialize parts");
145 _init (&init_tasks
, "Initialize tasks");
146 _init (&init_netif
, "Initialize net if");
147 _init (&init_dev
, "Initialize devices");
148 _init (&init_socket
, "Initialize sockets");
149 _init (&init_packet
, "Initialize netcore");
150 _init (&init_proc
, "Initialize procs");
151 _init (&init_module
, "Loading modules");
152 _init (&init_commands
, "Registering cmds");
153 _init (&init_console
, "Initialize console");
158 _init (&init_tty
, NULL
);
159 _init (&init_user
, NULL
);