diff options
author | David <dbphillipsnz@gmail.com> | 2013-08-14 15:45:55 +1200 |
---|---|---|
committer | David <dbphillipsnz@gmail.com> | 2014-03-27 20:32:10 +1300 |
commit | 14c302dd6cd219798efc7e2e3ef5330f8ce2db43 (patch) | |
tree | 9e5593a9979b64838da5f4b955788ab0f61b03b7 | |
parent | a6e43b022208908bf6d12f9e65f54c0f84743946 (diff) | |
download | toast-14c302dd6cd219798efc7e2e3ef5330f8ce2db43.tar.xz |
Added license
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | TODO.md | 4 | ||||
-rw-r--r-- | lowlevel.c | 22 | ||||
-rw-r--r-- | lowlevel.h | 18 | ||||
-rw-r--r-- | toast.h | 38 |
5 files changed, 79 insertions, 15 deletions
@@ -6,13 +6,17 @@ CFLAGS = -I. -std=gnu99 -ffreestanding -O2 -Wall -Wextra ASFLAGS = -felf LDFLAGS = -Tlink.ld -TOAST_TARGET = ~/toast/toast_img/ -SOURCES = boot.o kernel.o console.o string.o lowlevel.o +TOAST_TARGET = ~/programming/toast/toast_img/ +SOURCES = boot/boot.o \ + screen/console.o \ + string/common.o \ + kernel.o \ + lowlevel.o all: $(SOURCES) link clean: - - rm *.o kernel + - rm *.o */*.o kernel link: - $(LD) $(LDFLAGS) -o kernel $(SOURCES) @@ -22,7 +26,7 @@ link: install: # sudo umount $(TOAST_TARGET) - sudo mount /dev/loop11p1 $(TOAST_TARGET) + sudo mount /dev/loop0p1 $(TOAST_TARGET) sudo cp kernel $(TOAST_TARGET) sudo umount $(TOAST_TARGET) bochs -qf bochsrc @@ -0,0 +1,4 @@ +To do +===== +* Comment code +* Check software license options and possibly relicense @@ -1,3 +1,21 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + */ + #ifndef LOWLEVEL_C #define LOWLEVEL_C @@ -13,12 +31,12 @@ void outb(uint16_t p,uint8_t val) void disable_ints() { - asm("cli"); + asm("cli"::); } void enable_ints() { - asm("sti"); + asm("sti"::); } #endif
\ No newline at end of file @@ -1,3 +1,21 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + */ + #ifndef LOWLEVEL_H #define LOWLEVEL_H @@ -1,17 +1,37 @@ -#ifndef __TOAST_H -#define __TOAST_H +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + */ + +#ifndef TOAST_H +#define TOAST_H #define KERNEL_VERSION "0.1" -#define KERNEL_NICKNAME "Unstable" +#define KERNEL_NICKNAME "Hydrogen" -#include <stdbool.h> // Get our booleans defined -#include <stdint.h> // uint_8 etc +#include <stdbool.h> // Get our booleans defined +#include <stdint.h> // uint_8 etc -#include <console.h> -#include <lowlevel.h> -#include <string.h> +#include <screen/console.h> // Console output functions +//#include <console.h> // Console output functions +#include <lowlevel.h> // Low level assembly, eg outb(port,val) +#include <string/common.h> // Common string functions +//#include <string.h> // Common string functions // KERNEL.C void kernel_main(); -#endif
\ No newline at end of file +#endif |