From owner-svn-src-stable@freebsd.org Fri Jan 15 01:02:36 2016 Return-Path: Delivered-To: svn-src-stable@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 660EEA82D53 for ; Fri, 15 Jan 2016 01:02:36 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA4E21E2F for ; Fri, 15 Jan 2016 01:02:35 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x236.google.com with SMTP id l65so1937709wmf.1 for ; Thu, 14 Jan 2016 17:02:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZLsa1N++t7Nw0w+6Rfakmv9MdplOzStmjTmPdNx5TWY=; b=ZeBi9jVnu9N+V4ORP/k/ggx8x7+pjUs5BRcsceORmTRUqvIZAnsnwXWAkq5QFwfnfX 2wlZrs81Ob/Mc+1yCCfidpRjKMg9EoDTP54gaavuT2CTaes2ZA4AkGq8ERX4fzmGrwdP QVYDxxFXBJ0ketPvcOfJtugDDdtsBWtlYLAsnppvux3KFrIUDvjAIs/g4yJ3LHOErxCR nLdjxa4b23Y/d+XhfgHe/rMC5hur2X6857m3Rp0H6yX783FtXwlmV42QQgCecXTqAcRn c7sZRROS5So8RIgSxBrbgWxku+zuZFmcHbFr1rbHFB+cVBkxopRCB4aqCFyTuopShGSY aEmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ZLsa1N++t7Nw0w+6Rfakmv9MdplOzStmjTmPdNx5TWY=; b=GbQtSsR9vfpM/mJ8ArYOJ2ePNYu5oURD3Ll3bZlR8V5uC0SSh9m+kM+2KQMV1zjThs x5m3A9123NXSLO0+ScB+y6JvN5DtvVmN6zsmoFDwYgbUs3j4ZYT0qY4KNeH0Ukq7JnYt LHSwz3NmJlSHNLWpqiFOHKsYf5rRpybq3ohw4Gyn+P6+ZRitQJWBCR4kP9eyoaodpycr N6nzeNWWZIUqnNZ61WDjGUMTW5A38flm3R287cGQRHRA03UFKA3LknPk/K68t0L6Q1Pu pmGsrjnTQIz9TCt1k2CGXThWtX/yJs+HPA65IFY36tspjquDuKfRFzJAG7ydHDde3CB9 Gh0A== X-Gm-Message-State: AG10YOTgbzH0igh1N6xbyo0XNqOwJ64rUiRQfuekqk3+8BEZkO6YFRx9x/e0Umasn2DVqtncEYbtxzZeH7KhkWRW MIME-Version: 1.0 X-Received: by 10.28.189.197 with SMTP id n188mr326799wmf.22.1452819754113; Thu, 14 Jan 2016 17:02:34 -0800 (PST) Received: by 10.194.85.167 with HTTP; Thu, 14 Jan 2016 17:02:33 -0800 (PST) In-Reply-To: <201601070222.u072MjTs098126@repo.freebsd.org> References: <201601070222.u072MjTs098126@repo.freebsd.org> Date: Fri, 15 Jan 2016 02:02:33 +0100 Message-ID: Subject: Re: svn commit: r293297 - in stable/10/sys/boot/efi: . boot1 loader loader/arch loader/arch/amd64 From: Oliver Pinter To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2016 01:02:36 -0000 On 1/7/16, Ed Maste wrote: > Author: emaste > Date: Thu Jan 7 02:22:45 2016 > New Revision: 293297 > URL: https://svnweb.freebsd.org/changeset/base/293297 > > Log: > MFC r280950: Move the efi loaders to be under sys/boot/efi > > In HEAD this was done to support UEFI on arm64. Merging to stable/10 to > facilitate the merging of later UEFI changes. > > Added: > stable/10/sys/boot/efi/boot1/ > stable/10/sys/boot/efi/boot1/Makefile (contents, props changed) > stable/10/sys/boot/efi/boot1/Makefile.fat (contents, props changed) > stable/10/sys/boot/efi/boot1/boot1.c (contents, props changed) > stable/10/sys/boot/efi/boot1/fat.tmpl.bz2.uu (contents, props changed) > stable/10/sys/boot/efi/boot1/generate-fat.sh (contents, props changed) > stable/10/sys/boot/efi/loader/ > stable/10/sys/boot/efi/loader/Makefile (contents, props changed) > stable/10/sys/boot/efi/loader/arch/ > stable/10/sys/boot/efi/loader/arch/amd64/ > stable/10/sys/boot/efi/loader/arch/amd64/Makefile.inc (contents, props > changed) > stable/10/sys/boot/efi/loader/arch/amd64/amd64_tramp.S (contents, props > changed) > stable/10/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c (contents, > props changed) > stable/10/sys/boot/efi/loader/arch/amd64/framebuffer.c (contents, props > changed) > stable/10/sys/boot/efi/loader/arch/amd64/framebuffer.h (contents, props > changed) > stable/10/sys/boot/efi/loader/arch/amd64/ldscript.amd64 (contents, props > changed) > stable/10/sys/boot/efi/loader/arch/amd64/reloc.c (contents, props > changed) > stable/10/sys/boot/efi/loader/arch/amd64/start.S (contents, props > changed) > stable/10/sys/boot/efi/loader/autoload.c (contents, props changed) > stable/10/sys/boot/efi/loader/bootinfo.c (contents, props changed) > stable/10/sys/boot/efi/loader/conf.c (contents, props changed) > stable/10/sys/boot/efi/loader/copy.c (contents, props changed) > stable/10/sys/boot/efi/loader/devicename.c (contents, props changed) > stable/10/sys/boot/efi/loader/loader_efi.h (contents, props changed) > stable/10/sys/boot/efi/loader/main.c (contents, props changed) > stable/10/sys/boot/efi/loader/version (contents, props changed) > Modified: > stable/10/sys/boot/efi/Makefile > stable/10/sys/boot/efi/Makefile.inc > > Modified: stable/10/sys/boot/efi/Makefile > ============================================================================== > --- stable/10/sys/boot/efi/Makefile Thu Jan 7 02:06:14 2016 (r293296) > +++ stable/10/sys/boot/efi/Makefile Thu Jan 7 02:22:45 2016 (r293297) > @@ -2,4 +2,8 @@ > > SUBDIR= libefi > > +.if ${MACHINE_CPUARCH} == "amd64" > +SUBDIR+= loader boot1 > +.endif > + > .include > > Modified: stable/10/sys/boot/efi/Makefile.inc > ============================================================================== > --- stable/10/sys/boot/efi/Makefile.inc Thu Jan 7 02:06:14 2016 (r293296) > +++ stable/10/sys/boot/efi/Makefile.inc Thu Jan 7 02:22:45 2016 (r293297) > @@ -7,7 +7,10 @@ CFLAGS+= -march=i386 > .endif > > # Options used when building app-specific efi components > +# See conf/kern.mk for the correct set of these > CFLAGS+= -ffreestanding -fshort-wchar -Wformat > +CFLAGS+= -mno-red-zone > +CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float > LDFLAGS+= -nostdlib > > .include "../Makefile.inc" > > Added: stable/10/sys/boot/efi/boot1/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/10/sys/boot/efi/boot1/Makefile Thu Jan 7 02:22:45 > 2016 (r293297) > @@ -0,0 +1,84 @@ > +# $FreeBSD$ > + > +MAN= > + > +.include > + > +# In-tree GCC does not support __attribute__((ms_abi)). > +.if ${COMPILER_TYPE} != "gcc" > + > +MK_SSP= no > + > +PROG= loader.sym > +INTERNALPROG= > + > +# architecture-specific loader code > +SRCS= boot1.c reloc.c start.S > + > +CFLAGS+= -fPIC > +CFLAGS+= -I. > +CFLAGS+= -I${.CURDIR}/../include > +CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} > +CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include > +CFLAGS+= -I${.CURDIR}/../../.. > + > +# Always add MI sources and REGULAR efi loader bits > +.PATH: ${.CURDIR}/../loader/arch/amd64 ${.CURDIR}/../../common > +CFLAGS+= -I${.CURDIR}/../../common > + > +FILES= boot1.efi boot1.efifat > +FILESMODE_boot1.efi= ${BINMODE} > + > +LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH} > +LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc > + > +${PROG}: ${LDSCRIPT} > + > +OBJCOPY?= objcopy > +OBJDUMP?= objdump > + > +.if ${MACHINE_CPUARCH} == "amd64" > +EFI_TARGET= efi-app-x86_64 > +.elif ${MACHINE_CPUARCH} == "i386" > +EFI_TARGET= efi-app-ia32 > +.endif > + > +boot1.efi: loader.sym > + if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \ > + ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \ New build warning on this ^ lines: sh: -t: not found /usr/obj/jenkins/workspace/HardenedBSD-stable-10-STABLE-master-amd64/sys/boot/efi/boot1 66+1 records in 66+1 records out 33811 bytes transferred in 0.000617 secs (54832354 bytes/sec) See the jenkins log: http://jenkins.hardenedbsd.org:8180/jenkins/job/HardenedBSD-stable-10-STABLE-master-amd64/lastSuccessfulBuild/consoleFull Possible solution to add objdump to bootstrap utils. > + exit 1; \ > + fi > + ${OBJCOPY} -j .text -j .sdata -j .data \ > + -j .dynamic -j .dynsym -j .rel.dyn \ > + -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ > + --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} > + > +boot1.o: ${.CURDIR}/../../common/ufsread.c > + > +# The following inserts out objects into a template FAT file system > +# created by generate-fat.sh > + > +.include "${.CURDIR}/Makefile.fat" > + > +boot1.efifat: boot1.efi > + echo ${.OBJDIR} > + uudecode ${.CURDIR}/fat.tmpl.bz2.uu > + mv fat.tmpl.bz2 ${.TARGET}.bz2 > + bzip2 -f -d ${.TARGET}.bz2 > + dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc > + > +CLEANFILES= boot1.efifat > + > +.endif # ${COMPILER_TYPE} != "gcc" > + > +.include > + > +beforedepend ${OBJS}: machine x86 > + > +CLEANFILES+= machine x86 boot1.efi > + > +machine: > + ln -sf ${.CURDIR}/../../../amd64/include machine > + > +x86: > + ln -sf ${.CURDIR}/../../../x86/include x86 > > Added: stable/10/sys/boot/efi/boot1/Makefile.fat > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/10/sys/boot/efi/boot1/Makefile.fat Thu Jan 7 02:22:45 > 2016 (r293297) > @@ -0,0 +1,3 @@ > +# This file autogenerated by generate-fat.sh - DO NOT EDIT > +# $FreeBSD$ > +BOOT1_OFFSET=0x2d >