diff mbox series

[meta-swupdate-boards,2/2] meta-swupdate-boards: rename beaglebone to beaglebone-yocto

Message ID 1555613095-13251-2-git-send-email-pjtexier@koncepto.io
State Accepted
Headers show
Series [meta-swupdate-boards,1/2] layer.conf: add layer compatibility to warrior | expand

Commit Message

'Darko Komljenovic' via swupdate April 18, 2019, 6:44 p.m. UTC
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
---
 .../u-boot-fw-utils/beaglebone-yocto/fw_env.config |   3 +
 .../u-boot-fw-utils/beaglebone/fw_env.config       |   3 -
 .../update-image/beaglebone-yocto/emmcsetup.lua    |  85 +++++++++
 .../update-image/beaglebone-yocto/sw-description   |  63 +++++++
 .../images/update-image/beaglebone/emmcsetup.lua   |  85 ---------
 .../images/update-image/beaglebone/sw-description  |  63 -------
 .../swupdate/swupdate/beaglebone-yocto/defconfig   | 103 +++++++++++
 .../swupdate/swupdate/beaglebone-yocto/swupdate    | 193 +++++++++++++++++++++
 .../swupdate/beaglebone-yocto/swupdate.cfg         |  47 +++++
 .../swupdate/swupdate/beaglebone/defconfig         | 103 -----------
 .../swupdate/swupdate/beaglebone/swupdate          | 193 ---------------------
 .../swupdate/swupdate/beaglebone/swupdate.cfg      |  47 -----
 12 files changed, 494 insertions(+), 494 deletions(-)
 create mode 100644 recipes-bsp/u-boot/u-boot-fw-utils/beaglebone-yocto/fw_env.config
 delete mode 100644 recipes-bsp/u-boot/u-boot-fw-utils/beaglebone/fw_env.config
 create mode 100644 recipes-extended/images/update-image/beaglebone-yocto/emmcsetup.lua
 create mode 100644 recipes-extended/images/update-image/beaglebone-yocto/sw-description
 delete mode 100644 recipes-extended/images/update-image/beaglebone/emmcsetup.lua
 delete mode 100644 recipes-extended/images/update-image/beaglebone/sw-description
 create mode 100644 recipes-support/swupdate/swupdate/beaglebone-yocto/defconfig
 create mode 100644 recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate
 create mode 100644 recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate.cfg
 delete mode 100644 recipes-support/swupdate/swupdate/beaglebone/defconfig
 delete mode 100644 recipes-support/swupdate/swupdate/beaglebone/swupdate
 delete mode 100644 recipes-support/swupdate/swupdate/beaglebone/swupdate.cfg

Comments

Stefano Babic April 19, 2019, 1:13 p.m. UTC | #1
On 18/04/19 20:44, 'Pierre-Jean Texier' via swupdate wrote:
> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> ---
>  .../u-boot-fw-utils/beaglebone-yocto/fw_env.config |   3 +
>  .../u-boot-fw-utils/beaglebone/fw_env.config       |   3 -
>  .../update-image/beaglebone-yocto/emmcsetup.lua    |  85 +++++++++
>  .../update-image/beaglebone-yocto/sw-description   |  63 +++++++
>  .../images/update-image/beaglebone/emmcsetup.lua   |  85 ---------
>  .../images/update-image/beaglebone/sw-description  |  63 -------
>  .../swupdate/swupdate/beaglebone-yocto/defconfig   | 103 +++++++++++
>  .../swupdate/swupdate/beaglebone-yocto/swupdate    | 193 +++++++++++++++++++++
>  .../swupdate/beaglebone-yocto/swupdate.cfg         |  47 +++++
>  .../swupdate/swupdate/beaglebone/defconfig         | 103 -----------
>  .../swupdate/swupdate/beaglebone/swupdate          | 193 ---------------------
>  .../swupdate/swupdate/beaglebone/swupdate.cfg      |  47 -----
>  12 files changed, 494 insertions(+), 494 deletions(-)
>  create mode 100644 recipes-bsp/u-boot/u-boot-fw-utils/beaglebone-yocto/fw_env.config
>  delete mode 100644 recipes-bsp/u-boot/u-boot-fw-utils/beaglebone/fw_env.config
>  create mode 100644 recipes-extended/images/update-image/beaglebone-yocto/emmcsetup.lua
>  create mode 100644 recipes-extended/images/update-image/beaglebone-yocto/sw-description
>  delete mode 100644 recipes-extended/images/update-image/beaglebone/emmcsetup.lua
>  delete mode 100644 recipes-extended/images/update-image/beaglebone/sw-description
>  create mode 100644 recipes-support/swupdate/swupdate/beaglebone-yocto/defconfig
>  create mode 100644 recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate
>  create mode 100644 recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate.cfg
>  delete mode 100644 recipes-support/swupdate/swupdate/beaglebone/defconfig
>  delete mode 100644 recipes-support/swupdate/swupdate/beaglebone/swupdate
>  delete mode 100644 recipes-support/swupdate/swupdate/beaglebone/swupdate.cfg
> 


