refactor: move program registration from kernel to progmanager
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

- 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:
2026-03-07 20:39:43 +00:00
parent 6c3c0e63d5
commit 36ec7bfdb6
3 changed files with 8 additions and 15 deletions
+1 -1
View File
@@ -10,4 +10,4 @@ for dir in $(find src wasuro -type d 2>/dev/null); do
FU_PATHS="$FU_PATHS -Fu$dir" FU_PATHS="$FU_PATHS -Fu$dir"
done 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
View File
@@ -34,8 +34,6 @@ uses
contextswitcher, contextswitcher,
cpu, cpu,
desktop, desktop,
diskcmd,
diskutil,
doublebuffer, doublebuffer,
drivermanagement, drivermanagement,
E1000, E1000,
@@ -67,7 +65,6 @@ uses
mouse, mouse,
multiboot, multiboot,
net, net,
notepad,
OHCI, OHCI,
partcmd, partcmd,
PCI, PCI,
@@ -277,9 +274,6 @@ begin
testdriver.init(); testdriver.init();
E1000.init(); E1000.init();
AHCI.init(); AHCI.init();
diskcmd.init();
partcmd.init();
volcmd.init();
syslog.logln('KERNEL', 'DEVICE DRIVERS: INIT END.'); syslog.logln('KERNEL', 'DEVICE DRIVERS: INIT END.');
{ Bus Drivers } { Bus Drivers }
@@ -293,6 +287,7 @@ begin
syslog.logln('KERNEL', 'BUS DRIVERS: INIT END.'); syslog.logln('KERNEL', 'BUS DRIVERS: INIT END.');
{ Auto-mount discovered volumes into VFS } { Auto-mount discovered volumes into VFS }
splash.update(38, 'Auto-mounting volumes...');
vfs.auto_mount_volumes(); vfs.auto_mount_volumes();
{ Network Stack } { Network Stack }
@@ -354,12 +349,6 @@ begin
graphicsrefresh.init; graphicsrefresh.init;
usbhotplug.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) } { Enable preemptive context switching (replaces ISR_32) }
contextswitcher.init; contextswitcher.init;
+6 -2
View File
@@ -37,7 +37,7 @@ uses
//command provider units //command provider units
kernel, cpu, drivermanagement, processmanager, kernel, cpu, drivermanagement, processmanager,
arp, ipv4, tcp, arp, ipv4, tcp,
diskcmd, usbcore; diskcmd, usbcore, diskutil, notepad, partcmd, volcmd;
procedure init(); procedure init();
begin begin
@@ -54,10 +54,14 @@ begin
stdio.registerCommand('TCPCONNECT', @tcp.terminal_command_tcpconnect, 'Connect to a TCP host and send Hello World.'); 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('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).'); 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.'); stdio.registerCommand('USB', @usbcore.terminal_command_usb, 'USB subsystem information.');
{ Initialize baked-in programs } { Initialize baked-in programs }
diskcmd.init();
partcmd.init();
volcmd.init();
diskutil.init;
notepad.init;
md5sum.init(); md5sum.init();
base64_prog.init(); base64_prog.init();
dhclient.init(); dhclient.init();