Fixed issues with multiple kernel builds.

This commit is contained in:
Serge Vakulenko
2015-09-04 18:55:56 -07:00
parent 8ba13c2f71
commit 9f05f511a6
21 changed files with 111 additions and 100 deletions

View File

@@ -9,7 +9,7 @@ AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
CPP = ${MIPS_GCC_PREFIX}cpp CPP = ${MIPS_GCC_PREFIX}cpp
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=unix.map LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map
SIZE = ${MIPS_GCC_PREFIX}size SIZE = ${MIPS_GCC_PREFIX}size
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
OBJDUMP = ${MIPS_GCC_PREFIX}objdump OBJDUMP = ${MIPS_GCC_PREFIX}objdump
@@ -44,14 +44,14 @@ SYSTEM_OBJ = startup.o ${OBJS} #ioconf.o
ifeq (devcfg.c,$(wildcard devcfg.c)) ifeq (devcfg.c,$(wildcard devcfg.c))
SYSTEM_OBJ += devcfg.o SYSTEM_OBJ += devcfg.o
endif endif
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys .deps ${SYSTEM_OBJ} SYSTEM_DEP = Makefile ioconf.c machine sys .deps ${SYSTEM_OBJ}
SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@ SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \ SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o $@; \
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf ${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o $@
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \ SYSTEM_LD_TAIL = ${SIZE} $@; \
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \ $(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ $(basename $@).hex; \
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \ $(OBJCOPY) -O binary -R .boot -R .config $@ $(basename $@).bin; \
$(OBJDUMP) -d -S unix.elf > unix.dis $(OBJDUMP) -d -S $@ > $(basename $@).dis
%LOAD %LOAD
@@ -59,11 +59,12 @@ clean:
rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys
clean-all: clean clean-all: clean
rm -f *.h ioconf.c swapunix.c vers.c rm -f *.h *.hex ioconf.c swap*.c vers.c
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig reconfig ioconf.c: Config ../../../tools/kconfig/kconfig
../../../tools/kconfig/kconfig Config ../../../tools/kconfig/kconfig Config
$(MAKE) clean $(MAKE) clean
rm -f *.hex
load: unix.elf load: unix.elf
pic32prog unix.hex pic32prog unix.hex

View File

@@ -34,7 +34,6 @@ options "LED_DISK_PIN=1" # ...use pin RC1
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Console options # Console options
options "CONSOLE_DEVICE=ttyUSB0" # Console on USB options "CONSOLE_DEVICE=ttyUSB0" # Console on USB

View File

@@ -34,7 +34,6 @@ options "LED_DISK_PIN=1" # ...use pin RC1
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Console options # Console options
options "CONSOLE_DEVICE=tty4" # Console on UART5 options "CONSOLE_DEVICE=tty4" # Console on UART5

View File

@@ -33,7 +33,7 @@ AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
CPP = ${MIPS_GCC_PREFIX}cpp CPP = ${MIPS_GCC_PREFIX}cpp
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=unix.map LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map
SIZE = ${MIPS_GCC_PREFIX}size SIZE = ${MIPS_GCC_PREFIX}size
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
OBJDUMP = ${MIPS_GCC_PREFIX}objdump OBJDUMP = ${MIPS_GCC_PREFIX}objdump
@@ -106,14 +106,16 @@ SYSTEM_OBJ = startup.o ${OBJS} #ioconf.o
ifeq (devcfg.c,$(wildcard devcfg.c)) ifeq (devcfg.c,$(wildcard devcfg.c))
SYSTEM_OBJ += devcfg.o SYSTEM_OBJ += devcfg.o
endif endif
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys .deps ${SYSTEM_OBJ} SYSTEM_DEP = Makefile ioconf.c machine sys .deps ${SYSTEM_OBJ}
SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@ SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \ SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o $@; \
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf ${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o $@
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \ SYSTEM_LD_TAIL = ${SIZE} $@; \
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \ $(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ $(basename $@).hex; \
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \ $(OBJCOPY) -O binary -R .boot -R .config $@ $(basename $@).bin; \
$(OBJDUMP) -d -S unix.elf > unix.dis $(OBJDUMP) -d -S $@ > $(basename $@).dis
unix: unix.elf
unix.elf: ${SYSTEM_DEP} swapunix.o unix.elf: ${SYSTEM_DEP} swapunix.o
${SYSTEM_LD_HEAD} ${SYSTEM_LD_HEAD}
@@ -123,17 +125,18 @@ unix.elf: ${SYSTEM_DEP} swapunix.o
swapunix.o: swapunix.c swapunix.o: swapunix.c
${COMPILE_C} ${COMPILE_C}
all: unix.elf all: unix
clean: clean:
rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys
clean-all: clean clean-all: clean
rm -f *.h ioconf.c swapunix.c vers.c rm -f *.h *.hex ioconf.c swap*.c vers.c
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig reconfig ioconf.c: Config ../../../tools/kconfig/kconfig
../../../tools/kconfig/kconfig Config ../../../tools/kconfig/kconfig Config
$(MAKE) clean $(MAKE) clean
rm -f *.hex
load: unix.elf load: unix.elf
pic32prog unix.hex pic32prog unix.hex

View File

@@ -33,7 +33,6 @@ options "LED_DISK_PIN=12" # ...use pin RB12
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Console options # Console options
options "CONSOLE_DEVICE=ttyUSB0" # Console on USB options "CONSOLE_DEVICE=ttyUSB0" # Console on USB

View File

@@ -33,7 +33,6 @@ options "LED_DISK_PIN=12" # ...use pin RB12
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Console options # Console options
options "CONSOLE_DEVICE=tty4" # Console on UART5 options "CONSOLE_DEVICE=tty4" # Console on UART5

View File

@@ -33,7 +33,7 @@ AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
CPP = ${MIPS_GCC_PREFIX}cpp CPP = ${MIPS_GCC_PREFIX}cpp
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=unix.map LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map
SIZE = ${MIPS_GCC_PREFIX}size SIZE = ${MIPS_GCC_PREFIX}size
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
OBJDUMP = ${MIPS_GCC_PREFIX}objdump OBJDUMP = ${MIPS_GCC_PREFIX}objdump
@@ -106,14 +106,16 @@ SYSTEM_OBJ = startup.o ${OBJS} #ioconf.o
ifeq (devcfg.c,$(wildcard devcfg.c)) ifeq (devcfg.c,$(wildcard devcfg.c))
SYSTEM_OBJ += devcfg.o SYSTEM_OBJ += devcfg.o
endif endif
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys .deps ${SYSTEM_OBJ} SYSTEM_DEP = Makefile ioconf.c machine sys .deps ${SYSTEM_OBJ}
SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@ SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \ SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o $@; \
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf ${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o $@
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \ SYSTEM_LD_TAIL = ${SIZE} $@; \
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \ $(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ $(basename $@).hex; \
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \ $(OBJCOPY) -O binary -R .boot -R .config $@ $(basename $@).bin; \
$(OBJDUMP) -d -S unix.elf > unix.dis $(OBJDUMP) -d -S $@ > $(basename $@).dis
unix: unix.elf
unix.elf: ${SYSTEM_DEP} swapunix.o unix.elf: ${SYSTEM_DEP} swapunix.o
${SYSTEM_LD_HEAD} ${SYSTEM_LD_HEAD}
@@ -123,17 +125,18 @@ unix.elf: ${SYSTEM_DEP} swapunix.o
swapunix.o: swapunix.c swapunix.o: swapunix.c
${COMPILE_C} ${COMPILE_C}
all: unix.elf all: unix
clean: clean:
rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys
clean-all: clean clean-all: clean
rm -f *.h ioconf.c swapunix.c vers.c rm -f *.h *.hex ioconf.c swap*.c vers.c
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig reconfig ioconf.c: Config ../../../tools/kconfig/kconfig
../../../tools/kconfig/kconfig Config ../../../tools/kconfig/kconfig Config
$(MAKE) clean $(MAKE) clean
rm -f *.hex
load: unix.elf load: unix.elf
pic32prog unix.hex pic32prog unix.hex

View File

@@ -31,7 +31,6 @@ options "LED_KERNEL_PIN=5" # ...use pin RE5
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Console options # Console options
options "CONSOLE_DEVICE=ttyUSB0" # Console on USB options "CONSOLE_DEVICE=ttyUSB0" # Console on USB

View File

@@ -35,7 +35,6 @@ options "LED_KERNEL_PIN=5" # ...use pin RE5
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Console options # Console options
options "CONSOLE_DEVICE=tty1" # Console on UART2 options "CONSOLE_DEVICE=tty1" # Console on UART2

View File

@@ -30,7 +30,7 @@ AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
CPP = ${MIPS_GCC_PREFIX}cpp CPP = ${MIPS_GCC_PREFIX}cpp
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=unix.map LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map
SIZE = ${MIPS_GCC_PREFIX}size SIZE = ${MIPS_GCC_PREFIX}size
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
OBJDUMP = ${MIPS_GCC_PREFIX}objdump OBJDUMP = ${MIPS_GCC_PREFIX}objdump
@@ -103,14 +103,16 @@ SYSTEM_OBJ = startup.o ${OBJS} #ioconf.o
ifeq (devcfg.c,$(wildcard devcfg.c)) ifeq (devcfg.c,$(wildcard devcfg.c))
SYSTEM_OBJ += devcfg.o SYSTEM_OBJ += devcfg.o
endif endif
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys .deps ${SYSTEM_OBJ} SYSTEM_DEP = Makefile ioconf.c machine sys .deps ${SYSTEM_OBJ}
SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@ SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \ SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o $@; \
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf ${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o $@
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \ SYSTEM_LD_TAIL = ${SIZE} $@; \
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \ $(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ $(basename $@).hex; \
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \ $(OBJCOPY) -O binary -R .boot -R .config $@ $(basename $@).bin; \
$(OBJDUMP) -d -S unix.elf > unix.dis $(OBJDUMP) -d -S $@ > $(basename $@).dis
unix: unix.elf
unix.elf: ${SYSTEM_DEP} swapunix.o unix.elf: ${SYSTEM_DEP} swapunix.o
${SYSTEM_LD_HEAD} ${SYSTEM_LD_HEAD}
@@ -120,17 +122,18 @@ unix.elf: ${SYSTEM_DEP} swapunix.o
swapunix.o: swapunix.c swapunix.o: swapunix.c
${COMPILE_C} ${COMPILE_C}
all: unix.elf all: unix
clean: clean:
rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys
clean-all: clean clean-all: clean
rm -f *.h ioconf.c swapunix.c vers.c rm -f *.h *.hex ioconf.c swap*.c vers.c
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig reconfig ioconf.c: Config ../../../tools/kconfig/kconfig
../../../tools/kconfig/kconfig Config ../../../tools/kconfig/kconfig Config
$(MAKE) clean $(MAKE) clean
rm -f *.hex
load: unix.elf load: unix.elf
pic32prog unix.hex pic32prog unix.hex

View File

@@ -30,7 +30,6 @@ options "LED_KERNEL_PIN=3" # ...use pin RA3
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Serial UART ports # Serial UART ports
device uart1 # Serial-to-USB converter device uart1 # Serial-to-USB converter

View File

@@ -31,7 +31,7 @@ AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
CPP = ${MIPS_GCC_PREFIX}cpp CPP = ${MIPS_GCC_PREFIX}cpp
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=unix.map LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map
SIZE = ${MIPS_GCC_PREFIX}size SIZE = ${MIPS_GCC_PREFIX}size
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
OBJDUMP = ${MIPS_GCC_PREFIX}objdump OBJDUMP = ${MIPS_GCC_PREFIX}objdump
@@ -102,14 +102,16 @@ SYSTEM_OBJ = startup.o ${OBJS} #ioconf.o
ifeq (devcfg.c,$(wildcard devcfg.c)) ifeq (devcfg.c,$(wildcard devcfg.c))
SYSTEM_OBJ += devcfg.o SYSTEM_OBJ += devcfg.o
endif endif
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys .deps ${SYSTEM_OBJ} SYSTEM_DEP = Makefile ioconf.c machine sys .deps ${SYSTEM_OBJ}
SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@ SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \ SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o $@; \
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf ${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o $@
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \ SYSTEM_LD_TAIL = ${SIZE} $@; \
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \ $(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ $(basename $@).hex; \
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \ $(OBJCOPY) -O binary -R .boot -R .config $@ $(basename $@).bin; \
$(OBJDUMP) -d -S unix.elf > unix.dis $(OBJDUMP) -d -S $@ > $(basename $@).dis
unix: unix.elf
unix.elf: ${SYSTEM_DEP} swapunix.o unix.elf: ${SYSTEM_DEP} swapunix.o
${SYSTEM_LD_HEAD} ${SYSTEM_LD_HEAD}
@@ -119,17 +121,18 @@ unix.elf: ${SYSTEM_DEP} swapunix.o
swapunix.o: swapunix.c swapunix.o: swapunix.c
${COMPILE_C} ${COMPILE_C}
all: unix.elf all: unix
clean: clean:
rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys
clean-all: clean clean-all: clean
rm -f *.h ioconf.c swapunix.c vers.c rm -f *.h *.hex ioconf.c swap*.c vers.c
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig reconfig ioconf.c: Config ../../../tools/kconfig/kconfig
../../../tools/kconfig/kconfig Config ../../../tools/kconfig/kconfig Config
$(MAKE) clean $(MAKE) clean
rm -f *.hex
load: unix.elf load: unix.elf
pic32prog unix.hex pic32prog unix.hex

View File

@@ -27,7 +27,6 @@ options "BUS_DIV=1" # Bus clock divisor 1/2/4/8
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Serial UART ports # Serial UART ports
device uart1 # Serial-to-USB converter device uart1 # Serial-to-USB converter

View File

@@ -27,7 +27,6 @@ options "BUS_DIV=1" # Bus clock divisor 1/2/4/8
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Serial UART ports # Serial UART ports
device uart1 # Serial-to-USB converter device uart1 # Serial-to-USB converter

View File

@@ -27,7 +27,7 @@ AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
CPP = ${MIPS_GCC_PREFIX}cpp CPP = ${MIPS_GCC_PREFIX}cpp
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=unix.map LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map
SIZE = ${MIPS_GCC_PREFIX}size SIZE = ${MIPS_GCC_PREFIX}size
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
OBJDUMP = ${MIPS_GCC_PREFIX}objdump OBJDUMP = ${MIPS_GCC_PREFIX}objdump
@@ -99,14 +99,16 @@ SYSTEM_OBJ = startup.o ${OBJS} #ioconf.o
ifeq (devcfg.c,$(wildcard devcfg.c)) ifeq (devcfg.c,$(wildcard devcfg.c))
SYSTEM_OBJ += devcfg.o SYSTEM_OBJ += devcfg.o
endif endif
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys .deps ${SYSTEM_OBJ} SYSTEM_DEP = Makefile ioconf.c machine sys .deps ${SYSTEM_OBJ}
SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@ SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \ SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o $@; \
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf ${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o $@
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \ SYSTEM_LD_TAIL = ${SIZE} $@; \
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \ $(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ $(basename $@).hex; \
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \ $(OBJCOPY) -O binary -R .boot -R .config $@ $(basename $@).bin; \
$(OBJDUMP) -d -S unix.elf > unix.dis $(OBJDUMP) -d -S $@ > $(basename $@).dis
unix: unix.elf
unix.elf: ${SYSTEM_DEP} swapunix.o unix.elf: ${SYSTEM_DEP} swapunix.o
${SYSTEM_LD_HEAD} ${SYSTEM_LD_HEAD}
@@ -116,17 +118,18 @@ unix.elf: ${SYSTEM_DEP} swapunix.o
swapunix.o: swapunix.c swapunix.o: swapunix.c
${COMPILE_C} ${COMPILE_C}
all: unix.elf all: unix
clean: clean:
rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys
clean-all: clean clean-all: clean
rm -f *.h ioconf.c swapunix.c vers.c rm -f *.h *.hex ioconf.c swap*.c vers.c
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig reconfig ioconf.c: Config ../../../tools/kconfig/kconfig
../../../tools/kconfig/kconfig Config ../../../tools/kconfig/kconfig Config
$(MAKE) clean $(MAKE) clean
rm -f *.hex
load: unix.elf load: unix.elf
pic32prog unix.hex pic32prog unix.hex

View File

@@ -42,7 +42,6 @@ options "LED_TTY_INVERT"
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Console options # Console options
options "CONSOLE_DEVICE=ttyUSB0" # Console on USB options "CONSOLE_DEVICE=ttyUSB0" # Console on USB

View File

@@ -41,7 +41,6 @@ options "LED_TTY_INVERT"
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Console options # Console options
options "CONSOLE_DEVICE=tty1" # Console on UART2 options "CONSOLE_DEVICE=tty1" # Console on UART2

View File

@@ -42,7 +42,7 @@ AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
CPP = ${MIPS_GCC_PREFIX}cpp CPP = ${MIPS_GCC_PREFIX}cpp
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=unix.map LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map
SIZE = ${MIPS_GCC_PREFIX}size SIZE = ${MIPS_GCC_PREFIX}size
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
OBJDUMP = ${MIPS_GCC_PREFIX}objdump OBJDUMP = ${MIPS_GCC_PREFIX}objdump
@@ -115,14 +115,16 @@ SYSTEM_OBJ = startup.o ${OBJS} #ioconf.o
ifeq (devcfg.c,$(wildcard devcfg.c)) ifeq (devcfg.c,$(wildcard devcfg.c))
SYSTEM_OBJ += devcfg.o SYSTEM_OBJ += devcfg.o
endif endif
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys .deps ${SYSTEM_OBJ} SYSTEM_DEP = Makefile ioconf.c machine sys .deps ${SYSTEM_OBJ}
SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@ SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \ SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o $@; \
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf ${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o $@
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \ SYSTEM_LD_TAIL = ${SIZE} $@; \
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \ $(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ $(basename $@).hex; \
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \ $(OBJCOPY) -O binary -R .boot -R .config $@ $(basename $@).bin; \
$(OBJDUMP) -d -S unix.elf > unix.dis $(OBJDUMP) -d -S $@ > $(basename $@).dis
unix: unix.elf
unix.elf: ${SYSTEM_DEP} swapunix.o unix.elf: ${SYSTEM_DEP} swapunix.o
${SYSTEM_LD_HEAD} ${SYSTEM_LD_HEAD}
@@ -132,17 +134,18 @@ unix.elf: ${SYSTEM_DEP} swapunix.o
swapunix.o: swapunix.c swapunix.o: swapunix.c
${COMPILE_C} ${COMPILE_C}
all: unix.elf all: unix
clean: clean:
rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys
clean-all: clean clean-all: clean
rm -f *.h ioconf.c swapunix.c vers.c rm -f *.h *.hex ioconf.c swap*.c vers.c
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig reconfig ioconf.c: Config ../../../tools/kconfig/kconfig
../../../tools/kconfig/kconfig Config ../../../tools/kconfig/kconfig Config
$(MAKE) clean $(MAKE) clean
rm -f *.hex
load: unix.elf load: unix.elf
pic32prog unix.hex pic32prog unix.hex

View File

@@ -32,7 +32,6 @@ options "LED_TTY_PIN=1" # ...use pin RA1
# Root filesystem at /dev/sd0a, swap at /dev/sd0b # Root filesystem at /dev/sd0a, swap at /dev/sd0b
config unix root on sd0a config unix root on sd0a
swap on sd0b swap on sd0b
dumps on sd0b
# Serial UART ports # Serial UART ports
device uart1 # Serial-to-USB converter device uart1 # Serial-to-USB converter

View File

@@ -32,7 +32,7 @@ AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
CPP = ${MIPS_GCC_PREFIX}cpp CPP = ${MIPS_GCC_PREFIX}cpp
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=unix.map LDFLAGS = -nostdlib -T ../${LDSCRIPT} -Wl,-Map=$(basename $@).map
SIZE = ${MIPS_GCC_PREFIX}size SIZE = ${MIPS_GCC_PREFIX}size
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
OBJDUMP = ${MIPS_GCC_PREFIX}objdump OBJDUMP = ${MIPS_GCC_PREFIX}objdump
@@ -103,14 +103,16 @@ SYSTEM_OBJ = startup.o ${OBJS} #ioconf.o
ifeq (devcfg.c,$(wildcard devcfg.c)) ifeq (devcfg.c,$(wildcard devcfg.c))
SYSTEM_OBJ += devcfg.o SYSTEM_OBJ += devcfg.o
endif endif
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys .deps ${SYSTEM_OBJ} SYSTEM_DEP = Makefile ioconf.c machine sys .deps ${SYSTEM_OBJ}
SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@ SYSTEM_LD_HEAD = sh ../newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \ SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o $@; \
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf ${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o $@
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \ SYSTEM_LD_TAIL = ${SIZE} $@; \
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \ $(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ $(basename $@).hex; \
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \ $(OBJCOPY) -O binary -R .boot -R .config $@ $(basename $@).bin; \
$(OBJDUMP) -d -S unix.elf > unix.dis $(OBJDUMP) -d -S $@ > $(basename $@).dis
unix: unix.elf
unix.elf: ${SYSTEM_DEP} swapunix.o unix.elf: ${SYSTEM_DEP} swapunix.o
${SYSTEM_LD_HEAD} ${SYSTEM_LD_HEAD}
@@ -120,17 +122,18 @@ unix.elf: ${SYSTEM_DEP} swapunix.o
swapunix.o: swapunix.c swapunix.o: swapunix.c
${COMPILE_C} ${COMPILE_C}
all: unix.elf all: unix
clean: clean:
rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys rm -rf .deps *.elf *.o *.map *.dis *.bin machine sys
clean-all: clean clean-all: clean
rm -f *.h ioconf.c swapunix.c vers.c rm -f *.h *.hex ioconf.c swap*.c vers.c
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig reconfig ioconf.c: Config ../../../tools/kconfig/kconfig
../../../tools/kconfig/kconfig Config ../../../tools/kconfig/kconfig Config
$(MAKE) clean $(MAKE) clean
rm -f *.hex
load: unix.elf load: unix.elf
pic32prog unix.hex pic32prog unix.hex

View File

@@ -397,7 +397,7 @@ void do_load(f)
fputs("all:", f); fputs("all:", f);
for (fl = conf_list; fl; fl = fl->f_next) for (fl = conf_list; fl; fl = fl->f_next)
if (fl->f_type == SYSTEMSPEC) if (fl->f_type == SYSTEMSPEC)
fprintf(f, " %s.elf", fl->f_needs); fprintf(f, " %s", fl->f_needs);
putc('\n', f); putc('\n', f);
} }
@@ -508,6 +508,7 @@ do_systemspec(f, fl, first)
register struct file_list *fl; register struct file_list *fl;
int first; int first;
{ {
fprintf(f, "%s: %s.elf\n\n", fl->f_needs, fl->f_needs);
fprintf(f, "%s.elf: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn); fprintf(f, "%s.elf: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn);
// Don't use newvers target. // Don't use newvers target.