-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
353 changed files
with
42,956 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# P436-F16 | ||
Class Repository for P436 Fall 2016 Semester | ||
# Fall 2016 | ||
|
||
Welcome to Operating Systems! | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <xinu.h> | ||
#include <prodcons.h> | ||
|
||
void consumer(int count) { | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <xinu.h> | ||
#include <prodcons.h> | ||
|
||
void producer(int count) { | ||
} | ||
|
||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
target extended-remote :5560 | ||
load xinu | ||
b main | ||
c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
######################################################################### | ||
# # | ||
# # | ||
# Makefile for Qemu version of hte the Xinu operating system # | ||
# # | ||
# includes: .deps and .defs # | ||
# # | ||
# # | ||
######################################################################### | ||
|
||
NODE=0 | ||
GPORT=556${NODE} | ||
|
||
COMPILER_ROOT = /l/arm2/devtools/bin/arm-none-eabi- | ||
LIBGCC_LOC = /l/arm2/devtools/lib/gcc/arm-none-eabi/4.8.4 | ||
|
||
PNAME = bbb | ||
PLAT = Platform_$(PNAME) | ||
TOPDIR = .. | ||
|
||
CC = ${COMPILER_ROOT}gcc | ||
LD = ${COMPILER_ROOT}ld | ||
OBJCOPY = ${COMPILER_ROOT}objcopy | ||
XINU = $(TOPDIR)/compile/xinu | ||
XINUBIN = $(TOPDIR)/compile/xinu.bin | ||
XINUBOOT = $(TOPDIR)/compile/xinu.boot | ||
BUILDMAKE = $(TOPDIR)/compile/bin/build-make | ||
MKVERS = $(TOPDIR)/compile/bin/mkvers | ||
|
||
MAKEDEP = $(CC) -M -MG | ||
|
||
DEPSFILE = .deps | ||
DEFSFILE = .defs | ||
VERSIONFILE = version | ||
LDSCRIPT = ld.script | ||
MKVERS = $(TOPDIR)/compile/bin/mkvers | ||
REBUILDFLAGS = -s $(TOPDIR)/system debug.c \ | ||
-s $(TOPDIR)/lib \ | ||
-s $(TOPDIR)/device/tty \ | ||
-s $(TOPDIR)/device/nam \ | ||
-s $(TOPDIR)/device/ram \ | ||
-s $(TOPDIR)/device/lfs \ | ||
-s $(TOPDIR)/device/uart \ | ||
-s $(TOPDIR)/device/uart-pl011 \ | ||
-s $(TOPDIR)/device/loopback \ | ||
-s $(TOPDIR)/shell 'xsh_rdstest*' \ | ||
-s $(TOPDIR)/apps | ||
|
||
|
||
INCLUDE = -I$(TOPDIR)/include | ||
DEFS = -DBSDURG -DVERSION=\""`cat $(VERSIONFILE)`"\" | ||
|
||
# Compiler flags | ||
CFLAGS = -mcpu=arm1176jz-s -ggdb3 -mno-unaligned-access -marm -fno-builtin -fno-stack-protector -nostdlib -c -Wall -O ${DEFS} ${INCLUDE} | ||
SFLAGS = ${INCLUDE} | ||
|
||
# Loader flags | ||
|
||
LDFLAGS = -dn -m armelf -Map xinu.map -T ld.script | ||
|
||
all: xinu | ||
|
||
#-------------------------------------------------------------------------------- | ||
# Handle generation of a new version string when initialize is recompiled | ||
#-------------------------------------------------------------------------------- | ||
|
||
newversion: | ||
@echo creating new version | ||
@$(MKVERS) $(PNAME) > version | ||
|
||
#-------------------------------------------------------------------------------- | ||
# Include generic make targets and rules from the file generated by build-make | ||
#-------------------------------------------------------------------------------- | ||
-include $(DEFSFILE) | ||
|
||
#-------------------------------------------------------------------------------- | ||
# Add files that require special rules and place start.o at the front | ||
#-------------------------------------------------------------------------------- | ||
LD_LIST = binaries/start.o $(filter-out binaries/start.o,$(OBJ_FILES)) | ||
|
||
#------------------------------------------------------------ | ||
# Rules for files that need special handling | ||
#------------------------------------------------------------ | ||
|
||
# Define variables for the Configuration file and generated files | ||
|
||
CONFFILE = $(TOPDIR)/config/Configuration | ||
CONFH = $(TOPDIR)/include/conf.h | ||
CONFC = $(TOPDIR)/system/conf.c | ||
|
||
# Define variables for the config program and its sources | ||
|
||
CONFPGM = $(TOPDIR)/config/config | ||
CONFL = $(TOPDIR)/config/config.l | ||
CONFY = $(TOPDIR)/config/config.y | ||
|
||
# Set up the required build directory structure | ||
|
||
BLDDIRS = binaries | ||
export | ||
|
||
#-------------------------------------------------------------------------------- | ||
# Specific additional rules and exceptions | ||
#-------------------------------------------------------------------------------- | ||
|
||
xinu: Makefile rebuild $(BLDDIRS) $(DEFSFILE) $(DEPSFILE) $(CONFH) $(CONFC) $(LD_LIST) | ||
@echo;echo 'Loading object files to produce xinu' | ||
@$(LD) $(LDFLAGS) $(LD_LIST) -o $(XINU) -L$(LIBGCC_LOC) -lgcc | ||
@$(OBJCOPY) -O binary $(XINU) $(XINUBIN) | ||
@./uboot-tool/mkimage -A arm -O linux -T kernel -C none -a 0x81000000 -e 0x81000000 -d $(XINUBIN) $(XINUBOOT) | ||
|
||
$(BLDDIRS): | ||
@mkdir -p $(BLDDIRS) | ||
|
||
objects: $(LD_LIST) | ||
|
||
$(CONFH): $(CONFFILE) $(CONFPGM) | ||
@echo making $(CONFH) | ||
@make configure | ||
|
||
$(CONFC): $(CONFFILE) $(CONFPGM) | ||
@echo making $(CONFC) | ||
@make configure | ||
|
||
$(CONFPGM): $(CONFL) $(CONFY) | ||
@echo making the config program | ||
@make -C $(TOPDIR)/config clean all install | ||
|
||
configure: | ||
@echo forcing a rebuild of conf.h and conf.c | ||
@make newversion | ||
@(cd $(TOPDIR)/config; make install) | ||
|
||
clean: | ||
@echo removing .o files | ||
@rm -f ${LD_LIST} | ||
@echo removing configuration files ... | ||
@rm -f $(CONFH) $(CONFC) | ||
@(cd $(TOPDIR)/config; make clean) | ||
@echo removing xinu ... | ||
@rm -f $(XINU) | ||
@rm -f $(XINUBIN) | ||
@rm -f $(XINUBOOT) | ||
|
||
install: xinu | ||
cp xinu.boot /tftpboot | ||
|
||
qemu: xinu | ||
qemu-system-arm -M versatilepb -m 3G -nographic -cpu arm1176 -kernel xinu.boot | ||
|
||
qemu-gdb: xinu | ||
qemu-system-arm -M versatilepb -m 3G -nographic -cpu arm1176 -kernel xinu.boot -S -gdb tcp::${GPORT} | ||
#-------------------------------------------------------------------------------- | ||
# Locations of source directories and exceptions (.c and .[sS] files to exclude) | ||
#-------------------------------------------------------------------------------- | ||
|
||
$(DEFSFILE): | ||
@rm -f $(DEFSFILE) | ||
@echo "" > $(DEFSFILE) | ||
@make rebuild | ||
|
||
$(DEPSFILE): | ||
@rm -f $(DEPSFILE) | ||
@echo "" > $(DEPSFILE) | ||
@make depend | ||
|
||
rebuild: $(CONFC) | ||
@echo Rebuilding the $(DEFSFILE) file | ||
@$(BUILDMAKE) $(REBUILDFLAGS) > $(DEFSFILE) | ||
|
||
defclean: | ||
rm -f $(DEFSFILE) | ||
echo "" > $(DEFSFILE) | ||
|
||
depend: $(DEFSFILE) | ||
@echo;echo Making all dependencies in $(DEPSFILE) | ||
@$(MAKEDEP) ${INCLUDE} ${SRC_FULL} > $(DEPSFILE) | ||
@echo;echo Finished making dependencies | ||
|
||
depclean: | ||
rm -f $(DEPSFILE) | ||
echo "" > $(DEPSFILE) | ||
|
||
-include $(DEPSFILE) |
Oops, something went wrong.