diff --git a/etc/motd b/etc/motd deleted file mode 100644 index f5a6ac4..0000000 --- a/etc/motd +++ /dev/null @@ -1,12 +0,0 @@ -Welcome to UbixOS - -This is an experimental kernel so it has the potential -to crash if it does please send us some info so we can -fix it or if you have access to the source fix it and -commit the changes. - -All reports can be sent to cwolsen@ubixos.com - -NOTICE!!!!! - -This is now 2016 and we're working again! diff --git a/etc/userdb b/etc/userdb deleted file mode 100644 index ed464e7..0000000 --- a/etc/userdb +++ /dev/null Binary files differ diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..5761abc --- /dev/null +++ b/src/.gitignore @@ -0,0 +1 @@ +*.o diff --git a/src/Makefile b/src/Makefile index e052c98..77fab31 100644 --- a/src/Makefile +++ b/src/Makefile @@ -7,6 +7,8 @@ MAKE=make +CURDIR=${.CURDIR} + OBJ_DIR?= ${CURDIR}/obj CLEANDIR=clean @@ -111,13 +113,13 @@ @echo "***************************************************************" @echo "Step 1: Copy Binaries" @echo "***************************************************************" - cp -pr bin/build/* ${ROOT}/bin/ + cp -pr build/bin/* ${ROOT}/bin/ sync @echo @echo "***************************************************************" @echo "Step 2: Copy Libraries" @echo "***************************************************************" - cp -pr lib/build/* ${ROOT}/lib/ + cp -pr build/lib/* ${ROOT}/lib/ sync @echo @echo "***************************************************************" diff --git a/src/bin/clock/Makefile b/src/bin/clock/Makefile index 5f39cbd..e008787 100644 --- a/src/bin/clock/Makefile +++ b/src/bin/clock/Makefile @@ -17,11 +17,11 @@ #Objects OBJS = main.o -LIBRARIES = ../../build/libc_old.so +LIBRARIES = ../../build/lib/libc_old.so # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + $(CC) $(CFLAGS) -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) # strip $(BINARY) # Compile the source files @@ -45,4 +45,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/cp/Makefile b/src/bin/cp/Makefile index db4d56e..87fa208 100644 --- a/src/bin/cp/Makefile +++ b/src/bin/cp/Makefile @@ -17,12 +17,12 @@ #Objects OBJS = main.o -LIBRARIES = ../../build/libc_old.so +LIBRARIES = ../../build/lib/libc_old.so # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) - strip ${BUILD_DIR}/$(BINARY) + $(CC) $(CFLAGS) -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + strip ${BUILD_DIR}/bin/$(BINARY) # Compile the source files .cc.o: @@ -42,4 +42,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/disklabel/Makefile b/src/bin/disklabel/Makefile index a670f45..60fdca4 100644 --- a/src/bin/disklabel/Makefile +++ b/src/bin/disklabel/Makefile @@ -17,12 +17,12 @@ #Objects OBJS = main.o -LIBRARIES = ../../build/libc_old.so +LIBRARIES = ../../build/lib/libc_old.so # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) - strip ${BUILD_DIR}/$(BINARY) + $(CC) $(CFLAGS) -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + strip ${BUILD_DIR}/bin/$(BINARY) # Compile the source files .cc.o: @@ -42,4 +42,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/edit/Makefile b/src/bin/edit/Makefile index 84b8666..e34dbcd 100644 --- a/src/bin/edit/Makefile +++ b/src/bin/edit/Makefile @@ -25,7 +25,7 @@ # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + $(CC) $(CFLAGS) -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) #strip $(BINARY) # Compile the source files @@ -46,4 +46,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/fdisk/Makefile b/src/bin/fdisk/Makefile index 18c1947..e0619bb 100644 --- a/src/bin/fdisk/Makefile +++ b/src/bin/fdisk/Makefile @@ -17,12 +17,12 @@ #Objects OBJS = main.o -LIBRARIES = ../../build/libc_old.so +LIBRARIES = ../../build/lib/libc_old.so # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) - strip ${BUILD_DIR}/$(BINARY) + $(CC) $(CFLAGS) -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + strip ${BUILD_DIR}/bin/$(BINARY) # Compile the source files .cc.o: @@ -42,4 +42,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/format/Makefile b/src/bin/format/Makefile index 918796d..a51dd80 100644 --- a/src/bin/format/Makefile +++ b/src/bin/format/Makefile @@ -21,8 +21,8 @@ # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o ${BUILD_DIR}/$@ $(STARTUP) $(LIBRARIES) $(OBJS) - strip ${BUILD_DIR}/$(BINARY) + $(CC) $(CFLAGS) -o ${BUILD_DIR}/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + strip ${BUILD_DIR}/bin/$(BINARY) # Compile the source files .cc.o: @@ -42,4 +42,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) ${BUILD_DIR}/$(BINARY) + $(REMOVE) $(OBJS) ${BUILD_DIR}/bin/$(BINARY) diff --git a/src/bin/init/Makefile b/src/bin/init/Makefile index 2c520ed..4166f2c 100644 --- a/src/bin/init/Makefile +++ b/src/bin/init/Makefile @@ -21,7 +21,7 @@ # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -static -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + $(CC) $(CFLAGS) -static -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) # strip $(BINARY) # Compile the source files @@ -42,4 +42,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/ld/Makefile b/src/bin/ld/Makefile index f2b51f1..784cf1a 100644 --- a/src/bin/ld/Makefile +++ b/src/bin/ld/Makefile @@ -19,7 +19,7 @@ # Link The Binary $(OUTPUT) : $(OBJS) - $(CC) -m32 -nostdlib -shared -Wl,-soname,$(OUTPUT) -Wl,-m,elf_i386 -e _ld -o ../../build/$(OUTPUT) $(OBJS) $(LIBRARIES) $(SUBS) + $(CC) -m32 -nostdlib -shared -Wl,-soname,$(OUTPUT) -Wl,-m,elf_i386_fbsd -e _ld -o ../../build/bin/$(OUTPUT) $(OBJS) $(LIBRARIES) $(SUBS) # strip $(OUTPUT) # Compile the source files @@ -39,8 +39,8 @@ $(CC) -Wall -O $(CFLAGS) $(INCLUDES) -S -o $@ $< .S.o: - $(CC) -Wall $(CLFAGS) $(INCLUDES) -c -o $@ $< + $(CC) -Wall $(CFLAGS) $(INCLUDES) -c -o $@ $< # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(OUTPUT) + $(REMOVE) $(OBJS) ../../build/bin/$(OUTPUT) diff --git a/src/bin/login/Makefile b/src/bin/login/Makefile index 7d3962b..fb43756 100644 --- a/src/bin/login/Makefile +++ b/src/bin/login/Makefile @@ -21,7 +21,7 @@ # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + $(CC) $(CFLAGS) -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) # strip $(BINARY) # Compile the source files @@ -45,4 +45,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/ls/Makefile b/src/bin/ls/Makefile index 26b9357..534a265 100644 --- a/src/bin/ls/Makefile +++ b/src/bin/ls/Makefile @@ -21,7 +21,7 @@ # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o ../build/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + $(CC) $(CFLAGS) -o ../../build/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) strip $(BINARY) # Compile the source files @@ -45,4 +45,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BINARY) + $(REMOVE) $(OBJS) ../../build/bin/$(BINARY) diff --git a/src/bin/mount/Makefile b/src/bin/mount/Makefile index 5926d7b..f756f42 100644 --- a/src/bin/mount/Makefile +++ b/src/bin/mount/Makefile @@ -21,7 +21,7 @@ # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o ../build/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + $(CC) $(CFLAGS) -o ../../build/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) strip $(BINARY) # Compile the source files @@ -42,4 +42,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BINARY) + $(REMOVE) $(OBJS) ../../build/bin/$(BINARY) diff --git a/src/bin/muffin/Makefile b/src/bin/muffin/Makefile index 54801df..61e058c 100644 --- a/src/bin/muffin/Makefile +++ b/src/bin/muffin/Makefile @@ -28,7 +28,7 @@ # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o ../build/$@ $(STARTUP) $(LIBRARIES) $(LIBRARIES2) $(OBJS) + $(CC) $(CFLAGS) -o ../../build/bin/$@ $(STARTUP) $(LIBRARIES) $(LIBRARIES2) $(OBJS) strip $(BINARY) # Compile the source files @@ -49,4 +49,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BINARY) + $(REMOVE) $(OBJS) ../../build/bin/$(BINARY) diff --git a/src/bin/rtld-elf/Makefile b/src/bin/rtld-elf/Makefile index 81c8809..452d385 100644 --- a/src/bin/rtld-elf/Makefile +++ b/src/bin/rtld-elf/Makefile @@ -32,7 +32,7 @@ # $(CC) -fpic -nostdlib -shared -Wl,-soname,$(OUTPUT) -e .rtld_start -o $(OUTPUT) $(OBJS) $(LIBRARIES) $(SUBS) # $(CC) $(CFLAGS) -nostdlib -e .rtld_start -elf -shared -Wl,-Bsymbolic -o $(OUTPUT) $(OBJS) -lc_pic # $(CC) $(CFLAGS) -nostdlib -e .rtld_start -elf -shared -Wl,-Bsymbolic -o $(OUTPUT) $(OBJS) ./libc_pic.a #-lc_pic - $(CC) $(CFLAGS) -nostdlib -e .rtld_start -elf -shared -Wl,-Bsymbolic -o ../../libexec/build/$(OUTPUT) $(OBJS) ../../lib/libc/pic.a #-lc_pic + $(CC) $(CFLAGS) -nostdlib -e .rtld_start -elf -shared -Wl,-Bsymbolic -o ../../build/libexec/$(OUTPUT) $(OBJS) ../../lib/libc/pic.a #-lc_pic # strip $(OUTPUT) # Compile the source files diff --git a/src/bin/sh/Makefile b/src/bin/sh/Makefile index 14cc293..9729c68 100644 --- a/src/bin/sh/Makefile +++ b/src/bin/sh/Makefile @@ -25,7 +25,7 @@ # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o ../build/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + $(CC) $(CFLAGS) -o ../../build/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) #strip $(BINARY) # Compile the source files @@ -46,4 +46,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BINARY) + $(REMOVE) $(OBJS) ../../build/bin/$(BINARY) diff --git a/src/bin/shell/Makefile b/src/bin/shell/Makefile index 69bfaa1..e48a2b3 100644 --- a/src/bin/shell/Makefile +++ b/src/bin/shell/Makefile @@ -17,12 +17,12 @@ #Objects OBJS = main.o error.o commands.o exec.o input.o -LIBRARIES = ../../build/libc_old.so ../../build/ubix_api.so +LIBRARIES = ../../build/lib/libc_old.so ../../build/lib/ubix_api.so # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) - strip ${BUILD_DIR}/$(BINARY) + $(CC) $(CFLAGS) -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + strip ${BUILD_DIR}/bin/$(BINARY) # Compile the source files .cpp.o: @@ -45,4 +45,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/stat/Makefile b/src/bin/stat/Makefile index ed46577..a690034 100644 --- a/src/bin/stat/Makefile +++ b/src/bin/stat/Makefile @@ -17,11 +17,11 @@ #Objects OBJS = main.o -#MrOlsen (2016-01-19) TEMP: This is just to make it static LIBRARIES = ../../lib/build/libc_old.so +#MrOlsen (2016-01-19) TEMP: This is just to make it static LIBRARIES = ../../build/lib/libc_old.so # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + $(CC) $(CFLAGS) -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) # strip $(BINARY) # Compile the source files @@ -45,4 +45,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/ttyd/Makefile b/src/bin/ttyd/Makefile index 9d85ae8..0939851 100644 --- a/src/bin/ttyd/Makefile +++ b/src/bin/ttyd/Makefile @@ -17,12 +17,12 @@ #Objects OBJS = main.o -LIBRARIES = ../../lib/build/libc_old.so +LIBRARIES = ../../build/lib/libc_old.so # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ $(STARTUP) $(LIBRARIES) $(OBJS) - strip ${BUILD_DIR}/$(BINARY) + $(CC) $(CFLAGS) -o $(BUILD_DIR)/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + strip ${BUILD_DIR}/bin/$(BINARY) # Compile the source files .cc.o: @@ -42,4 +42,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) $(BUILD_DIR)/$(BINARY) + $(REMOVE) $(OBJS) $(BUILD_DIR)/bin/$(BINARY) diff --git a/src/bin/ubistry/Makefile b/src/bin/ubistry/Makefile index 09701d7..448bf3c 100644 --- a/src/bin/ubistry/Makefile +++ b/src/bin/ubistry/Makefile @@ -17,12 +17,12 @@ #Objects OBJS = db.o message.o main.o -LIBRARIES = ../../build/libc_old.so +LIBRARIES = ../../build/lib/libc_old.so # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o ${BUILD_DIR}/$@ $(STARTUP) $(LIBRARIES) $(OBJS) - strip ${BUILD_DIR}/$(BINARY) + $(CC) $(CFLAGS) -o ${BUILD_DIR}/bin/$@ $(STARTUP) $(LIBRARIES) $(OBJS) + strip ${BUILD_DIR}/bin/$(BINARY) # Compile the source files .cpp.o: @@ -45,4 +45,4 @@ # Clean Up The junk clean: - $(REMOVE) $(OBJS) ${BUILD_DIR}/$(BINARY) + $(REMOVE) $(OBJS) ${BUILD_DIR}/bin/$(BINARY) diff --git a/src/build/bin/.gitignore b/src/build/bin/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/src/build/bin/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/src/build/lib/.gitignore b/src/build/lib/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/src/build/lib/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/src/etc/motd b/src/etc/motd new file mode 100644 index 0000000..f5a6ac4 --- /dev/null +++ b/src/etc/motd @@ -0,0 +1,12 @@ +Welcome to UbixOS + +This is an experimental kernel so it has the potential +to crash if it does please send us some info so we can +fix it or if you have access to the source fix it and +commit the changes. + +All reports can be sent to cwolsen@ubixos.com + +NOTICE!!!!! + +This is now 2016 and we're working again! diff --git a/src/etc/userdb b/src/etc/userdb new file mode 100644 index 0000000..ed464e7 --- /dev/null +++ b/src/etc/userdb Binary files differ diff --git a/src/lib/libc_old/Makefile b/src/lib/libc_old/Makefile index 63a4ff3..214d26e 100644 --- a/src/lib/libc_old/Makefile +++ b/src/lib/libc_old/Makefile @@ -25,9 +25,9 @@ (cd generic;make) (cd gen;make) # $(LD) $(LDFLAGS) -o $(OUTPUT) $(OBJS) ./stdio/*.o ./sys/*.o ./string/*.o ./stdlib/*.o -# $(CC) -nostdlib -shared -Wl,-soname,libc_old.so -o ${BUILD_DIR}/$(OUTPUT) $(OBJS) $(SUBS) +# $(CC) -nostdlib -shared -Wl,-soname,libc_old.so -o ${BUILD_DIR}/lib/$(OUTPUT) $(OBJS) $(SUBS) # tsort -q for BSD - $(CC) -m32 -nostdlib -ggdb -shared -Wl,-x -o ${BUILD_DIR}/$(OUTPUT).so -Wl,-soname,$(OUTPUT).so `lorder $(OBJS) $(SUBS) | tsort` + $(CC) -m32 -nostdlib -ggdb -shared -Wl,-x -o ${BUILD_DIR}/lib/$(OUTPUT).so -Wl,-soname,$(OUTPUT).so `lorder $(OBJS) $(SUBS) | tsort` # $(CC) -nostdlib -ggdb -static -Wl,-x -o ${BUILD_DIR}/$(OUTPUT).static.so -Wl,-soname,$(OUTPUT).static.so `lorder $(OBJS) $(SUBS) | tsort -q` # Compile the source files diff --git a/src/lib/ubix_api/Makefile b/src/lib/ubix_api/Makefile index baa2af8..f39d1e7 100644 --- a/src/lib/ubix_api/Makefile +++ b/src/lib/ubix_api/Makefile @@ -16,7 +16,7 @@ lib.so: $(OBJS) (cd test;make) - $(CC) -m32 -nostdlib -shared -Wl,-soname,ubix_api.so -o ${BUILD_DIR}/$(OUTPUT) $(OBJS) $(SUBS) + $(CC) -m32 -nostdlib -shared -Wl,-soname,ubix_api.so -o ${BUILD_DIR}/lib/$(OUTPUT) $(OBJS) $(SUBS) # Compile the source files .cc.o: diff --git a/src/sys/compile/.gitignore b/src/sys/compile/.gitignore new file mode 100644 index 0000000..bec9de7 --- /dev/null +++ b/src/sys/compile/.gitignore @@ -0,0 +1,2 @@ +kernel +null.c diff --git a/src/sys/init/main.c b/src/sys/init/main.c index 23dee8a..2fc2a2f 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -147,7 +147,7 @@ execThread( systemTask, (uInt32) sysTask + 0x2000, 0x0 ); kprintf( "Thread Start!\n" ); - execFile( "sys:/bin/init", 0x0, 0x0, 0x0 ); /* OS Initializer */ + //MrOlsen execFile( "sys:/bin/init", 0x0, 0x0, 0x0 ); /* OS Initializer */ //execFile( "sys:/bin/login", 0x0, 0x0, 0x0 ); /* OS Initializer */ irqEnable( 0x0 ); diff --git a/src/sys/pci/hd.c b/src/sys/pci/hd.c index 938c92b..74331a5 100644 --- a/src/sys/pci/hd.c +++ b/src/sys/pci/hd.c @@ -245,6 +245,7 @@ for ( counter = 0; counter < 256; counter++ ) { tmp[counter] = inportWord( hdd->hdPort + ATA_DATA ); +kprintf("[%i]", tmp[counter]); } retVal = tmp[0x2F] & 0xFF;