The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

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

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 # Makefile.arm -- with config changes.
    2 # Copyright 1990 W. Jolitz
    3 #       from: @(#)Makefile.i386 7.1 5/10/91
    4 # $FreeBSD: releng/10.1/sys/conf/Makefile.arm 266311 2014-05-17 13:53:38Z ian $
    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 STD8X16FONT?=   iso
   23 
   24 .if !defined(S)
   25 .if exists(./@/.)
   26 S=      ./@
   27 .else
   28 S=      ../../..
   29 .endif
   30 .endif
   31 .include "$S/conf/kern.pre.mk"
   32 
   33 INCLUDES+= -I$S/contrib/libfdt
   34 
   35 SYSTEM_LD:= ${SYSTEM_LD:$S/conf/ldscript.$M=ldscript.$M}
   36 SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscript.$M=ldscript.$M}
   37 
   38 .if !defined(DEBUG) && !defined(PROFLEVEL)
   39 STRIP_FLAGS = -S
   40 .endif
   41 
   42 .if ${COMPILER_TYPE} != "clang"
   43 CFLAGS += -mno-thumb-interwork
   44 .endif
   45 
   46 .if empty(DDB_ENABLED)
   47 .if defined(WITHOUT_ARM_EABI) && ${COMPILER_TYPE} != "clang"
   48 CFLAGS += -mno-apcs-frame
   49 .endif
   50 .elif !defined(WITHOUT_ARM_EABI)
   51 CFLAGS += -funwind-tables
   52 .if ${COMPILER_TYPE} == "clang"
   53 # clang requires us to tell it to emit assembly with unwind information
   54 CFLAGS += -mllvm -arm-enable-ehabi
   55 .endif
   56 .endif
   57 
   58 # hack because genassym.c includes sys/bus.h which includes these.
   59 genassym.o: bus_if.h device_if.h
   60 
   61 SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \
   62           -warn-common -export-dynamic -dynamic-linker /red/herring -o \
   63            ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o
   64 SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript.$M\
   65                 >ldscript.$M.noheader; \
   66                 ${SYSTEM_LD_}; \
   67                 ${OBJCOPY} -S -O binary ${FULLKERNEL}.noheader \
   68                 ${KERNEL_KO}.bin; \
   69                 rm ${FULLKERNEL}.noheader
   70 
   71 .if defined(MFS_IMAGE)
   72 SYSTEM_LD_TAIL += ;sh ${S}/tools/embed_mfs.sh ${KERNEL_KO}.bin ${MFS_IMAGE};
   73 .endif
   74 
   75 FILES_CPU_FUNC = \
   76         $S/$M/$M/cpufunc_asm_arm9.S \
   77         $S/$M/$M/cpufunc_asm_arm10.S \
   78         $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \
   79         $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \
   80         $S/$M/$M/cpufunc_asm_fa526.S $S/$M/$M/cpufunc_asm_sheeva.S \
   81         $S/$M/$M/cpufunc_asm_pj4b.S $S/$M/$M/cpufunc_asm_armv6.S \
   82         $S/$M/$M/cpufunc_asm_armv7.S
   83 
   84 KERNEL_EXTRA=trampoline
   85 KERNEL_EXTRA_INSTALL=kernel.gz.tramp
   86 trampoline: ${KERNEL_KO}.tramp
   87 ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c
   88         echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h 
   89         sed s/${KERNVIRTADDR}/${KERNPHYSADDR}/ ldscript.$M > ldscript.$M.tramp
   90         sed s/" + SIZEOF_HEADERS"// ldscript.$M.tramp > \
   91             ldscript.$M.tramp.noheader
   92         echo "#include <machine/asm.h>" >tmphack.S
   93         echo "ENTRY(_start)" >>tmphack.S
   94         echo "bl _startC" >>tmphack.S
   95         ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \
   96             -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp
   97         eval $$(stat -s ${KERNEL_KO}.tmp) && \
   98             echo "#define KERNSIZE $$st_size" >>opt_kernname.h
   99         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \
  100             tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
  101             ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp
  102         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \
  103             ldscript.$M.tramp.noheader \
  104             tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
  105             ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader 
  106         ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
  107             ${KERNEL_KO}.tramp.bin 
  108         ${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp 
  109         echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" >opt_kernname.h 
  110         eval $$(stat -s ${KERNEL_KO}.tmp) && \
  111             echo "#define KERNSIZE $$st_size" >>opt_kernname.h
  112         gzip -f9 ${KERNEL_KO}.tmp
  113         eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \
  114             echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h
  115         ${CC} -O2 -ffreestanding -DKZIP -I. -I$S -c $S/kern/inflate.c -o \
  116             inflate-tramp.o
  117         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \
  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}.gz.tramp
  120         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \
  121             ldscript.$M.tramp.noheader \
  122             -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
  123             $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader
  124         ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
  125             ${KERNEL_KO}.gz.tramp.bin
  126         rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \
  127             inflate-tramp.o tmphack.S
  128 
  129 MKMODULESENV+=  MACHINE=${MACHINE}
  130 
  131 %BEFORE_DEPEND
  132 
  133 %OBJS
  134 
  135 %FILES.c
  136 
  137 %FILES.s
  138 
  139 %FILES.m
  140 
  141 %CLEAN
  142 
  143 CLEAN+= ldscript.$M ${KERNEL_KO}.bin ldscript.$M.noheader
  144 
  145 CLEAN+= ${KERNEL_KO}.tramp ${KERNEL_KO}.tramp.bin ldscript.$M.tramp \
  146         ldscript.$M.tramp.noheader ${KERNEL_KO}.gz.tramp \
  147         ${KERNEL_KO}.gz.tramp.bin
  148 
  149 ldscript.$M: $S/conf/ldscript.$M
  150         cat $S/conf/ldscript.$M|sed s/KERNPHYSADDR/${KERNPHYSADDR}/g| \
  151           sed s/KERNVIRTADDR/${KERNVIRTADDR}/g > ldscript.$M
  152 %RULES
  153         
  154 .include "$S/conf/kern.post.mk"

Cache object: a41d954a2ecc49aa24d2674bcdd2ecdd


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


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