summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes/ostree/ostree.bb6
-rw-r--r--recipes/ostree/ostree/0001-Don-t-require-boot-uEnv.txt-for-u-boot-support.patch62
2 files changed, 67 insertions, 1 deletions
diff --git a/recipes/ostree/ostree.bb b/recipes/ostree/ostree.bb
index 4700f08..96931f1 100644
--- a/recipes/ostree/ostree.bb
+++ b/recipes/ostree/ostree.bb
@@ -27,7 +27,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
27 27
28inherit autotools pkgconfig 28inherit autotools pkgconfig
29 29
30SRC_URI = "git://github.com/GNOME/ostree.git;tag=v2015.7" 30SRC_URI = " \
31 git://github.com/GNOME/ostree.git;tag=v2015.9 \
32 file://0001-Don-t-require-boot-uEnv.txt-for-u-boot-support.patch \
33 "
34
31S = "${WORKDIR}/git" 35S = "${WORKDIR}/git"
32 36
33DEPENDS = "glib-2.0 e2fsprogs gpgme attr libsoup-2.4 libgsystem libassuan xz" 37DEPENDS = "glib-2.0 e2fsprogs gpgme attr libsoup-2.4 libgsystem libassuan xz"
diff --git a/recipes/ostree/ostree/0001-Don-t-require-boot-uEnv.txt-for-u-boot-support.patch b/recipes/ostree/ostree/0001-Don-t-require-boot-uEnv.txt-for-u-boot-support.patch
new file mode 100644
index 0000000..8e1be94
--- /dev/null
+++ b/recipes/ostree/ostree/0001-Don-t-require-boot-uEnv.txt-for-u-boot-support.patch
@@ -0,0 +1,62 @@
1From ca0a0261be6397d5acb7a4fa2a492c5b554fb1fe Mon Sep 17 00:00:00 2001
2From: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
3Date: Tue, 6 Oct 2015 23:43:25 +0200
4Subject: [PATCH] Don't require /boot/uEnv.txt for u-boot support
5
6The current code checks if /boot/uEnv.txt is a symlink to
7decice if sysroot requires u-boot support. Why this is bad:
8
9There are 2 ways to provide a custom env to u-boot from user space:
10
111) A compiled binary that is sourced from u-boot.
122) A text file (usually /uEnv.txt) that is imported into env from u-boot.
13
14The current OSTree u-boot integration code was designed with the 1st
15case in mind.
16
17Many bootscripts provided by an embedded device vendors expect
18to find uEnv.txt in the top level directory, it is often hardcoded
19when building u-boot and is difficult to change later on. Or in other
20cases it is stored in read-only memory so changing it would require
21re-flushing boot loader with a new env. So the issue here is that
22OSTree's and vendor uEnv.txt want to exist on the same path and OSTree
23would throw away any changes added to /uEnv.txt by user on the next
24upgrade/deploy.
25
26This patch "hides" away the OSTree's env file loader/uEnv.txt from users
27who are used to edditing uEnv.txt at the top level directory. Now to add
28OSTree support on such boards you can simply add a custom logic in uEnv.txt
29that loads ostree env from /loader/uEnv.txt
30
31This change is backward compatible with the previous ostree releases and
32solves the issue described in:
33
34https://bugzilla.gnome.org/show_bug.cgi?id=755787
35---
36 src/libostree/ostree-bootloader-uboot.c | 4 ++--
37 1 file changed, 2 insertions(+), 2 deletions(-)
38
39diff --git a/src/libostree/ostree-bootloader-uboot.c b/src/libostree/ostree-bootloader-uboot.c
40index 4c0218f..f67e9bd 100644
41--- a/src/libostree/ostree-bootloader-uboot.c
42+++ b/src/libostree/ostree-bootloader-uboot.c
43@@ -52,7 +52,7 @@ _ostree_bootloader_uboot_query (OstreeBootloader *bootloader,
44 {
45 OstreeBootloaderUboot *self = OSTREE_BOOTLOADER_UBOOT (bootloader);
46
47- *out_is_active = g_file_query_file_type (self->config_path, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL) == G_FILE_TYPE_SYMBOLIC_LINK;
48+ *out_is_active = g_file_query_file_type (self->config_path, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL) == G_FILE_TYPE_REGULAR;
49 return TRUE;
50 }
51
52@@ -177,6 +177,6 @@ _ostree_bootloader_uboot_new (OstreeSysroot *sysroot)
53 {
54 OstreeBootloaderUboot *self = g_object_new (OSTREE_TYPE_BOOTLOADER_UBOOT, NULL);
55 self->sysroot = g_object_ref (sysroot);
56- self->config_path = g_file_resolve_relative_path (self->sysroot->path, "boot/uEnv.txt");
57+ self->config_path = g_file_resolve_relative_path (self->sysroot->path, "boot/loader/uEnv.txt");
58 return self;
59 }
60--
612.1.4
62