From 03c226dc8e48bb2096f18a3cce833daff6232115 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Fri, 13 Nov 2015 13:14:13 +0100 Subject: Remove unused b2qt-update-framework This reverts commit f309d05bccefc29977d474df734fecbe311f8f7b. Change-Id: Ia25e629247c6863d2ce48e1b8a80029d13248ded Reviewed-by: Gatis Paeglis --- conf/distro/include/nitrogen6x.conf | 13 +--- .../0002-nitrogen6x-update.patch | 84 ---------------------- .../u-boot/u-boot-script-boundary_git.bbappend | 1 - .../b2qt-update-framework/b2qt-update-framework.bb | 45 ------------ 4 files changed, 1 insertion(+), 142 deletions(-) delete mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch delete mode 100644 recipes/b2qt-update-framework/b2qt-update-framework.bb diff --git a/conf/distro/include/nitrogen6x.conf b/conf/distro/include/nitrogen6x.conf index 819960d..3b1b627 100644 --- a/conf/distro/include/nitrogen6x.conf +++ b/conf/distro/include/nitrogen6x.conf @@ -32,17 +32,8 @@ BOOTFS_CONTENT = "\ ${KERNEL_IMAGETYPE}-imx6q-nitrogen6_max.dtb:imx6q-nitrogen6_max.dtb \ 6x_bootscript-${MACHINE}:6x_bootscript \ 6x_upgrade-${MACHINE}:6x_upgrade \ - u-boot-${MACHINE}.imx:u-boot.imx \ - ${KERNEL_IMAGETYPE}:update/${KERNEL_IMAGETYPE} \ - ${KERNEL_IMAGETYPE}-imx6q-${MACHINE}.dtb:update/imx6q-${MACHINE}.dtb \ - ${KERNEL_IMAGETYPE}-imx6dl-${MACHINE}.dtb:update/imx6dl-${MACHINE}.dtb \ - ${KERNEL_IMAGETYPE}-imx6q-sabrelite.dtb:update/imx6q-sabrelite.dtb \ - ${KERNEL_IMAGETYPE}-imx6dl-nit6xlite.dtb:update/imx6dl-nit6xlite.dtb \ - ${KERNEL_IMAGETYPE}-imx6dl-nitrogen6_max.dtb:update/imx6dl-nitrogen6_max.dtb \ - ${KERNEL_IMAGETYPE}-imx6q-nitrogen6_max.dtb:update/imx6q-nitrogen6_max.dtb \ - update/platform:update/platform \ " -BOOTFS_DEPENDS = "u-boot:do_deploy virtual/kernel:do_deploy u-boot-script-boundary:do_deploy b2qt-update-framework:do_deploy" +BOOTFS_DEPENDS = "u-boot:do_deploy virtual/kernel:do_deploy u-boot-script-boundary:do_deploy" EXTRA_IMAGEDEPENDS += "u-boot-script-boundary" @@ -71,6 +62,4 @@ MACHINE_EXTRA_INSTALL_SDK = " \ opencv-dev \ " -B2QT_PLATFORM = "iMX6-eLinux" - ADB_PRODUCTID = "0x0d02" diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch deleted file mode 100644 index dd699d8..0000000 --- a/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 3d7276b2b27317c5067d2095ea5c3952d11f4390 Mon Sep 17 00:00:00 2001 -From: Rainer Keller -Date: Fri, 5 Sep 2014 14:39:50 +0200 -Subject: [PATCH] Add support for update recovery linux - ---- - board/boundary/nitrogen6x/6x_bootscript-yocto.txt | 61 +++++++++++++++++++++++ - 1 file changed, 61 insertions(+) - -diff --git a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt -index 5bc6170..4116ed4 100644 ---- a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt -+++ b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt -@@ -1,3 +1,67 @@ -+# Boot2Qt update part begin -+echo "Boot to Qt" -+mw.b 0x13000000 0x76 1 # v -+mw.b 0x13000001 0x75 1 # u -+mw.b 0x13000002 0x74 1 # t -+mw.b 0x13000003 0x69 1 # i -+ -+fdtaddr=0x12000000 -+ -+if test "x$boot2qt_update_state" = "x" ; then -+ setenv boot2qt_update_state valid -+ saveenv -+fi -+ -+# This is a workaround because environment partition is read-only. -+if fatload mmc 1:1 0x12000000 update/state ; then -+ if cmp.b 0x12000000 0x13000000 1 ; then -+ echo "State: Valid" -+ setenv boot2qt_fat_state valid -+ setenv boot2qt_update_state valid -+ saveenv -+ fi -+ if cmp.b 0x12000000 0x13000001 1 ; then -+ echo "State: Update" -+ setenv boot2qt_fat_state update -+ fi -+ if cmp.b 0x12000000 0x13000002 1 ; then -+ echo "State: Testing" -+ setenv boot2qt_fat_state testing -+ fi -+fi -+ -+if test "x$boot2qt_fat_state" = "xupdate" || test "x$boot2qt_update_state" = "xinvalid" ; then -+ setenv boot2qt_update_state testing -+ saveenv -+ echo "Recovery linux starting..." -+ setenv bootargs "console=ttymxc1,115200 vmalloc=400M consoleblank=0 vt.global_cursor_default=0 root=/dev/ram0" -+ -+ # Guess dtb name -+ dtbname="imx6"; -+ if itest.s x6S != "x$cpu" ; then -+ dtbname=${dtbname}q-; -+ else -+ dtbname=${dtbname}s-; -+ fi -+ -+ if itest.s x == "x$board" ; then -+ board=sabrelite -+ fi -+ dtbname=${dtbname}${board}.dtb; -+ -+ fatload mmc 1:1 ${loadaddr} update/uImage -+ fatload mmc 1:1 ${fdtaddr} update/${dtbname} -+ fatload mmc 1:1 0x13000000 update/uRamdisk -+ bootm ${loadaddr} 0x13000000 ${fdtaddr} -+fi -+ -+if test "x$boot2qt_fat_state" = "xtesting" || test "x$boot2qt_update_state" = "xtesting"; then -+ setenv boot2qt_update_state invalid -+ saveenv -+fi -+ -+# Boot2Qt update part end -+ - # Yocto-specifics - setenv bootpart 2 - setenv bootdir / --- -1.8.5.5 - diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary_git.bbappend b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary_git.bbappend index abbc222..a6cee2b 100644 --- a/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary_git.bbappend +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary_git.bbappend @@ -23,5 +23,4 @@ FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" SRC_URI += " \ file://0001-nitrogen6x-update-bootargs.patch \ - file://0002-nitrogen6x-update.patch \ " diff --git a/recipes/b2qt-update-framework/b2qt-update-framework.bb b/recipes/b2qt-update-framework/b2qt-update-framework.bb deleted file mode 100644 index ceae95a..0000000 --- a/recipes/b2qt-update-framework/b2qt-update-framework.bb +++ /dev/null @@ -1,45 +0,0 @@ -############################################################################# -## -## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -## -## This file is part of the Qt Enterprise Embedded Scripts of the Qt -## framework. -## -## $QT_BEGIN_LICENSE$ -## Commercial License Usage Only -## Licensees holding valid commercial Qt license agreements with Digia -## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, -## may use this file in accordance with the terms contained in said license -## agreement. -## -## For further information use the contact form at -## http://www.qt.io/contact-us. -## -## -## $QT_END_LICENSE$ -## -############################################################################# - -DESCRIPTION = "Boot to Qt update framework" -HOMEPAGE = "http://www.qt.io" -SECTION = "devel" -LICENSE = "CLOSED" - -PV = "1.0.0" -PR = "r0" -SRCREV = "${PV}" - -inherit deploy - -do_deploy() { - install -d ${DEPLOYDIR}/update/ - echo ${B2QT_PLATFORM} > ${DEPLOYDIR}/update/platform -} - -addtask deploy after do_install before do_build - -do_compile[noexec] = "1" -do_install[noexec] = "1" -do_populate_sysroot[noexec] = "1" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3-54-g00ecf From bfc5986a84a0c719dd75a175c9bc4edff6928b5a Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 16 Nov 2015 15:17:59 +0100 Subject: Revert "Build nativesdk-ostree" This reverts commit a5323e1fc1f734036d29da80aca037576e9d94b9. Running GNUPG (OSTree dependency) from toolchain is not supported. Change-Id: I00c5ddedfd06a5c56e64c0b3d45007b740f41a80 Reviewed-by: Gatis Paeglis --- recipes/e2fsprogs/e2fsprogs_%.bbappend | 1 - recipes/glib-networking/glib-networking_%.bbappend | 1 - recipes/gpgme/gpgme_%.bbappend | 1 - recipes/libassuan/libassuan_%.bbappend | 1 - recipes/libgpg-error/libgpg-error_%.bbappend | 1 - recipes/libgsystem/libgsystem.bb | 2 -- recipes/libsoup/libsoup-%.bbappend | 2 -- recipes/ostree/ostree.bb | 2 -- .../packagegroup/nativesdk-packagegroup-b2qt-embedded-toolchain-host.bb | 1 - 9 files changed, 12 deletions(-) delete mode 100644 recipes/e2fsprogs/e2fsprogs_%.bbappend delete mode 100644 recipes/glib-networking/glib-networking_%.bbappend delete mode 100644 recipes/gpgme/gpgme_%.bbappend delete mode 100644 recipes/libassuan/libassuan_%.bbappend delete mode 100644 recipes/libgpg-error/libgpg-error_%.bbappend delete mode 100644 recipes/libsoup/libsoup-%.bbappend diff --git a/recipes/e2fsprogs/e2fsprogs_%.bbappend b/recipes/e2fsprogs/e2fsprogs_%.bbappend deleted file mode 100644 index 608377e..0000000 --- a/recipes/e2fsprogs/e2fsprogs_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes/glib-networking/glib-networking_%.bbappend b/recipes/glib-networking/glib-networking_%.bbappend deleted file mode 100644 index 608377e..0000000 --- a/recipes/glib-networking/glib-networking_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes/gpgme/gpgme_%.bbappend b/recipes/gpgme/gpgme_%.bbappend deleted file mode 100644 index 608377e..0000000 --- a/recipes/gpgme/gpgme_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes/libassuan/libassuan_%.bbappend b/recipes/libassuan/libassuan_%.bbappend deleted file mode 100644 index 608377e..0000000 --- a/recipes/libassuan/libassuan_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes/libgpg-error/libgpg-error_%.bbappend b/recipes/libgpg-error/libgpg-error_%.bbappend deleted file mode 100644 index 2a59083..0000000 --- a/recipes/libgpg-error/libgpg-error_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -BBCLASSEXTEND += "nativesdk" diff --git a/recipes/libgsystem/libgsystem.bb b/recipes/libgsystem/libgsystem.bb index f006a39..d2d1a0b 100644 --- a/recipes/libgsystem/libgsystem.bb +++ b/recipes/libgsystem/libgsystem.bb @@ -39,5 +39,3 @@ do_configure_prepend() { # We get a syntax error since we do not bundle gnome recipes that define this macro. sed -i '/GTK_DOC_CHECK/d' ${S}/configure.ac } - -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes/libsoup/libsoup-%.bbappend b/recipes/libsoup/libsoup-%.bbappend deleted file mode 100644 index 4a95767..0000000 --- a/recipes/libsoup/libsoup-%.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -DEPENDS += "glib-networking" -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes/ostree/ostree.bb b/recipes/ostree/ostree.bb index 96931f1..d506403 100644 --- a/recipes/ostree/ostree.bb +++ b/recipes/ostree/ostree.bb @@ -51,5 +51,3 @@ do_install_append() { # this of course is a broken configure.ac logic. rm -rf ${D}${libdir}/dracut/ } - -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes/packagegroup/nativesdk-packagegroup-b2qt-embedded-toolchain-host.bb b/recipes/packagegroup/nativesdk-packagegroup-b2qt-embedded-toolchain-host.bb index 7591b6b..f64c0ac 100644 --- a/recipes/packagegroup/nativesdk-packagegroup-b2qt-embedded-toolchain-host.bb +++ b/recipes/packagegroup/nativesdk-packagegroup-b2qt-embedded-toolchain-host.bb @@ -30,7 +30,6 @@ RDEPENDS_${PN} = "\ nativesdk-python-modules \ nativesdk-python-misc \ nativesdk-gperf \ - nativesdk-ostree \ ${@base_contains("DISTRO_FEATURES", "wayland", "nativesdk-wayland", "", d)} \ ${MACHINE_EXTRA_INSTALL_SDK_HOST} \ " -- cgit v1.2.3-54-g00ecf From 886e2f139ecc56846203736eb9616f67ccb74d4f Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 16 Nov 2015 15:16:08 +0100 Subject: ostree: Add GNUPG to runtime dependencies. This is required for gpg signing support. Change-Id: Ia1396825453e2038c5d19a4767cadd6f93e1fa28 Reviewed-by: Gatis Paeglis --- recipes/ostree/ostree.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/ostree/ostree.bb b/recipes/ostree/ostree.bb index d506403..ab17671 100644 --- a/recipes/ostree/ostree.bb +++ b/recipes/ostree/ostree.bb @@ -35,6 +35,7 @@ SRC_URI = " \ S = "${WORKDIR}/git" DEPENDS = "glib-2.0 e2fsprogs gpgme attr libsoup-2.4 libgsystem libassuan xz" +RRECOMMENDS_${PN} += "gnupg" EXTRA_OECONF = "--with-dracut --without-selinux --without-libarchive --with-grub2=no --enable-gtk-doc-html=no" -- cgit v1.2.3-54-g00ecf From aed413df1ee31aad6f67eca405ed01d82d628fc7 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 10 Nov 2015 14:52:38 +0100 Subject: ostree: patch upstream project - This allows updating files on the boot partition. - Merges ostree's uEnv.txt with system's uEnv.txt - Adds support for convenience symlinks in top level of the /boot directory. This does not affect the atomic property of an update. Change-Id: Ie654e22d6e26aaa0c1395d226ed967765b0c764b Reviewed-by: Samuli Piippo --- recipes/ostree/ostree.bb | 8 +- ...llow-updating-files-on-the-boot-partition.patch | 92 ++++++++++++++++++ ...-require-boot-uEnv.txt-for-u-boot-support.patch | 62 ------------ ...-boot-Merge-ostree-s-and-systems-uEnv.txt.patch | 99 ++++++++++++++++++++ ...0003-Allow-updating-files-in-root-of-boot.patch | 104 +++++++++++++++++++++ 5 files changed, 301 insertions(+), 64 deletions(-) create mode 100644 recipes/ostree/ostree/0001-Allow-updating-files-on-the-boot-partition.patch delete mode 100644 recipes/ostree/ostree/0001-Don-t-require-boot-uEnv.txt-for-u-boot-support.patch create mode 100644 recipes/ostree/ostree/0002-u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch create mode 100644 recipes/ostree/ostree/0003-Allow-updating-files-in-root-of-boot.patch diff --git a/recipes/ostree/ostree.bb b/recipes/ostree/ostree.bb index ab17671..c4a6f69 100644 --- a/recipes/ostree/ostree.bb +++ b/recipes/ostree/ostree.bb @@ -28,10 +28,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" inherit autotools pkgconfig SRC_URI = " \ - git://github.com/GNOME/ostree.git;tag=v2015.9 \ - file://0001-Don-t-require-boot-uEnv.txt-for-u-boot-support.patch \ + git://github.com/GNOME/ostree.git \ + file://0001-Allow-updating-files-on-the-boot-partition.patch \ + file://0002-u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch \ + file://0003-Allow-updating-files-in-root-of-boot.patch \ " +SRCREV = "efdb4d8f443768e59529c299290bee8b1f8f93c3" + S = "${WORKDIR}/git" DEPENDS = "glib-2.0 e2fsprogs gpgme attr libsoup-2.4 libgsystem libassuan xz" diff --git a/recipes/ostree/ostree/0001-Allow-updating-files-on-the-boot-partition.patch b/recipes/ostree/ostree/0001-Allow-updating-files-on-the-boot-partition.patch new file mode 100644 index 0000000..0905cc1 --- /dev/null +++ b/recipes/ostree/ostree/0001-Allow-updating-files-on-the-boot-partition.patch @@ -0,0 +1,92 @@ +From bbb7a8ce89e3e13672c63fd4f1f19988fdf40014 Mon Sep 17 00:00:00 2001 +From: Gatis Paeglis +Date: Thu, 5 Nov 2015 17:37:54 +0100 +Subject: [PATCH 1/2] Allow updating files on the boot partition + +Until now OSTree copied only vmlinuz and initramfs +binaries to the boot partition. This patch adds support +for copying other files from the /boot directory of the +tree. + +How this works: + +Ignore subdirectories, only files in root of the boot +directory are copied. There is overhead of copying files +to boot partition, therefore the amount of files in the +boot/ should be kept to the minimum and subdirectories +shouldn't really be necessary. + +Files on the boot partition are updated only with major +releases, when kernel/initramfs bootcsum changes. Files +that require frequent updates should not be stored here. +--- + src/libostree/ostree-sysroot-deploy.c | 53 +++++++++++++++++++++++++++++++++++ + 1 file changed, 53 insertions(+) + +diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c +index f7afe3d..4d6534d 100644 +--- a/src/libostree/ostree-sysroot-deploy.c ++++ b/src/libostree/ostree-sysroot-deploy.c +@@ -1340,6 +1340,59 @@ install_deployment_kernel (OstreeSysroot *sysroot, + } + } + ++ { ++ /* Copy other files that are stored in the boot directory. Lets keep this simple: ++ * ++ * - Ignore subdirectories, only files in root of the boot directory are copied. There is ++ * overhead of copying files to boot partition, therefore the amount of files in the boot/ ++ * should be kept to the minimum and subdirectories shouldn't really be necessary. ++ * - Files on the boot partition are updated only with major releases, when kernel/initramfs ++ * bootcsum changes. Files that require frequent updates should not be stored here. ++ */ ++ g_autoptr(GFileEnumerator) dir_enum = NULL; ++ g_autoptr(GFile) deployments_bootdir = g_file_get_child (deployment_dir, "boot"); ++ dir_enum = g_file_enumerate_children (deployments_bootdir, OSTREE_GIO_FAST_QUERYINFO, ++ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, ++ NULL, error); ++ while (TRUE) ++ { ++ GFileInfo *file_info = NULL; ++ g_autoptr(GFile) source_file = NULL; ++ g_autoptr(GFile) dest_file = NULL; ++ g_autoptr(GFile) symlink_target = NULL; ++ GFileType type; ++ const char *name; ++ ++ if (!gs_file_enumerator_iterate (dir_enum, &file_info, NULL, cancellable, error)) ++ goto out; ++ if (file_info == NULL) ++ break; ++ ++ type = g_file_info_get_file_type (file_info); ++ name = g_file_info_get_name (file_info); ++ if (type == G_FILE_TYPE_DIRECTORY) ++ continue; ++ if (type == G_FILE_TYPE_SYMBOLIC_LINK) ++ { ++ symlink_target = g_file_get_child (bootcsumdir, g_file_info_get_symlink_target(file_info)); ++ if (!g_file_query_exists (symlink_target, NULL)) ++ continue; ++ } ++ if (g_str_has_prefix (name, "vmlinuz-") || g_str_has_prefix (name, "initramfs-")) ++ continue; ++ ++ dest_file = g_file_get_child (bootcsumdir, name); ++ if (!g_file_query_exists (dest_file, NULL)) ++ { ++ source_file = g_file_enumerator_get_child (dir_enum, file_info); ++ if (!gs_file_linkcopy_sync_data (source_file, dest_file, ++ G_FILE_COPY_OVERWRITE | G_FILE_COPY_NOFOLLOW_SYMLINKS | G_FILE_COPY_ALL_METADATA, ++ cancellable, error)) ++ goto out; ++ } ++ } ++ } ++ + if (fstatat (deployment_dfd, "usr/lib/os-release", &stbuf, 0) != 0) + { + if (errno != ENOENT) +-- +2.1.4 + 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 deleted file mode 100644 index 8e1be94..0000000 --- a/recipes/ostree/ostree/0001-Don-t-require-boot-uEnv.txt-for-u-boot-support.patch +++ /dev/null @@ -1,62 +0,0 @@ -From ca0a0261be6397d5acb7a4fa2a492c5b554fb1fe Mon Sep 17 00:00:00 2001 -From: Gatis Paeglis -Date: Tue, 6 Oct 2015 23:43:25 +0200 -Subject: [PATCH] Don't require /boot/uEnv.txt for u-boot support - -The current code checks if /boot/uEnv.txt is a symlink to -decice if sysroot requires u-boot support. Why this is bad: - -There are 2 ways to provide a custom env to u-boot from user space: - -1) A compiled binary that is sourced from u-boot. -2) A text file (usually /uEnv.txt) that is imported into env from u-boot. - -The current OSTree u-boot integration code was designed with the 1st -case in mind. - -Many bootscripts provided by an embedded device vendors expect -to find uEnv.txt in the top level directory, it is often hardcoded -when building u-boot and is difficult to change later on. Or in other -cases it is stored in read-only memory so changing it would require -re-flushing boot loader with a new env. So the issue here is that -OSTree's and vendor uEnv.txt want to exist on the same path and OSTree -would throw away any changes added to /uEnv.txt by user on the next -upgrade/deploy. - -This patch "hides" away the OSTree's env file loader/uEnv.txt from users -who are used to edditing uEnv.txt at the top level directory. Now to add -OSTree support on such boards you can simply add a custom logic in uEnv.txt -that loads ostree env from /loader/uEnv.txt - -This change is backward compatible with the previous ostree releases and -solves the issue described in: - -https://bugzilla.gnome.org/show_bug.cgi?id=755787 ---- - src/libostree/ostree-bootloader-uboot.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/libostree/ostree-bootloader-uboot.c b/src/libostree/ostree-bootloader-uboot.c -index 4c0218f..f67e9bd 100644 ---- a/src/libostree/ostree-bootloader-uboot.c -+++ b/src/libostree/ostree-bootloader-uboot.c -@@ -52,7 +52,7 @@ _ostree_bootloader_uboot_query (OstreeBootloader *bootloader, - { - OstreeBootloaderUboot *self = OSTREE_BOOTLOADER_UBOOT (bootloader); - -- *out_is_active = g_file_query_file_type (self->config_path, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL) == G_FILE_TYPE_SYMBOLIC_LINK; -+ *out_is_active = g_file_query_file_type (self->config_path, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL) == G_FILE_TYPE_REGULAR; - return TRUE; - } - -@@ -177,6 +177,6 @@ _ostree_bootloader_uboot_new (OstreeSysroot *sysroot) - { - OstreeBootloaderUboot *self = g_object_new (OSTREE_TYPE_BOOTLOADER_UBOOT, NULL); - self->sysroot = g_object_ref (sysroot); -- self->config_path = g_file_resolve_relative_path (self->sysroot->path, "boot/uEnv.txt"); -+ self->config_path = g_file_resolve_relative_path (self->sysroot->path, "boot/loader/uEnv.txt"); - return self; - } --- -2.1.4 - diff --git a/recipes/ostree/ostree/0002-u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch b/recipes/ostree/ostree/0002-u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch new file mode 100644 index 0000000..08855de --- /dev/null +++ b/recipes/ostree/ostree/0002-u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch @@ -0,0 +1,99 @@ +From 5ee49772b001b9757d6cb21fcc587d5ddc66cdb7 Mon Sep 17 00:00:00 2001 +From: Gatis Paeglis +Date: Thu, 5 Nov 2015 17:39:16 +0100 +Subject: [PATCH 2/2] u-boot: Merge ostree's and systems uEnv.txt + +This allows for simpler u-boot scripts and is +a proper fix for: + +https://bugzilla.gnome.org/show_bug.cgi?id=755787 +--- + src/libostree/ostree-bootloader-uboot.c | 42 ++++++++++++++++++++++++++++++--- + 1 file changed, 39 insertions(+), 3 deletions(-) + +diff --git a/src/libostree/ostree-bootloader-uboot.c b/src/libostree/ostree-bootloader-uboot.c +index f67e9bd..be1a40d 100644 +--- a/src/libostree/ostree-bootloader-uboot.c ++++ b/src/libostree/ostree-bootloader-uboot.c +@@ -29,6 +29,10 @@ + #include "otutil.h" + + #include ++#include ++#include ++#include ++#include + + struct _OstreeBootloaderUboot + { +@@ -69,13 +73,17 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self, + GCancellable *cancellable, + GError **error) + { ++ gboolean ret = FALSE; + g_autoptr(GPtrArray) boot_loader_configs = NULL; + OstreeBootconfigParser *config; + const char *val; ++ g_autofree char *boot_path = NULL; ++ g_autoptr(GFile) uenv_file = NULL; ++ char uenv_path[2048]; + + if (!_ostree_sysroot_read_boot_loader_configs (self->sysroot, bootversion, &boot_loader_configs, + cancellable, error)) +- return FALSE; ++ goto out; + + /* U-Boot doesn't support a menu so just pick the first one since the list is ordered */ + config = boot_loader_configs->pdata[0]; +@@ -85,10 +93,13 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self, + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "No \"linux\" key in bootloader config"); +- return FALSE; ++ goto out; + } + g_ptr_array_add (new_lines, g_strdup_printf ("kernel_image=%s", val)); + ++ boot_path = strndup (val, strlen (val) - strlen ("/vmlinuz")); ++ g_ptr_array_add (new_lines, g_strdup_printf ("bootdir=%s", boot_path)); ++ + val = ostree_bootconfig_parser_get (config, "initrd"); + if (val) + g_ptr_array_add (new_lines, g_strdup_printf ("ramdisk_image=%s", val)); +@@ -97,7 +108,32 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self, + if (val) + g_ptr_array_add (new_lines, g_strdup_printf ("bootargs=%s", val)); + +- return TRUE; ++ /* Merge with user's uEnv.txt if it exists */ ++ snprintf (uenv_path, sizeof(uenv_path), "boot/%s/uEnv.txt", boot_path); ++ uenv_file = g_file_get_child (self->sysroot->path, uenv_path); ++ if (g_file_query_exists (uenv_file, cancellable)) ++ { ++ g_autoptr(GInputStream) instream = NULL; ++ g_autoptr(GDataInputStream) datastream = NULL; ++ gsize len; ++ ++ instream = (GInputStream*)g_file_read (uenv_file, cancellable, error); ++ if (!instream) ++ goto out; ++ ++ datastream = g_data_input_stream_new (instream); ++ while (TRUE) ++ { ++ val = g_data_input_stream_read_line (datastream, &len, cancellable, error); ++ if (!val) ++ break; ++ g_ptr_array_add (new_lines, (char *)val); ++ } ++ } ++ ++ ret = TRUE; ++out: ++ return ret; + } + + static gboolean +-- +2.1.4 + diff --git a/recipes/ostree/ostree/0003-Allow-updating-files-in-root-of-boot.patch b/recipes/ostree/ostree/0003-Allow-updating-files-in-root-of-boot.patch new file mode 100644 index 0000000..d93da22 --- /dev/null +++ b/recipes/ostree/ostree/0003-Allow-updating-files-in-root-of-boot.patch @@ -0,0 +1,104 @@ +From f5a1391e64d4b17ed05fb47f23d5d35affb9f1fd Mon Sep 17 00:00:00 2001 +From: Gatis Paeglis +Date: Thu, 5 Nov 2015 14:58:56 +0100 +Subject: [PATCH] Allow updating files in root of /boot + +It is common for u-boot based systems to search +top level directory of the boot partiton for +additional files that are required for booting. +It can be difficult to change this search logic +if it is hardcoded somewhere low in the stack or +in u-boot env that is in read-only memory. To +allow updating these files you need to add a +symlink in your ostree sysroot: + +cd sysroot/boot +ln -s loader/my-special-file my-special-file + +The bellow code will make sure that loader/my-special-file +points to the correct target file version. + +This does not break the atomic property of update. +--- + src/libostree/ostree-bootloader-uboot.c | 65 +++++++++++++++++++++++++++++++++ + 1 file changed, 65 insertions(+) + +diff --git a/src/libostree/ostree-bootloader-uboot.c b/src/libostree/ostree-bootloader-uboot.c +index be1a40d..779c302 100644 +--- a/src/libostree/ostree-bootloader-uboot.c ++++ b/src/libostree/ostree-bootloader-uboot.c +@@ -131,6 +131,71 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self, + } + } + ++ { ++ /* It is common for u-boot based systems to search top level directory of the boot ++ * partiton for additional files that are required for booting. It can be difficult ++ * to change this search logic if it is hardcoded somewhere low in the stack or in ++ * u-boot env that is in read-only memory. To allow updating these files you need to ++ * add a symlink in your ostree sysroot: ++ * ++ * cd sysroot/boot ++ * ln -s loader/my-special-file my-special-file ++ * ++ * The bellow code will make sure that loader/my-special-file points to the correct ++ * target file version. ++ * ++ */ ++ g_autoptr(GFile) child = NULL; ++ int loader_fd; ++ g_autoptr(GFileEnumerator) dir_enum = NULL; ++ g_autoptr(GFile) real_boot = NULL; ++ g_autofree char *loader_path = NULL; ++ char buf[2048]; ++ ++ child = ot_gfile_resolve_path_printf (self->sysroot->path, "boot/loader.%d/", bootversion); ++ loader_path = g_file_get_path(child); ++ loader_fd = open (loader_path, O_RDONLY); ++ if (loader_fd == -1) { ++ perror("open"); ++ goto out; ++ } ++ ++ child = g_file_get_child (self->sysroot->path, "boot"); ++ dir_enum = g_file_enumerate_children (child, OSTREE_GIO_FAST_QUERYINFO, ++ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, ++ NULL, error); ++ ++ while (TRUE) { ++ const char *symlink_target, *name; ++ GFileInfo *file_info = NULL; ++ ++ if (!gs_file_enumerator_iterate (dir_enum, &file_info, NULL, cancellable, error)) { ++ close(loader_fd); ++ goto out; ++ } ++ ++ if (file_info == NULL) ++ break; ++ ++ if (g_file_info_get_is_symlink(file_info)) { ++ symlink_target = g_file_info_get_symlink_target(file_info); ++ if (g_str_has_prefix(symlink_target, "loader/")) { ++ name = g_file_info_get_name(file_info); ++ if (g_strcmp0 (name, "uEnv.txt") == 0) ++ continue; ++ ++ snprintf(buf, sizeof(buf), "%s/%s", loader_path, name); ++ remove(buf); ++ snprintf(buf, sizeof(buf), "..%s/%s", boot_path, name); ++ if (symlinkat(buf, loader_fd, name) == -1) ++ perror("symlinkat"); ++ } ++ } ++ } ++ ++ close(loader_fd); ++ } ++ + ret = TRUE; + out: + return ret; +-- +2.1.4 + -- cgit v1.2.3-54-g00ecf From 4383f6ec880dc1b2db4760216ea1d1a96fcd9cf2 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 17 Nov 2015 14:13:50 +0100 Subject: ostree: Add TLS support Change-Id: I2cbfe533a8ce58d337f77f013b0da47a6a91681e Reviewed-by: Samuli Piippo --- recipes/libsoup-2.4/libsoup-2.4_2.46.0.bbappend | 28 +++++++++++++++++++++++++ recipes/ostree/ostree.bb | 8 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 recipes/libsoup-2.4/libsoup-2.4_2.46.0.bbappend diff --git a/recipes/libsoup-2.4/libsoup-2.4_2.46.0.bbappend b/recipes/libsoup-2.4/libsoup-2.4_2.46.0.bbappend new file mode 100644 index 0000000..bc3d1ff --- /dev/null +++ b/recipes/libsoup-2.4/libsoup-2.4_2.46.0.bbappend @@ -0,0 +1,28 @@ +############################################################################# +## +## Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://www.qt.io/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +# Remove this recipe when openembedded-core/meta/recipes-support/libsoup/ +# will be updated to 2.50.0 version or above. +PV = "2.50.0" + +SRC_URI[md5sum] = "9a84d66e1b7ccd3bd340574b11eccc15" +SRC_URI[sha256sum] = "1e01365ac4af3817187ea847f9d3588c27eee01fc519a5a7cb212bb78b0f667b" diff --git a/recipes/ostree/ostree.bb b/recipes/ostree/ostree.bb index c4a6f69..bc13ac2 100644 --- a/recipes/ostree/ostree.bb +++ b/recipes/ostree/ostree.bb @@ -41,7 +41,13 @@ S = "${WORKDIR}/git" DEPENDS = "glib-2.0 e2fsprogs gpgme attr libsoup-2.4 libgsystem libassuan xz" RRECOMMENDS_${PN} += "gnupg" -EXTRA_OECONF = "--with-dracut --without-selinux --without-libarchive --with-grub2=no --enable-gtk-doc-html=no" +EXTRA_OECONF = "--with-dracut \ + --without-selinux \ + --without-libarchive \ + --with-grub2=no \ + --enable-gtk-doc-html=no \ + --with-soup \ + --enable-libsoup-client-certs" do_configure_prepend() { cd ${S} -- cgit v1.2.3-54-g00ecf From 86ba5c4ac6303258f430156a3e1a798b554954ab Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 4 Dec 2015 12:36:45 +0200 Subject: nitrogen6x: add u-boot binary back to the image This was incorrectly removed when update framework was reverted. Change-Id: I3b32f37f97d570cdafeb4a4bb63dd1a07a6f02e7 Reviewed-by: Rainer Keller --- conf/distro/include/nitrogen6x.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/distro/include/nitrogen6x.conf b/conf/distro/include/nitrogen6x.conf index 3b1b627..f9eb1d2 100644 --- a/conf/distro/include/nitrogen6x.conf +++ b/conf/distro/include/nitrogen6x.conf @@ -32,6 +32,7 @@ BOOTFS_CONTENT = "\ ${KERNEL_IMAGETYPE}-imx6q-nitrogen6_max.dtb:imx6q-nitrogen6_max.dtb \ 6x_bootscript-${MACHINE}:6x_bootscript \ 6x_upgrade-${MACHINE}:6x_upgrade \ + u-boot-${MACHINE}.imx:u-boot.imx \ " BOOTFS_DEPENDS = "u-boot:do_deploy virtual/kernel:do_deploy u-boot-script-boundary:do_deploy" -- cgit v1.2.3-54-g00ecf From c97f13c28d29bd71c98043f709a5875606300142 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 4 Dec 2015 13:07:47 +0200 Subject: Use openembedded mirror from github git.openembedded.org is down, use mirror from github Change-Id: I39bd04ddd3fffff42a8883b63ec62c604efc3a35 Reviewed-by: Teemu Holappa --- scripts/manifest.xml | 3 ++- scripts/manifest_dizzy.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/manifest.xml b/scripts/manifest.xml index e1e7e4c..59c7804 100644 --- a/scripts/manifest.xml +++ b/scripts/manifest.xml @@ -10,13 +10,14 @@ + +