From patchwork Wed Oct 17 07:32:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 149021 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp318116lji; Wed, 17 Oct 2018 00:30:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV61krAXit+rn4qt9+/HZPSflhQc1jebjX9MrBhYnVdLhSizLSKaFpwh7KAvUKnKVkYTKfqfs X-Received: by 2002:a50:aa22:: with SMTP id o31-v6mr33668492edc.23.1539761434753; Wed, 17 Oct 2018 00:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539761434; cv=none; d=google.com; s=arc-20160816; b=OWjtbKpDr8GLaCU3Zz1Kz32DCS68BFa5LB+p4uR9nCPLS6dDYoLXnwGpdHxbPQHIcs ZZ77oGBdnQvUtFrSunFBbTtUpEGjBZ/0024MwqvsO5WLc5nV4nk692BCjde4NRxZtUJN gHPPW+6oE+8WJwo6I0a/EmYJ18TEbdeQmV51KBRSUgmYFdk6PYln3J8XEB3D3i3kpwlQ rlvmTP7+/z+Fl0FrD2zmuE4tNQpl6fUXcly6vmtqMl3Vj0tdbvhKdm8zRQ/2sFPRuEP/ jJ2qY+IP/3SUHKJYO7vDNkhWVCmJgZXwtJ6o+JwXNEzGhMekVClpH0ivmsogww94x0Mk S6jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:message-id:date:to:from:dkim-signature; bh=Sk+3luVKHIZUg4e/ch0I/5YVB3KG/7gEkjA239kYrIg=; b=tUJ3iJxuvdfKbKi7PW3qXBkfeZxytywezIj0Xgy9D1ZhJVk4UiJK9QkGOphu5iWjls kv7tMo2r8bOHpB6BB5c4KhZ9XrkB27C1+4olAi5UvPn0Fe9aDFE39vwiBnElcj6WnRzu QMUwr3yEXrxxb2tnWK7Utrv0GPSxuuHO95GpbeXJlUTdWZ15WzB1bczms6jX3pmK+mNQ 0nnT3w7lHRGpQfvvSEO5yakjEHTIY/Tgc1zWSH4VueiOheYvaK5JsshB+R7+Ul0AjynJ qJkH1zTVJMMTfkLpE7qOhAp05q/OHRZnCQLcGVthd5jeAPyfeBZcfOml1l3IdSn2R/0b 0gaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="XbzqH/eh"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id n17-v6si2521381edq.35.2018.10.17.00.30.34; Wed, 17 Oct 2018 00:30:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="XbzqH/eh"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 314D0C21C2F; Wed, 17 Oct 2018 07:30:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2FC77C21C27; Wed, 17 Oct 2018 07:30:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C342EC21C27; Wed, 17 Oct 2018 07:30:28 +0000 (UTC) Received: from mail-yw1-f66.google.com (mail-yw1-f66.google.com [209.85.161.66]) by lists.denx.de (Postfix) with ESMTPS id EEE84C21BE5 for ; Wed, 17 Oct 2018 07:30:27 +0000 (UTC) Received: by mail-yw1-f66.google.com with SMTP id j75-v6so9946108ywj.10 for ; Wed, 17 Oct 2018 00:30:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fKaBWdjNSi1rvtD2R2hvsdRP0p0UpNEo1ULdn1P47Uk=; b=XbzqH/ehLTQu866b3e8hY683qEckDEmZJTNxNX7+DO2RnPWD7FeBM/BYmLu4ZwbXmn XclNKY5iAT5/c2f2XpHOiQijX1Z4yaUKqUEnt//Yn36Q99OqZYAD4HyulUYn87GG9mqu NYYFQ7bL5+EKAYUoAbsOysp6XdeSwbQtcN3bE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fKaBWdjNSi1rvtD2R2hvsdRP0p0UpNEo1ULdn1P47Uk=; b=lt+bsJviI05xDU/9yR9s1OLmn3XtRE+FF6o2tnNwHEGgNoP3pX8hcanOjNIr+tJxGK zkUK+RQAIChMuQ09NXsnFRx8ZU9oYcrsl0a42z5eGT/L8FnjBgyxGn9lVobmNy6nPf0y x/EpWJog9Ei22EK6d3PjHxDnDIBk92aAI5fR1ghrJTmsfGQIo9PxvPXgB2bODG+VdszU Ji3YwlVMPRCgOSGOcUQ+KHG6HbZnhLaZ29l2rgInqz9UpqqkK0NZd0neDMtRKr9rCiSr 9LR5TU3009vM9/nmFU/9RVcrH5KdeXaMh6TrsIhguWeJpCqEd5pUu7+h5I20BSxY3NDx NGSw== X-Gm-Message-State: ABuFfoj3icG/5+nDn9KtEUaoU6wQ+b2uOy1/TTQlyDeB6RA51f3jb8zC kCF3FLw5nniuzfPXlN6+rZBX3A== X-Received: by 2002:a0d:eb82:: with SMTP id u124-v6mr14293804ywe.40.1539761426444; Wed, 17 Oct 2018 00:30:26 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id c142-v6sm4530035ywa.81.2018.10.17.00.30.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 00:30:25 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com, agraf@suse.de Date: Wed, 17 Oct 2018 16:32:01 +0900 Message-Id: <20181017073207.13150-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 0/6] efi: make efi and bootmgr more usable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch set is a collection of patches to enhance efi user interfaces /commands. It will help improve user experience on efi boot and make it more usable without edk2's shell utility. Patch#1 to #4 are for efishell. Patch#5 and #6 are for bootmgr. Let's see how it works: => efishell boot add 1 SHELL mmc 0:1 /Shell.efi "" => efishell boot add 2 HELLO mmc 0:1 /hello.efi "" => efishell boot dump Boot0001: attributes: A-- (0x00000001) label: SHELL file_path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,MBR,0x086246ba,0x800,0x40000)/\\Shell.efi data: Boot0002: attributes: A-- (0x00000001) label: HELLO file_path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,MBR,0x086246ba,0x800,0x40000)/\\hello.efi data: => efishell boot order 1 2 => efishell boot order 1: Boot0001: SHELL 2: Boot0002: HELLO => bootefi bootmgr -2 WARNING: booting without device tree Booting: HELLO ## Starting EFI application at 000000007db8b040 ... Hello, world! ## Application terminated, r = 0 => efishell setvar PlatformLang en <--- important! => efishell bootmgr -1 or efishell bootmgr (shell ...) # The only drawback is that it can be confusing to type "bootefi ..." and "efi(shell) boot ..." :) Enjoy! -Takahiro Akashi AKASHI Takahiro (6): fs: update fs_dev_part in fs_set_blk_dev_with_part() efi_loader: add efi_dp_from_name() efi_loader: bootmgr: add load option helper functions cmd: add efishell command bootefi: carve out fdt parameter handling efi_loader: bootmgr: run an EFI application of a given load option cmd/Makefile | 2 +- cmd/bootefi.c | 112 +++---- cmd/efishell.c | 531 +++++++++++++++++++++++++++++++ fs/fs.c | 1 + include/efi_loader.h | 32 +- lib/efi_loader/efi_bootmgr.c | 76 +++-- lib/efi_loader/efi_device_path.c | 47 +++ 7 files changed, 721 insertions(+), 80 deletions(-) create mode 100644 cmd/efishell.c