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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [m68knommu/] [platform/] [5204/] [Rules.make] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#
2
# 68EZ328/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
# Copyright (C) 1998,1999  D. Jeff Dionne 
12
# Copyright (C) 1998       Kenneth Albanowski 
13
# Copyright (C) 1994 by Hamish Macdonald
14
#
15
 
16
CROSS_COMPILE = m68k-coff-
17
 
18
LIBGCC = `$(CC) -v 2>&1 | grep specs | sed -e "s/Reading specs from //" | sed -e s/specs/m68000\\\/libgcc.a/`
19
 
20
CFLAGS := $(CFLAGS) -pipe -DNO_MM -DNO_FPU -m5200 -Wa,-S -Wa,-m5200 -D__COFF__ -DMAGIC_ROM_PTR -DNO_FORGET -DUTS_SYSNAME='"uClinux"'
21
AFLAGS := $(AFLAGS) -pipe -DNO_MM -DNO_FPU -m5200 -Wa,-S -Wa,-m5200 -D__COFF__ -DMAGIC_ROM_PTR -DUTS_SYSNAME='"uClinux"'
22
 
23
LINKFLAGS = -T arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/$(MODEL).ld
24
 
25
HEAD := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o
26
 
27
INIT_B := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/init_$(MODEL).b
28
STOB   := arch/$(ARCH)/platform/$(PLATFORM)/tools/stob
29
 
30
SUBDIRS := arch/$(ARCH)/kernel arch/$(ARCH)/mm arch/$(ARCH)/lib \
31
           arch/$(ARCH)/platform/$(PLATFORM) $(SUBDIRS)
32
ARCHIVES := arch/$(ARCH)/kernel/kernel.o arch/$(ARCH)/mm/mm.o \
33
            arch/$(ARCH)/platform/$(PLATFORM)/platform.o $(ARCHIVES)
34
LIBS += arch/$(ARCH)/lib/lib.a $(LIBGCC)
35
 
36
ifdef CONFIG_FRAMEBUFFER
37
SUBDIRS := $(SUBDIRS) arch/$(ARCH)/console
38
ARCHIVES := $(ARCHIVES) arch/$(ARCH)/console/console.a
39
endif
40
 
41
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
42
 
43
romfs.s19: romfs.img arch/$(ARCH)/empty.o
44
        $(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
45
        $(CROSS_COMPILE)objcopy -O srec romfs.s19
46
 
47
romfs.b: romfs.s19
48
        $(STOB) romfs.s19 > romfs.b
49
 
50
linux.data: linux
51
        $(CROSS_COMPILE)objcopy -O binary --remove-section=.romvec --remove-section=.text --remove-section=.ramvec --remove-section=.bss --remove-section=.eram linux linux.data
52
 
53
linux.text: linux
54
        $(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
55
 
56
romfs.img:
57
        echo creating a vmlinux rom image without root filesystem!
58
 
59
linux.bin: linux.text linux.data romfs.img
60
        if [ -f romfs.img ]; then\
61
                cat linux.text linux.data romfs.img > linux.bin;\
62
        else\
63
                cat linux.text linux.data > linux.bin;\
64
        fi
65
 
66
flash.s19: linux.bin arch/$(ARCH)/empty.o
67
        $(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
68
        $(CROSS_COMPILE)objcopy -O srec flash.s19
69
 
70
flash.b: flash.s19
71
        $(STOB) flash.s19 > flash.b
72
 
73
linux.s19: linux
74
        $(CROSS_COMPILE)objcopy -O srec --adjust-section-vma=.data=0x`$(CROSS_COMPILE)nm linux | awk '/__data_rom_start/ {printf $$1}'` linux linux.s19
75
 
76
        $(CROSS_COMPILE)objcopy -O srec linux.s19
77
 
78
linux.b: linux.s19
79
        if [ -f $(INIT_B) ]; then\
80
                cp $(INIT_B) linux.b;\
81
        fi
82
        $(STOB) linux.s19 >> linux.b
83
 
84
archclean:
85
        @$(MAKEBOOT) clean
86
        rm -f linux.text linux.data linux.bin linux.rom linux.trg
87
        rm -f linux.s19 romfs.s19 flash.s19
88
        rm -f linux.img romdisk.img
89
        rm -f linux.b romfs.b flash.b

powered by: WebSVN 2.1.0

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