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$
    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 .endif
   44 
   45 
   46 .if !defined(DEBUG) && !defined(PROFLEVEL)
   47 STRIP_FLAGS = -S
   48 .endif
   49 
   50 DDB_ENABLED!=   grep DDB opt_ddb.h || true
   51 
   52 .if empty(DDB_ENABLED)
   53 CFLAGS += -mno-apcs-frame
   54 .endif
   55 
   56 SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader \
   57           -warn-common -export-dynamic -dynamic-linker /red/herring -o \
   58            ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o
   59 SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript.$M\
   60                 >ldscript.$M.noheader; \
   61                 ${SYSTEM_LD_}; \
   62                 ${OBJCOPY} -S -O binary ${FULLKERNEL}.noheader \
   63                 ${KERNEL_KO}.bin; \
   64                 rm ${FULLKERNEL}.noheader
   65 
   66 FILES_CPU_FUNC =        $S/$M/$M/cpufunc_asm_arm7tdmi.S \
   67         $S/$M/$M/cpufunc_asm_arm8.S $S/$M/$M/cpufunc_asm_arm9.S \
   68         $S/$M/$M/cpufunc_asm_sa1.S $S/$M/$M/cpufunc_asm_arm10.S \
   69         $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \
   70         $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S
   71 trampoline: ${KERNEL_KO}.tramp
   72 ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c
   73         echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h 
   74         sed s/${KERNVIRTADDR}/${KERNPHYSADDR}/ ldscript.$M > ldscript.$M.tramp
   75         sed s/" + SIZEOF_HEADERS"// ldscript.$M.tramp > \
   76         ldscript.$M.tramp.noheader
   77         echo "#include <machine/asm.h>" >tmphack.S
   78         echo "ENTRY(_start)" >>tmphack.S
   79         echo "bl _startC" >>tmphack.S
   80         ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \
   81         -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp
   82         eval $$(stat -s ${KERNEL_KO}.tmp) && \
   83         echo "#define KERNSIZE $$st_size" >>opt_kernname.h
   84         ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \
   85         tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
   86         ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp
   87         ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \
   88         tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
   89         ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader 
   90         ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
   91         ${KERNEL_KO}.tramp.bin 
   92         ${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp 
   93         echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" \
   94         >opt_kernname.h 
   95         eval $$(stat -s ${KERNEL_KO}.tmp) && \
   96         echo "#define KERNSIZE $$st_size" >>opt_kernname.h
   97         gzip -9 ${KERNEL_KO}.tmp
   98         eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \
   99         echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h
  100         ${CC} -O2 -DKZIP -I. -c $S/kern/inflate.c -o inflate-tramp.o
  101         ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \
  102         -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
  103         $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp
  104         ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \
  105         -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
  106         $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader
  107         ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
  108         ${KERNEL_KO}.gz.tramp.bin
  109         rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \
  110         inflate-tramp.o tmphack.S
  111 
  112 %BEFORE_DEPEND
  113 
  114 %OBJS
  115 
  116 %FILES.c
  117 
  118 %FILES.s
  119 
  120 %FILES.m
  121 
  122 %CLEAN
  123 
  124 CLEAN+= ldscript.$M ${KERNEL_KO}.bin ldscript.$M.noheader
  125 
  126 .if ${DDB_ENABLED} != ""
  127 CLEAN+= ${KERNEL_KO}.tramp ${KERNEL_KO}.tramp.bin ldscript.$M.tramp \
  128         ldscript.$M.tramp.noheader ${KERNEL_KO}.gz.tramp \
  129         ${KERNEL_KO}.gz.tramp.bin
  130 
  131 .endif
  132 ldscript.$M: $S/conf/ldscript.$M
  133         cat $S/conf/ldscript.$M|sed s/KERNPHYSADDR/${KERNPHYSADDR}/g| \
  134           sed s/KERNVIRTADDR/${KERNVIRTADDR}/g > ldscript.$M
  135 %RULES
  136         
  137 .include "$S/conf/kern.post.mk"

Cache object: feca0491049e96fba74d684908ed7324


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