aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v10/boot/rescue/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v10/boot/rescue/Makefile')
-rw-r--r--arch/cris/arch-v10/boot/rescue/Makefile55
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/cris/arch-v10/boot/rescue/Makefile b/arch/cris/arch-v10/boot/rescue/Makefile
new file mode 100644
index 00000000000..e9f2ba2ad02
--- /dev/null
+++ b/arch/cris/arch-v10/boot/rescue/Makefile
@@ -0,0 +1,55 @@
1#
2# Makefile for rescue code
3#
4ifndef TOPDIR
5TOPDIR = ../../../..
6endif
7CC = gcc-cris -mlinux -I $(TOPDIR)/include
8CFLAGS = -O2
9LD = gcc-cris -mlinux -nostdlib
10OBJCOPY = objcopy-cris
11OBJCOPYFLAGS = -O binary --remove-section=.bss
12
13all: rescue.bin testrescue.bin kimagerescue.bin
14
15rescue: rescue.bin
16 # do nothing
17
18rescue.bin: head.o
19 $(LD) -T rescue.ld -o rescue.o head.o
20 $(OBJCOPY) $(OBJCOPYFLAGS) rescue.o rescue.bin
21 cp rescue.bin $(TOPDIR)
22
23testrescue.bin: testrescue.o
24 $(OBJCOPY) $(OBJCOPYFLAGS) testrescue.o tr.bin
25# Pad it to 784 bytes
26 dd if=/dev/zero of=tmp2423 bs=1 count=784
27 cat tr.bin tmp2423 >testrescue_tmp.bin
28 dd if=testrescue_tmp.bin of=testrescue.bin bs=1 count=784
29 rm tr.bin tmp2423 testrescue_tmp.bin
30
31kimagerescue.bin: kimagerescue.o
32 $(OBJCOPY) $(OBJCOPYFLAGS) kimagerescue.o ktr.bin
33# Pad it to 784 bytes, that's what the rescue loader expects
34 dd if=/dev/zero of=tmp2423 bs=1 count=784
35 cat ktr.bin tmp2423 >kimagerescue_tmp.bin
36 dd if=kimagerescue_tmp.bin of=kimagerescue.bin bs=1 count=784
37 rm ktr.bin tmp2423 kimagerescue_tmp.bin
38
39head.o: head.S
40 $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
41
42testrescue.o: testrescue.S
43 $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
44
45kimagerescue.o: kimagerescue.S
46 $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
47
48clean:
49 rm -f *.o *.bin
50
51fastdep:
52
53modules:
54
55modules-install: