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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [or32/] [Rules.make] - Blame information for rev 666

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

Line No. Rev Author Line
1 666 simons
#
2
# or32/Makefile
3
#
4
# This file is included by the global makefile so that you can add your own
5
# platform-specific flags and dependencies.
6
#
7
# This file is subject to the terms and conditions of the GNU General Public
8
# License.  See the file "COPYING" in the main directory of this archive
9
# for more details.
10
#
11
# Based on m68k/Rules.make
12
#
13
 
14
CROSS_COMPILE =or32-rtems-
15
 
16
LIBGCC = /projects/or32-rtems/lib/gcc-lib/or32-rtems/2.95.2/libgcc.a
17
 
18
CFLAGS := $(CFLAGS) -pipe -DNO_MM -DNO_FPU -D__COFF__ -DMAGIC_ROM_PTR -DNO_FORGET -DUTS_SYSNAME='"uClinux"'
19
AFLAGS := $(AFLAGS) -pipe -DNO_MM -DNO_FPU -D__COFF__ -DMAGIC_ROM_PTR -DUTS_SYSNAME='"uClinux"'
20
 
21
LINKFLAGS = -T arch/$(ARCH)/board/$(MODEL).ld
22
 
23
INIT_B := arch/$(ARCH)/board/init_$(MODEL).b
24
STOB   := arch/$(ARCH)/tools/stob
25
 
26
SUBDIRS := arch/$(ARCH)/kernel arch/$(ARCH)/mm arch/$(ARCH)/lib \
27
           arch/$(ARCH)/board $(SUBDIRS)
28
ARCHIVES := arch/$(ARCH)/kernel/kernel.o arch/$(ARCH)/mm/mm.o \
29
            arch/$(ARCH)/board/board.o $(ARCHIVES)
30
LIBS += arch/$(ARCH)/lib/lib.a $(LIBGCC)
31
 
32
ifdef CONFIG_FRAMEBUFFER
33
SUBDIRS := $(SUBDIRS) arch/$(ARCH)/console
34
ARCHIVES := $(ARCHIVES) arch/$(ARCH)/console/console.a
35
endif
36
 
37
romfs.s19: romfs.img arch/$(ARCH)/empty.o
38
        $(CROSS_COMPILE)objcopy -v -R .text -R .data -R .bss --add-section=.fs=romfs.img --adjust-section-vma=.fs=$(ROMFS_LOAD_ADDR) arch/$(ARCH)/empty.o romfs.s19
39
        $(CROSS_COMPILE)objcopy -O srec romfs.s19
40
 
41
romfs.b: romfs.s19
42
        $(STOB) romfs.s19 > romfs.b
43
 
44
linux.data: linux
45
        $(CROSS_COMPILE)objcopy -O binary --remove-section=.romvec --remove-section=.text --remove-section=.ramvec --remove-section=.bss --remove-section=.eram linux linux.data
46
 
47
linux.text: linux
48
        $(CROSS_COMPILE)objcopy -O binary --remove-section=.ramvec --remove-section=.bss --remove-section=.data --remove-section=.eram --set-section-flags=.romvec=CONTENTS,ALLOC,LOAD,READONLY,CODE linux linux.text
49
 
50
romfs.img:
51
        echo creating a vmlinux rom image without root filesystem!
52
 
53
linux.bin: linux.text linux.data romfs.img
54
        if [ -f romfs.img ]; then\
55
                cat linux.text linux.data romfs.img > linux.bin;\
56
        else\
57
                cat linux.text linux.data > linux.bin;\
58
        fi
59
 
60
flash.s19: linux.bin arch/$(ARCH)/empty.o
61
        $(CROSS_COMPILE)objcopy -v -R .text -R .data -R .bss --add-section=.fs=linux.bin --adjust-section-vma=.fs=$(FLASH_LOAD_ADDR) arch/$(ARCH)/empty.o flash.s19
62
        $(CROSS_COMPILE)objcopy -O srec flash.s19
63
 
64
flash.b: flash.s19
65
        $(STOB) flash.s19 > flash.b
66
 
67
linux.trg linux.rom: linux.bin
68
        perl arch/$(ARCH)/tools/fixup.pl
69
 
70
linux.s19: linux
71
        $(CROSS_COMPILE)objcopy -O srec --adjust-section-vma=.data=0x`$(CROSS_COMPILE)nm linux | awk '/__data_rom_start/ {printf $$1}'` linux linux.s19
72
 
73
        $(CROSS_COMPILE)objcopy -O srec linux.s19
74
 
75
linux.b: linux.s19
76
        if [ -f $(INIT_B) ]; then\
77
                cp $(INIT_B) linux.b;\
78
        fi
79
        $(STOB) linux.s19 >> linux.b
80
 
81
archclean:
82
        rm -f linux.text linux.data linux.bin linux.rom linux.trg
83
        rm -f linux.s19 romfs.s19 flash.s19
84
        rm -f linux.img romdisk.img
85
        rm -f linux.b romfs.b flash.b

powered by: WebSVN 2.1.0

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