From owner-freebsd-current@freebsd.org Sun Jul 31 06:51:36 2016 Return-Path: Delivered-To: freebsd-current@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 56DF1BA9A70 for ; Sun, 31 Jul 2016 06:51:36 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 456E41DB8 for ; Sun, 31 Jul 2016 06:51:35 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u6V6pXSg021028 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Sat, 30 Jul 2016 23:51:34 -0700 Subject: Re: EFI boot: can we make loader.efi work as BOOT{x64, aa64, arm, ia32}.efi? To: freebsd-current@freebsd.org References: <5bf35d8a-9941-9c6e-ea0a-20827ad26466@delphij.net> From: Nathan Whitehorn Message-ID: <5489f1ff-d6db-c0e3-2be3-d3ae115a1f85@freebsd.org> Date: Sat, 30 Jul 2016 23:51:33 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <5bf35d8a-9941-9c6e-ea0a-20827ad26466@delphij.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVZdbkwf1vBqircHmv/cDS2dQEfrGZMRxzNu4p3AJSqgKA4wcB45txF+HecY2K5t2lJHuPdZff6zESeH81XwyKviWnZEs6+UsXM= X-Sonic-ID: C;vNoaOOtW5hGm1q/hcgQksw== M;mn1YOOtW5hGm1q/hcgQksw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2016 06:51:36 -0000 On 07/30/16 23:20, Xin Li wrote: > Hi, > > I finally got some time to explore the UEFI boot process (kudos to > everyone who made this work!) and getting myself familiarize with the > basics. > > One quick question -- Is there some technical restriction that prevents > us from merging boot1.efi and loader.efi into one binary? > > Cheers, > No technical reason (and, in fact, when you boot from CD, that's how it works). The reason they are different is that we traditionally don't mount the EFI partition and so make installworld can't replace things there. boot1.efi is a basically static piece of code that doesn't need updates and can load loader, which does get updates, from a UFS/ZFS system. loader.efi additionally assumes that it is started from the same partition that contains the kernel, loader.conf, fstab, etc., which are also generally not on the EFI partition (except in the CD case). -Nathan