|
|
@ -1,4 +1,5 @@ |
|
|
|
LOADADDR = 0x81000000
|
|
|
|
LOADADDR = 0x80400000 # RAM start + 4M
|
|
|
|
|
|
|
|
KERNEL_ENTRY = 0x80001000
|
|
|
|
RAMSIZE = 0x00100000 # 1MB
|
|
|
|
RAMSIZE = 0x00100000 # 1MB
|
|
|
|
|
|
|
|
|
|
|
|
CROSS_COMPILE = mips-linux-
|
|
|
|
CROSS_COMPILE = mips-linux-
|
|
|
@ -15,7 +16,7 @@ LD = $(CROSS_COMPILE)ld |
|
|
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
|
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
|
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
|
|
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
|
|
|
|
|
|
|
|
|
|
|
CFLAGS = -fno-builtin -Os -G 0 -mno-abicalls -fno-pic -Wall -DRAMSIZE=${RAMSIZE} -D_LZMA_IN_CB
|
|
|
|
CFLAGS = -fno-builtin -Os -G 0 -mno-abicalls -fno-pic -Wall -DRAMSIZE=${RAMSIZE} -DKERNEL_ENTRY=${KERNEL_ENTRY} -D_LZMA_IN_CB
|
|
|
|
# CFLAGS = -fno-builtin -Os -G 0 -mno-abicalls -fno-pic -Wall -DRAMSIZE=${RAMSIZE}
|
|
|
|
# CFLAGS = -fno-builtin -Os -G 0 -mno-abicalls -fno-pic -Wall -DRAMSIZE=${RAMSIZE}
|
|
|
|
|
|
|
|
|
|
|
|
O_FORMAT = $(shell $(OBJDUMP) -i | head -2 | grep elf32)
|
|
|
|
O_FORMAT = $(shell $(OBJDUMP) -i | head -2 | grep elf32)
|
|
|
@ -28,7 +29,10 @@ strip-flags = $(addprefix --remove-section=,$(drop-sections)) |
|
|
|
|
|
|
|
|
|
|
|
all : lzma.elf |
|
|
|
all : lzma.elf |
|
|
|
|
|
|
|
|
|
|
|
kernel.o: vmlinux.lzma |
|
|
|
lzma.lds: lzma.lds.in |
|
|
|
|
|
|
|
sed -e 's,@LOADADDR@,$(LOADADDR),g' $< >$@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kernel.o: vmlinux.lzma lzma.lds |
|
|
|
$(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
|
|
|
|
$(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
|
|
|
|
|
|
|
|
|
|
|
|
lzma.elf: start.o decompress.o LzmaDecode.o kernel.o |
|
|
|
lzma.elf: start.o decompress.o LzmaDecode.o kernel.o |