[PATCH] Driver Core: remove driver model detach_state
[linux-2.6/verdex.git] / arch / cris / arch-v10 / boot / rescue / Makefile
blobe9f2ba2ad02cbbe5ac11ef008414026e72ddbd31
2 # Makefile for rescue code
4 ifndef TOPDIR
5 TOPDIR = ../../../..
6 endif
7 CC = gcc-cris -mlinux -I $(TOPDIR)/include
8 CFLAGS = -O2
9 LD = gcc-cris -mlinux -nostdlib
10 OBJCOPY = objcopy-cris
11 OBJCOPYFLAGS = -O binary --remove-section=.bss
13 all: rescue.bin testrescue.bin kimagerescue.bin
15 rescue: rescue.bin
16 # do nothing
18 rescue.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)
23 testrescue.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
31 kimagerescue.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
39 head.o: head.S
40 $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
42 testrescue.o: testrescue.S
43 $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
45 kimagerescue.o: kimagerescue.S
46 $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
48 clean:
49 rm -f *.o *.bin
51 fastdep:
53 modules:
55 modules-install: