]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/cris/boot/rescue/Makefile
CRIS: Merge machine dependent boot/compressed and boot/rescue
[net-next-2.6.git] / arch / cris / boot / rescue / Makefile
similarity index 63%
rename from arch/cris/arch-v10/boot/rescue/Makefile
rename to arch/cris/boot/rescue/Makefile
index 82ab59b968e5a2f6a2838cbf13fda474b8577f7b..52bd0bd1dd22f20e2d11e5d5e492b0e4ed2fb67a 100644 (file)
@@ -2,16 +2,26 @@
 # Makefile for rescue (bootstrap) code
 #
 
-ccflags-y += -O2 $(LINUXINCLUDE)
+# CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
+# ccflags-$(CONFIG_ETRAX_ARCH_V32) += -I$(srctree)/include/asm/arch/mach/ \
+#                                  -I$(srctree)/include/asm/arch
+# asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch
+# LD = gcc-cris -mlinux -march=v32 -nostdlib
+
 asflags-y += $(LINUXINCLUDE)
-ldflags-y += -T $(srctree)/$(src)/rescue.lds
+ccflags-y += -O2 $(LINUXINCLUDE)
+arch-$(CONFIG_ETRAX_ARCH_V10) = v10
+arch-$(CONFIG_ETRAX_ARCH_V32) = v32
+
+ldflags-y += -T $(srctree)/$(src)/rescue_$(arch-y).lds
 OBJCOPYFLAGS = -O binary --remove-section=.bss
-obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
-OBJECT := $(obj)/head.o
+obj-$(CONFIG_ETRAX_ARCH_V32) = $(obj)/head_v32.o
+obj-$(CONFIG_ETRAX_ARCH_V10) = $(obj)/head_v10.o
+OBJECTS := $(obj-y)
 
 targets := rescue.o rescue.bin
 
-$(obj)/rescue.o: $(OBJECT) FORCE
+$(obj)/rescue.o: $(OBJECTS) FORCE
        $(call if_changed,ld)
 
 $(obj)/rescue.bin: $(obj)/rescue.o FORCE
@@ -26,6 +36,7 @@ $(obj)/testrescue.bin: $(obj)/testrescue.o
        dd if=testrescue_tmp.bin of=$(obj)/testrescue.bin bs=1 count=784
        rm tr.bin tmp2423 testrescue_tmp.bin
 
+
 $(obj)/kimagerescue.bin: $(obj)/kimagerescue.o
        $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/kimagerescue.o ktr.bin
 # Pad it to 784 bytes, that's what the rescue loader expects
@@ -33,3 +44,4 @@ $(obj)/kimagerescue.bin: $(obj)/kimagerescue.o
        cat ktr.bin tmp2423 >kimagerescue_tmp.bin
        dd if=kimagerescue_tmp.bin of=$(obj)/kimagerescue.bin bs=1 count=784
        rm ktr.bin tmp2423 kimagerescue_tmp.bin
+