Skip to content
Snippets Groups Projects
Commit c3453465 authored by David Mondou's avatar David Mondou
Browse files

Added engr-test build layer.

Added patches need to SWUpdate to recreate Hawkbit demo.
parent d8cb5df4
No related branches found
No related tags found
No related merge requests found
diff --git a/handlers/uboot_handler.c b/handlers/uboot_handler.c
index ae3f870..ee56b8f 100644
--- a/handlers/uboot_handler.c
+++ b/handlers/uboot_handler.c
@@ -33,6 +33,8 @@
static void uboot_handler(void);
+#define CONFIG_UBOOT_FWENV "/etc/fw_env.config"
+
struct env_opts *fw_env_opts = &(struct env_opts) {
.config_file = (char *)CONFIG_UBOOT_FWENV
};
@@ -59,10 +61,11 @@ static int install_uboot_environment(struct img_type *img,
close(fdout);
}
+
ret = fw_parse_script(filename, fw_env_opts);
if (ret < 0)
- snprintf(buf, sizeof(buf), "Error setting U-Boot environment");
+ snprintf(buf, sizeof(buf), "Error filename %s, fw_env_opts %s", filename, fw_env_opts->config_file);
else
snprintf(buf, sizeof(buf), "U-Boot environment updated");
diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c
index 4f7d3dc..fb8f9ed 100644
--- a/suricatta/server_hawkbit.c
+++ b/suricatta/server_hawkbit.c
@@ -900,11 +900,11 @@ server_op_res_t server_install_update(void)
}
}
- if ((result = save_state((char *)STATE_KEY, STATE_INSTALLED)) !=
+ /*if ((result = save_state((char *)STATE_KEY, STATE_INSTALLED)) !=
SERVER_OK) {
ERROR("Cannot persistently store update state.\n");
goto cleanup;
- }
+ }*/
if (server_send_deployment_reply(
action_id, json_data_chunk_max, json_data_chunk_count,
@@ -915,6 +915,15 @@ server_op_res_t server_install_update(void)
"server.\n");
}
+ if (server_send_deployment_reply(
+ action_id, 0, 0, reply_status_result_finished.success,
+ reply_status_execution.closed,
+ (const char *)"Skipped Update.") != SERVER_OK) {
+ ERROR("Error while reporting installation progress to "
+ "server.\n");
+ }
+
+
cleanup:
if (channel_data.json_reply != NULL &&
json_object_put(channel_data.json_reply) != JSON_OBJECT_FREED) {
diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc
index 30b21c1..ad6c5d6 100644
--- a/recipes-support/swupdate/swupdate.inc
+++ b/recipes-support/swupdate/swupdate.inc
@@ -5,6 +5,8 @@ DEPENDS = "mtd-utils libconfig libarchive openssl lua curl json-c u-boot-fw-util
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
++TARGET_CC_ARCH += "${LDFLAGS}"
inherit cml1 update-rc.d systemd
SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=git \
diff --git a/recipes-support/swupdate/swupdate/defconfig b/recipes-support/swupdate/swupdate/defconfig
index 5e5b24f..fc13846 100644
--- a/recipes-support/swupdate/swupdate/defconfig
+++ b/recipes-support/swupdate/swupdate/defconfig
@@ -1,7 +1,6 @@
#
-# Automatically generated make config: don't edit
-# swupdate version: 2014.07.0
-# Tue Dec 30 15:37:21 2014
+# Automatically generated file; DO NOT EDIT.
+# Swupdate Configuration
#
CONFIG_HAVE_DOT_CONFIG=y
@@ -15,14 +14,17 @@ CONFIG_HAVE_DOT_CONFIG=y
CONFIG_SCRIPTS=y
CONFIG_HW_COMPATIBILITY=y
CONFIG_HW_COMPATIBILITY_FILE="/etc/hwrevision"
+CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
+CONFIG_MTD=y
CONFIG_LUA=y
+CONFIG_LUAPKG="lua"
# CONFIG_FEATURE_SYSLOG is not set
#
# Build Options
#
# CONFIG_STATIC is not set
-CONFIG_CROSS_COMPILER_PREFIX=""
+CONFIG_CROSS_COMPILE=""
CONFIG_SYSROOT=""
CONFIG_EXTRA_CFLAGS=""
CONFIG_EXTRA_LDFLAGS=""
@@ -32,10 +34,32 @@ CONFIG_EXTRA_LDLIBS=""
# Debugging Options
#
# CONFIG_DEBUG is not set
-# CONFIG_DEBUG_PESSIMIZE is not set
# CONFIG_WERROR is not set
# CONFIG_NOCLEANUP is not set
# CONFIG_DOWNLOAD is not set
+# CONFIG_HASH_VERIFY is not set
+# CONFIG_SIGNED_IMAGES is not set
+# CONFIG_ENCRYPTED_IMAGES is not set
+CONFIG_SURICATTA=y
+
+#
+# Suricatta
+#
+
+#
+# Features
+#
+# CONFIG_SURICATTA_SSL is not set
+# CONFIG_SURICATTA_STATE_CHOICE_NONE is not set
+CONFIG_SURICATTA_STATE_CHOICE_UBOOT=y
+CONFIG_SURICATTA_STATE_UBOOT=""
+
+#
+# Server
+#
+CONFIG_SURICATTA_HAWKBIT=y
+# CONFIG_SURICATTA_SERVER_NONE is not set
+CONFIG_SURICATTA_HAWKBIT_PROXY=""
CONFIG_WEBSERVER=y
#
@@ -47,36 +71,36 @@ CONFIG_MONGOOSE=y
# Mongoose Feature
#
CONFIG_MONGOOSELUA=y
-# CONFIG_MONGOOSESQL is not set
CONFIG_MONGOOSEIPV6=y
CONFIG_MONGOOSESSL=y
#
# Archival Features
#
-CONFIG_CPIO=y
CONFIG_GUNZIP=y
#
# Parser Features
#
CONFIG_LIBCONFIG=y
+CONFIG_LIBCONFIGROOT=""
+CONFIG_JSON=y
# CONFIG_LUAEXTERNAL is not set
-# CONFIG_SETEXTPARSERNAME is not set
-CONFIG_EXTPARSERNAME=""
# CONFIG_SETSWDESCRIPTION is not set
-CONFIG_SWDESCRIPTION=""
#
# Image Handlers
#
-# CONFIG_UBIVOL is not set
-CONFIG_UBIBLACKLIST=""
+CONFIG_UBIVOL=y
+CONFIG_UBIBLACKLIST="0 1 3"
CONFIG_UBIVIDOFFSET=0
CONFIG_CFI=y
+# CONFIG_CFIHAMMING1 is not set
CONFIG_RAW=y
CONFIG_LUASCRIPTHANDLER=y
CONFIG_SHELLSCRIPTHANDLER=y
CONFIG_HANDLER_IN_LUA=y
+CONFIG_ARCHIVE=y
+# CONFIG_REMOTE_HANDLER is not set
CONFIG_UBOOT=y
CONFIG_UBOOT_FWENV="/etc/fw_env.config"
diff --git a/recipes-support/swupdate/swupdate_2016.10.bb b/recipes-support/swupdate/swupdate_2016.10.bb
index 662b3d0..24c3c02 100644
--- a/recipes-support/swupdate/swupdate_2016.10.bb
+++ b/recipes-support/swupdate/swupdate_2016.10.bb
@@ -1,3 +1,3 @@
require swupdate.inc
-
+TARGET_CC_ARCH += "${LDFLAGS}"
SRCREV = "edd6559728d2e234ebdc03ba1d5444449ae2b92b"
require recipes-core/images/core-image-minimal.bb
IMAGE_INSTALL += " memtester iperf3 packagegroup-base-wifi e2fsprogs dosfstools strace u-boot-fw-utils openssh swupdate mtd-utils mtd-utils-ubifs rng-tools i2c-tools"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment