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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [alpha/] [boot/] [Makefile] - Blame information for rev 199

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#
2
# arch/alpha/boot/Makefile
3
#
4
# This file is subject to the terms and conditions of the GNU General Public
5
# License.  See the file "COPYING" in the main directory of this archive
6
# for more details.
7
#
8
# Copyright (C) 1994 by Linus Torvalds
9
#
10
 
11
ifdef CONFIG_CROSSCOMPILE
12
# enable this for linking under OSF/1:
13
LINKFLAGS = -non_shared -T 0x20000000 -N
14
else
15
 elf=$(shell if $(LD) --help | grep elf64alpha >/dev/null; then echo yes; fi)
16
 ifeq ($(elf),yes)
17
  LINKFLAGS = -static -Ttext 0x20000000 -N
18
 else
19
  LINKFLAGS = -static -T bootloader.lds -N
20
 endif
21
endif
22
 
23
.S.s:
24
        $(CC) -D__ASSEMBLY__ -traditional -E -o $*.o $<
25
.S.o:
26
        $(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $<
27
 
28
OBJECTS = head.o main.o
29
BPOBJECTS = head.o bootp.o
30
TARGETS = vmlinux.gz tools/objstrip # also needed by aboot & milo
31
VMLINUX = $(TOPDIR)/vmlinux
32
OBJSTRIP = tools/objstrip
33
 
34
all:    $(TARGETS)
35
        @echo Ready to install kernel in $(shell pwd)/vmlinux.gz
36
 
37
# normally no need to build these:
38
rawboot: vmlinux.nh tools/lxboot tools/bootlx
39
 
40
msb:    tools/lxboot tools/bootlx vmlinux.nh
41
        ( cat tools/lxboot tools/bootlx vmlinux.nh ) > /dev/rz0a
42
        disklabel -rw rz0 'linux' tools/lxboot tools/bootlx
43
 
44
bootimage:      tools/mkbb tools/lxboot tools/bootlx vmlinux.nh
45
        ( cat tools/lxboot tools/bootlx vmlinux.nh ) > bootimage
46
        tools/mkbb bootimage tools/lxboot
47
 
48
bootpfile:      tools/bootph vmlinux.nh
49
        ( cat tools/bootph vmlinux.nh ) > bootpfile
50
 
51
srmboot:        bootdevice bootimage
52
        dd if=bootimage of=$(BOOTDEV) bs=512 seek=1 skip=1
53
        tools/mkbb $(BOOTDEV) tools/lxboot
54
 
55
bootdevice:
56
        @test "$(BOOTDEV)" != ""  || (echo You must specify BOOTDEV ; exit -1)
57
 
58
vmlinux.gz: vmlinux
59
        gzip -fv vmlinux
60
 
61
#
62
# A raw binary without header.  Used by raw boot.
63
#
64
main.o: ksize.h
65
 
66
bootp.o: ksize.h
67
 
68
ksize.h: $(OBJSTRIP) vmlinux.nh
69
        echo "#define KERNEL_SIZE `$(OBJSTRIP) -p vmlinux.nh /dev/null`" > $@
70
 
71
vmlinux.nh: $(VMLINUX) $(OBJSTRIP)
72
ifeq ($(elf),yes)
73
        cp $(VMLINUX) vmlinux.stripped
74
        strip vmlinux.stripped          # work around ELF binutils bug...
75
        $(OBJSTRIP) -v vmlinux.stripped vmlinux.nh
76
        rm -f vmlinux.stripped
77
else
78
        $(OBJSTRIP) -v $(VMLINUX) vmlinux.nh
79
endif
80
 
81
vmlinux: $(TOPDIR)/vmlinux
82
        cp $(TOPDIR)/vmlinux vmlinux
83
        strip vmlinux
84
 
85
tools/lxboot: $(OBJSTRIP) bootloader
86
        $(OBJSTRIP) -p bootloader tools/lxboot
87
 
88
tools/bootlx: bootloader $(OBJSTRIP)
89
        $(OBJSTRIP) -vb bootloader tools/bootlx
90
 
91
tools/bootph: bootpheader $(OBJSTRIP)
92
        $(OBJSTRIP) -vb bootpheader tools/bootph
93
 
94
$(OBJSTRIP): $(OBJSTRIP).c
95
        $(HOSTCC) $(OBJSTRIP).c -o $(OBJSTRIP)
96
 
97
tools/mkbb: tools/mkbb.c
98
        $(HOSTCC) tools/mkbb.c -o tools/mkbb
99
 
100
bootloader: $(OBJECTS)
101
        $(LD) $(LINKFLAGS) \
102
                $(OBJECTS) \
103
                $(LIBS) \
104
                -o bootloader && strip bootloader || \
105
                (rm -f bootloader && exit 1)
106
 
107
bootpheader: $(BPOBJECTS)
108
        $(LD) $(LINKFLAGS) \
109
                $(BPOBJECTS) \
110
                $(LIBS) \
111
                -o bootpheader && strip bootpheader || \
112
                (rm -f bootpheader && exit 1)
113
 
114
clean:
115
        rm -f $(TARGETS) bootloader bootimage vmlinux.nh \
116
                tools/mkbb tools/bootlx tools/lxboot ksize.h
117
 
118
dep:

powered by: WebSVN 2.1.0

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