package/swupdate: new package
PATCH 1/1 package/swupdate: new package
This is mainly a draft based on Busybox package.
Just build tested with one x86 toolchain.
---
Note: The following patch was sent in order to build swupdate in Buildroot:
http://patchwork.ozlabs.org/patch/386687/
package/Config.in | 1 + package/swupdate/Config.in | 41 ++++++++++ ...wupdate-0001-Add-missing-header-for-off_t.patch | 25 ++++++ package/swupdate/swupdate.config | 77 ++++++++++++++++++ package/swupdate/swupdate.mk | 94 ++++++++++++++++++++++ 5 files changed, 238 insertions(+) create mode 100644 package/swupdate/Config.in create mode 100644 package/swupdate/swupdate-0001-Add-missing-header-for-off_t.patch create mode 100644 package/swupdate/swupdate.config create mode 100644 package/swupdate/swupdate.mk
package/Config.in +1 -0
@@ -370,6 +370,7 @@ endif source "package/sunxi-cedarx/Config.in" source "package/sunxi-mali/Config.in" source "package/sunxi-mali-prop/Config.in" + source "package/swupdate/Config.in" source "package/sysstat/Config.in" source "package/targetcli-fb/Config.in" source "package/ti-gfx/Config.in"
package/swupdate/Config.in new file +41 -0
41 lines not on this page · raw message
package/swupdate/swupdate-0001-Add-missing-header-for-off_t.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 4e382373cad64ca7e183336e33b72c53cfeed340 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Sun, 7 Sep 2014 17:31:09 +0200 +Subject: [PATCH 1/1] Add missing header for off_t + +Signed-off-by: Romain Naour <[email protected]> +--- + include/swupdate.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/swupdate.h b/include/swupdate.h +index 78b7f85..c193397 100644 +--- a/include/swupdate.h ++++ b/include/swupdate.h +@@ -23,6 +23,7 @@ + #ifndef _SWUPDATE_H + #define _SWUPDATE_H + ++#include <sys/types.h> + #include <sys/queue.h> + #include "flash.h" + #include "globals.h" +-- +1.9.3 +
package/swupdate/swupdate.config new file +77 -0
77 lines not on this page · raw message
package/swupdate/swupdate.mk new file +94 -0
94 lines not on this page · raw message
Signature · 1 line
1.9.3
PATCH 1/1 package/swupdate: new package
Dear Romain Naour,
Quoted 3 lines · Romain Naour
This is mainly a draft based on Busybox package.
Just build tested with one x86 toolchain.
[snip]
I will check this package since we use it in one of our projects.
Best regards
J?rg Krause
PATCH 1/1 package/swupdate: new package
Hi J?rg,
Le 26/10/2014 22:49, J?rg Krause a ?crit :
Quoted 11 lines
Dear Romain Naour,
Quoted 3 lines · Romain Naour
This is mainly a draft based on Busybox package.
Just build tested with one x86 toolchain.[snip]
I will check this package since we use it in one of our projects.
Great! I don't have the opportunity (yet) to fully test the software on hardware...
Best regards,
Signature · 8 lines
Romain Naour OPEN WIDE Ing?nierie - Paris 23/25, rue Daviel| 75013 PARIS http://ingenierie.openwide.fr Le blog des technologies libres et embarqu?es : http://www.linuxembedded.fr
PATCH 1/1 package/swupdate: new package
In reply to Romain NaourQuoted 1 line · Romain Naour
This is mainly a draft based on Busybox package.
Busybox?
Quoted 8 lines
Just build tested with one x86 toolchain.
Signed-off-by Romain Naour <[email protected]>Cc Angelo Compagnucci <[email protected]>Cc Jeremy Rosen <[email protected]>---
Note: The following patch was sent in order to build swupdate in Buildroot:http://patchwork.ozlabs.org/patch/386687/
Since that patch was applied a while ago, this comment is no longer necessary.
Quoted 17 lines
package/Config.in | 1 + package/swupdate/Config.in | 41 ++++++++++ ...wupdate-0001-Add-missing-header-for-off_t.patch | 25 ++++++ package/swupdate/swupdate.config | 77 ++++++++++++++++++ package/swupdate/swupdate.mk | 94 ++++++++++++++++++++++ 5 files changed, 238 insertions(+) create mode 100644 package/swupdate/Config.in create mode 100644 package/swupdate/swupdate-0001-Add-missing-header-for-off_t.patch create mode 100644 package/swupdate/swupdate.config create mode 100644 package/swupdate/swupdate.mkpackage/Config.in +0
-0
package/Config.in endif · line 373
Quoted 4 lines
package/Config.in +1
-0@@ -370,6 +370,7 @@ endif source "package/sunxi-cedarx/Config.in" source "package/sunxi-mali/Config.in" source "package/sunxi-mali-prop/Config.in" + source "package/swupdate/Config.in"
I really don't think Hardware Handling is the right menu for this. Maybe System
tools?
package/swupdate/Config.in line 4
Quoted 13 lines
package/Config.in +0
-0source "package/sysstat/Config.in" source "package/targetcli-fb/Config.in" source "package/ti-gfx/Config.in"package/swupdate/Config.in new file +4
-0@@ -0,0 +1,41 @@ +config BR2_PACKAGE_SWUPDATE + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_MTD + # Probably needs some dependency
uboot-tools as a runtime dependency?
Quoted 25 lines
package/swupdate/Config.in new file +25
-0+ bool "swupdate" + help + swupdate provides a reliable way to update the software on an embedded + system. + + https://github.com/sbabic/swupdate.git + +if BR2_PACKAGE_SWUPDATE + +config BR2_PACKAGE_SWUPDATE_CONFIG + string "swupdate configuration file to use?" + default "package/swupdate/swupdate.config" + help + Some people may wish to use their own modified swupdate configuration + file, and will specify their config file location with this option. + + Most people will just use the default swupdate configuration file. + +config BR2_PACKAGE_SWUPDATE_LUA + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + depends on !BR2_PACKAGE_LUA_5_1 + bool "Enable lua interpreter" + help + Enable LUA interpreter. +
package/swupdate/Config.in line 39
Quoted 10 lines
package/swupdate/Config.in new file +10
-0+comment "swupdate needs a Lua 5.2 interpreter" + depends on BR2_PACKAGE_LUA_5_1 || !BR2_PACKAGE_HAS_LUAINTERPRETER + +config BR2_PACKAGE_SWUPDATE_LIBCONFIG + select BR2_PACKAGE_LIBCONFIG + bool "Enable libconfig parser" + default y + help + Use libconfig to parse the configuration file. + This is the default parser.
So, without libconfig it doesn't support a config file I guess?
Quoted 39 lines
package/swupdate/Config.in new file +2
-0+ +endifpackage/swupdate/swupdate-0001-Add-missing-header-for-off_t.patch new file +25
-0@@ -0,0 +1,25 @@ +From 4e382373cad64ca7e183336e33b72c53cfeed340 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Sun, 7 Sep 2014 17:31:09 +0200 +Subject: [PATCH 1/1] Add missing header for off_t + +Signed-off-by: Romain Naour <[email protected]> +--- + include/swupdate.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/swupdate.h b/include/swupdate.h +index 78b7f85..c193397 100644 +--- a/include/swupdate.h ++++ b/include/swupdate.h +@@ -23,6 +23,7 @@ + #ifndef _SWUPDATE_H + #define _SWUPDATE_H + ++#include <sys/types.h> + #include <sys/queue.h> + #include "flash.h" + #include "globals.h" +-- +1.9.3 +package/swupdate/swupdate.config new file +0
-0
package/swupdate/swupdate.config line 4
Quoted 4 lines
package/swupdate/swupdate.config new file +4
-0@@ -0,0 +1,77 @@ +# +# Automatically generated make config: don't edit +# swupdate version: 2014.07.0 +# Thu Sep 4 23:38:08 2014
That's pretty long ago :-)
Quoted 24 lines
package/swupdate/swupdate.config new file +24
-0+# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Swupdate Settings +# + +# +# General Configuration +# +CONFIG_SCRIPTS=y +# CONFIG_HW_COMPATIBILITY is not set +CONFIG_HW_COMPATIBILITY_FILE="" +CONFIG_LUA=y +# CONFIG_FEATURE_SYSLOG is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS=""
package/swupdate/swupdate.config line 38
Quoted 10 lines
package/swupdate/swupdate.config new file +10
-0+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_WEBSERVER=y
You're disabling it in the .mk file, so it doesn't make much sense to enable it
here.
Quoted 52 lines
package/swupdate/swupdate.config new file +39
-0+ +# +# Webserver Features +# +# CONFIG_MONGOOSE is not set +# CONFIG_MONGOOSELUA is not set +# CONFIG_MONGOOSESQL is not set +# CONFIG_MONGOOSEIPV6 is not set +# CONFIG_MONGOOSESSL is not set + +# +# Archival Features +# +CONFIG_CPIO=y +CONFIG_GUNZIP=y + +# +# Parser Features +# +CONFIG_LIBCONFIG=y +# CONFIG_LUAEXTERNAL is not set +# CONFIG_SETEXTPARSERNAME is not set +CONFIG_EXTPARSERNAME="" +# CONFIG_SETSWDESCRIPTION is not set +CONFIG_SWDESCRIPTION="" + +# +# Image Handlers +# +CONFIG_UBIVOL=y +CONFIG_UBIBLACKLIST="" +CONFIG_UBIVIDOFFSET=0 +CONFIG_CFI=y +CONFIG_RAW=y +CONFIG_LUASCRIPTHANDLER=y +CONFIG_SHELLSCRIPTHANDLER=y +CONFIG_HANDLER_IN_LUA=y +# CONFIG_UBOOT is not set +CONFIG_UBOOT_FWENV=""package/swupdate/swupdate.mk new file +7
-0@@ -0,0 +1,94 @@ +################################################################################ +# +# swupdate +# +################################################################################ + +SWUPDATE_VERSION = a4c94e334c4bdb0b95b8ea324a413abade93ed03
package/swupdate/swupdate.mk line 17
Quoted 10 lines
package/swupdate/swupdate.mk new file +10
-0+SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION)) +SWUPDATE_LICENSE = GPLv2 +SWUPDATE_LICENSE_FILES = COPYING +SWUPDATE_DEPENDENCIES = zlib mtd + +SWUPDATE_CFLAGS = \ + $(TARGET_CFLAGS) + +SWUPDATE_LDFLAGS = \ + $(TARGET_LDFLAGS)
I think it's more appropriate to remove these definitions and instead addTARGET_XXX directly in _MAKE_ENV.
However, wouldn't it be better to pass these through the corresponding .config
values?
package/swupdate/swupdate.mk line 30
Quoted 13 lines
package/swupdate/swupdate.mk new file +13
-0+ +SWUPDATE_BUILD_CONFIG = $(SWUPDATE_DIR)/.config +# Allows the build system to tweak CFLAGS +SWUPDATE_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + CFLAGS="$(SWUPDATE_CFLAGS)" \ + LDFLAGS="$(SWUPDATE_LDFLAGS)" + +SWUPDATE_MAKE_OPTS = \ + CC="$(TARGET_CC)" \ + ARCH=$(KERNEL_ARCH) \ + PREFIX="$(TARGET_DIR)" \ + EXTRA_LDFLAGS="$(SWUPDATE_LDFLAGS)" \
So you pass these twice?
package/swupdate/swupdate.mk line 39
Quoted 9 lines
package/swupdate/swupdate.mk new file +9
-0+ CROSS_COMPILE="$(TARGET_CROSS)" \ + CONFIG_PREFIX="$(TARGET_DIR)" \ + SKIP_STRIP=y + +ifndef SWUPDATE_CONFIG_FILE + SWUPDATE_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG)) +endif + +SWUPDATE_KCONFIG_FILE = $(SWUPDATE_CONFIG_FILE)
What's the point of SWUPDATE_CONFIG_FILE? You can just set
SWUPDATE_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG))
Quoted 16 lines
package/swupdate/swupdate.mk new file +16
-0+SWUPDATE_KCONFIG_EDITORS = menuconfig xconfig gconfig +SWUPDATE_KCONFIG_OPTS = $(SWUPDATE_MAKE_OPTS) + +ifeq ($(BR2_PACKAGE_SWUPDATE_LUA),y) +SWUPDATE_DEPENDENCIES += lua +define SWUPDATE_LUA + $(call KCONFIG_ENABLE_OPT,CONFIG_LUA,$(SWUPDATE_BUILD_CONFIG)) +endef +else +define SWUPDATE_LUA + $(call KCONFIG_DISABLE_OPT,CONFIG_LUA,$(SWUPDATE_BUILD_CONFIG)) +endef +endif + +# If we're using static libs do the same for swupdate +ifeq ($(BR2_PREFER_STATIC_LIB),y)
package/swupdate/swupdate.mk line 65
Quoted 10 lines
package/swupdate/swupdate.mk new file +10
-0+define SWUPDATE_PREFER_STATIC + $(call KCONFIG_ENABLE_OPT,CONFIG_STATIC,$(SWUPDATE_BUILD_CONFIG)) +endef +endif + +# Disable swupdate's version of mongoose. +# Use the Buildroot's mongoose package instead. +define SWUPDATE_WEBSERVER_MONGOOSE + $(call KCONFIG_DISABLE_OPT,CONFIG_WEBSERVER,$(SWUPDATE_BUILD_CONFIG)) + $(call KCONFIG_DISABLE_OPT,CONFIG_MONGOOSE,$(SWUPDATE_BUILD_CONFIG))
Doesn't swupdate use an embedded mongoose? I.e., doesn't it link with it?
Regards,
Arnout
Quoted 30 lines
package/swupdate/swupdate.mk new file +29
-0+endef + +ifeq ($(BR2_PACKAGE_SWUPDATE_LIBCONFIG),y) +SWUPDATE_DEPENDENCIES += libconfig +define SWUPDATE_LIBCONFIG_PARSER + $(call KCONFIG_ENABLE_OPT,CONFIG_LIBCONFIG,$(SWUPDATE_BUILD_CONFIG)) +endef +else +define SWUPDATE_LIBCONFIG_PARSER + $(call KCONFIG_DISABLE_OPT,CONFIG_LIBCONFIG,$(SWUPDATE_BUILD_CONFIG)) +endef +endif + +define SWUPDATE_KCONFIG_FIXUP_CMDS + $(SWUPDATE_LUA) + $(SWUPDATE_PREFER_STATIC) + $(SWUPDATE_WEBSERVER_MONGOOSE) + $(SWUPDATE_LIBCONFIG_PARSER) +endef + +define SWUPDATE_BUILD_CMDS + $(SWUPDATE_MAKE_ENV) $(MAKE) $(SWUPDATE_MAKE_OPTS) -C $(@D) +endef + +define SWUPDATE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/swupdate $(TARGET_DIR)/usr/bin/swupdate +endef + +$(eval $(kconfig-package))
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F