MIPS: eBPF: Fix icache flush end address
[linux/fpc-iii.git] / arch / mips / lasat / image / Makefile
blob78ce4cff101271c2c1bd9582e0b278102fb9448e
1 # SPDX-License-Identifier: GPL-2.0
3 # MAKEFILE FOR THE MIPS LINUX BOOTLOADER AND ROM DEBUGGER
5 # i-data Networks
7 # Author: Thomas Horsten <thh@i-data.com>
10 ifndef Version
11 Version = "$(USER)-test"
12 endif
14 MKLASATIMG = mklasatimg
15 MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200
16 KERNEL_IMAGE = vmlinux
18 LDSCRIPT= -L$(srctree)/$(src) -Tromscript.normal
20 HEAD_DEFINES := -D_kernel_start=$(VMLINUX_LOAD_ADDRESS) \
21 -D_kernel_entry=$(VMLINUX_ENTRY_ADDRESS) \
22 -D VERSION="\"$(Version)\"" \
23 -D TIMESTAMP=$(shell date +%s)
25 $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE)
26 $(CC) -fno-pic $(HEAD_DEFINES) $(LINUXINCLUDE) -c -o $@ $<
28 OBJECTS = head.o kImage.o
30 rom.sw: $(obj)/rom.sw
31 rom.bin: $(obj)/rom.bin
33 $(obj)/rom.sw: $(obj)/rom.bin
34 $(MKLASATIMG) -o $@ -k $^ -m $(MKLASATIMG_ARCH)
36 $(obj)/rom.bin: $(obj)/rom
37 $(OBJCOPY) -O binary -S $^ $@
39 # Rule to make the bootloader
40 $(obj)/rom: $(addprefix $(obj)/,$(OBJECTS))
41 $(LD) $(KBUILD_LDFLAGS) $(LDSCRIPT) -o $@ $^
43 $(obj)/%.o: $(obj)/%.gz
44 $(LD) -r -o $@ -b binary $<
46 $(obj)/%.gz: $(obj)/%.bin
47 gzip -cf -9 $< > $@
49 $(obj)/kImage.bin: $(KERNEL_IMAGE)
50 $(OBJCOPY) -O binary -S $^ $@
52 clean:
53 rm -f rom rom.bin rom.sw kImage.bin kImage.o