OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [cris/] [boot/] [rescue/] [Makefile] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#
2
# Makefile for rescue code
3
#
4
ifndef TOPDIR
5
TOPDIR = ../../../..
6
HPATH = $(TOPDIR)/include
7
export HPATH
8
endif
9
CC = gcc-cris -mlinux -I $(TOPDIR)/include
10
CFLAGS = -O2
11
LD = gcc-cris -mlinux -nostdlib
12
OBJCOPY = objcopy-cris
13
 
14
all: rescue.bin testrescue.bin kimagerescue.bin
15
 
16
rescue: rescue.bin
17
        # do nothing
18
 
19
rescue.bin: head.o
20
        $(LD) -T rescue.ld -o rescue.o head.o
21
        $(OBJCOPY) -O binary --remove-section=.bss rescue.o rescue.bin
22
        cp rescue.bin $(TOPDIR)
23
 
24
testrescue.bin: testrescue.o
25
        $(OBJCOPY) -O binary --remove-section=.bss testrescue.o tr.bin
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
29
        dd if=testrescue_tmp.bin of=testrescue.bin bs=1 count=784
30
        rm tr.bin tmp2423 testrescue_tmp.bin
31
 
32
kimagerescue.bin: kimagerescue.o
33
        $(OBJCOPY) -O binary --remove-section=.bss kimagerescue.o ktr.bin
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
37
        dd if=kimagerescue_tmp.bin of=kimagerescue.bin bs=1 count=784
38
        rm ktr.bin tmp2423 kimagerescue_tmp.bin
39
 
40
head.o: head.S
41
        $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
42
 
43
testrescue.o: testrescue.S
44
        $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
45
 
46
kimagerescue.o: kimagerescue.S
47
        $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
48
 
49
clean:
50
        rm -f *.o *.bin
51
 
52
fastdep:
53
 
54
modules:
55
 
56
modules_install:
57
 
58
depend:
59
        $(CC) -M *.S > .depend
60
 
61
-include .depend

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.