console code now builds on zizzer
console/Makefile: Updated to build on linux and removed lots of crud that compiled, disassembled, and then reassembled console/dbmentry.s: the assembler didn't like they comments, so I removed them console/printf.c: Gcc was very unhappy, so I fixed this line h/lib.h: time_t is defined in a std header, and this was causing some problems
This commit is contained in:
parent
b582b5058e
commit
31ac4ce140
4 changed files with 31 additions and 34 deletions
|
@ -1,51 +1,48 @@
|
||||||
|
|
||||||
all: console
|
|
||||||
|
|
||||||
DBMENTRY = fffffc0000010000
|
DBMENTRY = fffffc0000010000
|
||||||
INCLUDES = -I$(PALCODE) -I$(INCLUDEH) -I$(M5)/dev
|
INCLUDES = -I$(PALCODE) -I$(INCLUDEH) -I$(M5)/dev
|
||||||
|
|
||||||
SOURDIR = ./
|
SOURDIR = ./
|
||||||
PALCODE = ../palcode
|
PALCODE = ../palcode
|
||||||
INCLUDEH = ../h
|
INCLUDEH = ../h
|
||||||
CC=gcc
|
|
||||||
#AS=gas
|
ARCHNAME=$(shell uname -m)
|
||||||
|
|
||||||
|
### If we are not compiling on an alpha, we must use cross tools ###
|
||||||
|
ifneq ($(ARCHNAME), alpha)
|
||||||
|
CC=alpha-unknown-linux-gnu-gcc
|
||||||
|
AS=alpha-unknown-linux-gnu-as
|
||||||
|
CXX=alpha-unknown-linux-gnu-g++
|
||||||
|
LD=alpha-unknown-linux-gnu-ld
|
||||||
|
endif
|
||||||
|
|
||||||
|
### Make sure that the M5 variable is set ###
|
||||||
|
ifndef M5
|
||||||
|
$(error The M5 variable must be set)
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: console
|
||||||
|
|
||||||
dbmentry.o: dbmentry.s
|
dbmentry.o: dbmentry.s
|
||||||
$(AS) $(INCLUDES) -nointrinsics -o $*.o $*.s
|
g++ -I ../h -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ dbmentry.s | \
|
||||||
|
$(AS) -m 21164 -o dbmentry.s.o
|
||||||
|
|
||||||
console.o: console.c
|
console.o: console.c
|
||||||
$(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c
|
$(CC) -g3 $(INCLUDES) -D _TIME_T -nostdinc++ -o $*.o -c $*.c
|
||||||
|
|
||||||
printf.o: printf.c
|
printf.o: printf.c
|
||||||
$(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c
|
$(CC) -g3 $(INCLUDES) -nostdinc++ -o $*.o -c $*.c
|
||||||
|
|
||||||
paljtokern.s.o: paljtokern.s
|
paljtokern.s.o: paljtokern.s
|
||||||
g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \
|
g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \
|
||||||
gas -m 21164 -o paljtokern.s.o
|
$(AS) -m 21164 -o paljtokern.s.o
|
||||||
|
|
||||||
paljtoslave.s.o: paljtoslave.s
|
paljtoslave.s.o: paljtoslave.s
|
||||||
g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \
|
g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \
|
||||||
gas -m 21164 -o paljtoslave.s.o
|
$(AS) -m 21164 -o paljtoslave.s.o
|
||||||
|
|
||||||
paljtokern.c: paljtokern.s.o
|
console: console.o dbmentry.o printf.o paljtokern.s.o paljtoslave.s.o
|
||||||
echo 'unsigned int palJToKern[] = {' > paljtokern.c
|
$(LD) -o console -N -Ttext $(DBMENTRY) -non_shared \
|
||||||
dis paljtokern.s.o | awk '{print "0x"$$2","}' >> paljtokern.c
|
dbmentry.s.o console.o printf.o paljtokern.s.o paljtoslave.s.o -lc
|
||||||
echo "0x0\n};" >> paljtokern.c
|
|
||||||
|
|
||||||
paljtoslave.c: paljtoslave.s.o
|
|
||||||
echo "unsigned int palJToSlave[] = {" > paljtoslave.c
|
|
||||||
dis paljtoslave.s.o | awk '{print "0x"$$2","}' >> paljtoslave.c
|
|
||||||
echo "0x0\n};" >> paljtoslave.c
|
|
||||||
|
|
||||||
paljtokern.c.o: paljtokern.c
|
|
||||||
$(CC) -g3 -nointrinsics -o paljtokern.c.o -c paljtokern.c
|
|
||||||
|
|
||||||
paljtoslave.c.o: paljtoslave.c
|
|
||||||
$(CC) -g3 -nointrinsics -o paljtoslave.c.o -c paljtoslave.c
|
|
||||||
|
|
||||||
console: console.o dbmentry.o printf.o paljtokern.c.o paljtoslave.c.o
|
|
||||||
$(LD) -o console -N -T $(DBMENTRY) -non_shared \
|
|
||||||
dbmentry.o console.o printf.o paljtokern.c.o paljtoslave.c.o -lc
|
|
||||||
|
|
||||||
install: console
|
install: console
|
||||||
scp console zizzer.eecs.umich.edu:/z/m5/system/testing/binaries/console
|
scp console zizzer.eecs.umich.edu:/z/m5/system/testing/binaries/console
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
/* taken from ebfw/rom/dbmentry.s */
|
/* taken from ebfw/rom/dbmentry.s */
|
||||||
|
|
||||||
#define EB164
|
#define EB164
|
||||||
#ifndef LINT
|
/*#ifndef LINT
|
||||||
.data
|
.data
|
||||||
.asciiz "$Id: dbmentry.s,v 1.1.1.1 1997/10/30 23:27:12 verghese Exp $"
|
.asciiz "$Id: dbmentry.s,v 1.1.1.1 1997/10/30 23:27:12 verghese Exp $"
|
||||||
.text
|
.text
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
* Debug Monitor Entry code
|
* Debug Monitor Entry code
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -219,7 +219,7 @@ FormatItem(const char *f, va_list *ap)
|
||||||
case '-': leftjust = TRUE;
|
case '-': leftjust = TRUE;
|
||||||
break;
|
break;
|
||||||
case 'c': {
|
case 'c': {
|
||||||
char a = va_arg(*ap, char);
|
char a = va_arg(*ap, char *);
|
||||||
|
|
||||||
if (leftjust) PutChar(a & 0x7f);
|
if (leftjust) PutChar(a & 0x7f);
|
||||||
if (fieldwidth > 0) PutRepChar(fill, fieldwidth - 1);
|
if (fieldwidth > 0) PutRepChar(fill, fieldwidth - 1);
|
||||||
|
|
|
@ -234,7 +234,7 @@ date.c
|
||||||
extern void printDate(void);
|
extern void printDate(void);
|
||||||
extern void setDate(ub * date);
|
extern void setDate(ub * date);
|
||||||
extern ui gettime(void);
|
extern ui gettime(void);
|
||||||
extern time_t time(void);
|
//extern time_t time(void);
|
||||||
extern void CheckDate(void);
|
extern void CheckDate(void);
|
||||||
|
|
||||||
/*::::::::::::::
|
/*::::::::::::::
|
||||||
|
|
Loading…
Reference in a new issue