Put keyboard into subdir
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
*.o
|
*.o
|
||||||
gamarjoba_munde/gamarjoba
|
gamarjoba_munde/gamarjoba
|
||||||
baremetal_gamarjoba/baremetal_gamarjoba
|
baremetal_gamarjoba/baremetal_gamarjoba
|
||||||
|
keyboard/keyboard_kernel
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ This repo contains the following executables:
|
|||||||
|
|
||||||
* `gamarjoba_munde` - x86-64 linux binary that prints the text "Gamarjoba, Munde"
|
* `gamarjoba_munde` - x86-64 linux binary that prints the text "Gamarjoba, Munde"
|
||||||
* `baremetal_gamarjoba` - bare-metal x86 program run with QEMU
|
* `baremetal_gamarjoba` - bare-metal x86 program run with QEMU
|
||||||
|
* `keyboard` - reads keycode information from keyboard. Also uses both Rust and C includes.
|
||||||
|
|
||||||
# Useful links
|
# Useful links
|
||||||
|
|
||||||
|
|||||||
15
justfile
15
justfile
@@ -20,3 +20,18 @@ run_baremetal_gamarjoba: build_baremetal_gamarjoba
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
cd baremetal_gamarjoba
|
cd baremetal_gamarjoba
|
||||||
qemu-system-i386 -kernel baremetal_gamarjoba
|
qemu-system-i386 -kernel baremetal_gamarjoba
|
||||||
|
|
||||||
|
|
||||||
|
build_keyboard:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
cd keyboard
|
||||||
|
gcc -m32 -ffreestanding -o c_keyboard.o -c c_keyboard.c
|
||||||
|
rustc --emit obj -o rust_keyboard.o --target i686-unknown-linux-gnu keyboard.rs
|
||||||
|
nasm -f elf32 -i ../common keyboard.asm
|
||||||
|
ld -m elf_i386 -nostdlib -T ../common/linker.ld keyboard.o c_keyboard.o rust_keyboard.o -o keyboard_kernel
|
||||||
|
|
||||||
|
run_keyboard: build_keyboard
|
||||||
|
qemu-system-i386 -kernel keyboard/keyboard_kernel
|
||||||
|
|
||||||
|
run_terminal_keyboard: build_keyboard
|
||||||
|
qemu-system-i386 -display curses -kernel keyboard/keyboard_kernel
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%include "multiboot_header.asm"
|
%include "../common/multiboot_header.asm"
|
||||||
%include "x86_vram.asm"
|
%include "../common/x86_vram.asm"
|
||||||
|
|
||||||
extern c_entry
|
extern c_entry
|
||||||
extern print_int
|
extern print_int
|
||||||
@@ -56,4 +56,4 @@ scan:
|
|||||||
xor al, al
|
xor al, al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
%include "x86_vram_functions.asm"
|
%include "../common/x86_vram_functions.asm"
|
||||||
Reference in New Issue
Block a user