Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 23:56:31 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r299993 - head/sys/conf
Message-ID:  <201605162356.u4GNuVfk095459@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Mon May 16 23:56:31 2016
New Revision: 299993
URL: https://svnweb.freebsd.org/changeset/base/299993

Log:
  [mips] Improve MIPS trampoline code
  
  This patch fix trampoline build. inckern.S increases stack and calls _startC
  of elf_trampoline, so inckern.S should be called before elf_trampoline. gcc4.2 puts
  text (code) into image according to order of source files in this call, so order has changed.
  
  In addition make will install trampoline kernel. It allows to use kernel for firmware build.
  
  Submitted by:	Michael Zhilin <mizhka@gmail.com>
  Differential Revision:	https://reviews.freebsd.org/D6242

Modified:
  head/sys/conf/Makefile.mips

Modified: head/sys/conf/Makefile.mips
==============================================================================
--- head/sys/conf/Makefile.mips	Mon May 16 23:54:28 2016	(r299992)
+++ head/sys/conf/Makefile.mips	Mon May 16 23:56:31 2016	(r299993)
@@ -62,6 +62,7 @@ ASM_CFLAGS+=${CFLAGS} -D_LOCORE -DLOCORE
 
 .if !defined(WITHOUT_KERNEL_TRAMPOLINE)
 KERNEL_EXTRA=trampoline
+KERNEL_EXTRA_INSTALL=${KERNEL_KO}.tramp.bin
 trampoline: ${KERNEL_KO}.tramp.bin
 ${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/$M/$M/elf_trampoline.c \
 	$S/$M/$M/inckern.S 
@@ -72,7 +73,7 @@ ${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/
 	${CC} -O -nostdlib -I. -I$S ${TRAMP_EXTRA_FLAGS} ${TRAMP_LDFLAGS} -Xlinker \
 		-T -Xlinker ${LDSCRIPT_NAME}.tramp.noheader \
 		-DKERNNAME="\"${KERNEL_KO}.tmp\"" -DELFSIZE=${TRAMP_ELFSIZE} \
-		$S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
+		$S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c \
 		-o ${KERNEL_KO}.tramp.elf
 	${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.elf \
 		${KERNEL_KO}.tramp.bin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605162356.u4GNuVfk095459>