feature (drivers): setup a small driver to test stuff
This commit is contained in:
parent
0732a19f8a
commit
7e53ab9e7c
|
@ -2,3 +2,4 @@ build
|
|||
cmake-build-debug
|
||||
noxos.log
|
||||
ramdisk/shell.elf
|
||||
ramdisk/*.nxkm
|
15
build.sh
15
build.sh
|
@ -43,13 +43,21 @@ kernel_build() {
|
|||
}
|
||||
|
||||
libnx_build() {
|
||||
cd ../libnx
|
||||
cd ../libraries/libnx
|
||||
bash build.sh
|
||||
cd ../kernel
|
||||
cd ../../kernel
|
||||
}
|
||||
|
||||
libnxdrv_build() {
|
||||
cd ../libraries/libnxdrv
|
||||
bash build.sh
|
||||
cd ../../kernel
|
||||
}
|
||||
|
||||
shell_build() {
|
||||
gcc shell.c -o ramdisk/shell.elf -nostdlib -nolibc -fno-stack-protector -I../libnx/inc ../libnx/build/cmake/libnx.so
|
||||
echo " --> Building shell"
|
||||
# gcc shell.c -o ramdisk/shell.elf -nostdlib -nolibc -fno-stack-protector -I../libraries/libnx/inc/public ../libraries/libnx/build/cmake/libnx.so
|
||||
gcc test_driver.c -o ramdisk/test_driver.nxkm -nostdlib -nolibc -I../libraries/libnxdrv/inc -L../libraries/libnxdrv/build -lnxdrv
|
||||
}
|
||||
|
||||
|
||||
|
@ -109,6 +117,7 @@ case $1 in
|
|||
kernel_build
|
||||
[ ! -d "build/limine" ] && limine_install
|
||||
libnx_build
|
||||
libnxdrv_build
|
||||
shell_build
|
||||
generate_initial_ramdisk
|
||||
generate_image
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"PS2_ACPI_VALIDATION": true,
|
||||
"LOG_GRAPHICAL": false,
|
||||
"LOG_GRAPHICAL": true,
|
||||
|
||||
"modules": {
|
||||
"FAT32": "/initrd/modules/fat32.nxkm"
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#include "libnxdrv.h"
|
||||
|
||||
int main() {
|
||||
nx_drv_init();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue