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

Version: -  FREEBSD  -  FREEBSD11  -  FREEBSD10  -  FREEBSD9  -  FREEBSD92  -  FREEBSD91  -  FREEBSD90  -  FREEBSD8  -  FREEBSD82  -  FREEBSD81  -  FREEBSD80  -  FREEBSD7  -  FREEBSD74  -  FREEBSD73  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  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  -  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.mips
    2 # $FreeBSD: stable/11/sys/conf/Makefile.mips 299993 2016-05-16 23:56:31Z adrian $
    3 #
    4 # Makefile for FreeBSD
    5 #
    6 # This makefile is constructed from a machine description:
    7 #       config machineid
    8 # Most changes should be made in the machine description
    9 #       /sys/mips/conf/``machineid''
   10 # after which you should do
   11 #        config machineid
   12 # Generic makefile changes should be made in
   13 #       /sys/conf/Makefile.mips
   14 # after which config should be rerun for all machines.
   15 #
   16 
   17 # Which version of config(8) is required.
   18 %VERSREQ=       600012
   19 
   20 STD8X16FONT?=   iso
   21 
   22 .if !defined(S)
   23 .if exists(./@/.)
   24 S=      ./@
   25 .else
   26 S=      ../../..
   27 .endif
   28 .endif
   29 .include "$S/conf/kern.pre.mk"
   30 
   31 INCLUDES+= -I$S/contrib/libfdt
   32 
   33 LDSCRIPT_NAME?=ldscript.$M
   34 SYSTEM_LD:= ${SYSTEM_LD:$S/conf/${LDSCRIPT_NAME}=${LDSCRIPT_NAME}}
   35 SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/${LDSCRIPT_NAME}=${LDSCRIPT_NAME}}
   36 
   37 KERNLOADADDR?=0x80001000
   38 # This obscure value is defined by CFE for WR160N
   39 # To be changed later
   40 TRAMPLOADADDR?=0x807963c0
   41 
   42 # We default to the MIPS32 ISA, if none specified in the
   43 # kernel configuration file.
   44 ARCH_FLAGS?=-march=mips32
   45 EXTRA_FLAGS=-fno-pic -mno-abicalls -G0 -DKERNLOADADDR=${KERNLOADADDR}
   46 
   47 HACK_EXTRA_FLAGS=-shared
   48 
   49 # We add the -fno-pic flag to kernels because otherwise performance
   50 # is extremely poor, as well as -mno-abicalls to force no ABI usage.
   51 CFLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS)
   52 HACK_EXTRA_FLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS)
   53 TRAMP_ARCH_FLAGS?=$(ARCH_FLAGS)
   54 TRAMP_EXTRA_FLAGS=${EXTRA_FLAGS} ${TRAMP_ARCH_FLAGS}
   55 .if ${MACHINE_ARCH:Mmips64*} != ""
   56 TRAMP_ELFSIZE=64
   57 .else
   58 TRAMP_ELFSIZE=32
   59 .endif
   60 
   61 ASM_CFLAGS+=${CFLAGS} -D_LOCORE -DLOCORE
   62 
   63 .if !defined(WITHOUT_KERNEL_TRAMPOLINE)
   64 KERNEL_EXTRA=trampoline
   65 KERNEL_EXTRA_INSTALL=${KERNEL_KO}.tramp.bin
   66 trampoline: ${KERNEL_KO}.tramp.bin
   67 ${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/$M/$M/elf_trampoline.c \
   68         $S/$M/$M/inckern.S 
   69         ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \
   70                 -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp
   71         sed -e s/${KERNLOADADDR}/${TRAMPLOADADDR}/ -e s/" + SIZEOF_HEADERS"// \
   72                  ${LDSCRIPT_NAME} > ${LDSCRIPT_NAME}.tramp.noheader
   73         ${CC} -O -nostdlib -I. -I$S ${TRAMP_EXTRA_FLAGS} ${TRAMP_LDFLAGS} -Xlinker \
   74                 -T -Xlinker ${LDSCRIPT_NAME}.tramp.noheader \
   75                 -DKERNNAME="\"${KERNEL_KO}.tmp\"" -DELFSIZE=${TRAMP_ELFSIZE} \
   76                 $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c \
   77                 -o ${KERNEL_KO}.tramp.elf
   78         ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.elf \
   79                 ${KERNEL_KO}.tramp.bin
   80 .endif
   81 
   82 %BEFORE_DEPEND
   83 
   84 %OBJS
   85 
   86 %FILES.c
   87 
   88 %FILES.s
   89 
   90 %FILES.m
   91 
   92 %CLEAN
   93 
   94 CLEAN+= ${LDSCRIPT_NAME} ${LDSCRIPT_NAME}.tramp.noheader \
   95         ${KERNEL_KO}.tramp.elf ${KERNEL_KO}.tramp.bin
   96 
   97 ${LDSCRIPT_NAME}: $S/conf/${LDSCRIPT_NAME}
   98         sed s/KERNLOADADDR/${KERNLOADADDR}/g $S/conf/${LDSCRIPT_NAME} \
   99                 > ${LDSCRIPT_NAME}
  100 %RULES
  101 
  102 .include "$S/conf/kern.post.mk"

Cache object: 76b863c370d5f68d69e4c534a5615056


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