Applied to -master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/recipes-bsp/u-boot/u-boot-fw-utils/beaglebone-yocto/fw_env.config b/recipes-bsp/u-boot/u-boot-fw-utils/beaglebone-yocto/fw_env.config
new file mode 100644
index 0000000..f6e4e61
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-fw-utils/beaglebone-yocto/fw_env.config
@@ -0,0 +1,3 @@ 
+# Block device example
+/dev/mmcblk1boot1       0x00000         0x20000
+/dev/mmcblk1boot1       0x20000         0x20000
diff --git a/recipes-bsp/u-boot/u-boot-fw-utils/beaglebone/fw_env.config b/recipes-bsp/u-boot/u-boot-fw-utils/beaglebone/fw_env.config
deleted file mode 100644
index f6e4e61..0000000
--- a/recipes-bsp/u-boot/u-boot-fw-utils/beaglebone/fw_env.config
+++ /dev/null
@@ -1,3 +0,0 @@ 
-# Block device example
-/dev/mmcblk1boot1       0x00000         0x20000
-/dev/mmcblk1boot1       0x20000         0x20000
diff --git a/recipes-extended/images/update-image/beaglebone-yocto/emmcsetup.lua b/recipes-extended/images/update-image/beaglebone-yocto/emmcsetup.lua
new file mode 100644
index 0000000..88eba77
--- /dev/null
+++ b/recipes-extended/images/update-image/beaglebone-yocto/emmcsetup.lua
@@ -0,0 +1,85 @@ 
+function os.capture(cmd)
+	local f = assert(io.popen(cmd, 'r'))
+	local s = assert(f:read('*a'))
+	f:close()
+	return s
+end
+
+function file_exists(name)
+	local f=io.open(name,"r")
+	if f~=nil then io.close(f) return true else return false end
+end
+
+function cmdexec(cmd)
+	local ret, s, status = os.execute(cmd)
+	if (status ~= 0) then
+		return false, cmd .. " return with error"
+	end
+
+	return true,""
+end
+
+function preinst()
+	local out
+	local s1
+	local ret
+
+	local log = os.tmpname()
+
+	local eMMC = "/dev/mmcblk1"
+	ret = file_exists("/dev/mmcblk1")
+
+	if (ret == false) then
+		return false, "Cannot fine eMMC"
+	end
+
+	cmdexec("/usr/sbin/sfdisk -d " .. eMMC .. "> /tmp/dumppartitions")
+
+	-- check if there are two identical partitions
+	-- and create the second one if no available
+	f = io.input("/tmp/dumppartitions")
+	fo = io.output("/tmp/partitions")
+	t = f:read()
+	found = false
+	while (t ~= nil) do
+		j=0
+		j=string.find(t, "/dev/mmcblk1p3")
+		fo:write(t .. "\n")
+		if (j == 1) then
+			found=true
+			break
+		end
+		j=string.find(t, "/dev/mmcblk1p2")
+		if (j == 1) then
+			start, size = string.match(t, "%a+%s*=%s*(%d+), size=%s*(%d+)")
+		end
+		t = f:read()
+	end
+
+	if (found) then
+		f:close()
+		fo:close()
+		return true, out
+	end
+
+	start=start+size
+	partitions = eMMC .. "p3 : start=    " .. string.format("%d", start) .. ", size=  " .. size .. ", type=83\n"
+
+	fo:write(partitions)
+	fo:close()
+	f:close()
+
+	out = os.capture("/usr/sbin/sfdisk --force " .. eMMC .. " < /tmp/partitions")
+
+	-- use partprobe to inform the kernel of the new partitions
+
+	cmdexec("/usr/sbin/partprobe " .. eMMC)
+
+	return true, out
+end
+
+function postinst()
+	local out = "Post installed script called"
+
+	return true, out
+end
diff --git a/recipes-extended/images/update-image/beaglebone-yocto/sw-description b/recipes-extended/images/update-image/beaglebone-yocto/sw-description
new file mode 100644
index 0000000..51477f1
--- /dev/null
+++ b/recipes-extended/images/update-image/beaglebone-yocto/sw-description
@@ -0,0 +1,63 @@ 
+software =
+{
+	version = "0.1.0";
+
+	beaglebone = {
+		hardware-compatibility: [ "1.0"];
+		stable : {
+			copy1 : {
+				images: (
+					{
+						filename = "core-image-full-cmdline-beaglebone.ext4.gz";
+						device = "/dev/mmcblk1p2";
+						type = "raw";
+						compressed = true;
+					}
+				);
+				scripts: (
+					{
+						filename = "emmcsetup.lua";
+						type = "lua";
+					}
+				);
+				uboot: (
+					{
+						name = "boot_targets";
+						value = "legacy_mmc1 mmc1 nand0 pxe dhcp";
+					},
+					{
+						name = "bootcmd_legacy_mmc1";
+						value = "setenv mmcdev 1;setenv bootpart 1:2; run mmcboot";
+					}
+				);
+
+			};
+			copy2 : {
+				images: (
+					{
+						filename = "core-image-full-cmdline-beaglebone.ext4.gz";
+						device = "/dev/mmcblk1p3";
+						type = "raw";
+						compressed = true;
+					}
+				);
+				scripts: (
+					{
+						filename = "emmcsetup.lua";
+						type = "lua";
+					}
+				);
+				uboot: (
+					{
+						name = "boot_targets";
+						value = "legacy_mmc1 mmc1 nand0 pxe dhcp";
+					},
+					{
+						name = "bootcmd_legacy_mmc1";
+						value = "setenv mmcdev 1;setenv bootpart 1:3; run mmcboot";
+					}
+				);
+			};
+		};
+	}
+}
diff --git a/recipes-extended/images/update-image/beaglebone/emmcsetup.lua b/recipes-extended/images/update-image/beaglebone/emmcsetup.lua
deleted file mode 100644
index 88eba77..0000000
--- a/recipes-extended/images/update-image/beaglebone/emmcsetup.lua
+++ /dev/null
@@ -1,85 +0,0 @@ 
-function os.capture(cmd)
-	local f = assert(io.popen(cmd, 'r'))
-	local s = assert(f:read('*a'))
-	f:close()
-	return s
-end
-
-function file_exists(name)
-	local f=io.open(name,"r")
-	if f~=nil then io.close(f) return true else return false end
-end
-
-function cmdexec(cmd)
-	local ret, s, status = os.execute(cmd)
-	if (status ~= 0) then
-		return false, cmd .. " return with error"
-	end
-
-	return true,""
-end
-
-function preinst()
-	local out
-	local s1
-	local ret
-
-	local log = os.tmpname()
-
-	local eMMC = "/dev/mmcblk1"
-	ret = file_exists("/dev/mmcblk1")
-
-	if (ret == false) then
-		return false, "Cannot fine eMMC"
-	end
-
-	cmdexec("/usr/sbin/sfdisk -d " .. eMMC .. "> /tmp/dumppartitions")
-
-	-- check if there are two identical partitions
-	-- and create the second one if no available
-	f = io.input("/tmp/dumppartitions")
-	fo = io.output("/tmp/partitions")
-	t = f:read()
-	found = false
-	while (t ~= nil) do
-		j=0
-		j=string.find(t, "/dev/mmcblk1p3")
-		fo:write(t .. "\n")
-		if (j == 1) then
-			found=true
-			break
-		end
-		j=string.find(t, "/dev/mmcblk1p2")
-		if (j == 1) then
-			start, size = string.match(t, "%a+%s*=%s*(%d+), size=%s*(%d+)")
-		end
-		t = f:read()
-	end
-
-	if (found) then
-		f:close()
-		fo:close()
-		return true, out
-	end
-
-	start=start+size
-	partitions = eMMC .. "p3 : start=    " .. string.format("%d", start) .. ", size=  " .. size .. ", type=83\n"
-
-	fo:write(partitions)
-	fo:close()
-	f:close()
-
-	out = os.capture("/usr/sbin/sfdisk --force " .. eMMC .. " < /tmp/partitions")
-
-	-- use partprobe to inform the kernel of the new partitions
-
-	cmdexec("/usr/sbin/partprobe " .. eMMC)
-
-	return true, out
-end
-
-function postinst()
-	local out = "Post installed script called"
-
-	return true, out
-end
diff --git a/recipes-extended/images/update-image/beaglebone/sw-description b/recipes-extended/images/update-image/beaglebone/sw-description
deleted file mode 100644
index 51477f1..0000000
--- a/recipes-extended/images/update-image/beaglebone/sw-description
+++ /dev/null
@@ -1,63 +0,0 @@ 
-software =
-{
-	version = "0.1.0";
-
-	beaglebone = {
-		hardware-compatibility: [ "1.0"];
-		stable : {
-			copy1 : {
-				images: (
-					{
-						filename = "core-image-full-cmdline-beaglebone.ext4.gz";
-						device = "/dev/mmcblk1p2";
-						type = "raw";
-						compressed = true;
-					}
-				);
-				scripts: (
-					{
-						filename = "emmcsetup.lua";
-						type = "lua";
-					}
-				);
-				uboot: (
-					{
-						name = "boot_targets";
-						value = "legacy_mmc1 mmc1 nand0 pxe dhcp";
-					},
-					{
-						name = "bootcmd_legacy_mmc1";
-						value = "setenv mmcdev 1;setenv bootpart 1:2; run mmcboot";
-					}
-				);
-
-			};
-			copy2 : {
-				images: (
-					{
-						filename = "core-image-full-cmdline-beaglebone.ext4.gz";
-						device = "/dev/mmcblk1p3";
-						type = "raw";
-						compressed = true;
-					}
-				);
-				scripts: (
-					{
-						filename = "emmcsetup.lua";
-						type = "lua";
-					}
-				);
-				uboot: (
-					{
-						name = "boot_targets";
-						value = "legacy_mmc1 mmc1 nand0 pxe dhcp";
-					},
-					{
-						name = "bootcmd_legacy_mmc1";
-						value = "setenv mmcdev 1;setenv bootpart 1:3; run mmcboot";
-					}
-				);
-			};
-		};
-	}
-}
diff --git a/recipes-support/swupdate/swupdate/beaglebone-yocto/defconfig b/recipes-support/swupdate/swupdate/beaglebone-yocto/defconfig
new file mode 100644
index 0000000..ff8ab7c
--- /dev/null
+++ b/recipes-support/swupdate/swupdate/beaglebone-yocto/defconfig
@@ -0,0 +1,103 @@ 
+#
+# Automatically generated file; DO NOT EDIT.
+# Swupdate Configuration
+#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Swupdate Settings
+#
+
+#
+# General Configuration
+#
+CONFIG_SCRIPTS=y
+CONFIG_HW_COMPATIBILITY=y
+CONFIG_HW_COMPATIBILITY_FILE="/etc/hwrevision"
+CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
+# CONFIG_MTD is not set
+CONFIG_LUA=y
+CONFIG_LUAPKG="lua"
+# CONFIG_FEATURE_SYSLOG is not set
+
+#
+# Build Options
+#
+CONFIG_CROSS_COMPILE=""
+CONFIG_SYSROOT=""
+CONFIG_EXTRA_CFLAGS=""
+CONFIG_EXTRA_LDFLAGS=""
+CONFIG_EXTRA_LDLIBS=""
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_WERROR is not set
+# CONFIG_NOCLEANUP is not set
+# CONFIG_BOOTLOADER is not set
+CONFIG_UBOOT=y
+# CONFIG_BOOTLOADER_NONE is not set
+# CONFIG_BOOTLOADER_GRUB is not set
+CONFIG_UBOOT_FWENV="/etc/fw_env.config"
+CONFIG_DOWNLOAD=y
+CONFIG_HASH_VERIFY=y
+# CONFIG_SIGNED_IMAGES is not set
+CONFIG_ENCRYPTED_IMAGES=y
+CONFIG_SURICATTA=y
+
+#
+# Suricatta
+#
+
+#
+# Features
+#
+CONFIG_SURICATTA_SSL=y
+# CONFIG_SURICATTA_STATE_CHOICE_NONE is not set
+CONFIG_SURICATTA_STATE_CHOICE_BOOTLOADER=y
+CONFIG_SURICATTA_STATE_BOOTLOADER="ustate"
+
+#
+# Server
+#
+CONFIG_SURICATTA_HAWKBIT=y
+# CONFIG_SURICATTA_SERVER_NONE is not set
+CONFIG_WEBSERVER=y
+
+#
+# Webserver Features
+#
+CONFIG_MONGOOSE=y
+
+#
+# Mongoose Feature
+#
+CONFIG_MONGOOSELUA=y
+# CONFIG_MONGOOSEIPV6 is not set
+CONFIG_MONGOOSESSL=y
+
+#
+# Archival Features
+#
+CONFIG_GUNZIP=y
+
+#
+# Parser Features
+#
+CONFIG_LIBCONFIG=y
+CONFIG_PARSERROOT=""
+CONFIG_JSON=y
+# CONFIG_LUAEXTERNAL is not set
+# CONFIG_SETSWDESCRIPTION is not set
+
+#
+# Image Handlers
+#
+CONFIG_RAW=y
+CONFIG_LUASCRIPTHANDLER=y
+CONFIG_SHELLSCRIPTHANDLER=y
+# CONFIG_HANDLER_IN_LUA is not set
+CONFIG_ARCHIVE=y
+CONFIG_REMOTE_HANDLER=y
+CONFIG_BOOTLOADERHANDLER=y
diff --git a/recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate b/recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate
new file mode 100644
index 0000000..aba2e84
--- /dev/null
+++ b/recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate
@@ -0,0 +1,193 @@ 
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          swupdate
+# Required-Start:    $local_fs
+# Should-Start:
+# Required-Stop:     $local_fs
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start swupdate application
+### END INIT INFO
+
+# The definition of actions: (From LSB 3.1.0)
+# start         start the service
+# stop          stop the service
+# restart       stop and restart the service if the service is already running,
+#               otherwise start the service
+# try-restart	restart the service if the service is already running
+# reload	cause the configuration of the service to be reloaded without
+#               actually stopping and restarting the service
+# force-reload	cause the configuration to be reloaded if the service supports
+#               this, otherwise restart the service if it is running
+# status	print the current status of the service
+
+# The start, stop, restart, force-reload, and status actions shall be supported
+# by all init scripts; the reload and the try-restart actions are optional
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+DESC="swupdate"
+NAME="swupdate"
+DAEMON=/usr/bin/swupdate
+PIDFILE=/var/run/$NAME.pid
+
+. /etc/init.d/functions || exit 1
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+#
+# Function that starts the daemon/service
+#
+do_start() {
+	local status pid
+
+	status=0
+	pid=`pidofproc $NAME` || status=$?
+	case $status in
+	0)
+		echo "$DESC already running ($pid)."
+		exit 1
+		;;
+	*)
+		rootfs=`mount | grep "on / type" | cut -d':' -f 2 | cut -d' ' -f 1`
+
+		if [ $rootfs == '/dev/mmcblk1p2' ];then
+			selection="-e stable,copy2"
+		else
+			selection="-e stable,copy1"
+		fi
+
+		state=`fw_printenv ustate | cut -f 2 -d'='`
+		if [ $state == 1 ];then
+			EXTRA_ARGS="-c 2"
+		else
+			EXTRA_ARGS=""
+		fi
+
+		cd /home/root
+		# be sure that we can change U-Boot ENV
+		echo 0 > /sys/block/mmcblk1boot1/force_ro
+		echo "Starting $DESC ..."
+		exec /usr/bin/swupdate-progress -w -p -r &
+		exec $DAEMON -v -H beaglebone:1.0 ${selection} -f /etc/swupdate.cfg -u "$EXTRA_ARGS" -w "" &
+		exit 0
+		;;
+	esac
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop() {
+	local pid status
+
+	status=0
+	pid=`pidofproc $NAME` || status=$?
+	case $status in
+	0)
+		# Exit when fail to stop, the kill would complain when fail
+		kill -s 15 $pid >/dev/null && rm -f $PIDFILE && \
+			echo "Stopped $DESC ($pid)." || exit $?
+		;;
+	*)
+		echo "$DESC is not running; none killed." >&2
+		;;
+	esac
+
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	return $status
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+	local pid status
+
+	status=0
+        # If the daemon can reload its configuration without
+        # restarting (for example, when it is sent a SIGHUP),
+        # then implement that here.
+	pid=`pidofproc $NAME` || status=$?
+	case $status in
+	0)
+		echo "Reloading $DESC ..."
+		kill -s 1 $pid || exit $?
+		;;
+	*)
+		echo "$DESC is not running; none reloaded." >&2
+		;;
+	esac
+	exit $status
+}
+
+
+#
+# Function that shows the daemon/service status
+#
+status_of_proc () {
+	local pid status
+
+	status=0
+	# pidof output null when no program is running, so no "2>/dev/null".
+	pid=`pidofproc $NAME` || status=$?
+	case $status in
+	0)
+		echo "$DESC is running ($pid)."
+		exit 0
+		;;
+	*)
+		echo "$DESC is not running." >&2
+		exit $status
+		;;
+	esac
+}
+
+case "$1" in
+start)
+	do_start
+	;;
+stop)
+	do_stop || exit $?
+	;;
+status)
+	status_of_proc
+	;;
+restart)
+	# Always start the service regardless the status of do_stop
+	do_stop
+	do_start
+	;;
+try-restart|force-reload)
+	# force-reload is the same as reload or try-restart according
+	# to its definition, the reload is not implemented here, so
+	# force-reload is the alias of try-restart here, but it should
+	# be the alias of reload if reload is implemented.
+	#
+	# Only start the service when do_stop succeeds
+	do_stop && do_start
+	;;
+#reload)
+	# If the "reload" action is implemented properly, then let the
+	# force-reload be the alias of reload, and remove it from
+	# try-restart|force-reload)
+	#
+	#do_reload
+	#;;
+*)
+	echo "Usage: $0 {start|stop|status|restart|try-restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
diff --git a/recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate.cfg b/recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate.cfg
new file mode 100644
index 0000000..a646a65
--- /dev/null
+++ b/recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate.cfg
@@ -0,0 +1,47 @@ 
+globals :
+{
+
+	verbose = true;
+	loglevel = 5;
+	syslog = true;
+	/* public-key-file = "test.pem";*/
+};
+
+download :
+{
+	retries = 3;
+	timeout = 1800;
+};
+
+identify : (
+	{ name = "board"; value = "BeagleboneBlack"; }
+);
+
+suricatta :
+{
+
+	tenant		= "default";
+	id		= "bbb";
+	confirm 	= 0;
+	url 		= "http://papero:8080";
+	polldelay	= 360;
+	nocheckcert	= true;
+	retry		= 4;
+	retrywait	= 200;
+	loglevel	= 10;
+	userid		= 0;
+	groupid		= 0;
+	max_artifacts	= 1;
+/*
+	cafile		= "/etc/ssl/cafile";
+	sslkey		= "/etc/ssl/sslkey";
+	sslcert		= "/etc/ssl/sslcert";
+*/
+};
+
+webserver :
+{
+	document_root = "/www";
+	userid		= 0;
+	groupid		= 0;
+};
diff --git a/recipes-support/swupdate/swupdate/beaglebone/defconfig b/recipes-support/swupdate/swupdate/beaglebone/defconfig
deleted file mode 100644
index ff8ab7c..0000000
--- a/recipes-support/swupdate/swupdate/beaglebone/defconfig
+++ /dev/null
@@ -1,103 +0,0 @@ 
-#
-# Automatically generated file; DO NOT EDIT.
-# Swupdate Configuration
-#
-CONFIG_HAVE_DOT_CONFIG=y
-
-#
-# Swupdate Settings
-#
-
-#
-# General Configuration
-#
-CONFIG_SCRIPTS=y
-CONFIG_HW_COMPATIBILITY=y
-CONFIG_HW_COMPATIBILITY_FILE="/etc/hwrevision"
-CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
-# CONFIG_MTD is not set
-CONFIG_LUA=y
-CONFIG_LUAPKG="lua"
-# CONFIG_FEATURE_SYSLOG is not set
-
-#
-# Build Options
-#
-CONFIG_CROSS_COMPILE=""
-CONFIG_SYSROOT=""
-CONFIG_EXTRA_CFLAGS=""
-CONFIG_EXTRA_LDFLAGS=""
-CONFIG_EXTRA_LDLIBS=""
-
-#
-# Debugging Options
-#
-# CONFIG_DEBUG is not set
-# CONFIG_WERROR is not set
-# CONFIG_NOCLEANUP is not set
-# CONFIG_BOOTLOADER is not set
-CONFIG_UBOOT=y
-# CONFIG_BOOTLOADER_NONE is not set
-# CONFIG_BOOTLOADER_GRUB is not set
-CONFIG_UBOOT_FWENV="/etc/fw_env.config"
-CONFIG_DOWNLOAD=y
-CONFIG_HASH_VERIFY=y
-# CONFIG_SIGNED_IMAGES is not set
-CONFIG_ENCRYPTED_IMAGES=y
-CONFIG_SURICATTA=y
-
-#
-# Suricatta
-#
-
-#
-# Features
-#
-CONFIG_SURICATTA_SSL=y
-# CONFIG_SURICATTA_STATE_CHOICE_NONE is not set
-CONFIG_SURICATTA_STATE_CHOICE_BOOTLOADER=y
-CONFIG_SURICATTA_STATE_BOOTLOADER="ustate"
-
-#
-# Server
-#
-CONFIG_SURICATTA_HAWKBIT=y
-# CONFIG_SURICATTA_SERVER_NONE is not set
-CONFIG_WEBSERVER=y
-
-#
-# Webserver Features
-#
-CONFIG_MONGOOSE=y
-
-#
-# Mongoose Feature
-#
-CONFIG_MONGOOSELUA=y
-# CONFIG_MONGOOSEIPV6 is not set
-CONFIG_MONGOOSESSL=y
-
-#
-# Archival Features
-#
-CONFIG_GUNZIP=y
-
-#
-# Parser Features
-#
-CONFIG_LIBCONFIG=y
-CONFIG_PARSERROOT=""
-CONFIG_JSON=y
-# CONFIG_LUAEXTERNAL is not set
-# CONFIG_SETSWDESCRIPTION is not set
-
-#
-# Image Handlers
-#
-CONFIG_RAW=y
-CONFIG_LUASCRIPTHANDLER=y
-CONFIG_SHELLSCRIPTHANDLER=y
-# CONFIG_HANDLER_IN_LUA is not set
-CONFIG_ARCHIVE=y
-CONFIG_REMOTE_HANDLER=y
-CONFIG_BOOTLOADERHANDLER=y
diff --git a/recipes-support/swupdate/swupdate/beaglebone/swupdate b/recipes-support/swupdate/swupdate/beaglebone/swupdate
deleted file mode 100644
index aba2e84..0000000
--- a/recipes-support/swupdate/swupdate/beaglebone/swupdate
+++ /dev/null
@@ -1,193 +0,0 @@ 
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides:          swupdate
-# Required-Start:    $local_fs
-# Should-Start:
-# Required-Stop:     $local_fs
-# Should-Stop:
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Start swupdate application
-### END INIT INFO
-
-# The definition of actions: (From LSB 3.1.0)
-# start         start the service
-# stop          stop the service
-# restart       stop and restart the service if the service is already running,
-#               otherwise start the service
-# try-restart	restart the service if the service is already running
-# reload	cause the configuration of the service to be reloaded without
-#               actually stopping and restarting the service
-# force-reload	cause the configuration to be reloaded if the service supports
-#               this, otherwise restart the service if it is running
-# status	print the current status of the service
-
-# The start, stop, restart, force-reload, and status actions shall be supported
-# by all init scripts; the reload and the try-restart actions are optional
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-
-DESC="swupdate"
-NAME="swupdate"
-DAEMON=/usr/bin/swupdate
-PIDFILE=/var/run/$NAME.pid
-
-. /etc/init.d/functions || exit 1
-
-# Exit if the package is not installed
-[ -x "$DAEMON" ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-#
-# Function that starts the daemon/service
-#
-do_start() {
-	local status pid
-
-	status=0
-	pid=`pidofproc $NAME` || status=$?
-	case $status in
-	0)
-		echo "$DESC already running ($pid)."
-		exit 1
-		;;
-	*)
-		rootfs=`mount | grep "on / type" | cut -d':' -f 2 | cut -d' ' -f 1`
-
-		if [ $rootfs == '/dev/mmcblk1p2' ];then
-			selection="-e stable,copy2"
-		else
-			selection="-e stable,copy1"
-		fi
-
-		state=`fw_printenv ustate | cut -f 2 -d'='`
-		if [ $state == 1 ];then
-			EXTRA_ARGS="-c 2"
-		else
-			EXTRA_ARGS=""
-		fi
-
-		cd /home/root
-		# be sure that we can change U-Boot ENV
-		echo 0 > /sys/block/mmcblk1boot1/force_ro
-		echo "Starting $DESC ..."
-		exec /usr/bin/swupdate-progress -w -p -r &
-		exec $DAEMON -v -H beaglebone:1.0 ${selection} -f /etc/swupdate.cfg -u "$EXTRA_ARGS" -w "" &
-		exit 0
-		;;
-	esac
-}
-
-#
-# Function that stops the daemon/service
-#
-do_stop() {
-	local pid status
-
-	status=0
-	pid=`pidofproc $NAME` || status=$?
-	case $status in
-	0)
-		# Exit when fail to stop, the kill would complain when fail
-		kill -s 15 $pid >/dev/null && rm -f $PIDFILE && \
-			echo "Stopped $DESC ($pid)." || exit $?
-		;;
-	*)
-		echo "$DESC is not running; none killed." >&2
-		;;
-	esac
-
-	# Wait for children to finish too if this is a daemon that forks
-	# and if the daemon is only ever run from this initscript.
-	# If the above conditions are not satisfied then add some other code
-	# that waits for the process to drop all resources that could be
-	# needed by services started subsequently.  A last resort is to
-	# sleep for some time.
-	return $status
-}
-
-#
-# Function that sends a SIGHUP to the daemon/service
-#
-do_reload() {
-	local pid status
-
-	status=0
-        # If the daemon can reload its configuration without
-        # restarting (for example, when it is sent a SIGHUP),
-        # then implement that here.
-	pid=`pidofproc $NAME` || status=$?
-	case $status in
-	0)
-		echo "Reloading $DESC ..."
-		kill -s 1 $pid || exit $?
-		;;
-	*)
-		echo "$DESC is not running; none reloaded." >&2
-		;;
-	esac
-	exit $status
-}
-
-
-#
-# Function that shows the daemon/service status
-#
-status_of_proc () {
-	local pid status
-
-	status=0
-	# pidof output null when no program is running, so no "2>/dev/null".
-	pid=`pidofproc $NAME` || status=$?
-	case $status in
-	0)
-		echo "$DESC is running ($pid)."
-		exit 0
-		;;
-	*)
-		echo "$DESC is not running." >&2
-		exit $status
-		;;
-	esac
-}
-
-case "$1" in
-start)
-	do_start
-	;;
-stop)
-	do_stop || exit $?
-	;;
-status)
-	status_of_proc
-	;;
-restart)
-	# Always start the service regardless the status of do_stop
-	do_stop
-	do_start
-	;;
-try-restart|force-reload)
-	# force-reload is the same as reload or try-restart according
-	# to its definition, the reload is not implemented here, so
-	# force-reload is the alias of try-restart here, but it should
-	# be the alias of reload if reload is implemented.
-	#
-	# Only start the service when do_stop succeeds
-	do_stop && do_start
-	;;
-#reload)
-	# If the "reload" action is implemented properly, then let the
-	# force-reload be the alias of reload, and remove it from
-	# try-restart|force-reload)
-	#
-	#do_reload
-	#;;
-*)
-	echo "Usage: $0 {start|stop|status|restart|try-restart|force-reload}" >&2
-	exit 3
-	;;
-esac
-
diff --git a/recipes-support/swupdate/swupdate/beaglebone/swupdate.cfg b/recipes-support/swupdate/swupdate/beaglebone/swupdate.cfg
deleted file mode 100644
index a646a65..0000000
--- a/recipes-support/swupdate/swupdate/beaglebone/swupdate.cfg
+++ /dev/null
@@ -1,47 +0,0 @@ 
-globals :
-{
-
-	verbose = true;
-	loglevel = 5;
-	syslog = true;
-	/* public-key-file = "test.pem";*/
-};
-
-download :
-{
-	retries = 3;
-	timeout = 1800;
-};
-
-identify : (
-	{ name = "board"; value = "BeagleboneBlack"; }
-);
-
-suricatta :
-{
-
-	tenant		= "default";
-	id		= "bbb";
-	confirm 	= 0;
-	url 		= "http://papero:8080";
-	polldelay	= 360;
-	nocheckcert	= true;
-	retry		= 4;
-	retrywait	= 200;
-	loglevel	= 10;
-	userid		= 0;
-	groupid		= 0;
-	max_artifacts	= 1;
-/*
-	cafile		= "/etc/ssl/cafile";
-	sslkey		= "/etc/ssl/sslkey";
-	sslcert		= "/etc/ssl/sslcert";
-*/
-};
-
-webserver :
-{
-	document_root = "/www";
-	userid		= 0;
-	groupid		= 0;
-};