]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - arch/cris/arch-v10/boot/rescue/Makefile
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
[mirror_ubuntu-jammy-kernel.git] / arch / cris / arch-v10 / boot / rescue / Makefile
CommitLineData
1da177e4 1#
63e6b9a0 2# Makefile for rescue (bootstrap) code
1da177e4 3#
3e41d652
MS
4
5CC = gcc-cris -mlinux $(LINUXINCLUDE)
546cc148
JN
6ccflags-y += -O2
7asflags-y += -traditional
1da177e4 8LD = gcc-cris -mlinux -nostdlib
546cc148 9ldflags-y += -T $(obj)/rescue.ld
1da177e4
LT
10OBJCOPY = objcopy-cris
11OBJCOPYFLAGS = -O binary --remove-section=.bss
63e6b9a0
JN
12obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
13OBJECT := $(obj)/head.o
1da177e4 14
63e6b9a0 15targets := rescue.o rescue.bin
1da177e4 16
63e6b9a0
JN
17$(obj)/rescue.o: $(OBJECT) FORCE
18 $(call if_changed,ld)
1da177e4 19
63e6b9a0
JN
20$(obj)/rescue.bin: $(obj)/rescue.o FORCE
21 $(call if_changed,objcopy)
22 cp -p $(obj)/rescue.bin $(objtree)
23
24$(obj)/testrescue.bin: $(obj)/testrescue.o
25 $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/testrescue.o tr.bin
1da177e4
LT
26# Pad it to 784 bytes
27 dd if=/dev/zero of=tmp2423 bs=1 count=784
28 cat tr.bin tmp2423 >testrescue_tmp.bin
63e6b9a0 29 dd if=testrescue_tmp.bin of=$(obj)/testrescue.bin bs=1 count=784
1da177e4
LT
30 rm tr.bin tmp2423 testrescue_tmp.bin
31
63e6b9a0
JN
32$(obj)/kimagerescue.bin: $(obj)/kimagerescue.o
33 $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/kimagerescue.o ktr.bin
1da177e4
LT
34# Pad it to 784 bytes, that's what the rescue loader expects
35 dd if=/dev/zero of=tmp2423 bs=1 count=784
36 cat ktr.bin tmp2423 >kimagerescue_tmp.bin
63e6b9a0 37 dd if=kimagerescue_tmp.bin of=$(obj)/kimagerescue.bin bs=1 count=784
1da177e4 38 rm ktr.bin tmp2423 kimagerescue_tmp.bin