* [PATCH] weston: upgrade from 1.11.1 to 1.12.0
From: Fathi Boudra @ 2016-11-08 13:54 UTC (permalink / raw)
To: openembedded-core
From: Daniel Díaz <daniel.diaz@linaro.org>
* Refresh patches to apply cleanly on 1.12.0 (no changes):
- 0001-make-error-portable.patch
- 0001-configure.ac-Fix-wayland-protocols-path.patch
- 0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
- 0001-Add-configuration-option-for-no-input-device.patch
* Remove 0001-shared-include-stdint.h-for-int32_t.patch applied
upstream
https://cgit.freedesktop.org/wayland/weston/commit/?id=649bbce6
* Update license files checksum, compositor.c location has changed.
No license changes.
* Drop --disable-rpi-compositor from EXTRA_OE_CONF. Raspberry Pi backend
and renderer have been removed upstream. The option doesn't exist
anymore.
* Adjust files names to the new naming: weston -> libweston-1.
Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
---
...-configuration-option-for-no-input-device.patch | 39 +++++++++++-----------
...1-configure.ac-Fix-wayland-protocols-path.patch | 4 +--
.../wayland/weston/0001-make-error-portable.patch | 20 +++++------
.../0001-shared-include-stdint.h-for-int32_t.patch | 23 -------------
...ch-Provide-a-default-version-that-doesn-t.patch | 28 ++++++++--------
.../wayland/{weston_1.11.1.bb => weston_1.12.0.bb} | 12 +++----
6 files changed, 51 insertions(+), 75 deletions(-)
delete mode 100644 meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
rename meta/recipes-graphics/wayland/{weston_1.11.1.bb => weston_1.12.0.bb} (92%)
diff --git a/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch b/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
index c45f3ad..a822d4a 100644
--- a/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
+++ b/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
@@ -31,24 +31,24 @@ Reviewed-by: Daniel Stone <daniels@collabora.com>
Upstream-Status: backport from
https://cgit.freedesktop.org/wayland/weston/commit/?id=75b7197f
---
- man/weston.ini.man | 5 +++++
- src/compositor.h | 3 +++
- src/libinput-seat.c | 6 ++++++
- src/main.c | 5 +++++
- weston.ini.in | 1 +
- 5 files changed, 20 insertions(+)
+ compositor/main.c | 5 +++++
+ libweston/compositor.h | 4 ++++
+ libweston/libinput-seat.c | 6 ++++++
+ man/weston.ini.man | 5 +++++
+ weston.ini.in | 1 +
+ 5 files changed, 21 insertions(+)
---- a/src/main.c
-+++ b/src/main.c
-@@ -1298,6 +1298,7 @@ int main(int argc, char *argv[])
- struct wl_client *primary_client;
+--- a/compositor/main.c
++++ b/compositor/main.c
+@@ -1595,6 +1595,7 @@ int main(int argc, char *argv[])
struct wl_listener primary_client_destroyed;
struct weston_seat *seat;
-+ int require_input;
+ struct wet_compositor user_data;
++ int require_input;
const struct weston_option core_options[] = {
{ WESTON_OPTION_STRING, "backend", 'B', &backend },
-@@ -1373,6 +1374,10 @@ int main(int argc, char *argv[])
+@@ -1678,6 +1679,10 @@ int main(int argc, char *argv[])
if (weston_compositor_init_config(ec, config) < 0)
goto out;
@@ -59,21 +59,22 @@ https://cgit.freedesktop.org/wayland/weston/commit/?id=75b7197f
if (load_backend(ec, backend, &argc, argv, config) < 0) {
weston_log("fatal: failed to create compositor backend\n");
goto out;
---- a/src/compositor.h
-+++ b/src/compositor.h
-@@ -803,6 +803,9 @@ struct weston_compositor {
+--- a/libweston/compositor.h
++++ b/libweston/compositor.h
+@@ -836,6 +836,10 @@ struct weston_compositor {
void *user_data;
void (*exit)(struct weston_compositor *c);
+
+ /* Whether to let the compositor run without any input device. */
+ bool require_input;
++
};
struct weston_buffer {
---- a/src/libinput-seat.c
-+++ b/src/libinput-seat.c
-@@ -255,6 +255,12 @@ udev_input_enable(struct udev_input *inp
+--- a/libweston/libinput-seat.c
++++ b/libweston/libinput-seat.c
+@@ -259,6 +259,12 @@ udev_input_enable(struct udev_input *inp
devices_found = 1;
}
@@ -88,7 +89,7 @@ https://cgit.freedesktop.org/wayland/weston/commit/?id=75b7197f
"warning: no input devices on entering Weston. "
--- a/man/weston.ini.man
+++ b/man/weston.ini.man
-@@ -169,6 +169,11 @@ time, the one specified in the command-l
+@@ -168,6 +168,11 @@ time, the one specified in the command-l
hand, if none of these sets the value, default idle timeout will be
set to 300 seconds.
.RS
diff --git a/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch b/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
index edd3b91..39000d4 100644
--- a/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
+++ b/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
@@ -18,10 +18,10 @@ Upstream-Status: Inappropriate [embedded specific]
--- a/configure.ac
+++ b/configure.ac
-@@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [lib
+@@ -229,7 +229,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [lib
PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
- PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2],
+ PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.7],
- [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
+ [ac_wayland_protocols_pkgdatadir=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
diff --git a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
index f7b5284..c41ea49 100644
--- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
@@ -7,18 +7,18 @@ error() is not posix but gnu extension so may not be available on all
kind of systemsi e.g. musl.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
- configure.ac | 2 ++
- src/weston-error.h | 20 ++++++++++++++++++++
- src/weston-launch.c | 2 +-
+Upstream-Status: Submitted
+---
+ configure.ac | 2 ++
+ libweston/weston-error.h | 20 ++++++++++++++++++++
+ libweston/weston-launch.c | 2 +-
3 files changed, 23 insertions(+), 1 deletion(-)
- create mode 100644 src/weston-error.h
+ create mode 100644 libweston/weston-error.h
--- a/configure.ac
+++ b/configure.ac
-@@ -60,6 +60,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+@@ -102,6 +102,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
[[#include <time.h>]])
AC_CHECK_HEADERS([execinfo.h])
@@ -28,7 +28,7 @@ Upstream-Status: Submitted
COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
--- /dev/null
-+++ b/src/weston-error.h
++++ b/libweston/weston-error.h
@@ -0,0 +1,20 @@
+#ifndef _WESTON_ERROR_H
+#define _WESTON_ERROR_H
@@ -50,8 +50,8 @@ Upstream-Status: Submitted
+
+#endif
+
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
+--- a/libweston/weston-launch.c
++++ b/libweston/weston-launch.c
@@ -33,7 +33,6 @@
#include <poll.h>
#include <errno.h>
diff --git a/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch b/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
deleted file mode 100644
index ee66c20..0000000
--- a/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From ba02b8abe4e2afac2bfbf2559972d5059d75a041 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sat, 16 Jul 2016 22:50:19 +0300
-Subject: [PATCH weston] shared: include stdint.h for int32_t
-
-This fixes build on musl.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted
----
- shared/xalloc.h | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/shared/xalloc.h
-+++ b/shared/xalloc.h
-@@ -30,6 +30,7 @@
- extern "C" {
- #endif
-
-+#include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
-
diff --git a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
index d684b1c..3d12d53 100644
--- a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
+++ b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -14,13 +14,13 @@ Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
- configure.ac | 9 +++++++--
- src/weston-launch.c | 20 ++++++++++++++++++++
+ configure.ac | 9 +++++++--
+ libweston/weston-launch.c | 20 ++++++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
--- a/configure.ac
+++ b/configure.ac
-@@ -416,13 +416,17 @@ AC_ARG_ENABLE(resize-optimization,
+@@ -441,13 +441,17 @@ AC_ARG_ENABLE(resize-optimization,
AS_IF([test "x$enable_resize_optimization" = "xyes"],
[AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
@@ -40,7 +40,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
fi
AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
-@@ -673,6 +677,7 @@ AC_MSG_RESULT([
+@@ -704,6 +708,7 @@ AC_MSG_RESULT([
Enable developer documentation ${enable_devdocs}
weston-launch utility ${enable_weston_launch}
@@ -48,8 +48,8 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
systemd-login support ${have_systemd_login}
systemd notify support ${enable_systemd_notify}
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
+--- a/libweston/weston-launch.c
++++ b/libweston/weston-launch.c
@@ -51,7 +51,9 @@
#include <pwd.h>
@@ -103,7 +103,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
if (ioctl(wl->tty, KDSKBMUTE, 0) &&
ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
-@@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl)
+@@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl,
setenv("HOME", wl->pw->pw_dir, 1);
setenv("SHELL", wl->pw->pw_shell, 1);
@@ -111,15 +111,15 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
env = pam_getenvlist(wl->ph);
if (env) {
for (i = 0; env[i]; ++i) {
-@@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl)
+@@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl,
}
free(env);
}
+#endif
- }
- static void
-@@ -665,7 +675,9 @@ static void
+ /*
+ * We open a new session, so it makes sense
+@@ -675,7 +685,9 @@ static void
help(const char *name)
{
fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
@@ -129,7 +129,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
fprintf(stderr, " -t, --tty Start session on alternative tty\n");
fprintf(stderr, " -v, --verbose Be verbose\n");
fprintf(stderr, " -h, --help Display this help message\n");
-@@ -678,7 +690,9 @@ main(int argc, char *argv[])
+@@ -688,7 +700,9 @@ main(int argc, char *argv[])
int i, c;
char *tty = NULL;
struct option opts[] = {
@@ -139,7 +139,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
{ "tty", required_argument, NULL, 't' },
{ "verbose", no_argument, NULL, 'v' },
{ "help", no_argument, NULL, 'h' },
-@@ -690,9 +704,13 @@ main(int argc, char *argv[])
+@@ -700,9 +714,13 @@ main(int argc, char *argv[])
while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) {
switch (c) {
case 'u':
@@ -153,7 +153,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
break;
case 't':
tty = optarg;
-@@ -732,8 +750,10 @@ main(int argc, char *argv[])
+@@ -740,8 +758,10 @@ main(int argc, char *argv[])
if (setup_tty(&wl, tty) < 0)
exit(EXIT_FAILURE);
diff --git a/meta/recipes-graphics/wayland/weston_1.11.1.bb b/meta/recipes-graphics/wayland/weston_1.12.0.bb
similarity index 92%
rename from meta/recipes-graphics/wayland/weston_1.11.1.bb
rename to meta/recipes-graphics/wayland/weston_1.12.0.bb
index 7e75cf7..f944646 100644
--- a/meta/recipes-graphics/wayland/weston_1.11.1.bb
+++ b/meta/recipes-graphics/wayland/weston_1.12.0.bb
@@ -3,20 +3,19 @@ DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
HOMEPAGE = "http://wayland.freedesktop.org"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
- file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331"
+ file://libweston/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331"
SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
file://0001-make-error-portable.patch \
file://0001-configure.ac-Fix-wayland-protocols-path.patch \
- file://0001-shared-include-stdint.h-for-int32_t.patch \
file://xwayland.weston-start \
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
file://0001-Add-configuration-option-for-no-input-device.patch \
"
-SRC_URI[md5sum] = "c5fdc02ab67d33c0fca8f72d341facdf"
-SRC_URI[sha256sum] = "548973496a5c8613d6690f9120f21066946a544df65ce4fe0ef153a8dc0bf6de"
+SRC_URI[md5sum] = "310af6d7f8ba03c3418cec8ad72ea748"
+SRC_URI[sha256sum] = "ac7ac2a32e3b9f50131fccded5d2326bd36b2226712d90b61999118a09af5033"
inherit autotools pkgconfig useradd distro_features_check
# depends on virtual/egl
@@ -26,7 +25,6 @@ DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
EXTRA_OECONF = "--enable-setuid-install \
- --disable-rpi-compositor \
--disable-rdp-compositor \
WAYLAND_PROTOCOLS_SYSROOT_DIR=${STAGING_DIR}/${MACHINE} \
"
@@ -84,7 +82,7 @@ PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
do_install_append() {
# Weston doesn't need the .la files to load modules, so wipe them
- rm -f ${D}/${libdir}/weston/*.la
+ rm -f ${D}/${libdir}/libweston-1/*.la
# If X11, ship a desktop file to launch it
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
@@ -103,7 +101,7 @@ do_install_append() {
PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)}"
PACKAGES += "${PN}-examples"
-FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/*${SOLIBS} ${libdir}/${BPN}/*.so ${libdir}/libweston-1/*.so ${datadir}"
FILES_${PN}-examples = "${bindir}/*"
FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so"
--
2.10.2
^ permalink raw reply related
* Re: [PATCH] x264: Update to latest on stable branch
From: Khem Raj @ 2016-11-08 14:37 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LbTtLuY8JEPY6nRN7AithNTrn8A3oFrQMaKke9GJZnDCQ@mail.gmail.com>
On Tue, Nov 8, 2016 at 3:07 AM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 8 November 2016 at 05:23, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> - Switch URI to use github mirror for reliabality
>> - Disable openCL code, its not used
>> - TEXTRELs are fixed, therefore dont skip QA check
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>
>
> Breaking here for x86-64.
>
> configure output:
>
> DEBUG: Executing shell function do_configure
> Unknown option --disable-static, ignored
> Found x86_64-poky-linux-gcc (GCC) 6.2.0
> Minimum version is yasm-1.2.0
> If you really want to compile without asm, configure with --disable-asm.
> WARNING: exit code 1 from a shell command.
>
> config.log:
>
> x264 configure script
> Command line options: "--prefix=/usr" "--host=x86_64-poky-linux"
> "--libdir=/usr/lib" "--cross-prefix=x86_64-poky-linux-"
> "--sysroot=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64"
> "--enable-shared" "--enable-static" "--disable-lavf" "--disable-swscale"
> "--disable-opencl" "--enable-pic" "--disable-static"
>
> checking whether x86_64-poky-linux-gcc -m64 -march=corei7 -mtune=corei7
> -mfpmath=sse -msse4.2
> --sysroot=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64 works... yes
> checking whether x86_64-poky-linux-gcc -m64 -march=corei7 -mtune=corei7
> -mfpmath=sse -msse4.2
> --sysroot=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64 supports for(
> int i = 0; i < 9; i++ ); with -std=gnu99... yes
> checking for -mpreferred-stack-boundary=5... yes
> checking whether x86_64-poky-linux-gcc supports vpmovzxwd ymm0, xmm0... no
> Failed commandline was:
> --------------------------------------------------
> x86_64-poky-linux-gcc conftest.asm -I. -I$(SRCPATH) -DARCH_X86_64=1
> -I$(SRCPATH)/common/x86/ -f elf64 -o conftest.o
> x86_64-poky-linux-gcc: error: elf64: No such file or directory
> x86_64-poky-linux-gcc: error: unrecognized command line option '-f'
> --------------------------------------------------
> Failed program was:
> --------------------------------------------------
> vpmovzxwd ymm0, xmm0
> --------------------------------------------------
>
> Ah, looks like the configure is respecting the AS environment variable that
> we set to 'as' in bitbake.conf, but it really actually wants yasm. I added
> AS[unexport] = 1 to the recipe and it appears to work now for me. Can you
> verify that it still works on the architectures you care about?
recipe is setting AS too here ,so that must be removed as well. I will send a V2
>
> Ross
^ permalink raw reply
* Re: [PATCH 09/13] icu: update to 58.1
From: Alexander Kanavin @ 2016-11-08 14:48 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0Laf3ZkyWqz2qY8Evj2R3OB1swBzfWeAZ9D+y3hFXjSecg@mail.gmail.com>
On 11/02/2016 02:16 PM, Burton, Ross wrote:
> This breaks under musl:
>
> ../../icu/source/i18n/digitlst.cpp:67:24: fatal error: xlocale.h: No
> such file or directory
> # include <xlocale.h>
>
> musl doesn't have xlocale.h but does have a crippled strtod_l (doesn't
> actually support a passed in locale, which is the entire point of the _l
> functions).
>
> Upstreams such as pulseaudio have
> done https://bugs.freedesktop.org/attachment.cgi?id=118644 to guard the
> include, but I see that digitlist.cpp has an alternative branch where
> strtod_l isn't supported: as that function on musl is crippled maybe ICU
> should be told not to use it?
Thanks, I've forced icu to take that alternative branch (when musl is in
use) by monkey patching configure.ac; the updated patch will come with
the next batch of updates. There's no configure switch or environment
variable that will have the necessary effect.
Alex
^ permalink raw reply
* [PATCH v2 0/4] Make oe.lsb.distro_identifier() more consistent
From: Joshua Lock @ 2016-11-08 14:49 UTC (permalink / raw)
To: openembedded-core
The oe.lsb.distro_identifier() method call will return different identification
information depending on the source which is found to provide that information.
This series attempts to address this in two ways:
1) preferring os-release(5) as the source of distribution identification. this
increasingly common standard mechanism is available on each of the build host
distributions we commonly test on.
2) converting the distribution identifier to lower case before including it in
the distro_identifier return value. This ensures that, for most of the tested
distros, the identifier returned via the LSB code paths matches that returned
by the os-release code paths.
Changes since v1:
* improve release_dict_osr() in patch 3 to handle empty lines and values with surrounding quotation marks in /etc/os-release, as used in CentOS
The following changes since commit 9303d8055c45a0f6af295d70a6f6a8b9d8d8a7c9:
devtool: add "rename" subcommand (2016-11-07 11:04:17 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib joshuagl/liboe
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=joshuagl/liboe
Joshua Lock (4):
lib/oe/path: remove duplicate import
lib/oe/lsb: make the release dict keys consistent regardless of source
lib/oe/lsb: prefer /etc/os-release for distribution data
lib/oe/lsb: attempt to ensure consistent distro id regardless of
source
meta/lib/oe/lsb.py | 73 +++++++++++++++++++++++++++++++++++------------------
meta/lib/oe/path.py | 1 -
2 files changed, 49 insertions(+), 25 deletions(-)
--
2.7.4
^ permalink raw reply
* [PATCH v2 1/4] lib/oe/path: remove duplicate import
From: Joshua Lock @ 2016-11-08 14:49 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <cover.1478615920.git.joshua.g.lock@intel.com>
There's no need to import glob inside copyhardlinktree() as it's
already imported for the entire path module.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
meta/lib/oe/path.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index 06a5af2..f73fd4a 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -81,7 +81,6 @@ def copyhardlinktree(src, dst):
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
source = ''
if os.path.isdir(src):
- import glob
if len(glob.glob('%s/.??*' % src)) > 0:
source = '%s/.??* ' % src
source = source + '%s/*' % src
--
2.7.4
^ permalink raw reply related
* [PATCH v2 2/4] lib/oe/lsb: make the release dict keys consistent regardless of source
From: Joshua Lock @ 2016-11-08 14:49 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <cover.1478615920.git.joshua.g.lock@intel.com>
Rather than have the distro_identifier method look for different keys in
the dict depending on the source ensure that each function for retrieving
release data uses the same key names in the returned dict.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
meta/lib/oe/lsb.py | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index e0bdfba..0bb7686 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -1,5 +1,5 @@
-def release_dict():
- """Return the output of lsb_release -ir as a dictionary"""
+def release_dict_lsb():
+ """ Return the output of lsb_release -ir as a dictionary """
from subprocess import PIPE
try:
@@ -7,19 +7,28 @@ def release_dict():
except bb.process.CmdError as exc:
return None
+ lsb_map = { 'Distributor ID': 'DISTRIB_ID',
+ 'Release': 'DISTRIB_RELEASE'}
+ lsb_keys = lsb_map.keys()
+
data = {}
for line in output.splitlines():
- if line.startswith("-e"): line = line[3:]
+ if line.startswith("-e"):
+ line = line[3:]
try:
key, value = line.split(":\t", 1)
except ValueError:
continue
- else:
- data[key] = value
+ if key in lsb_keys:
+ data[lsb_map[key]] = value
+
+ if len(data.keys()) != 2:
+ return None
+
return data
def release_dict_file():
- """ Try to gather LSB release information manually when lsb_release tool is unavailable """
+ """ Try to gather release information manually when other methods fail """
data = None
try:
if os.path.exists('/etc/lsb-release'):
@@ -64,15 +73,12 @@ def distro_identifier(adjust_hook=None):
import re
- lsb_data = release_dict()
- if lsb_data:
- distro_id, release = lsb_data['Distributor ID'], lsb_data['Release']
- else:
- lsb_data_file = release_dict_file()
- if lsb_data_file:
- distro_id, release = lsb_data_file['DISTRIB_ID'], lsb_data_file.get('DISTRIB_RELEASE', None)
- else:
- distro_id, release = None, None
+ distro_data = release_dict_lsb()
+ if not distro_data:
+ distro_data = release_dict_file()
+
+ distro_id = distro_data['DISTRIB_ID']
+ release = distro_data['DISTRIB_RELEASE']
if adjust_hook:
distro_id, release = adjust_hook(distro_id, release)
--
2.7.4
^ permalink raw reply related
* [PATCH v2 3/4] lib/oe/lsb: prefer /etc/os-release for distribution data
From: Joshua Lock @ 2016-11-08 14:49 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <cover.1478615920.git.joshua.g.lock@intel.com>
os-release(5) is an increasingly standard source of operating system
identification and more likely to be present on modern OS deployments, i.e.
many container variants of common distros include os-release and not the
lsb_release tool.
Therefore we should favour parsing /etc/os-release in distro_identifier(),
try lsb_release when that fails and finally fall back on various distro
specific sources of OS identification.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
meta/lib/oe/lsb.py | 37 ++++++++++++++++++++++++++++---------
1 file changed, 28 insertions(+), 9 deletions(-)
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 0bb7686..8018c7b 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -1,3 +1,25 @@
+def release_dict_osr():
+ """ Populate a dict with pertinent values from /etc/os-release """
+ if not os.path.exists('/etc/os-release'):
+ return None
+
+ data = {}
+ with open('/etc/os-release') as f:
+ for line in f:
+ try:
+ key, val = line.rstrip().split('=', 1)
+ except ValueError:
+ continue
+ if key == 'NAME':
+ data['DISTRIB_ID'] = val.strip('"')
+ if key == 'VERSION_ID':
+ data['DISTRIB_RELEASE'] = val.strip('"')
+
+ if len(data.keys()) != 2:
+ return None
+
+ return data
+
def release_dict_lsb():
""" Return the output of lsb_release -ir as a dictionary """
from subprocess import PIPE
@@ -46,14 +68,6 @@ def release_dict_file():
if match:
data['DISTRIB_ID'] = match.group(1)
data['DISTRIB_RELEASE'] = match.group(2)
- elif os.path.exists('/etc/os-release'):
- data = {}
- with open('/etc/os-release') as f:
- for line in f:
- if line.startswith('NAME='):
- data['DISTRIB_ID'] = line[5:].rstrip().strip('"')
- if line.startswith('VERSION_ID='):
- data['DISTRIB_RELEASE'] = line[11:].rstrip().strip('"')
elif os.path.exists('/etc/SuSE-release'):
data = {}
data['DISTRIB_ID'] = 'SUSE LINUX'
@@ -73,7 +87,12 @@ def distro_identifier(adjust_hook=None):
import re
- distro_data = release_dict_lsb()
+ # Try /etc/os-release first, then the output of `lsb_release -ir` and
+ # finally fall back on parsing various release files in order to determine
+ # host distro name and version.
+ distro_data = release_dict_osr()
+ if not distro_data:
+ distro_data = release_dict_lsb()
if not distro_data:
distro_data = release_dict_file()
--
2.7.4
^ permalink raw reply related
* [PATCH v2 4/4] lib/oe/lsb: attempt to ensure consistent distro id regardless of source
From: Joshua Lock @ 2016-11-08 14:49 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <cover.1478615920.git.joshua.g.lock@intel.com>
The LSB Distributor ID and os-release NAME differ for most of the
distributions tested by the Yocto Project (CentOS, Debian, Fedora,
openSUSE and Ubuntu) however for all but openSUSE the os-release ID
matches the LSB Distributor ID when both are lowered before
comparison.
Therefore, in order to improve the consistency of identification of
a distribution, switch to using the os-release ID and converting
the ID value to lowercase.
Table showing comparison of LSB Distributor ID to os-release fields NAME
and ID for current Yocto Project supported host distributions:
Distribution | Version | Distributor ID | NAME | ID |
-------------------------------------------------------------------------
CentOS | 7 | CentOS | CentOS Linux | centos |
Debian | 8 | Debian | Debian GNU/Linux | debian |
Fedora | 23 | Fedora | Fedora | fedora |
Fedora | 24 | Fedora | Fedora | fedora |
openSUSE | 13.2 | openSUSE project | openSUSE | opensuse |
openSUSE | 42.1 | SUSE LINUX | openSUSE Leap | opensuse |
Ubuntu | 14.04 | Ubuntu | Ubuntu | ubuntu |
Ubuntu | 16.04 | Ubuntu | Ubuntu | ubuntu |
[YOCTO #10591]
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
meta/lib/oe/lsb.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 8018c7b..5a795a1 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -10,7 +10,7 @@ def release_dict_osr():
key, val = line.rstrip().split('=', 1)
except ValueError:
continue
- if key == 'NAME':
+ if key == 'ID':
data['DISTRIB_ID'] = val.strip('"')
if key == 'VERSION_ID':
data['DISTRIB_RELEASE'] = val.strip('"')
@@ -107,7 +107,7 @@ def distro_identifier(adjust_hook=None):
distro_id = re.sub(r'\W', '', distro_id)
if release:
- id_str = '{0}-{1}'.format(distro_id, release)
+ id_str = '{0}-{1}'.format(distro_id.lower(), release)
else:
id_str = distro_id
return id_str.replace(' ','-').replace('/','-')
--
2.7.4
^ permalink raw reply related
* Re: [PATCH] u-boot: mkimage: Fix build of u-boot-mkimage
From: Marek Vasut @ 2016-11-08 14:49 UTC (permalink / raw)
To: Jussi Kukkonen; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CAHiDW_Gynj2f6ByeSwYe61S8kQ_q8BiAG9Ng2d8BzQ-KNwH=EA@mail.gmail.com>
On 11/07/2016 09:43 PM, Jussi Kukkonen wrote:
> On 7 November 2016 at 20:20, Marek Vasut <marex@denx.de
> <mailto:marex@denx.de>> wrote:
>
> The build failed on qemux86-64 because it couldn't execute
> tools/bin2header on a host due to it being compiled with target
> toolchain. Drop the incorrect EXTRA_OEMAKE, U-Boot Kbuild/Kconfig
> respects the flags from OE. Moreover, since U-Boot buildsystem
> already strips the tools, add INSANE_SKIP = "already-stripped" .
>
>
> The INSANE_SKIP mentioned here is no longer included in the patch.
I just noticed that too that I forgot to update the commit message
altogether.
--
Best regards,
Marek Vasut
^ permalink raw reply
* [PATCH v2][krogoth] nss: fix compilation with glibc-2.24
From: Enrico Jorns @ 2016-11-08 15:07 UTC (permalink / raw)
To: openembedded-core; +Cc: Enrico Jorns
In-Reply-To: <4b9e1364-53da-c237-276e-e2e011e13505@gmail.com>
`readdir_r` is deprecated as of glibc-2.24 and leads to a compilation
error:
| In file included from sysrand.c:16:0:
| unix_rand.c: In function 'ReadOneFile':
| unix_rand.c:1090:6: error: 'readdir_r' is deprecated [-Werror=deprecated-declarations]
| error = readdir_r(fd, &entry_dir, &result);
| ^~~~~
| In file included from unix_rand.c:1032:0,
| from sysrand.c:16:
| /usr/include/dirent.h:183:12: note: declared here
| extern int readdir_r (DIR *__restrict __dirp,
| ^~~~~~~~~
| cc1: all warnings being treated as errors
The issue is reported in nss bug tracker
(https://bugzilla.mozilla.org/show_bug.cgi?id=1254334) and fixed in nss
mainline.
The fixing patch is extracted from the nss source code repository.
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
---
Added missing upstream status.
.../nss/nss/use-readdir-instead-of-readdir_r.patch | 97 ++++++++++++++++++++++
meta/recipes-support/nss/nss_3.21.bb | 1 +
2 files changed, 98 insertions(+)
create mode 100644 meta/recipes-support/nss/nss/use-readdir-instead-of-readdir_r.patch
diff --git a/meta/recipes-support/nss/nss/use-readdir-instead-of-readdir_r.patch b/meta/recipes-support/nss/nss/use-readdir-instead-of-readdir_r.patch
new file mode 100644
index 0000000..226e57d
--- /dev/null
+++ b/meta/recipes-support/nss/nss/use-readdir-instead-of-readdir_r.patch
@@ -0,0 +1,97 @@
+# HG changeset patch
+# User Martin Thomson <martin.thomson@gmail.com>
+# Date 1457600884 -39600
+# Thu Mar 10 20:08:04 2016 +1100
+# Node ID 7309fcbce2eceae1e4e3c687348e540905ae286a
+# Parent e7b6fca4f01427cafb4328f6e279af62290a2f34
+Bug 1254334 - Use readdir instead of readdir_r, r=emaldona, sr=rrelyea
+
+Upstream-Status: Backport
+
+diff -r e7b6fca4f014 -r 7309fcbce2ec lib/freebl/unix_rand.c
+--- a/nss/lib/freebl/unix_rand.c Wed Apr 20 15:22:46 2016 +0200
++++ b/nss/lib/freebl/unix_rand.c Thu Mar 10 20:08:04 2016 +1100
+@@ -1054,26 +1054,16 @@
+ *
+ * return 1 if it's time to reset the fileToRead (no more files to read).
+ */
+-int ReadOneFile(int fileToRead)
++static int
++ReadOneFile(int fileToRead)
+ {
+ char *dir = "/etc";
+ DIR *fd = opendir(dir);
+ int resetCount = 0;
+-#ifdef SOLARIS
+- /* grumble, Solaris does not define struct dirent to be the full length */
+- typedef union {
+- unsigned char space[sizeof(struct dirent) + MAXNAMELEN];
+- struct dirent dir;
+- } dirent_hack;
+- dirent_hack entry, firstEntry;
+-
+-#define entry_dir entry.dir
+-#else
+- struct dirent entry, firstEntry;
+-#define entry_dir entry
+-#endif
+-
+- int i, error = -1;
++ struct dirent *entry;
++ char firstName[NAME_MAX + 1];
++ const char *name = NULL;
++ int i;
+
+ if (fd == NULL) {
+ dir = PR_GetEnvSecure("HOME");
+@@ -1085,33 +1075,34 @@
+ return 1;
+ }
+
++ firstName[0] = '\0';
+ for (i=0; i <= fileToRead; i++) {
+- struct dirent *result = NULL;
+ do {
+- error = readdir_r(fd, &entry_dir, &result);
+- } while (error == 0 && result != NULL &&
+- !ReadFileOK(dir,&result->d_name[0]));
+- if (error != 0 || result == NULL) {
++ /* readdir() isn't guaranteed to be thread safe on every platform;
++ * this code assumes the same directory isn't read concurrently.
++ * This usage is confirmed safe on Linux, see bug 1254334. */
++ entry = readdir(fd);
++ } while (entry != NULL && !ReadFileOK(dir, &entry->d_name[0]));
++ if (entry == NULL) {
+ resetCount = 1; /* read to the end, start again at the beginning */
+- if (i != 0) {
++ if (firstName[0]) {
+ /* ran out of entries in the directory, use the first one */
+- entry = firstEntry;
+- error = 0;
+- break;
++ name = firstName;
+ }
+- /* if i== 0, there were no readable entries in the directory */
+ break;
+ }
+- if (i==0) {
+- /* save the first entry in case we run out of entries */
+- firstEntry = entry;
++ name = entry->d_name;
++ if (i == 0) {
++ /* copy the name of the first in case we run out of entries */
++ PORT_Assert(PORT_Strlen(name) <= NAME_MAX);
++ PORT_Strncpy(firstName, name, NAME_MAX);
++ firstName[NAME_MAX] = '\0';
+ }
+ }
+
+- if (error == 0) {
++ if (name) {
+ char filename[PATH_MAX];
+- int count = snprintf(filename, sizeof filename,
+- "%s/%s",dir, &entry_dir.d_name[0]);
++ int count = snprintf(filename, sizeof(filename), "%s/%s",dir, name);
+ if (count >= 1) {
+ ReadSingleFile(filename);
+ }
diff --git a/meta/recipes-support/nss/nss_3.21.bb b/meta/recipes-support/nss/nss_3.21.bb
index 05d81c2..39b0994 100644
--- a/meta/recipes-support/nss/nss_3.21.bb
+++ b/meta/recipes-support/nss/nss_3.21.bb
@@ -21,6 +21,7 @@ SRC_URI = "\
file://nss-fix-incorrect-shebang-of-perl.patch \
file://nss-fix-nsinstall-build.patch \
file://0001-Fix-build-failure-on-opensuse-13.1.patch \
+ file://use-readdir-instead-of-readdir_r.patch \
file://nss-gcc6-fix.patch \
file://nss.pc.in \
file://signlibs.sh \
--
2.1.4
^ permalink raw reply related
* [PATCH V2] x264: Update to latest on stable branch
From: Khem Raj @ 2016-11-08 15:19 UTC (permalink / raw)
To: openembedded-core
- unexport AS variable
- Switch URI to use github mirror for reliabality
- Disable openCL code, its not used
- TEXTRELs are fixed, therefore dont skip QA check
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v1 -> v2:
- unexport AS variable
.../x264/x264/don-t-default-to-cortex-a9-with-neon.patch | 13 ++-----------
meta/recipes-multimedia/x264/x264_git.bb | 11 ++++-------
2 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch b/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
index bf72fca..73f2aac 100644
--- a/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
+++ b/meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
@@ -5,10 +5,10 @@ Upstream-Status: Pending
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
diff --git a/configure b/configure
-index 2916036..f4ece40 100755
+index 9d1586c..3109ec4 100755
--- a/configure
+++ b/configure
-@@ -773,9 +773,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
+@@ -874,9 +874,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
fi
if [ $asm = auto -a $ARCH = ARM ] ; then
@@ -18,12 +18,3 @@ index 2916036..f4ece40 100755
if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6
cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2
cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
-@@ -788,8 +785,6 @@ if [ $asm = auto -a $ARCH = ARM ] ; then
- fi
-
- if [ $asm = auto -a $ARCH = AARCH64 ] ; then
-- # set flags so neon is built by default
-- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu|-arch)' || CFLAGS="$CFLAGS -arch arm64 -mfpu=neon"
-
- if cc_check '' '' '__asm__("cmeq v0.8h, v0.8h, #0");' ; then define HAVE_NEON
- ASFLAGS="$ASFLAGS -c"
diff --git a/meta/recipes-multimedia/x264/x264_git.bb b/meta/recipes-multimedia/x264/x264_git.bb
index 393310f..e790681 100644
--- a/meta/recipes-multimedia/x264/x264_git.bb
+++ b/meta/recipes-multimedia/x264/x264_git.bb
@@ -8,11 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "yasm-native"
-SRC_URI = "git://git.videolan.org/x264.git \
+SRC_URI = "git://github.com/mirror/x264;branch=stable \
file://don-t-default-to-cortex-a9-with-neon.patch \
"
-SRCREV = "c8a773ebfca148ef04f5a60d42cbd7336af0baf6"
+SRCREV = "86b71982e131eaa70125f8d0e725fcade9c4c677"
PV = "r2491+git${SRCPV}"
@@ -34,6 +34,7 @@ EXTRA_OECONF = '--prefix=${prefix} \
--enable-static \
--disable-lavf \
--disable-swscale \
+ --disable-opencl \
--enable-pic \
${X264_DISABLE_ASM} \
'
@@ -42,12 +43,8 @@ do_configure() {
./configure ${EXTRA_OECONF}
}
-AS = "${TARGET_PREFIX}gcc"
-
do_install() {
oe_runmake install DESTDIR=${D}
}
-# PIC can't be enabled for few BSP's
-INSANE_SKIP_${PN}_append = " textrel"
-
+AS[unexport] = "1"
--
2.10.2
^ permalink raw reply related
* Re: uninative binary?
From: Christopher Larson @ 2016-11-08 15:19 UTC (permalink / raw)
To: Gary Thomas; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <390c7dd5-dd7b-8364-66ac-d2853f0a574a@mlbassoc.com>
[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]
On Mon, Nov 7, 2016 at 11:41 PM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2016-11-04 11:03, Richard Purdie wrote:
>
>> On Fri, 2016-11-04 at 08:16 +0100, Gary Thomas wrote:
>>
>>> Some of my customers need to be able to build without any
>>> network connectivity, so I normally use BB_NO_NETWORK="1"
>>>
>>> Is there a way to add the uninative "binary shim" to my
>>> download mirror? Given that the path includes a hash as
>>> a directory, it's not clear to me how to put it into my
>>> mirror.
>>>
>>> Thanks for any ideas
>>>
>>
>> Set UNINATIVE_URL to point at your mirror?
>>
>> If the file already exists in DL_DIR, it will be used without touching
>> the network.
>>
>
> Thanks, that worked. I keep a link to my mirror in my meta tree,
> so I added these lines to my ${DISTRO}.conf:
> UNINATIVE_URL ?= "file://${COREBASE}/sources/uninative/1.4/"
> require conf/distro/include/yocto-uninative.inc
> INHERIT += "uninative"
> When I ran a build, this got sucked into my ${DL_DIR} as
> $ ls -lR downloads/uninative/
> downloads/uninative/:
> total 4
> drwxrwxr-x 2 gthomas gthomas 4096 Nov 7 13:02
> 101ff8f2580c193488db9e76f9646fb6ed38b65fb76f403acb0e2178ce7127ca
>
> downloads/uninative/101ff8f2580c193488db9e76f9646fb6ed38b65f
> b76f403acb0e2178ce7127ca:
> total 4
> lrwxrwxrwx 1 gthomas gthomas 76 Nov 7 13:02
> x86_64-nativesdk-libc.tar.bz2 -> /local/poky-cutting-edge/sourc
> es/uninative/1.4/x86_64-nativesdk-libc.tar.bz2
It seems the uninative fetch does use mirrors, as well, from what I’ve
seen. At least, premirrors. I see a bunch of irritating fetch failure
messages from each of my premirrors when attempting to get uninative in
certain builds.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 2635 bytes --]
^ permalink raw reply
* [PATCH 1/1] qemuarm64.conf: make runqemu's graphics work
From: Robert Yang @ 2016-11-08 15:37 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <cover.1478619418.git.liezhi.yang@windriver.com>
Fixed:
$ runqemu qemuarm64 (without -nographics)
There is no output in qemu console without this fix.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/conf/machine/qemuarm64.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
index d075062..df2010c 100644
--- a/meta/conf/machine/qemuarm64.conf
+++ b/meta/conf/machine/qemuarm64.conf
@@ -16,7 +16,7 @@ QB_MACHINE = "-machine virt"
QB_CPU = "-cpu cortex-a57"
QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,38400"
# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
-QB_OPT_APPEND = "-show-cursor -device virtio-rng-pci"
+QB_OPT_APPEND = "-show-cursor -device virtio-rng-pci -monitor null"
QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-device,netdev=net0,mac=@MAC@"
QB_SLIRP_OPT = "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
--
2.9.0
^ permalink raw reply related
* [PATCH 0/1] qemuarm64.conf: make runqemu's graphics work
From: Robert Yang @ 2016-11-08 15:37 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 9303d8055c45a0f6af295d70a6f6a8b9d8d8a7c9:
devtool: add "rename" subcommand (2016-11-07 11:04:17 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/arm64
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/arm64
Robert Yang (1):
qemuarm64.conf: make runqemu's graphics work
meta/conf/machine/qemuarm64.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.9.0
^ permalink raw reply
* [PATCH 0/5] wic: bugfixes & --fixed-size support
From: Maciej Borzecki @ 2016-11-08 15:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Maciej Borzecki
The patch series is a follow-up after a previous attempt of adding
--reserved-size option to wic[1].
The series introduces a number of fixes in patches 1 - 4.
The last patch in the series introduces --fixed-size option as discussed in [1].
The patch also introduces minor refactoring to code responsible for computing
partition size.
Aside from new option, another user-visible change is how the size rootfs
partitions with vfat is calculated. In previous code, vfat rootfs partition size
did not account for --extra-space nor --overhead-factor. Now, all rootfs
partitions (except for squashfs) are subject to the same rules of partition
sizing.
http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127634.html
Maciej Borzecki (5):
wic: make sure that partition size is always an integer in internal
processing
wic: use partition size when creating empty partition files
wic: check that filesystem is specified for a rootfs partition
wic: fix function comment typos
wic: add --fixed-size wks option
scripts/lib/wic/help.py | 14 +++--
scripts/lib/wic/imager/direct.py | 2 +-
scripts/lib/wic/ksparser.py | 41 +++++++++++++--
scripts/lib/wic/partition.py | 93 +++++++++++++++++++++-------------
scripts/lib/wic/utils/partitionedfs.py | 6 +--
5 files changed, 109 insertions(+), 47 deletions(-)
--
2.5.0
^ permalink raw reply
* [PATCH 1/5] wic: make sure that partition size is always an integer in internal processing
From: Maciej Borzecki @ 2016-11-08 15:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Maciej Borzecki
In-Reply-To: <cover.1478619682.git.maciej.borzecki@rndity.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
---
scripts/lib/wic/partition.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 89c33ab8b7d54bb14678b2e07e706e3feb6ae57a..4b8d769437120adadb5dba2f3919d4eb96141292 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -157,7 +157,7 @@ class Partition():
out = exec_cmd(du_cmd)
rootfs_size = out.split()[0]
- self.size = rootfs_size
+ self.size = int(rootfs_size)
self.source_file = rootfs
def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
@@ -194,7 +194,7 @@ class Partition():
# get the rootfs size in the right units for kickstart (kB)
du_cmd = "du -Lbks %s" % rootfs
out = exec_cmd(du_cmd)
- self.size = out.split()[0]
+ self.size = int(out.split()[0])
break
@@ -379,7 +379,7 @@ class Partition():
out = exec_cmd(du_cmd)
fs_size = out.split()[0]
- self.size = fs_size
+ self.size = int(fs_size)
def prepare_swap_partition(self, cr_workdir, oe_builddir, native_sysroot):
"""
--
2.5.0
^ permalink raw reply related
* [PATCH 3/5] wic: check that filesystem is specified for a rootfs partition
From: Maciej Borzecki @ 2016-11-08 15:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Maciej Borzecki
In-Reply-To: <cover.1478619682.git.maciej.borzecki@rndity.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
---
scripts/lib/wic/partition.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 8adc698240c8e3bd9f4118663a5d7a167e0bb4a4..24e657592738dc7c5cdff78e3740d7c373021e9d 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -184,6 +184,10 @@ class Partition():
if os.path.isfile(rootfs):
os.remove(rootfs)
+ if not self.fstype:
+ msger.error("File system for partition %s not specified in kickstart, " \
+ "use --fstype option" % (self.mountpoint))
+
for prefix in ("ext", "btrfs", "vfat", "squashfs"):
if self.fstype.startswith(prefix):
method = getattr(self, "prepare_rootfs_" + prefix)
--
2.5.0
^ permalink raw reply related
* [PATCH 2/5] wic: use partition size when creating empty partition files
From: Maciej Borzecki @ 2016-11-08 15:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Maciej Borzecki
In-Reply-To: <cover.1478619682.git.maciej.borzecki@rndity.com>
It seems that prepare_empty_partition_ext() and
prepare_empty_partition_btrfs() got broken in commit
c8669749e37fe865c197c98d5671d9de176ff4dd, thus one could observe the
following backtrace:
Backtrace:
File "<snip>/poky/scripts/lib/wic/plugins/imager/direct_plugin.py", line 93, in do_create
creator.create()
File "<snip>/poky/scripts/lib/wic/imager/baseimager.py", line 159, in create
self._create()
File "<snip>/poky/scripts/lib/wic/imager/direct.py", line 290, in _create
self.bootimg_dir, self.kernel_dir, self.native_sysroot)
File "<snip>/poky/scripts/lib/wic/partition.py", line 146, in prepare
method(rootfs, oe_builddir, native_sysroot)
File "<snip>/poky/scripts/lib/wic/partition.py", line 325, in prepare_empty_partition_ext
os.ftruncate(sparse.fileno(), rootfs_size * 1024)
NameError: name 'rootfs_size' is not defined
Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
---
scripts/lib/wic/partition.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 4b8d769437120adadb5dba2f3919d4eb96141292..8adc698240c8e3bd9f4118663a5d7a167e0bb4a4 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -308,7 +308,7 @@ class Partition():
Prepare an empty ext2/3/4 partition.
"""
with open(rootfs, 'w') as sparse:
- os.ftruncate(sparse.fileno(), rootfs_size * 1024)
+ os.ftruncate(sparse.fileno(), self.size * 1024)
extra_imagecmd = "-i 8192"
@@ -326,7 +326,7 @@ class Partition():
Prepare an empty btrfs partition.
"""
with open(rootfs, 'w') as sparse:
- os.ftruncate(sparse.fileno(), rootfs_size * 1024)
+ os.ftruncate(sparse.fileno(), self.size * 1024)
label_str = ""
if self.label:
--
2.5.0
^ permalink raw reply related
* [PATCH 4/5] wic: fix function comment typos
From: Maciej Borzecki @ 2016-11-08 15:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Maciej Borzecki
In-Reply-To: <cover.1478619682.git.maciej.borzecki@rndity.com>
Fix typos in documentation of Image.add_partition() and
Image.__format_disks().
Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
---
scripts/lib/wic/utils/partitionedfs.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index cb03009fc7e3c97305079629ded7d2ff01eba4c4..9e76487844eebfffc7227d053a65dc9fdab3678b 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -92,7 +92,7 @@ class Image():
def add_partition(self, size, disk_name, mountpoint, source_file=None, fstype=None,
label=None, fsopts=None, boot=False, align=None, no_table=False,
part_type=None, uuid=None, system_id=None):
- """ Add the next partition. Prtitions have to be added in the
+ """ Add the next partition. Partitions have to be added in the
first-to-last order. """
ks_pnum = len(self.partitions)
@@ -292,7 +292,7 @@ class Image():
# even number of sectors.
if part['mountpoint'] == "/boot" and part['fstype'] in ["vfat", "msdos"] \
and part['size'] % 2:
- msger.debug("Substracting one sector from '%s' partition to " \
+ msger.debug("Subtracting one sector from '%s' partition to " \
"get even number of sectors for the partition" % \
part['mountpoint'])
part['size'] -= 1
--
2.5.0
^ permalink raw reply related
* [PATCH 5/5] wic: add --fixed-size wks option
From: Maciej Borzecki @ 2016-11-08 15:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Maciej Borzecki
In-Reply-To: <cover.1478619682.git.maciej.borzecki@rndity.com>
Added new option --fixed-size to wks. The option can be used to indicate
the exact size of a partition. The option cannot be added together with
--size, in which case an error will be raised. Other options that
influence automatic partition size (--extra-space, --overhead-factor),
if specifiec along with --fixed-size, will raise an error.
If it partition data is larger than the amount of space specified with
--fixed-size option wic will raise an error.
Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
---
scripts/lib/wic/help.py | 14 ++++--
scripts/lib/wic/imager/direct.py | 2 +-
scripts/lib/wic/ksparser.py | 41 +++++++++++++++--
scripts/lib/wic/partition.py | 83 ++++++++++++++++++++--------------
scripts/lib/wic/utils/partitionedfs.py | 2 +-
5 files changed, 100 insertions(+), 42 deletions(-)
diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index e5347ec4b7c900c68fc64351a5293e75de0672b3..daa11bf489c135627ddfe4cef968e48f8e3ad1d8 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -646,6 +646,12 @@ DESCRIPTION
not specified, the size is in MB.
You do not need this option if you use --source.
+ --fixed-size: Exact partition size. Value format is the same
+ as for --size option. This option cannot be
+ specified along with --size. If partition data
+ is larger than --fixed-size and error will be
+ raised when assembling disk image.
+
--source: This option is a wic-specific option that names the
source of the data that will populate the
partition. The most common value for this option
@@ -719,13 +725,15 @@ DESCRIPTION
space after the space filled by the content
of the partition. The final size can go
beyond the size specified by --size.
- By default, 10MB.
+ By default, 10MB. This option cannot be used
+ with --fixed-size option.
--overhead-factor: This option is specific to wic. The
size of the partition is multiplied by
this factor. It has to be greater than or
- equal to 1.
- The default value is 1.3.
+ equal to 1. The default value is 1.3.
+ This option cannot be used with --fixed-size
+ option.
--part-type: This option is specific to wic. It specifies partition
type GUID for GPT partitions.
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 2bedef08d6450096c786def6f75a9ee53fcd4b3b..c01a1ea538428e36a75ac5b31a822e01901bea6a 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -290,7 +290,7 @@ class DirectImageCreator(BaseImageCreator):
self.bootimg_dir, self.kernel_dir, self.native_sysroot)
- self.__image.add_partition(int(part.size),
+ self.__image.add_partition(part.get_size(),
part.disk,
part.mountpoint,
part.source_file,
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 0894e2b199a299fbbed272f2e1c95e9d692e3ab1..62c490274aa92bf82aac304d9323250e3b728d0c 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -113,6 +113,9 @@ def systemidtype(arg):
class KickStart():
""""Kickstart parser implementation."""
+ DEFAULT_EXTRA_SPACE = 10*1024
+ DEFAULT_OVERHEAD_FACTOR = 1.3
+
def __init__(self, confpath):
self.partitions = []
@@ -127,16 +130,24 @@ class KickStart():
part.add_argument('mountpoint', nargs='?')
part.add_argument('--active', action='store_true')
part.add_argument('--align', type=int)
- part.add_argument("--extra-space", type=sizetype, default=10*1024)
+ part.add_argument("--extra-space", type=sizetype)
part.add_argument('--fsoptions', dest='fsopts')
part.add_argument('--fstype')
part.add_argument('--label')
part.add_argument('--no-table', action='store_true')
part.add_argument('--ondisk', '--ondrive', dest='disk')
- part.add_argument("--overhead-factor", type=overheadtype, default=1.3)
+ part.add_argument("--overhead-factor", type=overheadtype)
part.add_argument('--part-type')
part.add_argument('--rootfs-dir')
- part.add_argument('--size', type=sizetype, default=0)
+
+ # --size and --fixed-size cannot be specified together; options
+ # ----extra-space and --overhead-factor should also raise a parser
+ # --error, but since nesting mutually exclusive groups does not work,
+ # ----extra-space/--overhead-factor are handled later
+ sizeexcl = part.add_mutually_exclusive_group()
+ sizeexcl.add_argument('--size', type=sizetype, default=0)
+ sizeexcl.add_argument('--fixed-size', type=sizetype, default=0)
+
part.add_argument('--source')
part.add_argument('--sourceparams')
part.add_argument('--system-id', type=systemidtype)
@@ -170,11 +181,33 @@ class KickStart():
lineno += 1
if line and line[0] != '#':
try:
- parsed = parser.parse_args(shlex.split(line))
+ line_args = shlex.split(line)
+ parsed = parser.parse_args(line_args)
except ArgumentError as err:
raise KickStartError('%s:%d: %s' % \
(confpath, lineno, err))
if line.startswith('part'):
+ # using ArgumentParser one cannot easily tell if option
+ # was passed as argument, if said option has a default
+ # value; --overhead-factor/--extra-space cannot be used
+ # with --fixed-size, so at least detect when these were
+ # passed with non-0 values ...
+ if parsed.fixed_size:
+ if parsed.overhead_factor or parsed.extra_space:
+ err = "%s:%d: arguments --overhead-factor and --extra-space not "\
+ "allowed with argument --fixed-size" \
+ % (confpath, lineno)
+ raise KickStartError(err)
+ else:
+ # ... and provide defaults if not using
+ # --fixed-size iff given option was not used
+ # (again, one cannot tell if option was passed but
+ # with value equal to 0)
+ if '--overhead-factor' not in line_args:
+ parsed.overhead_factor = self.DEFAULT_OVERHEAD_FACTOR
+ if '--extra-space' not in line_args:
+ parsed.extra_space = self.DEFAULT_EXTRA_SPACE
+
self.partnum += 1
self.partitions.append(Partition(parsed, self.partnum))
elif line.startswith('include'):
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 24e657592738dc7c5cdff78e3740d7c373021e9d..354d4b44c50c77baa54331e95ce0876c32d09339 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -54,6 +54,7 @@ class Partition():
self.part_type = args.part_type
self.rootfs_dir = args.rootfs_dir
self.size = args.size
+ self.fixed_size = args.fixed_size
self.source = args.source
self.sourceparams = args.sourceparams
self.system_id = args.system_id
@@ -87,6 +88,39 @@ class Partition():
else:
return 0
+ def get_rootfs_size(self, actual_rootfs_size=0):
+ """
+ Calculate the required size of rootfs taking into consideration
+ --size/--fixed-size flags as well as overhead and extra space, as
+ specified in kickstart file. Raises an error if the
+ `actual_rootfs_size` is larger than fixed-size rootfs.
+
+ """
+ if self.fixed_size:
+ rootfs_size = self.fixed_size
+ if actual_rootfs_size > rootfs_size:
+ msger.error("Actual rootfs size (%d kB) is larger than allowed size %d kB" \
+ %(actual_rootfs_size, rootfs_size))
+ else:
+ extra_blocks = self.get_extra_block_count(actual_rootfs_size)
+ if extra_blocks < self.extra_space:
+ extra_blocks = self.extra_space
+
+ rootfs_size = actual_rootfs_size + extra_blocks
+ rootfs_size *= self.overhead_factor
+
+ msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
+ (extra_blocks, self.mountpoint, rootfs_size))
+
+ return rootfs_size
+
+ def get_size(self):
+ """
+ Obtain partition size taking into consideration --size/--fixed-size
+ options.
+ """
+ return self.fixed_size if self.fixed_size else self.size
+
def prepare(self, creator, cr_workdir, oe_builddir, rootfs_dir,
bootimg_dir, kernel_dir, native_sysroot):
"""
@@ -97,9 +131,9 @@ class Partition():
self.sourceparams_dict = parse_sourceparams(self.sourceparams)
if not self.source:
- if not self.size:
- msger.error("The %s partition has a size of zero. Please "
- "specify a non-zero --size for that partition." % \
+ if not self.size and not self.fixed_size:
+ msger.error("The %s partition has a size of zero. Please "
+ "specify a non-zero --size/--fixed-size for that partition." % \
self.mountpoint)
if self.fstype and self.fstype == "swap":
self.prepare_swap_partition(cr_workdir, oe_builddir,
@@ -146,6 +180,10 @@ class Partition():
oe_builddir,
bootimg_dir, kernel_dir, rootfs_dir,
native_sysroot)
+ if self.fixed_size and self.size > self.fixed_size:
+ msger.error("File system image of partition %s is larger (%d kB) than its"\
+ "allowed size %d kB" % (self.mountpoint,
+ self.size, self.fixed_size))
def prepare_rootfs_from_fs_image(self, cr_workdir, oe_builddir,
rootfs_dir):
@@ -211,15 +249,7 @@ class Partition():
out = exec_cmd(du_cmd)
actual_rootfs_size = int(out.split()[0])
- extra_blocks = self.get_extra_block_count(actual_rootfs_size)
- if extra_blocks < self.extra_space:
- extra_blocks = self.extra_space
-
- rootfs_size = actual_rootfs_size + extra_blocks
- rootfs_size *= self.overhead_factor
-
- msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
- (extra_blocks, self.mountpoint, rootfs_size))
+ rootfs_size = self.get_rootfs_size(actual_rootfs_size)
with open(rootfs, 'w') as sparse:
os.ftruncate(sparse.fileno(), rootfs_size * 1024)
@@ -245,15 +275,7 @@ class Partition():
out = exec_cmd(du_cmd)
actual_rootfs_size = int(out.split()[0])
- extra_blocks = self.get_extra_block_count(actual_rootfs_size)
- if extra_blocks < self.extra_space:
- extra_blocks = self.extra_space
-
- rootfs_size = actual_rootfs_size + extra_blocks
- rootfs_size *= self.overhead_factor
-
- msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
- (extra_blocks, self.mountpoint, rootfs_size))
+ rootfs_size = self.get_rootfs_size(actual_rootfs_size)
with open(rootfs, 'w') as sparse:
os.ftruncate(sparse.fileno(), rootfs_size * 1024)
@@ -275,20 +297,13 @@ class Partition():
out = exec_cmd(du_cmd)
blocks = int(out.split()[0])
- extra_blocks = self.get_extra_block_count(blocks)
- if extra_blocks < self.extra_space:
- extra_blocks = self.extra_space
-
- blocks += extra_blocks
-
- msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
- (extra_blocks, self.mountpoint, blocks))
+ rootfs_size = self.get_rootfs_size(blocks)
label_str = "-n boot"
if self.label:
label_str = "-n %s" % self.label
- dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, blocks)
+ dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, rootfs_size)
exec_native_cmd(dosfs_cmd, native_sysroot)
mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir)
@@ -311,8 +326,9 @@ class Partition():
"""
Prepare an empty ext2/3/4 partition.
"""
+ size = self.get_size()
with open(rootfs, 'w') as sparse:
- os.ftruncate(sparse.fileno(), self.size * 1024)
+ os.ftruncate(sparse.fileno(), size * 1024)
extra_imagecmd = "-i 8192"
@@ -329,8 +345,9 @@ class Partition():
"""
Prepare an empty btrfs partition.
"""
+ size = self.get_size()
with open(rootfs, 'w') as sparse:
- os.ftruncate(sparse.fileno(), self.size * 1024)
+ os.ftruncate(sparse.fileno(), size * 1024)
label_str = ""
if self.label:
@@ -345,7 +362,7 @@ class Partition():
"""
Prepare an empty vfat partition.
"""
- blocks = self.size
+ blocks = self.get_size()
label_str = "-n boot"
if self.label:
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 9e76487844eebfffc7227d053a65dc9fdab3678b..cfa5f5ce09b764c1c2a9b7a3f7bf7d677a6811c4 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -209,7 +209,7 @@ class Image():
msger.debug("Assigned %s to %s%d, sectors range %d-%d size %d "
"sectors (%d bytes)." \
% (part['mountpoint'], part['disk_name'], part['num'],
- part['start'], part['start'] + part['size'] - 1,
+ part['start'], disk['offset'] - 1,
part['size'], part['size'] * self.sector_size))
# Once all the partitions have been layed out, we can calculate the
--
2.5.0
^ permalink raw reply related
* Re: methodology for writing OE perl recipes equivalent to RH RPMs
From: Khem Raj @ 2016-11-08 16:22 UTC (permalink / raw)
To: Robert P. J. Day, OE Core mailing list
In-Reply-To: <alpine.LFD.2.20.1611080239410.18324@localhost.localdomain>
[-- Attachment #1.1: Type: text/plain, Size: 4846 bytes --]
On 11/8/16 12:19 AM, Robert P. J. Day wrote:
>
> (NOTE: i'm fighting with a compile error in a perl recipe i've
> written, but rather than ask about that right this instant, i want to
> explain my general methodology for writing these sorts of recipes so
> that, in the future, i'll have a much better idea of how to solve
> issues like this, so i apologize for the verbosity, and if people want
> to chime in with advice, i'll be delighted to write all this up later
> for everyone else's benefit. *then* i'll ask about my compile error.)
>
> at the moment, for a "qemuppc" core-image-minimal target, i'm trying
> to write OE-equivalent perl and/or python recipes for 200+ x86_64
> centos RPMs -- effectively trying to reproduce (for powerpc) a running
> centos 7 system. in short, trying to port a centos 7 system to an
> OE-based powerpc box, which involves reproducing with OE equivalents
> quite a number of stock RPMs for which there are no obvious available
> recipes. from that initial list of 200+ RPMs, i'm down to less than 60
> to go, so that's progress.
>
> most of what's left is perl, so here's my methodology for creating a
> perl recipe, and i'll use a specific example, "perl-Net-IP", and even
> though i'm doing this on my fedora system, there's not much difference
> between this system and a centos box, other than RPM version
> differences.
>
> first, i typically pop over to the OE layers page, and do a search
> to see if there's already a recipe for what i'm looking for -- in this
> case, i didn't see an equivalent for "perl-Net-IP":
>
> https://layers.openembedded.org/layerindex/branch/master/recipes/?q=perl+net+ip
>
> (Q: is that a reasonably comprehensive search approach? oh, and i've
> already been advised to avoid using the meta-debian layer.)
>
> next, since it looks like i'll need to write a recipe, i install the
> equivalent recipe on my fedora box, just to see what i'm aiming for as
> a final result (or something reasonably equivalent):
>
> $ sudo dnf install perl-Net-IP
> $ rpm -ql perl-Net-IP
> /usr/bin/ipcount
> /usr/bin/iptab
> /usr/share/doc/perl-Net-IP
> /usr/share/doc/perl-Net-IP/COPYING
> /usr/share/doc/perl-Net-IP/Changes
> /usr/share/doc/perl-Net-IP/README
> /usr/share/man/man3/Net::IP.3pm.gz
> /usr/share/perl5/vendor_perl/Net
> /usr/share/perl5/vendor_perl/Net/IP.pm
> $
>
> ok, now i have an idea of what my final OE build should produce.
>
> next, pop over to metacpan.org and search for corresponding source
> to find:
>
> https://metacpan.org/pod/Net::IP
>
> at which point, write a fairly boilerplate recipe (the "noarch" RPMs
> are the easy ones), filling in among other things:
>
> * "SRC_URI"
> * checksums
> * "S"
> * "inherit cpan allarch"
>
> ///// start /////
>
> DESCRIPTION = "Net::IP"
>
> SECTION = "libs"
> LICENSE = "Artisticv1 | GPLv1+"
> PR = "r0"
>
> MAINTAINER= "rday"
> HOMEPAGE= "https://metacpan.org/pod/Net::IP"
>
> LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
> file://${COMMON_LICENSE_DIR}/GPL-1.0;md5=e9e36a9de734199567a4d769498f743d"
>
> SRC_URI = "https://cpan.metacpan.org/authors/id/M/MA/MANU/Net-IP-1.26.tar.gz"
>
> SRC_URI[md5sum] = "3a98e3ac45d69ea38a63a7e678bd716d"
> SRC_URI[sha256sum] = "040f16f3066647d761b724a3b70754d28cbd1e6fe5ea01c63ed1cd857117d639"
>
> S = "${WORKDIR}/Net-IP-${PV}"
>
> inherit cpan allarch
>
> BBCLASSEXTEND = "native"
>
> ///// end /////
>
> at this point, i run:
>
> $ bitbake -c fetchall perl-net-ip
>
> to make sure the fetch works (and adjust checksums to taste), then:
>
> $ bitbake perl-net-ip
>
> to build, and check the contents of the resulting rpm file to see that
> it matches:
>
> $ rpm -qpl perl-net-ip-1.26-r0.all.rpm
> /usr
> /usr/bin
> /usr/bin/ipcount
> /usr/bin/iptab
> /usr/lib
> /usr/lib/perl
> /usr/lib/perl/vendor_perl
> /usr/lib/perl/vendor_perl/5.22.1
> /usr/lib/perl/vendor_perl/5.22.1/Net
> /usr/lib/perl/vendor_perl/5.22.1/Net/IP.pm
> $
>
> looks good, so that gets added to my build, and on to the next recipe.
>
> couple final notes:
>
> * i'm currently ignoring all the dependencies i should be adding to
> those recipes; i'll put them in later
>
> * it's easy to see when i should use "inherit cpan_build" for the
> older-style Build.PL-based recipes
>
> * about to get into the arch-specific recipes, so that will get more
> interesting ... back shortly with my recipe that's causing the build
> error
>
> thoughts?
>
this seems OK approach to me. I wonder how would recipe-tool fair doing the
new recipe work of this sort of usecase. ( devtool add )
> rday
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 211 bytes --]
^ permalink raw reply
* [Patch v2 00/14] MIPS: Use MACHINEOVERRIDES and reduce duplication
From: Zubair Lutfullah Kakakhel @ 2016-11-08 17:12 UTC (permalink / raw)
To: openembedded-core
Hi,
This patch series adds a few MACHINEOVERRIDES options in arch-mips
to reduce duplicate configurations in various recipes.
Further info in
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10404
Regards,
ZubairLK
V1 -> V2
Added more options for endian independent and big/little endian
Added another patch for o32 in TUNE_FEATURES for MIPS32R6.
Zubair Lutfullah Kakakhel (14):
arch-mips: Add o32 in TUNE_FEATURES for MIPS32R6
arch-mips: Add MACHINEOVERRIDES variables to reduce duplication
bitbake.conf: Reduce duplication in MIPS variants
fts: Reduce duplication in MIPS variants.
glibc: Reduce duplication in MIPS variants
packagegroup: Reduce duplication in MIPS variants.
gcc-runtime: Reduce duplication in MIPS variants.
gdb: Reduce duplication in MIPS variants.
mmc-utils: Reduce duplication in MIPS variants.
valgrind: Reduce duplication in MIPS variants.
ghostscript: Reduce duplication in MIPS variants.
ltp: Reduce duplication in MIPS variants.
mdadm: Reduce duplication in MIPS variants.
webkit: Reduce duplication in MIPS variants.
meta/conf/bitbake.conf | 11 +----------
meta/conf/machine/include/mips/README | 3 +++
meta/conf/machine/include/mips/arch-mips.inc | 12 ++++++++++++
meta/conf/machine/include/tune-mips32r6.inc | 8 ++++----
meta/recipes-core/fts/fts.bb | 5 +----
meta/recipes-core/glibc/glibc-ld.inc | 17 ++---------------
.../recipes-core/packagegroups/packagegroup-core-sdk.bb | 5 +----
.../packagegroups/packagegroup-core-tools-profile.bb | 10 ++--------
meta/recipes-devtools/gcc/gcc-runtime.inc | 9 +--------
meta/recipes-devtools/gdb/gdb-common.inc | 7 +------
meta/recipes-devtools/mmc/mmc-utils_git.bb | 4 ++--
meta/recipes-devtools/valgrind/valgrind_3.12.0.bb | 3 +--
meta/recipes-extended/ghostscript/ghostscript_9.19.bb | 3 +--
meta/recipes-extended/ltp/ltp_20160126.bb | 2 +-
meta/recipes-extended/mdadm/mdadm_3.4.bb | 4 ++--
meta/recipes-sato/webkit/webkitgtk_2.14.1.bb | 3 +--
16 files changed, 36 insertions(+), 70 deletions(-)
--
2.10.2
^ permalink raw reply
* [Patch v2 03/14] bitbake.conf: Reduce duplication in MIPS variants
From: Zubair Lutfullah Kakakhel @ 2016-11-08 17:12 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <20161108171235.41837-1-Zubair.Kakakhel@imgtec.com>
Reduce duplication in MIPS variants now that the MACHINEOVERRIDES
variable is defined
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
meta/conf/bitbake.conf | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 9f445bb..1472e8f 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -533,16 +533,7 @@ BUILDSDK_LDFLAGS = "-Wl,-O1"
LINKER_HASH_STYLE ??= "gnu"
# mips does not support GNU hash style therefore we override
-LINKER_HASH_STYLE_mips = "sysv"
-LINKER_HASH_STYLE_mipsel = "sysv"
-LINKER_HASH_STYLE_mips64 = "sysv"
-LINKER_HASH_STYLE_mips64el = "sysv"
-LINKER_HASH_STYLE_mips64n32 = "sysv"
-LINKER_HASH_STYLE_mips64eln32 = "sysv"
-LINKER_HASH_STYLE_mipsisa32r6 = "sysv"
-LINKER_HASH_STYLE_mipsisa32r6el = "sysv"
-LINKER_HASH_STYLE_mipsisa64r6 = "sysv"
-LINKER_HASH_STYLE_mipsisa64r6el = "sysv"
+LINKER_HASH_STYLE_mipsarch = "sysv"
TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE', True) != 'gnu']}"
--
2.10.2
^ permalink raw reply related
* [Patch v2 02/14] arch-mips: Add MACHINEOVERRIDES variables to reduce duplication
From: Zubair Lutfullah Kakakhel @ 2016-11-08 17:12 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <20161108171235.41837-1-Zubair.Kakakhel@imgtec.com>
In some cases, each MIPS variant in a recipe requires a duplicate
line. Even if the passed flag is the same.
Add global MACHINEOVERRIDES variables for the following
* mipsarch : All MIPS
* mipsarch{eb,el} : All MIPS Big/Little Endian
* mipsarchr6 : All MIPS R6
* mipsarcho32 : All MIPS o32 Endian Independent
* mipsarchn32 : All MIPS n32 Endian Independent
* mipsarchn64 : All MIPS n64 Endian Independent
* mipsarcho32{eb,el} : All MIPS o32 Big/Little Endian
* mipsarchn32{eb,el} : All MIPS n32 Big/Little Endian
* mipsarchn64{eb,el} : All MIPS n64 Big/Little Endian
This is intended to reduce duplications in recipes
[YOCTO #10404]
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
meta/conf/machine/include/mips/README | 3 +++
meta/conf/machine/include/mips/arch-mips.inc | 12 ++++++++++++
2 files changed, 15 insertions(+)
diff --git a/meta/conf/machine/include/mips/README b/meta/conf/machine/include/mips/README
index 62fa156..f36e87b 100644
--- a/meta/conf/machine/include/mips/README
+++ b/meta/conf/machine/include/mips/README
@@ -32,6 +32,9 @@ MIPSPKGSFX_BYTE - This is defined as either blank and "64" for MIPS64 CPUs.
MIPSPKGSFX_ENDIAN - For bigendian hardware this is blank, otherwise it's
defined as "el".
+MIPSPKGSFX_ENDIAN2 - For bigendian hardware this is "eb", otherwise it's
+defined as "el".
+
MIPSPKGSFX_VARIANT_tune-<tune> - In the default tunings it is set to the
same value as TUNE_ARCH. In custom, optimized tunings, the value should
be modified to more precisely describe the tuning.
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
index 6069ca1..d8b2bcb 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -39,6 +39,7 @@ TUNEVALID[mipsisa32r6] = "Use 32r6"
# Package naming
MIPSPKGSFX_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el', d)}"
+MIPSPKGSFX_ENDIAN2 = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'eb', 'el', d)}"
MIPSPKGSFX_BYTE = "${@bb.utils.contains('TUNE_FEATURES', 'n64' , '64', '', d)}"
MIPSPKGSFX_BYTE .= "${@bb.utils.contains('TUNE_FEATURES', 'n32' , '64', '', d)}"
MIPSPKGSFX_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard' , '', '-nf', d)}"
@@ -50,6 +51,17 @@ MIPSPKGSFX_32R6 = "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa32r6', 'isa32',
TUNE_ARCH = "mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
+# Various Global Machine Overrides
+MACHINEOVERRIDES =. "mipsarch:"
+MACHINEOVERRIDES =. "mipsarch${MIPSPKGSFX_ENDIAN2}:"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'r6', 'mipsarchr6:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'mipsarchn32:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'o32', 'mipsarcho32:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n64', 'mipsarchn64:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'mipsarchn32${MIPSPKGSFX_ENDIAN2}:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'o32', 'mipsarcho32${MIPSPKGSFX_ENDIAN2}:', '' ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n64', 'mipsarchn64${MIPSPKGSFX_ENDIAN2}:', '' ,d)}"
+
# Base tunes
AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
--
2.10.2
^ permalink raw reply related
* [Patch v2 01/14] arch-mips: Add o32 in TUNE_FEATURES for MIPS32R6
From: Zubair Lutfullah Kakakhel @ 2016-11-08 17:12 UTC (permalink / raw)
To: openembedded-core
In-Reply-To: <20161108171235.41837-1-Zubair.Kakakhel@imgtec.com>
mips32r6 tunings should have o32 ABI flag in TUNE_FEATURES
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
Applies to Morty as well
---
meta/conf/machine/include/tune-mips32r6.inc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/conf/machine/include/tune-mips32r6.inc b/meta/conf/machine/include/tune-mips32r6.inc
index 4721319..dea33ea 100644
--- a/meta/conf/machine/include/tune-mips32r6.inc
+++ b/meta/conf/machine/include/tune-mips32r6.inc
@@ -9,21 +9,21 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa32r6', ' -march=mi
# Base Tunes
AVAILTUNES += "mipsisa32r6 mipsisa32r6el"
-TUNE_FEATURES_tune-mipsisa32r6 = "bigendian mipsisa32r6 fpu-hard r6"
+TUNE_FEATURES_tune-mipsisa32r6 = "o32 bigendian mipsisa32r6 fpu-hard r6"
MIPSPKGSFX_VARIANT_tune-mipsisa32r6 = "${TUNE_ARCH}"
PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6 = "mipsisa32r6"
-TUNE_FEATURES_tune-mipsisa32r6el = "fpu-hard mipsisa32r6 r6"
+TUNE_FEATURES_tune-mipsisa32r6el = "o32 fpu-hard mipsisa32r6 r6"
MIPSPKGSFX_VARIANT_tune-mipsisa32r6el = "${TUNE_ARCH}"
PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6el = "mipsisa32r6el"
# Soft Float
AVAILTUNES += "mipsisa32r6-nf mipsisa32r6el-nf"
-TUNE_FEATURES_tune-mipsisa32r6-nf = "bigendian mipsisa32r6 r6"
+TUNE_FEATURES_tune-mipsisa32r6-nf = "o32 bigendian mipsisa32r6 r6"
MIPSPKGSFX_VARIANT_tune-mipsisa32r6-nf = "${TUNE_ARCH}"
PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6-nf = "mipsisa32r6-nf"
-TUNE_FEATURES_tune-mipsisa32r6el-nf = "mipsisa32r6 r6"
+TUNE_FEATURES_tune-mipsisa32r6el-nf = "o32 mipsisa32r6 r6"
MIPSPKGSFX_VARIANT_tune-mipsisa32r6el-nf = "${TUNE_ARCH}"
PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6el-nf = "mipsisa32r6el-nf"
--
2.10.2
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox