diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-11 15:43:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-11 15:43:41 -0400 |
commit | 1d80cac0fe44fb87b2a3d35fddd7f534ea81cd90 (patch) | |
tree | 53b3e76a70e4ca6f77e29bcd47124d8b6a0b208e /arch/cris/boot/rescue/Makefile | |
parent | 7b5ca22643beba8fdd5b7055e0594a514b3710d7 (diff) | |
parent | 999fb23ef868719b8bd55ee3f6b1f7a8fd8016af (diff) |
Merge branch 'for-linus' of git://repo.or.cz/cris-mirror
* 'for-linus' of git://repo.or.cz/cris-mirror:
CRISv32: Fix typo compile error in ARTPEC-3 gpio driver.
CRIS: Wire up syscalls signalfd4 to writev.
CRISv32: Remove obsolete vcs_hook.o from Makefile
CRIS: Merge machine dependent boot/compressed and boot/rescue
Diffstat (limited to 'arch/cris/boot/rescue/Makefile')
-rw-r--r-- | arch/cris/boot/rescue/Makefile | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/cris/boot/rescue/Makefile b/arch/cris/boot/rescue/Makefile new file mode 100644 index 000000000000..52bd0bd1dd22 --- /dev/null +++ b/arch/cris/boot/rescue/Makefile | |||
@@ -0,0 +1,47 @@ | |||
1 | # | ||
2 | # Makefile for rescue (bootstrap) code | ||
3 | # | ||
4 | |||
5 | # CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE) | ||
6 | # ccflags-$(CONFIG_ETRAX_ARCH_V32) += -I$(srctree)/include/asm/arch/mach/ \ | ||
7 | # -I$(srctree)/include/asm/arch | ||
8 | # asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch | ||
9 | # LD = gcc-cris -mlinux -march=v32 -nostdlib | ||
10 | |||
11 | asflags-y += $(LINUXINCLUDE) | ||
12 | ccflags-y += -O2 $(LINUXINCLUDE) | ||
13 | arch-$(CONFIG_ETRAX_ARCH_V10) = v10 | ||
14 | arch-$(CONFIG_ETRAX_ARCH_V32) = v32 | ||
15 | |||
16 | ldflags-y += -T $(srctree)/$(src)/rescue_$(arch-y).lds | ||
17 | OBJCOPYFLAGS = -O binary --remove-section=.bss | ||
18 | obj-$(CONFIG_ETRAX_ARCH_V32) = $(obj)/head_v32.o | ||
19 | obj-$(CONFIG_ETRAX_ARCH_V10) = $(obj)/head_v10.o | ||
20 | OBJECTS := $(obj-y) | ||
21 | |||
22 | targets := rescue.o rescue.bin | ||
23 | |||
24 | $(obj)/rescue.o: $(OBJECTS) FORCE | ||
25 | $(call if_changed,ld) | ||
26 | |||
27 | $(obj)/rescue.bin: $(obj)/rescue.o FORCE | ||
28 | $(call if_changed,objcopy) | ||
29 | cp -p $(obj)/rescue.bin $(objtree) | ||
30 | |||
31 | $(obj)/testrescue.bin: $(obj)/testrescue.o | ||
32 | $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/testrescue.o tr.bin | ||
33 | # Pad it to 784 bytes | ||
34 | dd if=/dev/zero of=tmp2423 bs=1 count=784 | ||
35 | cat tr.bin tmp2423 >testrescue_tmp.bin | ||
36 | dd if=testrescue_tmp.bin of=$(obj)/testrescue.bin bs=1 count=784 | ||
37 | rm tr.bin tmp2423 testrescue_tmp.bin | ||
38 | |||
39 | |||
40 | $(obj)/kimagerescue.bin: $(obj)/kimagerescue.o | ||
41 | $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/kimagerescue.o ktr.bin | ||
42 | # Pad it to 784 bytes, that's what the rescue loader expects | ||
43 | dd if=/dev/zero of=tmp2423 bs=1 count=784 | ||
44 | cat ktr.bin tmp2423 >kimagerescue_tmp.bin | ||
45 | dd if=kimagerescue_tmp.bin of=$(obj)/kimagerescue.bin bs=1 count=784 | ||
46 | rm ktr.bin tmp2423 kimagerescue_tmp.bin | ||
47 | |||