{"id":812148,"url":"http://patchwork.ozlabs.org/api/patches/812148/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20170910132236.14318-13-robdclark@gmail.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170910132236.14318-13-robdclark@gmail.com>","list_archive_url":null,"date":"2017-09-10T13:22:33","name":"[U-Boot,v1,12/12] HACK: efi_loader: hacks for SCT","commit_ref":null,"pull_url":null,"state":"superseded","archived":true,"hash":"16e956331ecb499896dfcf300360052f7e23bf17","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/?format=json","name":"Rob Clark","email":"robdclark@gmail.com"},"delegate":{"id":3400,"url":"http://patchwork.ozlabs.org/api/users/3400/?format=json","username":"agraf","first_name":"Alexander","last_name":"Graf","email":"agraf@suse.de"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20170910132236.14318-13-robdclark@gmail.com/mbox/","series":[{"id":2401,"url":"http://patchwork.ozlabs.org/api/series/2401/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=2401","date":"2017-09-10T13:22:21","name":"efi_loader+video: support for Shell.efi","version":1,"mbox":"http://patchwork.ozlabs.org/series/2401/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/812148/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/812148/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"dh2ZclPn\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xqsMz0f1rz9s7g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 10 Sep 2017 23:29:03 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid D48DCC21EE4; Sun, 10 Sep 2017 13:26:53 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 53153C21E1D;\n\tSun, 10 Sep 2017 13:24:10 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid CD902C21F94; Sun, 10 Sep 2017 13:23:32 +0000 (UTC)","from mail-qk0-f172.google.com (mail-qk0-f172.google.com\n\t[209.85.220.172])\n\tby lists.denx.de (Postfix) with ESMTPS id D7EEFC21F56\n\tfor <u-boot@lists.denx.de>; Sun, 10 Sep 2017 13:23:23 +0000 (UTC)","by mail-qk0-f172.google.com with SMTP id b82so14298512qkc.4\n\tfor <u-boot@lists.denx.de>; Sun, 10 Sep 2017 06:23:23 -0700 (PDT)","from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a])\n\tby smtp.gmail.com with ESMTPSA id\n\tg31sm4526589qtg.21.2017.09.10.06.23.20\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 10 Sep 2017 06:23:21 -0700 (PDT)"],"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=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=FVOt/YC/ElIJ+vQG6Z0RsNRlZ0fWOtQcY9X24GXgOrg=;\n\tb=dh2ZclPn9scRVi3G6OUHmdS8ygw6PhoFSuVwPWABV30iF3kOQEdO83h4DTqkDLY88o\n\tMGRmx3dY61ge4sFdyO4LIgEbGakuGYJGNg/zr4JNhA2ly1bN4XC8H/23PkbrHsm/DF9H\n\tujzNaxkY3PaSyLHMq/t53axUf3JBjaV3/vkOuDiE1b0jQgwjFHBv/LxeFX/8yDjR4pAD\n\tartKyjwMUfWvJuomWkWJvykrmTUlgYJTr2NA+36w7htzQm2DK5OfmRj0gNNxz04gbI5B\n\t80f/KuTKMwgOiB9BbZ3Mh7NU6saznqbebt6oBxv1EZEvdT4j5sbgMSNfSyEll2HP2qJi\n\tM/nA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=FVOt/YC/ElIJ+vQG6Z0RsNRlZ0fWOtQcY9X24GXgOrg=;\n\tb=AN91SYlILDh+irr51uZhIhc7FV/4QzHBkcFH6GsOrfNJAW7ltAplMGZG+jeWtUjmeA\n\tD34TamKQQdDMp6HLgxsrKEDsnjvVJ0AZrqLTVgKxQcJ5LFYiC/A7na8suXrFmBdwoW2w\n\tUS3UJScxa+MvUsKtFTl6aKLCPlWR4ZQubAAMktV7yBRSXYoMB0zpbc/WXD+jZAWUzW+r\n\tk++zPnvkDCrlnXLZ3U4evtM7PK3Y2olvZZAQcV8Gtosd2kj+XG3UnkIfMuuZJXcRMS2c\n\tQdYaIXQn09h+mNgVdQOgGfXsav5zebwgkhYw3Q4C4rgM/NYYtPLECTdGYukRWHGZk9PC\n\tr7gA==","X-Gm-Message-State":"AHPjjUiRSw/mCg+ncemYji40k14GST7VRdOnl0W1ZkVXR7sfcQHiRaAP\n\t+p/ZysaXQ0nS5tDGqIw=","X-Google-Smtp-Source":"AOwi7QBWDhBwPW44VcIusomxaLTWQ8bjfgSJKfBG1PUSvPe21/sKosyHtB/Q5pxlpCUvrL6D8lDpMw==","X-Received":"by 10.55.165.81 with SMTP id o78mr10891944qke.313.1505049802570; \n\tSun, 10 Sep 2017 06:23:22 -0700 (PDT)","From":"Rob Clark <robdclark@gmail.com>","To":"U-Boot Mailing List <u-boot@lists.denx.de>","Date":"Sun, 10 Sep 2017 09:22:33 -0400","Message-Id":"<20170910132236.14318-13-robdclark@gmail.com>","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170910132236.14318-1-robdclark@gmail.com>","References":"<20170910132236.14318-1-robdclark@gmail.com>","Cc":"Heinrich Schuchardt <xypron.glpk@gmx.de>,\n\tLeif Lindholm <leif.lindholm@linaro.org>","Subject":"[U-Boot] [PATCH v1 12/12] HACK: efi_loader: hacks for SCT","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"Not intended to be merged, just to show the remaning TODOs to get\nSCT.efi working.\n---\n include/config_distro_bootcmd.h |  2 +-\n lib/efi_loader/efi_boottime.c   |  4 ++--\n lib/efi_loader/efi_console.c    |  3 ++-\n lib/efi_loader/efi_file.c       | 11 +++++++++--\n 4 files changed, 14 insertions(+), 6 deletions(-)","diff":"diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h\nindex e0d0034ed3..e232a62996 100644\n--- a/include/config_distro_bootcmd.h\n+++ b/include/config_distro_bootcmd.h\n@@ -88,7 +88,7 @@\n \n #ifdef CONFIG_EFI_LOADER\n #if defined(CONFIG_ARM64)\n-#define BOOTEFI_NAME \"bootaa64.efi\"\n+#define BOOTEFI_NAME \"shell.efi\"\n #elif defined(CONFIG_ARM)\n #define BOOTEFI_NAME \"bootarm.efi\"\n #endif\ndiff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\nindex 9628bef474..5db8ea9090 100644\n--- a/lib/efi_loader/efi_boottime.c\n+++ b/lib/efi_loader/efi_boottime.c\n@@ -172,7 +172,7 @@ static efi_status_t efi_unsupported(const char *funcname)\n static unsigned long EFIAPI efi_raise_tpl(UINTN new_tpl)\n {\n \tEFI_ENTRY(\"0x%zx\", new_tpl);\n-\treturn EFI_EXIT(0);\n+\treturn EFI_EXIT(TPL_APPLICATION);\n }\n \n static void EFIAPI efi_restore_tpl(UINTN old_tpl)\n@@ -1021,7 +1021,7 @@ static efi_status_t EFIAPI efi_set_watchdog_timer(unsigned long timeout,\n {\n \tEFI_ENTRY(\"%ld, 0x%\"PRIx64\", %ld, %p\", timeout, watchdog_code,\n \t\t  data_size, watchdog_data);\n-\treturn efi_unsupported(__func__);\n+\treturn EFI_EXIT(EFI_SUCCESS);\n }\n \n static efi_status_t EFIAPI efi_connect_controller(\ndiff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c\nindex fcd65ca488..139f7ea55b 100644\n--- a/lib/efi_loader/efi_console.c\n+++ b/lib/efi_loader/efi_console.c\n@@ -561,7 +561,8 @@ static efi_status_t EFIAPI efi_cin_ex_register_key_notify(\n \t\tefi_handle_t *notify_handle)\n {\n \tEFI_ENTRY(\"%p, %p, %p\", this, notify_fn, notify_handle);\n-\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n+//\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n+\treturn EFI_EXIT(EFI_SUCCESS);\n }\n \n static efi_status_t EFIAPI efi_cin_ex_unregister_key_notify(\ndiff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c\nindex 118d83ad7c..d66b0d0370 100644\n--- a/lib/efi_loader/efi_file.c\n+++ b/lib/efi_loader/efi_file.c\n@@ -218,8 +218,8 @@ static efi_status_t EFIAPI efi_file_delete(struct efi_file_handle *file)\n {\n \tstruct file_handle *fh = to_fh(file);\n \tEFI_ENTRY(\"%p\", file);\n-\tfile_close(fh);\n-\treturn EFI_EXIT(EFI_WARN_DELETE_FAILURE);\n+\t// TODO need fs_rm()..\n+\treturn EFI_EXIT(file_close(fh));\n }\n \n static efi_status_t file_read(struct file_handle *fh, u64 *buffer_size,\n@@ -340,6 +340,13 @@ static efi_status_t EFIAPI efi_file_write(struct efi_file_handle *file,\n \n \tEFI_ENTRY(\"%p, %p, %p\", file, buffer_size, buffer);\n \n+\t// XXX hack because fat_write is horrible:\n+\tif (!fs_exists(fh->path)) {\n+\t\tchar *p = fh->path;\n+\t\twhile ((p = strchr(p, '/')))\n+\t\t\t*p++ = '_';\n+\t}\n+\n \tif (set_blk_dev(fh)) {\n \t\tret = EFI_DEVICE_ERROR;\n \t\tgoto error;\n","prefixes":["U-Boot","v1","12/12"]}