diff --git a/meta-digi-dey/conf/distro/dey.conf b/meta-digi-dey/conf/distro/dey.conf index 01f9cd81f..f0750c6b3 100644 --- a/meta-digi-dey/conf/distro/dey.conf +++ b/meta-digi-dey/conf/distro/dey.conf @@ -56,9 +56,6 @@ PREFERRED_VERSION_linux-yocto_qemumips ?= "4.8%" PREFERRED_VERSION_linux-yocto_qemumips64 ?= "4.8%" PREFERRED_VERSION_linux-yocto_qemuppc ?= "4.8%" -# Use swupdate version 2016.10 -PREFERRED_VERSION_swupdate = "2016.10+git%" - SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate/0001-progress_client-add-command-line-parameter.patch b/meta-digi-dey/recipes-support/swupdate/swupdate/0001-progress_client-add-command-line-parameter.patch deleted file mode 100644 index a45429c2f..000000000 --- a/meta-digi-dey/recipes-support/swupdate/swupdate/0001-progress_client-add-command-line-parameter.patch +++ /dev/null @@ -1,133 +0,0 @@ -From: Stefano Babic -Date: Wed, 30 Nov 2016 18:04:21 +0100 -Subject: [PATCH] progress_client: add command line parameter - -Add command lin eparameter to: -- waiting forever for a connection with SWUpdate -- make psplash optional - -Signed-off-by: Stefano Babic -Signed-off-by: David Escalona ---- - progress_client/progress.c | 67 +++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 60 insertions(+), 7 deletions(-) - -diff --git a/progress_client/progress.c b/progress_client/progress.c -index b057a8f..c587dd6 100644 ---- a/progress_client/progress.c -+++ b/progress_client/progress.c -@@ -34,11 +34,30 @@ - #include - #include - #include -+#include - - #include - - #define PSPLASH_MSG_SIZE 64 - -+static struct option long_options[] = { -+ {"psplash", no_argument, NULL, 'p'}, -+ {"wait", no_argument, NULL, 'w'}, -+ {NULL, 0, NULL, 0} -+}; -+ -+static void usage(char *programname) -+{ -+ fprintf(stdout, "%s (compiled %s)\n", programname, __DATE__); -+ fprintf(stdout, "Usage %s [OPTION]\n", -+ programname); -+ fprintf(stdout, -+ " -w, --wait : wait for a connection with SWUpdate\n" -+ " -p, --psplash : send info to the psplash process\n" -+ " -h, --help : print this help and exit\n" -+ ); -+} -+ - static int psplash_init(char *pipe) - { - int psplash_pipe_fd; -@@ -123,7 +142,8 @@ static void psplash_progress(char *pipe, struct progress_msg *pmsg) - free(buf); - } - --int main(void) { -+int main(int argc, char **argv) -+{ - int connfd; - struct sockaddr_un servaddr; - struct progress_msg msg; -@@ -135,7 +155,31 @@ int main(void) { - int percent = 0; - char bar[60]; - int filled_len; -+ int opt_w = 0; -+ int opt_p = 0; -+ int c; - -+ /* Process options with getopt */ -+ while ((c = getopt_long(argc, argv, "wph", -+ long_options, NULL)) != EOF) { -+ switch (c) { -+ case 'w': -+ opt_w = 1; -+ break; -+ case 'p': -+ opt_p = 1; -+ break; -+ case 'h': -+ usage(argv[0]); -+ exit(0); -+ break; -+ default: -+ usage(argv[0]); -+ exit(1); -+ break; -+ } -+ } -+ - tmpdir = getenv("TMPDIR"); - if (!tmpdir) - tmpdir = "/tmp"; -@@ -150,10 +194,18 @@ int main(void) { - servaddr.sun_family = AF_LOCAL; - strcpy(servaddr.sun_path, SOCKET_PROGRESS_PATH); - -- ret = connect(connfd, (struct sockaddr *) &servaddr, sizeof(servaddr)); -- if (ret < 0) { -- fprintf(stderr, "no communication with swupdate\n"); -- } -+ /* Connection to SWUpdate */ -+ do { -+ ret = connect(connfd, (struct sockaddr *) &servaddr, sizeof(servaddr)); -+ if (ret == 0) -+ break; -+ if (!opt_w) { -+ fprintf(stderr, "no communication with swupdate\n"); -+ exit(1); -+ } -+ -+ sleep(1); -+ } while (1); - - while (1) { - ret = read(connfd, &msg, sizeof(msg)); -@@ -161,7 +213,7 @@ int main(void) { - close(connfd); - exit(1); - } -- if (!psplash_ok) { -+ if (!psplash_ok && opt_p) { - psplash_ok = psplash_init(psplash_pipe_path); - } - -@@ -193,7 +245,8 @@ int main(void) { - fprintf(stdout, "\n\n%s !\n", msg.status == SUCCESS - ? "SUCCESS" - : "FAILURE"); -- psplash_progress(psplash_pipe_path, &msg); -+ if (psplash_ok) -+ psplash_progress(psplash_pipe_path, &msg); - psplash_ok = 0; - break; - case DONE: diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate_2017.01.bbappend b/meta-digi-dey/recipes-support/swupdate/swupdate_2017.01.bbappend new file mode 100644 index 000000000..e5fae592d --- /dev/null +++ b/meta-digi-dey/recipes-support/swupdate/swupdate_2017.01.bbappend @@ -0,0 +1,9 @@ +# Copyright (C) 2016, 2017 Digi International Inc. + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +do_install_append() { + # Copy the 'progress' binary. + install -d ${D}${bindir}/ + install -m 0755 progress ${D}${bindir}/ +} diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate_git.bbappend b/meta-digi-dey/recipes-support/swupdate/swupdate_git.bbappend deleted file mode 100644 index f973e1df0..000000000 --- a/meta-digi-dey/recipes-support/swupdate/swupdate_git.bbappend +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2016 Digi International - -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" - -# Version 2016.10 -SRCREV = "edd6559728d2e234ebdc03ba1d5444449ae2b92b" -PV = "2016.10+git${SRCPV}" - -SRC_URI += "file://0001-progress_client-add-command-line-parameter.patch" - -do_install_append() { - # The 'progress' command is new starting in version '2016.10', but we - # don't need to do a version check here because the bbappend is version - # specific (PV hardcoded above) - install -d ${D}${bindir}/ - install -m 0755 progress ${D}${bindir}/ -}