From owner-svn-src-all@freebsd.org Mon May 16 23:56:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF473B3EBB9; Mon, 16 May 2016 23:56:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CC6F1EF7; Mon, 16 May 2016 23:56:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4GNuVMh095460; Mon, 16 May 2016 23:56:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4GNuVfk095459; Mon, 16 May 2016 23:56:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201605162356.u4GNuVfk095459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 16 May 2016 23:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299993 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2016 23:56:32 -0000 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 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