[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]

FreeBSD/Linux Kernel Cross Reference
sys/conf/Makefile.arm

Version: -  FREEBSD  -  FREEBSD7  -  FREEBSD70  -  FREEBSD6  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  OPENSOLARIS  -  minix-3-1-1  -  TRUSTEDBSD-SEBSD  -  FREEBSD-LIBC  -  FREEBSD7-LIBC  -  FREEBSD6-LIBC  -  GLIBC27 
SearchContext: -  none  -  excerpts  -  bigexcerpts 

  1 # Makefile.arm -- with config changes.
  2 # Copyright 1990 W. Jolitz
  3 #       from: @(#)Makefile.i386 7.1 5/10/91
  4 # $FreeBSD: src/sys/conf/Makefile.arm,v 1.40 2008/10/13 20:07:13 raj Exp $
  5 #
  6 # Makefile for FreeBSD
  7 #
  8 # This makefile is constructed from a machine description:
  9 #       config machineid
 10 # Most changes should be made in the machine description
 11 #       /sys/arm/conf/``machineid''
 12 # after which you should do
 13 #        config machineid
 14 # Generic makefile changes should be made in
 15 #       /sys/conf/Makefile.arm
 16 # after which config should be rerun for all machines.
 17 #
 18 
 19 # Which version of config(8) is required.
 20 %VERSREQ=       600004
 21 
 22 # Temporary stuff while we're still embryonic
 23 NO_MODULES=
 24 
 25 STD8X16FONT?=   iso
 26 
 27 .if !defined(S)
 28 .if exists(./@/.)
 29 S=      ./@
 30 .else
 31 S=      ../../..
 32 .endif
 33 .endif
 34 .include "$S/conf/kern.pre.mk"
 35 
 36 SYSTEM_LD:= ${SYSTEM_LD:$S/conf/ldscript.$M=ldscript.$M}
 37 SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscript.$M=ldscript.$M}
 38 
 39 .if defined(ARM_BIG_ENDIAN)
 40 CC += -mbig-endian
 41 SYSTEM_LD += -EB
 42 LD += -EB
 43 .else
 44 CC += -mlittle-endian
 45 SYSTEM_LD += -EL
 46 LD += -EL
 47 .endif
 48 
 49 
 50 .if !defined(DEBUG) && !defined(PROFLEVEL)
 51 STRIP_FLAGS = -S
 52 .endif
 53 
 54 DDB_ENABLED!=   grep DDB opt_ddb.h || true
 55 
 56 .if empty(DDB_ENABLED)
 57 CFLAGS += -mno-apcs-frame
 58 .endif
 59 
 60 SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader \
 61           -warn-common -export-dynamic -dynamic-linker /red/herring -o \
 62            ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o
 63 SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript.$M\
 64                 >ldscript.$M.noheader; \
 65                 ${SYSTEM_LD_}; \
 66                 ${OBJCOPY} -S -O binary ${FULLKERNEL}.noheader \
 67                 ${KERNEL_KO}.bin; \
 68                 rm ${FULLKERNEL}.noheader
 69 
 70 .if defined(MFS_IMAGE)
 71 SYSTEM_LD_TAIL += ;sh ${S}/tools/embed_mfs.sh ${KERNEL_KO}.bin ${MFS_IMAGE};
 72 .endif
 73 
 74 FILES_CPU_FUNC =        $S/$M/$M/cpufunc_asm_arm7tdmi.S \
 75         $S/$M/$M/cpufunc_asm_arm8.S $S/$M/$M/cpufunc_asm_arm9.S \
 76         $S/$M/$M/cpufunc_asm_sa1.S $S/$M/$M/cpufunc_asm_arm10.S \
 77         $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \
 78         $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \
 79         $S/$M/$M/cpufunc_asm_feroceon.S
 80 KERNEL_EXTRA=trampoline
 81 KERNEL_EXTRA_INSTALL=kernel.gz.tramp
 82 trampoline: ${KERNEL_KO}.tramp
 83 ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c
 84         echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h 
 85         sed s/${KERNVIRTADDR}/${KERNPHYSADDR}/ ldscript.$M > ldscript.$M.tramp
 86         sed s/" + SIZEOF_HEADERS"// ldscript.$M.tramp > \
 87         ldscript.$M.tramp.noheader
 88         echo "#include <machine/asm.h>" >tmphack.S
 89         echo "ENTRY(_start)" >>tmphack.S
 90         echo "bl _startC" >>tmphack.S
 91         ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \
 92         -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp
 93         eval $$(stat -s ${KERNEL_KO}.tmp) && \
 94         echo "#define KERNSIZE $$st_size" >>opt_kernname.h
 95         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \
 96         tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
 97         ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp
 98         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \
 99         ldscript.$M.tramp.noheader \
100         tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
101         ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader 
102         ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
103         ${KERNEL_KO}.tramp.bin 
104         ${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp 
105         echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" \
106         >opt_kernname.h 
107         eval $$(stat -s ${KERNEL_KO}.tmp) && \
108         echo "#define KERNSIZE $$st_size" >>opt_kernname.h
109         gzip -9 ${KERNEL_KO}.tmp
110         eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \
111         echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h
112         ${CC} -O2 -DKZIP -I. -I$S -c $S/kern/inflate.c -o inflate-tramp.o
113         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \
114         -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
115         $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp
116         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \
117         ldscript.$M.tramp.noheader \
118         -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
119         $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader
120         ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
121         ${KERNEL_KO}.gz.tramp.bin
122         rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \
123         inflate-tramp.o tmphack.S
124 
125 %BEFORE_DEPEND
126 
127 %OBJS
128 
129 %FILES.c
130 
131 %FILES.s
132 
133 %FILES.m
134 
135 %CLEAN
136 
137 CLEAN+= ldscript.$M ${KERNEL_KO}.bin ldscript.$M.noheader
138 
139 .if ${DDB_ENABLED} != ""
140 CLEAN+= ${KERNEL_KO}.tramp ${KERNEL_KO}.tramp.bin ldscript.$M.tramp \
141         ldscript.$M.tramp.noheader ${KERNEL_KO}.gz.tramp \
142         ${KERNEL_KO}.gz.tramp.bin
143 
144 .endif
145 ldscript.$M: $S/conf/ldscript.$M
146         cat $S/conf/ldscript.$M|sed s/KERNPHYSADDR/${KERNPHYSADDR}/g| \
147           sed s/KERNVIRTADDR/${KERNVIRTADDR}/g > ldscript.$M
148 %RULES
149         
150 .include "$S/conf/kern.post.mk"

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.