mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [PATCH 16/16] efi: use an EFI variable to save the environment
Date: Fri, 17 Jul 2015 21:22:49 +0200	[thread overview]
Message-ID: <1437160969-31517-17-git-send-email-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <1437160969-31517-1-git-send-email-m.olbrich@pengutronix.de>

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 arch/efi/efi/efi.c | 5 +++++
 common/efi-guid.c  | 1 +
 include/efi.h      | 1 +
 3 files changed, 7 insertions(+)

diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c
index 07a4d9d0fc57..d3f520f60f14 100644
--- a/arch/efi/efi/efi.c
+++ b/arch/efi/efi/efi.c
@@ -326,8 +326,13 @@ static void fixup_tables(void)
 
 static int efi_init(void)
 {
+	char *env;
+
 	defaultenv_append_directory(env_efi);
 
+	env = xasprintf("/efivars/barebox-env-%pUl", &efi_barebox_vendor_guid);
+	default_environment_path_set(env);
+
 	return 0;
 }
 device_initcall(efi_init);
diff --git a/common/efi-guid.c b/common/efi-guid.c
index f4ff7feadfe4..64f3b1f65fd3 100644
--- a/common/efi-guid.c
+++ b/common/efi-guid.c
@@ -9,6 +9,7 @@ efi_guid_t efi_unknown_device_guid = EFI_UNKNOWN_DEVICE_GUID;
 efi_guid_t efi_null_guid = EFI_NULL_GUID;
 efi_guid_t efi_global_variable_guid = EFI_GLOBAL_VARIABLE_GUID;
 efi_guid_t efi_block_io_protocol_guid = EFI_BLOCK_IO_PROTOCOL_GUID;
+efi_guid_t efi_barebox_vendor_guid = EFI_BAREBOX_VENDOR_GUID;
 efi_guid_t efi_systemd_vendor_guid = EFI_SYSTEMD_VENDOR_GUID;
 
 #define EFI_GUID_STRING(guid, short, long) do {	\
diff --git a/include/efi.h b/include/efi.h
index 5b0de119fb74..b2e965bae1d4 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -485,6 +485,7 @@ extern efi_guid_t efi_unknown_device_guid;
 extern efi_guid_t efi_null_guid;
 extern efi_guid_t efi_global_variable_guid;
 extern efi_guid_t efi_block_io_protocol_guid;
+extern efi_guid_t efi_barebox_vendor_guid;
 extern efi_guid_t efi_systemd_vendor_guid;
 
 #define EFI_SYSTEM_TABLE_SIGNATURE ((u64)0x5453595320494249ULL)
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-07-17 19:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 19:22 [PATCHv2 00/16] EFI updates Michael Olbrich
2015-07-17 19:22 ` [PATCH 01/16] xfuncs: add xasprintf() and xvasprintf() Michael Olbrich
2015-07-17 19:22 ` [PATCH 02/16] xfuncs: add wrapper for wchar strdup functions Michael Olbrich
2015-07-17 19:22 ` [PATCH 03/16] efi: improve malloc pool allocation Michael Olbrich
2015-07-17 19:22 ` [PATCH 04/16] efi: refactor & improve application loading code Michael Olbrich
2015-07-17 19:22 ` [PATCH 05/16] efi: add support for initrd loading Michael Olbrich
2015-07-17 19:22 ` [PATCH 06/16] efi: add helper to get the GPT partition UUID for a device Michael Olbrich
2015-07-17 19:22 ` [PATCH 07/16] efi: export device_path_from_handle() Michael Olbrich
2015-07-17 19:22 ` [PATCH 08/16] efi: add helper functions to write EFI variables Michael Olbrich
2015-07-17 19:22 ` [PATCH 09/16] efi: write volatile EFI variables used by systemd Michael Olbrich
2015-07-17 19:22 ` [PATCH 10/16] efi: use xasprintf() when appropriate Michael Olbrich
2015-07-17 19:22 ` [PATCH 11/16] efi: use xstrdup_* " Michael Olbrich
2015-07-17 19:22 ` [PATCH 12/16] fs: " Michael Olbrich
2015-07-17 19:22 ` [PATCH 13/16] fs: efivars: " Michael Olbrich
2015-07-17 19:22 ` [PATCH 14/16] fs: efivars: add more error checking Michael Olbrich
2015-07-17 19:22 ` [PATCH 15/16] fs: efivars: read the attributes on the second get_variable() Michael Olbrich
2015-07-17 19:22 ` Michael Olbrich [this message]
2015-07-20  5:26 ` [PATCHv2 00/16] EFI updates Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437160969-31517-17-git-send-email-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox