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-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
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.2/sys/conf/Makefile.arm 278715 2015-02-13 21:26:45Z 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 .else
   45 # We generally don't want fpu instructions in the kernel.
   46 CFLAGS += -mfpu=none
   47 .endif
   48 
   49 .if empty(DDB_ENABLED)
   50 .if defined(WITHOUT_ARM_EABI) && ${COMPILER_TYPE} != "clang"
   51 CFLAGS += -mno-apcs-frame
   52 .endif
   53 .elif !defined(WITHOUT_ARM_EABI)
   54 CFLAGS += -funwind-tables
   55 .if ${COMPILER_TYPE} == "clang"
   56 # clang requires us to tell it to emit assembly with unwind information
   57 CFLAGS += -mllvm -arm-enable-ehabi
   58 .endif
   59 .endif
   60 
   61 # hack because genassym.c includes sys/bus.h which includes these.
   62 genassym.o: bus_if.h device_if.h
   63 
   64 SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \
   65           -warn-common -export-dynamic -dynamic-linker /red/herring -o \
   66            ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o
   67 SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript.$M\
   68                 >ldscript.$M.noheader; \
   69                 ${SYSTEM_LD_}; \
   70                 ${OBJCOPY} -S -O binary ${FULLKERNEL}.noheader \
   71                 ${KERNEL_KO}.bin; \
   72                 rm ${FULLKERNEL}.noheader
   73 
   74 .if defined(MFS_IMAGE)
   75 SYSTEM_LD_TAIL += ;sh ${S}/tools/embed_mfs.sh ${KERNEL_KO}.bin ${MFS_IMAGE};
   76 .endif
   77 
   78 FILES_CPU_FUNC = \
   79         $S/$M/$M/cpufunc_asm_arm9.S \
   80         $S/$M/$M/cpufunc_asm_arm10.S \
   81         $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \
   82         $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \
   83         $S/$M/$M/cpufunc_asm_fa526.S $S/$M/$M/cpufunc_asm_sheeva.S \
   84         $S/$M/$M/cpufunc_asm_pj4b.S $S/$M/$M/cpufunc_asm_armv6.S \
   85         $S/$M/$M/cpufunc_asm_armv7.S
   86 
   87 .if defined(KERNPHYSADDR)
   88 KERNEL_EXTRA=trampoline
   89 KERNEL_EXTRA_INSTALL=kernel.gz.tramp
   90 trampoline: ${KERNEL_KO}.tramp
   91 ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c
   92         echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h 
   93         sed s/${KERNVIRTADDR}/${KERNPHYSADDR}/ ldscript.$M > ldscript.$M.tramp
   94         sed s/" + SIZEOF_HEADERS"// ldscript.$M.tramp > \
   95             ldscript.$M.tramp.noheader
   96         echo "#include <machine/asm.h>" >tmphack.S
   97         echo "ENTRY(_start)" >>tmphack.S
   98         echo "bl _startC" >>tmphack.S
   99         ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \
  100             -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp
  101         eval $$(stat -s ${KERNEL_KO}.tmp) && \
  102             echo "#define KERNSIZE $$st_size" >>opt_kernname.h
  103         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \
  104             tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
  105             ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp
  106         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \
  107             ldscript.$M.tramp.noheader \
  108             tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
  109             ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader 
  110         ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
  111             ${KERNEL_KO}.tramp.bin 
  112         ${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp 
  113         echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" >opt_kernname.h 
  114         eval $$(stat -s ${KERNEL_KO}.tmp) && \
  115             echo "#define KERNSIZE $$st_size" >>opt_kernname.h
  116         gzip -f9 ${KERNEL_KO}.tmp
  117         eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \
  118             echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h
  119         ${CC} -O2 -ffreestanding -DKZIP -I. -I$S -c $S/kern/inflate.c -o \
  120             inflate-tramp.o
  121         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \
  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}.gz.tramp
  124         ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \
  125             ldscript.$M.tramp.noheader \
  126             -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
  127             $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader
  128         ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
  129             ${KERNEL_KO}.gz.tramp.bin
  130         rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \
  131             inflate-tramp.o tmphack.S
  132 .endif
  133 
  134 MKMODULESENV+=  MACHINE=${MACHINE}
  135 
  136 %BEFORE_DEPEND
  137 
  138 %OBJS
  139 
  140 %FILES.c
  141 
  142 %FILES.s
  143 
  144 %FILES.m
  145 
  146 %CLEAN
  147 
  148 CLEAN+= ldscript.$M ${KERNEL_KO}.bin ldscript.$M.noheader
  149 
  150 CLEAN+= ${KERNEL_KO}.tramp ${KERNEL_KO}.tramp.bin ldscript.$M.tramp \
  151         ldscript.$M.tramp.noheader ${KERNEL_KO}.gz.tramp \
  152         ${KERNEL_KO}.gz.tramp.bin
  153 
  154 ldscript.$M: $S/conf/ldscript.$M
  155         cat $S/conf/ldscript.$M|sed s/KERNPHYSADDR/${KERNPHYSADDR}/g| \
  156           sed s/KERNVIRTADDR/${KERNVIRTADDR}/g > ldscript.$M
  157 %RULES
  158         
  159 .include "$S/conf/kern.post.mk"

Cache object: 32e6209671b7541b5c46e4b8725b6457


[ 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.