mirror of
git://projects.qi-hardware.com/iris.git
synced 2025-04-21 12:27:27 +03:00
idle
This commit is contained in:
14
Makefile
14
Makefile
@@ -1,4 +1,4 @@
|
||||
load = 0xa0000000
|
||||
load = 0x80000000
|
||||
|
||||
CXXFLAGS = -Wno-unused-parameter -fno-strict-aliasing -fno-builtin -nostdinc
|
||||
CPPFLAGS = -O5 -Wa,-mips32
|
||||
@@ -8,7 +8,9 @@ LD = $(CROSS)ld
|
||||
OBJCOPY = $(CROSS)objcopy
|
||||
OBJDUMP = $(CROSS)objdump
|
||||
|
||||
BUILT_SOURCES = interrupts.cc panic.cc data.cc test.cc
|
||||
kernel_sources = interrupts.cc panic.cc data.cc test.cc
|
||||
boot_sources = init.cc
|
||||
BUILT_SOURCES = $(kernel_sources) $(boot_sources)
|
||||
|
||||
PYPP = /usr/bin/pypp
|
||||
%.cc: %.ccp kernel.hh
|
||||
@@ -17,8 +19,8 @@ PYPP = /usr/bin/pypp
|
||||
$(PYPP) --name $< < $< > $@
|
||||
|
||||
# Transform ':' into ';' so vim doesn't think there are errors.
|
||||
uimage: all.raw.gz Makefile
|
||||
mkimage -A MIPS -O Linux -C gzip -a $(load) -e 0x$(shell /bin/sh -c '$(OBJDUMP) -t all | grep __start$$ | cut -b-8') -n "Shevek's kernel" -d $< $@ | sed -e 's/:/;/g'
|
||||
uimage: all.raw Makefile
|
||||
mkimage -A MIPS -O Linux -C none -a $(load) -e 0x$(shell /bin/sh -c '$(OBJDUMP) -t all | grep __start$$ | cut -b-8') -n "Shevek's kernel" -d $< $@ | sed -e 's/:/;/g'
|
||||
|
||||
%.o:%.cc Makefile kernel.hh
|
||||
$(CC) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
@@ -26,8 +28,8 @@ uimage: all.raw.gz Makefile
|
||||
%.o:%.S Makefile
|
||||
$(CC) $(CPPFLAGS) -DKERNEL_STACK_SIZE=0x2000 -c $< -o $@
|
||||
|
||||
# entry.o must be the first file. For the rest, the order doesn't matter.
|
||||
all: entry.o $(subst .cc,.o,$(BUILT_SOURCES))
|
||||
# entry.o must be the first file. boot.o must be the first of the init objects (which can be dumped after loading).
|
||||
all: entry.o $(subst .cc,.o,$(kernel_sources)) boot.o $(subst .cc,.o,$(boot_sources))
|
||||
$(LD) --omagic -Ttext $(load) $^ -o $@
|
||||
|
||||
junk = mdebug.abi32 reginfo comment pdr
|
||||
|
||||
Reference in New Issue
Block a user