refactor: move program registration from kernel to progmanager
- Remove diskcmd, diskutil, notepad, partcmd, volcmd init calls and uses from kernel.pas — these are programs, not kernel subsystems. - Move their initialization into progmanager.init() alongside the other baked-in programs (md5sum, base64_prog, dhclient, etc.). - Remove diskcmd, diskutil, notepad from kernel's uses clause. - Add a splash.update() call for the auto-mount volumes step. - Suppress FPC warnings in compile_sources.sh (-v0e instead of -v0ew).
This commit is contained in:
+1
-1
@@ -10,4 +10,4 @@ for dir in $(find src wasuro -type d 2>/dev/null); do
|
||||
FU_PATHS="$FU_PATHS -Fu$dir"
|
||||
done
|
||||
|
||||
fpc -Aelf -gw -g -gl -n -v0ew -O3 -OpPENTIUM3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ $FU_PATHS src/kernel.pas
|
||||
fpc -Aelf -gw -g -gl -n -v0e -O3 -OpPENTIUM3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ $FU_PATHS src/kernel.pas
|
||||
+1
-12
@@ -34,8 +34,6 @@ uses
|
||||
contextswitcher,
|
||||
cpu,
|
||||
desktop,
|
||||
diskcmd,
|
||||
diskutil,
|
||||
doublebuffer,
|
||||
drivermanagement,
|
||||
E1000,
|
||||
@@ -67,7 +65,6 @@ uses
|
||||
mouse,
|
||||
multiboot,
|
||||
net,
|
||||
notepad,
|
||||
OHCI,
|
||||
partcmd,
|
||||
PCI,
|
||||
@@ -277,9 +274,6 @@ begin
|
||||
testdriver.init();
|
||||
E1000.init();
|
||||
AHCI.init();
|
||||
diskcmd.init();
|
||||
partcmd.init();
|
||||
volcmd.init();
|
||||
syslog.logln('KERNEL', 'DEVICE DRIVERS: INIT END.');
|
||||
|
||||
{ Bus Drivers }
|
||||
@@ -293,6 +287,7 @@ begin
|
||||
syslog.logln('KERNEL', 'BUS DRIVERS: INIT END.');
|
||||
|
||||
{ Auto-mount discovered volumes into VFS }
|
||||
splash.update(38, 'Auto-mounting volumes...');
|
||||
vfs.auto_mount_volumes();
|
||||
|
||||
{ Network Stack }
|
||||
@@ -354,12 +349,6 @@ begin
|
||||
graphicsrefresh.init;
|
||||
usbhotplug.init;
|
||||
|
||||
{ Initialize disk utility (registers with desktop search) }
|
||||
diskutil.init;
|
||||
|
||||
{ Initialize notepad (registers with desktop search) }
|
||||
notepad.init;
|
||||
|
||||
{ Enable preemptive context switching (replaces ISR_32) }
|
||||
contextswitcher.init;
|
||||
|
||||
|
||||
+6
-2
@@ -37,7 +37,7 @@ uses
|
||||
//command provider units
|
||||
kernel, cpu, drivermanagement, processmanager,
|
||||
arp, ipv4, tcp,
|
||||
diskcmd, usbcore;
|
||||
diskcmd, usbcore, diskutil, notepad, partcmd, volcmd;
|
||||
|
||||
procedure init();
|
||||
begin
|
||||
@@ -54,10 +54,14 @@ begin
|
||||
stdio.registerCommand('TCPCONNECT', @tcp.terminal_command_tcpconnect, 'Connect to a TCP host and send Hello World.');
|
||||
stdio.registerCommand('TCPLISTEN', @tcp.terminal_command_tcplisten, 'Listen on a TCP port and log received data.');
|
||||
stdio.registerCommand('TCPHTTP', @tcp.terminal_command_tcphttp, 'Send HTTP GET to a host IP (port 80 default).');
|
||||
diskcmd.init();
|
||||
stdio.registerCommand('USB', @usbcore.terminal_command_usb, 'USB subsystem information.');
|
||||
|
||||
{ Initialize baked-in programs }
|
||||
diskcmd.init();
|
||||
partcmd.init();
|
||||
volcmd.init();
|
||||
diskutil.init;
|
||||
notepad.init;
|
||||
md5sum.init();
|
||||
base64_prog.init();
|
||||
dhclient.init();
|
||||
|
||||
Reference in New Issue
Block a user