diff options
| author | Miguel <m.i@gmx.at> | 2018-09-21 15:40:35 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-21 15:40:35 +0200 |
| commit | d7086073d9cc2d6f9174731bf8d8fb907d5d99e7 (patch) | |
| tree | cae033cbc5c4e6ae6cdcfac172cbdc7421b58aa9 | |
| parent | c298ca7e6beaad0bcc32af6d4cf50d41b79f13b7 (diff) | |
trying uefi
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | driver/serial.c | 4 | ||||
| -rw-r--r-- | driver/serial.h | 2 | ||||
| -rw-r--r-- | kernel/kernel.h | 2 | ||||
| -rw-r--r-- | kernel/log.h | 1 | ||||
| -rw-r--r-- | userspace/fsh.c | 3 |
6 files changed, 15 insertions, 3 deletions
@@ -104,6 +104,7 @@ ASM_OBJECTS+=$(ASM_MULTIBOOT_OBJ2) #### BINARIES AND SUBMODULES ######## FOOLOS_ISO=FoolOS.iso +FOOLOS_ISO_EFI=FoolOS-EFI.iso KERNEL_IMG=foolos.img BIN_KERNEL=kernel.bin BIN_MBR=./boot1/mbr.bin @@ -206,7 +207,7 @@ stop-qemu: ############ cleanup ############ clean: $(CLEANDIRS) - @echo "Cleaning..."; rm -f *.bin $(FOOLOS) $(FOOLOS_ISO) $(FOOLOS_VDI) $(KERNEL_ENTRY) $(KERNEL_IMG) $(ASM_OBJECTS) $(OBJECTS) $(IMG_FILLUP) $(BIN_MBR) $(BIN_MP) $(BIN_STAGE2) $(DEPS) bochs.out bochs.log ne2k-tx.log ne2k-txdump.txt tags grubiso/boot/foolos.bin grubiso/boot/ext2.img + @echo "Cleaning..."; rm -f *.bin $(FOOLOS) $(FOOLOS_ISO) $(FOOLOS_ISO_EFI) $(FOOLOS_VDI) $(KERNEL_ENTRY) $(KERNEL_IMG) $(ASM_OBJECTS) $(OBJECTS) $(IMG_FILLUP) $(BIN_MBR) $(BIN_MP) $(BIN_STAGE2) $(DEPS) bochs.out bochs.log ne2k-tx.log ne2k-txdump.txt tags grubiso/boot/foolos.bin grubiso/boot/ext2.img @echo "Cleaning Documentation..."; rm -f ./doc/ -r tags: @@ -231,7 +232,8 @@ $(FOOLOS_ISO): $(KERNEL_IMG) userspace @echo "Create ISO..." @cp $(KERNEL_IMG) grubiso/boot/foolos.bin @cp $(IMG_USERSPACE) grubiso/boot - @grub-mkrescue -o $(FOOLOS_ISO) grubiso/ + @grub-mkrescue -d /usr/lib/grub/i386-efi -o $(FOOLOS_ISO_EFI) grubiso/ + @grub-mkrescue -d /usr/lib/grub/i386-pc -o $(FOOLOS_ISO) grubiso/ @echo "Finished ISO" @echo "------------------------" diff --git a/driver/serial.c b/driver/serial.c index 4e43251..16b3b6c 100644 --- a/driver/serial.c +++ b/driver/serial.c @@ -1,3 +1,5 @@ +#ifndef FOOLOS_LOG_OFF + #include "serial.h" #include "asm_x86.h" // provides x86_inb() and x86_outb() @@ -36,3 +38,5 @@ void serial_write(uint8_t a) while (is_transmit_empty() == 0); x86_outb(PORT,a); } + +#endif diff --git a/driver/serial.h b/driver/serial.h index bf56f80..cd76707 100644 --- a/driver/serial.h +++ b/driver/serial.h @@ -1,6 +1,7 @@ #ifndef FOOLOS_SERIAL_H #define FOOLOS_SERIAL_H + /** * @file * MINIMALISTIC SERIAL PORT DRIVER for COM1 @@ -36,4 +37,5 @@ uint8_t serial_read(); /** write one byte from COM1 (blocking) **/ void serial_write(uint8_t a); + #endif diff --git a/kernel/kernel.h b/kernel/kernel.h index 9e67c34..b2bb81b 100644 --- a/kernel/kernel.h +++ b/kernel/kernel.h @@ -23,7 +23,7 @@ REFERENCES #define FOOLOS_CONFIG_H //#define FOOLOS_UNIT_TESTING // Run Unit Tests -//#define FOOLOS_LOG_OFF // Turn off logging +#define FOOLOS_LOG_OFF // Turn off logging (disables serial port alltogether) //#define FOOLOS_COLORLESS // Turn off colors in log #define HIDE_FIXME diff --git a/kernel/log.h b/kernel/log.h index 3a8c746..930aa53 100644 --- a/kernel/log.h +++ b/kernel/log.h @@ -50,6 +50,7 @@ void log(bool color,char *module_name, int prio, char *format_string, ...); #define kpanic(...) {while(1);} #define klog(...) {} #define fixme(...) {} +#define testlog(...) {} #endif diff --git a/userspace/fsh.c b/userspace/fsh.c index 4df4e4e..5609256 100644 --- a/userspace/fsh.c +++ b/userspace/fsh.c @@ -8,6 +8,9 @@ * TODO: Free tokenizer / dynamic size! * TODO: & with pipes * TODO: > < + * TODO: tab complete + * TODO: multiple PATH vars + * TODO: history */ #include <stdio.h> |
