summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Drivers
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-06-06 10:27:55 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-06-06 10:27:55 +0000
commit4e75e05a20ddd0dbca982e8f3bc2ea8043ed3a3f (patch)
tree95409c0e32b644578b94a5c230417da684d79dc9 /Kernel/Drivers
parentf5081a8f9a8537ad5be5d639955cd1d0e68a9e1d (diff)
parent9994b8f3f88131f41be1061fb0947177e66dc7b0 (diff)
Merged in MHR-23 (pull request #14)
Draft: MHR-23
Diffstat (limited to 'Kernel/Drivers')
-rw-r--r--Kernel/Drivers/.gitkeep0
-rw-r--r--Kernel/Drivers/Bonjour/Bonjour.c20
-rw-r--r--Kernel/Drivers/Bonjour/DriverRsrc.rsrc25
-rw-r--r--Kernel/Drivers/Bonjour/x86_64.mk52
-rw-r--r--Kernel/Drivers/MahroussUpdate/DriverRsrc.rsrc25
-rw-r--r--Kernel/Drivers/MahroussUpdate/MahroussUpdate.cc24
-rw-r--r--Kernel/Drivers/MahroussUpdate/MahroussUpdate.hxx37
-rw-r--r--Kernel/Drivers/MahroussUpdate/x86_64.mk53
-rw-r--r--Kernel/Drivers/SampleDriver/DriverRsrc.rsrc25
-rw-r--r--Kernel/Drivers/SampleDriver/SampleDriver.c25
-rw-r--r--Kernel/Drivers/SampleDriver/x86_64.mk52
11 files changed, 0 insertions, 338 deletions
diff --git a/Kernel/Drivers/.gitkeep b/Kernel/Drivers/.gitkeep
deleted file mode 100644
index e69de29b..00000000
--- a/Kernel/Drivers/.gitkeep
+++ /dev/null
diff --git a/Kernel/Drivers/Bonjour/Bonjour.c b/Kernel/Drivers/Bonjour/Bonjour.c
deleted file mode 100644
index 52187ac1..00000000
--- a/Kernel/Drivers/Bonjour/Bonjour.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -------------------------------------------
-
- Copyright SoftwareLabs
-
-------------------------------------------- */
-
-#include <DriverKit/KernelString.h>
-#include <DriverKit/KernelPrint.h>
-
-int __ImageStart(void)
-{
- kernelPrintStr("Bonjour: Starting up zeroconf...\r");
- return 0;
-}
-
-int __ImageEnd(void)
-{
- kernelPrintStr("Bonjour: Shutting down zeroconf...\r");
- return 0;
-}
diff --git a/Kernel/Drivers/Bonjour/DriverRsrc.rsrc b/Kernel/Drivers/Bonjour/DriverRsrc.rsrc
deleted file mode 100644
index 494e85ee..00000000
--- a/Kernel/Drivers/Bonjour/DriverRsrc.rsrc
+++ /dev/null
@@ -1,25 +0,0 @@
-1 ICON "../../Root/Boot/Icons/bonjour-logo.ico"
-
-1 VERSIONINFO
-FILEVERSION 1,0,0,0
-PRODUCTVERSION 1,0,0,0
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "080904E4"
- BEGIN
- VALUE "CompanyName", "SoftwareLabs"
- VALUE "FileDescription", "New OS Bonjour driver."
- VALUE "FileVersion", "1.00"
- VALUE "InternalName", "Bonjour."
- VALUE "LegalCopyright", "Copyright SoftwareLabs, all rights reserved."
- VALUE "OriginalFilename", "Bonjour.exe"
- VALUE "ProductName", "Bonjour."
- VALUE "ProductVersion", "1.00"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x809, 1252
- END
-END
diff --git a/Kernel/Drivers/Bonjour/x86_64.mk b/Kernel/Drivers/Bonjour/x86_64.mk
deleted file mode 100644
index b2493edf..00000000
--- a/Kernel/Drivers/Bonjour/x86_64.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-##################################################
-# (C) SoftwareLabs, all rights reserved.
-# This is the sample driver makefile.
-##################################################
-
-CC_GNU=x86_64-w64-mingw32-gcc
-LD_GNU=x86_64-w64-mingw32-ld
-
-WINDRES=x86_64-w64-mingw32-windres
-
-ADD_FILE=touch
-COPY=cp
-HTTP_GET=wget
-
-LD_FLAGS=-e __ImageStart --subsystem=17
-
-OBJ=*.o
-
-
-REM=rm
-REM_FLAG=-f
-
-FLAG_ASM=-f win64
-FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mgeneral-regs-only -mno-red-zone -D__KERNEL__ -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -ffreestanding -std=c17 -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -D__BOOTLOADER__ -I./
-
-.PHONY: invalid-recipe
-invalid-recipe:
- @echo "invalid-recipe: Use make all instead."
-
-.PHONY: all
-all: compile-amd64
- $(LD_GNU) $(OBJ) $(LD_FLAGS) -o Bonjour.exe
- cp Bonjour.exe ../../Root/Boot/Bonjour.exe
-
-ifneq ($(DEBUG_SUPPORT), )
-DEBUG = -D__DEBUG__
-endif
-
-.PHONY: compile-amd64
-compile-amd64:
- $(WINDRES) DriverRsrc.rsrc -O coff -o DriverRsrc.o
- $(CC_GNU) $(FLAG_GNU) $(DEBUG) $(wildcard *.c) $(wildcard ../../DriverKit/*.c) $(wildcard ../../DriverKit/*.S)
-
-.PHONY: clean
-clean:
- $(REM) $(REM_FLAG) $(OBJ) Bonjour.exe
-
-.PHONY: help
-help:
- @echo "=== HELP ==="
- @echo "clean: Clean driver."
- @echo "compile-amd64: Build driver."
diff --git a/Kernel/Drivers/MahroussUpdate/DriverRsrc.rsrc b/Kernel/Drivers/MahroussUpdate/DriverRsrc.rsrc
deleted file mode 100644
index 88261a47..00000000
--- a/Kernel/Drivers/MahroussUpdate/DriverRsrc.rsrc
+++ /dev/null
@@ -1,25 +0,0 @@
-1 ICON "../../Root/Boot/Icons/update-logo.ico"
-
-1 VERSIONINFO
-FILEVERSION 1,0,0,0
-PRODUCTVERSION 1,0,0,0
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "080904E4"
- BEGIN
- VALUE "CompanyName", "SoftwareLabs"
- VALUE "FileDescription", "New OS Mahrouss Update driver."
- VALUE "FileVersion", "1.00"
- VALUE "InternalName", "Mahrouss Update."
- VALUE "LegalCopyright", "Copyright SoftwareLabs, all rights reserved."
- VALUE "OriginalFilename", "MahroussUpdate.exe"
- VALUE "ProductName", "MahroussUpdate."
- VALUE "ProductVersion", "1.00"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x809, 1252
- END
-END
diff --git a/Kernel/Drivers/MahroussUpdate/MahroussUpdate.cc b/Kernel/Drivers/MahroussUpdate/MahroussUpdate.cc
deleted file mode 100644
index eb8d03c7..00000000
--- a/Kernel/Drivers/MahroussUpdate/MahroussUpdate.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -------------------------------------------
-
- Copyright SoftwareLabs
-
-------------------------------------------- */
-
-#include <DriverKit/KernelString.h>
-#include <DriverKit/KernelPrint.h>
-
-#include <Drivers/MahroussUpdate/MahroussUpdate.hxx>
-
-DK_EXTERN int __ImageStart(void) {
- kernelPrintStr("Mahrouss Update: Looking for updates...\r");
- UpdateRequest req("mup://release-mahrouss.logic/newos/");
-
- return 0;
-}
-
-DK_EXTERN int __ImageEnd(void) {
- return 0;
-}
-
-///! @brief Use this to check your stack, if using MinGW/MSVC.
-DK_EXTERN void ___chkstk_ms(void) {}
diff --git a/Kernel/Drivers/MahroussUpdate/MahroussUpdate.hxx b/Kernel/Drivers/MahroussUpdate/MahroussUpdate.hxx
deleted file mode 100644
index dbcaed43..00000000
--- a/Kernel/Drivers/MahroussUpdate/MahroussUpdate.hxx
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -------------------------------------------
-
- Copyright SoftwareLabs
-
-------------------------------------------- */
-
-#pragma once
-
-#include <DriverKit/KernelString.h>
-
-#include "DriverKit/KernelPrint.h"
-
-/// @file Software update job driver.
-
-class UpdateRequest;
-class UpdateRequestObserver;
-
-class UpdateRequest
-{
-public:
- explicit UpdateRequest(const char* patchUrl = "mup://invalid-url-scheme/")
- {
- kernelStringCopy(this->fPatchUrl, patchUrl, kernelStringLength(patchUrl));
-
- kernelPrintStr("Mahrouss Update, Looking at: ");
- kernelPrintStr(patchUrl);
- kernelPrintChar('\r');
- kernelPrintChar('\n');
- }
-
- ~UpdateRequest()
- {
- }
-
-private:
- char fPatchUrl[4096] = {0};
-};
diff --git a/Kernel/Drivers/MahroussUpdate/x86_64.mk b/Kernel/Drivers/MahroussUpdate/x86_64.mk
deleted file mode 100644
index 13b30d59..00000000
--- a/Kernel/Drivers/MahroussUpdate/x86_64.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-##################################################
-# (C) SoftwareLabs, all rights reserved.
-# This is the sample driver makefile.
-##################################################
-
-CC_GNU=x86_64-w64-mingw32-gcc
-LD_GNU=x86_64-w64-mingw32-ld
-
-WINDRES=x86_64-w64-mingw32-windres
-
-ADD_FILE=touch
-COPY=cp
-HTTP_GET=wget
-
-LD_FLAGS=-e __ImageStart --subsystem=17
-
-OBJ=*.o
-
-
-REM=rm
-REM_FLAG=-f
-
-FLAG_ASM=-f win64
-FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mgeneral-regs-only -mno-red-zone -D__KERNEL__ -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -ffreestanding -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -D__BOOTLOADER__ -I./
-
-.PHONY: invalid-recipe
-invalid-recipe:
- @echo "invalid-recipe: Use make all instead."
-
-.PHONY: all
-all: compile-amd64
- $(LD_GNU) $(OBJ) $(LD_FLAGS) -o MahroussUpdate.exe
- cp MahroussUpdate.exe ../../Root/Boot/MahroussUpdate.exe
-
-ifneq ($(DEBUG_SUPPORT), )
-DEBUG = -D__DEBUG__
-endif
-
-.PHONY: compile-amd64
-compile-amd64:
- $(WINDRES) DriverRsrc.rsrc -O coff -o DriverRsrc.o
- $(CC_GNU) $(FLAG_GNU) -std=c17 $(DEBUG) $(wildcard *.c) $(wildcard ../../DriverKit/*.c) $(wildcard ../../DriverKit/*.S)
- $(CC_GNU) $(FLAG_GNU) -std=c++17 -fno-rtti -fno-exceptions $(DEBUG) $(wildcard *.cc) $(wildcard ../../DriverKit/*.cc)
-
-.PHONY: clean
-clean:
- $(REM) $(REM_FLAG) $(OBJ) MahroussUpdate.exe
-
-.PHONY: help
-help:
- @echo "=== HELP ==="
- @echo "clean: Clean driver."
- @echo "compile-amd64: Build driver."
diff --git a/Kernel/Drivers/SampleDriver/DriverRsrc.rsrc b/Kernel/Drivers/SampleDriver/DriverRsrc.rsrc
deleted file mode 100644
index 3a3b8774..00000000
--- a/Kernel/Drivers/SampleDriver/DriverRsrc.rsrc
+++ /dev/null
@@ -1,25 +0,0 @@
-1 ICON "../../Root/Boot/Icons/driver-logo.ico"
-
-1 VERSIONINFO
-FILEVERSION 1,0,0,0
-PRODUCTVERSION 1,0,0,0
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "080904E4"
- BEGIN
- VALUE "CompanyName", "SoftwareLabs"
- VALUE "FileDescription", "New OS driver."
- VALUE "FileVersion", "1.00"
- VALUE "InternalName", "SampleDriver"
- VALUE "LegalCopyright", "Copyright SoftwareLabs, all rights reserved."
- VALUE "OriginalFilename", "SampleDriver.exe"
- VALUE "ProductName", "SampleDriver"
- VALUE "ProductVersion", "1.00"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x809, 1252
- END
-END
diff --git a/Kernel/Drivers/SampleDriver/SampleDriver.c b/Kernel/Drivers/SampleDriver/SampleDriver.c
deleted file mode 100644
index b92b1ef8..00000000
--- a/Kernel/Drivers/SampleDriver/SampleDriver.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -------------------------------------------
-
- Copyright SoftwareLabs
-
-------------------------------------------- */
-
-#include <DriverKit/KernelString.h>
-#include <DriverKit/KernelPrint.h>
-
-int __ImageStart(void)
-{
- kernelPrintStr("SampleDriver: Starting up...\r");
- return 0;
-}
-
-int __ImageEnd(void)
-{
- kernelPrintStr("SampleDriver: Shutting down...\r");
- return 0;
-}
-
-///! @brief Use this to check your stack, if using MinGW/MSVC.
-void ___chkstk_ms(void)
-{
-}
diff --git a/Kernel/Drivers/SampleDriver/x86_64.mk b/Kernel/Drivers/SampleDriver/x86_64.mk
deleted file mode 100644
index 5bdf0331..00000000
--- a/Kernel/Drivers/SampleDriver/x86_64.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-##################################################
-# (C) SoftwareLabs, all rights reserved.
-# This is the sample driver makefile.
-##################################################
-
-CC_GNU=x86_64-w64-mingw32-gcc
-LD_GNU=x86_64-w64-mingw32-ld
-
-WINDRES=x86_64-w64-mingw32-windres
-
-ADD_FILE=touch
-COPY=cp
-HTTP_GET=wget
-
-LD_FLAGS=-e __ImageStart --subsystem=17
-
-OBJ=*.o
-
-
-REM=rm
-REM_FLAG=-f
-
-FLAG_ASM=-f win64
-FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mgeneral-regs-only -mno-red-zone -D__KERNEL__ -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -ffreestanding -std=c17 -D__HAVE_MAHROUSS_APIS__ -D__MAHROUSS__ -D__BOOTLOADER__ -I./
-
-.PHONY: invalid-recipe
-invalid-recipe:
- @echo "invalid-recipe: Use make all instead."
-
-.PHONY: all
-all: compile-amd64
- $(LD_GNU) $(OBJ) $(LD_FLAGS) -o SampleDriver.exe
- cp SampleDriver.exe ../../Root/Boot/SampleDriver.exe
-
-ifneq ($(DEBUG_SUPPORT), )
-DEBUG = -D__DEBUG__
-endif
-
-.PHONY: compile-amd64
-compile-amd64:
- $(WINDRES) DriverRsrc.rsrc -O coff -o DriverRsrc.o
- $(CC_GNU) $(FLAG_GNU) $(DEBUG) $(wildcard *.c) $(wildcard ../../DriverKit/*.c) $(wildcard ../../DriverKit/*.S)
-
-.PHONY: clean
-clean:
- $(REM) $(REM_FLAG) $(OBJ) SampleDriver.exe
-
-.PHONY: help
-help:
- @echo "=== HELP ==="
- @echo "clean: Clean driver."
- @echo "compile-amd64: Build driver."