From owner-freebsd-current@freebsd.org Mon Aug 1 05:45:55 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 048E1BA7B4E for ; Mon, 1 Aug 2016 05:45:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (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 C287611BE for ; Mon, 1 Aug 2016 05:45:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22d.google.com with SMTP id f6so157770254ith.0 for ; Sun, 31 Jul 2016 22:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OGmqLfEYJh7RM48dlwbbfuND+XVkf0B+uK8gR9kKn+0=; b=M7PBBx4mC+Fnf8i4K/V9l2QfqAg9xs55SDwB7XJA4RSxguQMRtV1MlfTocc66B8iiS RxxB3B6743rCUWp/lmuVPmgIBd3Hf7nYuyNi4nxQsqUg5ebdqBhGj1Al3YNEd+ZsNLzT YA+Ra3MO3EMO6+WoDRzmu7HvmuzRKsammO7jsd7nNVzTu7LeE07/yJNrWS69Icxobwyo 4n7cpO0bhaomAVlG4U966I4/p7eE2wjh5ueEaj8qIlm8VAJUCY93INdqtyFRBDA77oMS 9hfycnbC1S54z3OnsS1UBw53yOCq1gPucyyro6cx5WZfEojh0eTb/3DCUvFhjQ1EP/qd Xhew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=OGmqLfEYJh7RM48dlwbbfuND+XVkf0B+uK8gR9kKn+0=; b=I/HQ7JBUEGajD7X44ZOZ78K3h+QRGaAalKeE6MYAm1KmlO524cxyvGn5oooLkXuHYY JwTBgT3wyA4kAe71J+IrtX4alqk92cj4+zCXVtuExXUU0ZYDF/B3B0ybe7+ZbpazwcG4 /VeF5evy8K6z3xmUsCFlxVR4YkK0v/rLOKerhHFzUfxpGSEH+TbA40hwrh5nTFFCNuLJ 6NhgrnDM4RLM4X6BMcHC8e58Ki20Gkvl/bkY0UKQHh3mLeZJ5MPYUwwT4aKbJF6LF0gh c38gM2IDmsNNexKx2WU4Idc3KHzKvLQ1ycbICVuj7qpziuxT58Q9I5o+7AhaxflN5FBs +DRg== X-Gm-Message-State: AEkoousbB8S0Wz4oMCFsHjGR5iGWRpZeGm4VlK7ejD0N1bAMYxJ1WED57LXFaacIzOaIqze1wnCRDsxK5C48+g== X-Received: by 10.36.69.36 with SMTP id y36mr11622618ita.72.1470030353422; Sun, 31 Jul 2016 22:45:53 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.137.131 with HTTP; Sun, 31 Jul 2016 22:45:52 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <5bf35d8a-9941-9c6e-ea0a-20827ad26466@delphij.net> References: <5bf35d8a-9941-9c6e-ea0a-20827ad26466@delphij.net> From: Warner Losh Date: Sun, 31 Jul 2016 23:45:52 -0600 X-Google-Sender-Auth: gYvN7u7yF3ue3Goz1cAJOuDP6hg Message-ID: Subject: Re: EFI boot: can we make loader.efi work as BOOT{x64, aa64, arm, ia32}.efi? To: Xin Li Cc: FreeBSD Current , Xin LI Content-Type: text/plain; charset=UTF-8 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: Mon, 01 Aug 2016 05:45:55 -0000 On Sun, Jul 31, 2016 at 12:20 AM, 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? Yes. There's many technical reasons. Don't do it. loader.efi loads all the forth stuff from the partition it was loaded from. If you merge, it cannot do that. boot.efi should implement the UEFI boot manager protocol, but doesn't. Once it does, it can't be merged with loader.efi. We have deep issues with loader.efi if you have any system that's even a little complex. As these issues have come up, some have been fixed, but others haven't. It hasn't been possible, without ugly hacks, to boot off ping / pong partitions on the same disk for example. Please do not do this. It is a really bad idea. Warner