mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] SWupdate patch
@ 2017-04-24 13:41 Pedro Lafuente
  2017-04-25 12:42 ` Roland Hieber
  0 siblings, 1 reply; 2+ messages in thread
From: Pedro Lafuente @ 2017-04-24 13:41 UTC (permalink / raw)
  To: ptxdist

commit 862120ca23a0be3f865c3b566a8d50e9c55f3517
Author: pedro.lafuente@avt-stoye.de <pedro.lafuente@avt-stoye.de>
Date:   Mon Apr 24 15:20:31 2017 +0200

     SWupdate package support for ptxdist.

diff --git a/rules/swupdate.in b/rules/swupdate.in
new file mode 100644
index 0000000..43517b6
--- /dev/null
+++ b/rules/swupdate.in
@@ -0,0 +1,618 @@
+## SECTION=applications
+
+menuconfig SWUPDATE
+bool
+prompt "SWupdate"
+
+if SWUPDATE
+
+menu "Swupdate Settings"
+
+menu "General Configuration"
+
+config SCRIPTS
+    bool "enable pre and postinstall scripts"
+    default y
+    help
+      Enabling this option, the installer will run
+      pre- and postinstall scripts, if they are present
+      in the image. For security reason, this option
+      can be switched off.
+
+config HW_COMPATIBILITY
+    bool "check for hardware / software compatibility"
+    default n
+    help
+      If enabled, check if the hardware revision
+      supports the software version. Detecting the hardware
+      revision is very board specific, and it cannot be generalized.
+      For this reason, the software expects that the detected
+      version is written into a file by a previous software.
+
+config HW_COMPATIBILITY_FILE
+    string "File with detected hardware revisions"
+    depends on HW_COMPATIBILITY
+    default "/etc/hwrevision"
+    help
+      File where to read the detected hardware revsion
+      that must be compared with the software version.
+      The file has simple entries (one per line) in the
+      format of "major.minor".
+
+config SW_VERSIONS_FILE
+    string "File with detected software version"
+    default "/etc/sw-versions"
+    help
+      This is an optional file that is scanned at the
+      beginning to read the installed versions of
+      all sw-components. Each entry in the file is a
+      a pair of "name version".
+      In sw-description,  an image can have the
+      optional attributes:
+        "name" : key for searching in SW_VERSIONS_FILE
+        "version" : version contained in the .swu
+        "install-if-different" : if set, version
+              is compared with the one in SW_VERSIONS_FILE.
+      The image is installed only if there is a version mismatch.
+      This lets reduce risks in case of components that are not
+      safe to be updated, such as the bootloader. Updating it is a risk,
+      but in some cases it can be required to do it. Having a check,
+      the risky-component is not always updated.
+
+config MTD
+    bool "MTD support"
+    default y
+    #depends on HAVE_LIBMTD
+    select MTD_UTILS
+    help
+      Enable MTD support.
+
+config SWUPDATE_LUA
+    bool "lua"
+    default y
+    #depends on HAVE_LUA
+    select LUA
+    select LUA_INSTALL_LUA
+    select LUA_INSTALL_LUAC
+    select LUA_INSTALL_LIBLUA
+
+    help
+      Enable LUA interpreter.
+
+#config LUAPKG
+#    string "LUA pkg-config name"
+#    default "lua"
+#    #depends on LUA
+#    select LUA
+#    select LUA_INSTALL_LUA
+#    select LUA_INSTALL_LUAC
+#    select LUA_INSTALL_LIBLUA
+#    help
+#      Which pkg-config package supplies the Lua API.
+
+# These are auto-selected by other options
+
+config FEATURE_SYSLOG
+    bool #No description makes it a hidden option
+    default n
+    #help
+    #  This option is auto-selected when you select any applet which may
+    #  send its output to syslog. You do not need to select it manually.
+
+endmenu
+
+menu 'Build Options'
+
+config STATIC
+    bool "Build swupdate as a static binary (no shared libs)"
+    default n
+    help
+      If you want to build a static swupdate binary, which does not
+      use or require any shared libraries, then enable this option.
+      This can cause swupdate to be considerably larger, so you should
+      leave this option false unless you have a good reason (i.e.
+      your target platform does not support shared libraries, or
+      you are building an initrd which doesn't need anything but
+      swupdate, etc).
+
+      Most people will leave this set to 'N'.
+
+config CROSS_COMPILE
+    string "Cross Compiler prefix"
+    default 
"/opt/OSELAS.Toolchain-2014.12.2/arm-cortexa8-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/bin/arm-cortexa8-linux-gnueabihf-"
+    help
+      If you want to build swupdate with a cross compiler, then you
+      will need to set this to the cross-compiler prefix, for example,
+      "i386-uclibc-".
+
+      Native builds leave this empty.
+
+config SYSROOT
+    string "Path to sysroot"
+    default 
"/opt/OSELAS.Toolchain-2014.12.2/arm-cortexa8-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-cortexa8-linux-gnueabihf"
+    help
+      If you want to build swupdate with a cross compiler, then you
+      might also need to specify where /usr/include and /usr/lib
+      will be found.
+
+      For example, swupdate can be built against an installed
+      Android NDK, platform version 9, for ARM ABI with
+
+      CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
+
+      Native builds leave this empty.
+
+config EXTRA_CFLAGS
+    string "Additional CFLAGS"
+    default ""
+    help
+      Additional CFLAGS to pass to the compiler verbatim.
+
+config EXTRA_LDFLAGS
+    string "Additional LDFLAGS"
+    default ""
+    help
+      Additional LDFLAGS to pass to the linker verbatim.
+
+config EXTRA_LDLIBS
+    string "Additional LDLIBS"
+    default ""
+    help
+      Additional LDLIBS to pass to the linker with -l.
+
+endmenu
+
+menu 'Debugging Options'
+
+config SW_UPDATE_DEBUG
+    bool "Build Swupdate with extra Debugging symbols"
+    default n
+    help
+      Say Y here if you wish to examine swupdate internals while 
applets are
+      running. This increases the size of the binary considerably, and
+      should only be used when doing development. If you are doing
+      development and want to debug swupdate, answer Y.
+
+      Most people should answer N.
+
+config DEBUG_PESSIMIZE
+    bool "Disable compiler optimizations"
+    default n
+    depends on SW_UPDATE_DEBUG
+    help
+      The compiler's optimization of source code can eliminate and reorder
+      code, resulting in an executable that's hard to understand when
+      stepping through it with a debugger. This switches it off, resulting
+      in a much bigger executable that more closely matches the source
+      code.
+
+config WERROR
+    bool "Abort compilation on any warning"
+    default n
+    help
+      Selecting this will add -Werror to gcc command line.
+
+      Most people should answer N.
+
+config NOCLEANUP
+    bool "Do not remove temporary files after execution"
+    default n
+    help
+      After each run, temporary files are removed from
+      /tmp to restart in a clean state. For debugging purpose,
+      it helps to check the consistency of the file extracted
+      by swupdate.
+      For production, answer N.
+
+endmenu
+endmenu
+
+config DOWNLOAD
+    bool "Enable image downloading"
+    default y
+    select LIBCURL
+    help
+      Enable update from image URL using libcurl. Files are downloaded
+      completely before installation begins.
+
+config HASH_VERIFY
+    bool "Allow to add sha256 hash to each image"
+    select OPENSSL
+    default y
+    help
+      Allow to add a sha256 hash to an artifact.
+      This is automatically set in case of Signed Image
+
+config SIGNED_IMAGES
+    bool "Enable verification of signed images"
+    default y
+    select OPENSSL
+    select HASH_VERIFY
+
+config ENCRYPTED_IMAGES
+    bool "Images can be encrypted with a symmetric key"
+    select OPENSSL
+
+    # DO NOT EDIT. This file is generated from Config.src
+    #
+    # For a description of the syntax of this configuration file,
+    # see scripts/kbuild/config-language.txt.
+    #
+
+#    menu "Suricatta"
+#        menu "Features"
+#        depends on SURICATTA
+#        config SURICATTA_SSL
+#        bool "SSL support"
+#        default n
+#        #depends on HAVE_LIBSSL
+#        #depends on HAVE_LIBCRYPTO
+#        select OPENSSL
+
+#            help
+#                Enable SSL and checksum verification support in suricatta.
+
+#        choice
+#            prompt "Update Status Storage"
+#            default SURICATTA_STATE_CHOICE_UBOOT if  UBOOT
+#            default SURICATTA_STATE_CHOICE_NONE  if !UBOOT
+#            help
+#                Place for suricatta to persistently store the update
+#                status for, e.g., communicating it to the server after
+#                a reboot.
+
+#        config SURICATTA_STATE_CHOICE_NONE
+#            bool "None"
+#            help
+#                Do not store update status.
+
+#        config SURICATTA_STATE_CHOICE_UBOOT
+#            bool "U-Boot"
+#            #depends on UBOOT
+#            #depends on HAVE_ZLIB
+#            select U_BOOT_TOOLS_TOOL_ENV
+#            select U_BOOT_TOOLS
+#            select ZLIB
+#            help
+#                Store update status in U-Boot's environment.
+#                Specify U-Boot environment variable name to store 
update status in.
+
+#        endchoice
+
+#        config SURICATTA_STATE_UBOOT
+#            string "Store Update Status in U-Boot Environment variable"
+#            default "ustate"
+#            depends on SURICATTA_STATE_CHOICE_UBOOT
+#            help
+#                Store update information in U-Boot's environment.
+
+#        endmenu
+
+#        menu "Server"
+#        choice
+#            prompt "Server Type"
+#            default SURICATTA_HAWKBIT
+#            help
+#                Choose the server type. Currently, just hawkBit is
+#                supported.
+
+#        config SURICATTA_HAWKBIT
+#            bool "hawkBit support"
+#            #depends on HAVE_LIBCURL
+#            #depends on JSON
+#            select JSON_C
+#            select JSON_GLIB
+#            select LIBFASTJSON
+#            select LIBCURL
+#            select SURICATTA
+#            help
+#                Support for hawkBit server.
+#                https://projects.eclipse.org/projects/iot.hawkbit
+
+#        config SURICATTA_SERVER_NONE
+#            bool "None"
+#            help
+#                Do not start suricatta mode
+#        endchoice
+#        endmenu
+#        endmenu
+
+        config WEBSERVER
+        bool "Enable webserver"
+        default y
+        help
+            Enable update from remote using a webserver on the target.
+
+        menu "Webserver Features"
+        config MONGOOSE
+        bool "mongoose"
+        default y
+        help
+            Enable mongoose webserver.
+
+        menu "Mongoose Feature"
+        depends on MONGOOSE
+
+        config MONGOOSELUA
+        bool "lua interpreter"
+        #depends on LUA
+        select LUA
+        select LUA_INSTALL_LUA
+        select LUA_INSTALL_LUAC
+        select LUA_INSTALL_LIBLUA
+        default y
+        help
+            It allows to use LUA scripts as CGI interpreter.
+
+        config MONGOOSEIPV6
+        bool "ipv6"
+        default y
+        help
+            It enables ipv6 support into mongoose
+
+        config MONGOOSESSL
+        bool "ssl"
+        #depends on HAVE_LIBSSL
+        #depends on HAVE_LIBCRYPTO
+        select OPENSSL
+        help
+            It enables SSL support into mongoose
+        endmenu
+        endmenu
+
+menu "Archival Features"
+
+config GUNZIP
+    bool "gunzip"
+    default y
+    select ZLIB
+    help
+      gunzip is used to decompress archives created by gzip.
+      You can use the `-t' option to test the integrity of
+      an archive, without decompressing it.
+
+endmenu
+
+menu "Parser Features"
+
+config SWUPDATE_LIBCONFIG
+    bool "libconfig"
+    default y
+    #depends on HAVE_LIBCONFIG
+    select LIBCONFIG
+    select LIBCONFIG_CXX
+    help
+      Use libconfig to parse the configuration file.
+      This is the default parser.
+
+config LIBCONFIGROOT
+    string
+    prompt "Name of root node"
+    depends on SWUPDATE_LIBCONFIG
+
+
+    help
+      For compatibility reasons, the root node
+      can be set to something else as "software".
+      In most case you do not need to set it.
+
+config JSON
+    bool "libjson"
+    default n
+    #depends on HAVE_JSON_C
+    select JSON_C
+
+    help
+      Use json-c to parse the configuration file.
+      Also required for suricatta's hawkBit Server support.
+
+
+config LUAEXTERNAL
+    bool "lua"
+    #depends on LUA
+    select LUA
+    select LUA_INSTALL_LUA
+    select LUA_INSTALL_LUAC
+    select LUA_INSTALL_LIBLUA
+    default n
+    help
+      call an external parser written in LUA.
+
+config SETEXTPARSERNAME
+    bool "Set external parser name"
+    depends on LUAEXTERNAL
+    default n
+    help
+      Set to define own path and filename for the
+      external parser, else default lua-tools/extparser.lua
+      will be used.
+
+config EXTPARSERNAME
+    string "External parser file name"
+    depends on SETEXTPARSERNAME
+    help
+      Lua script to be executed for parsing
+      the sw-description file.
+
+config SETSWDESCRIPTION
+    bool "set file description name"
+    default n
+    help
+      Set it if you want to change the name of
+      the default software descritpion file.
+      If not set, default file name is "sw-description"
+
+config SWDESCRIPTION
+    string "description file"
+    depends on SETSWDESCRIPTION
+    help
+       File extracted from the image containing
+       the description (meta) of the images.
+       This file, after extraction, is passed to the parser.
+endmenu
+
+#
+# For a description of the syntax of this configuration file,
+# see scripts/kbuild/config-language.txt.
+#
+
+menu "Image Handlers"
+
+config SWUPDATE_UBIVOL
+    bool "ubivol"
+    default n
+    #depends on HAVE_LIBUBI
+    #depends on MTD
+    select MTD_UTILS_UBI_UTILS
+    select MTD_UTILS
+    help
+      ubi is the default format for NAND device.
+      Say Y if you have NAND or you use UBI on
+      your system.
+
+
+config UBIBLACKLIST
+    string "List of MTD devices to be excluded for UBI"
+    depends on SWUPDATE_UBIVOL
+    help
+      Define a list of MTD devices that are excluded
+      by scan_mtd_device. The devices are still available
+      as raw devices.
+      The list can be set as a string with the mtd numbers.
+      Examples: "0 1 2"
+      This excludes mtd0-mtd1-mtd2 to be searched for UBI volumes
+
+config UBIVIDOFFSET
+    int "VID Header Offset"
+    depends on SWUPDATE_UBIVOL
+    default 0
+    help
+      Force UBI to set a VID header offset to be 2048 bytes
+      instead of the value reported by the kernel.
+      In other words, you may ask UBI to avoid using sub-pages.
+      This is not recommended since this will require
+      more storage overhead, but may be useful
+      if your NAND driver incorrectly reports that it can handle
+      sub-page accesses when it should not.
+
+
+config CFI
+    bool "cfi"
+    #depends on MTD
+    select MTD_UTILS
+    default n
+    help
+      Handler to store images in flash in raw mode,
+      without UBI
+
+config CFIHAMMING1
+    bool "NAND in raw mode with 1bit Hamming OOB (TI)"
+    #depends on MTD
+    select MTD_UTILS
+    default n
+    select CFI
+    help
+      On certain TI's omaps (for example, DM3730 or AM3517),
+      the first bootloader (MLO or SPL) must be saved with one bit
+      Hamming correction because this is requested by the SOC's ROM.
+      However, the Linux driver must use for the rest of the NAND a more
+      powerful algorithm to make data reliable, and this causes that
+      it is not possible to update SPL by letting the driver to handle
+      the OOB area. This handler raws the NAND in raw mode, computing
+      the ECC with 1 bit Hamming Code and saving it into OOB
+      (assumes sector size of 512 and page size of 2048).
+
+      You do not need this if you have not a OMAP SOC.
+
+config RAW
+    bool "raw"
+    default y
+    help
+      This is a simple handler that simply copies
+      into the destination.
+
+config LUASCRIPTHANDLER
+    bool "luascript"
+    select LUA
+    select LUA_INSTALL_LUA
+    select LUA_INSTALL_LUAC
+    select LUA_INSTALL_LIBLUA
+    default n
+    help
+      Handler to be called for pre- and post scripts
+      written in LUA.
+
+config SHELLSCRIPTHANDLER
+    bool "shellscript"
+    default n
+    help
+      Handler to be called for pre- and post scripts
+      written as shell scripts. The default shell /bin/sh
+      is called.
+
+config HANDLER_IN_LUA
+    bool "Handlers in LUA"
+    #depends on LUASCRIPTHANDLER
+    select LUA
+    select LUA_INSTALL_LUA
+    select LUA_INSTALL_LUAC
+    select LUA_INSTALL_LIBLUA
+
+
+    default n
+    help
+      Allow to write own handlers in LUA.
+      They are loaded at the start-up.
+
+config ARCHIVE
+    bool "archive"
+    #depends on HAVE_LIBARCHIVE
+    select LIBARCHIVE
+    default n
+    help
+      Handler using the libarchive to extract tarballs
+      into a filesystem.
+
+
+config REMOTE_HANDLER
+    bool "Remote handler"
+    depends on HAVE_LIBZEROMQ
+    default n
+    help
+      Sometimes the update process should be done
+      by another process, where code is already
+      provided. The remote handler let communicate
+      an external process with SWUpdate, sending
+      the image to be updated with the help of the
+      zeromq library.
+
+comment "remote handler needs zeromq"
+    depends on !HAVE_LIBZEROMQ
+
+
+config SWUPDATE_UBOOT
+    bool
+    prompt "uboot"
+    #depends on HAVE_LIBUBOOTENV
+    #depends on HAVE_ZLIB
+    select U_BOOT_TOOLS_TOOL_ENV
+    select U_BOOT_TOOLS
+    select ZLIB
+    default n
+    help
+      Enable it to change U-Boot environment
+      during the installation process.
+
+config UBOOT_FWENV
+    string
+    prompt "U-Boot Environment Configuration file"
+    depends on SWUPDATE_UBOOT
+    default "/etc/fw_env.config"
+    help
+      This is the file described in U-Boot documentation
+      in the tools directory. It tells where the U-Boot
+      environment is saved.
+
+endmenu
+
+endif
diff --git a/rules/swupdate.make b/rules/swupdate.make
new file mode 100644
index 0000000..2d41f95
--- /dev/null
+++ b/rules/swupdate.make
@@ -0,0 +1,197 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Pedro Lafuente <pedro.lafuente@avt-stoye.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_SWUPDATE) += swupdate
+
+#
+# Paths and names
+#
+SWUPDATE_VERSION    := 2017.01
+SWUPDATE_MD5        := 90d86de674dc70a19adc92847420700a
+SWUPDATE        := swupdate-$(SWUPDATE_VERSION)
+SWUPDATE_SUFFIX    := tar.gz
+SWUPDATE_URL        := 
https://github.com/sbabic/swupdate/archive/$(SWUPDATE_VERSION).$(SWUPDATE_SUFFIX)
+SWUPDATE_SOURCE    := $(SRCDIR)/$(SWUPDATE).$(SWUPDATE_SUFFIX)
+SWUPDATE_DIR        := $(BUILDDIR)/$(SWUPDATE)
+SWUPDATE_LICENSE    := GNUGPL
+
+# 
----------------------------------------------------------------------------
+# Get
+# 
----------------------------------------------------------------------------
+
+$(SWUPDATE_SOURCE):
+    @$(call targetinfo)
+    @$(call get, SWUPDATE)
+    @$(call touch)
+
+# 
----------------------------------------------------------------------------
+# Extract
+# 
----------------------------------------------------------------------------
+
+$(STATEDIR)/swupdate.extract:
+    @$(call targetinfo)
+#    @$(call clean, $(SWUPDATE_DIR))
+    @$(call extract, SWUPDATE)
+    @$(call touch)
+# 
----------------------------------------------------------------------------
+# Prepare
+# 
----------------------------------------------------------------------------
+
+#SWUPDATE_CONF_ENV    := $(CROSS_ENV)
+#
+# autoconf
+#
+#SWUPDATE_CONF_TOOL    := autoconf
+SWUPDATE_CONF_OPT    := allyesconfig
+SYSROOT_TOOLCHAIN=sysroot-arm-cortexa8-linux-gnueabihf
+CROSS_COMPILE_PATH=$(shell readlink 
'${PTXDIST_WORKSPACE}/selected_toolchain')/$(PTXCONF_COMPILER_PREFIX)
+SYS_ROOT_PATH=$(shell readlink 
'${PTXDIST_WORKSPACE}/selected_toolchain' | sed -e 
's/\(bin\)*$$//g')$(SYSROOT_TOOLCHAIN)
+
+INC_MTD_UTILS=$(PTXDIST_PLATFORMDIR)/build-target/$(MTD_UTILS)/include
+INC_LIBCURL=$(PTXDIST_PLATFORMDIR)/build-target/$(LIBCURL)/include
+INC_OPENSSL=$(PTXDIST_PLATFORMDIR)/build-target/$(OPENSSL)/include
+INC_ZLIB=$(PTXDIST_PLATFORMDIR)/build-target/$(ZLIB)
+INC_LIBARCHIVE=$(PTXDIST_PLATFORMDIR)/build-target/$(LIBARCHIVE)/libarchive
+INC_LIBCONFIG=$(PTXDIST_PLATFORMDIR)/build-target/$(LIBCONFIG)/lib
+INC_JSON_C=$(PTXDIST_PLATFORMDIR)/build-target/$(JSON_C)/lib
+INC_LUA=$(PTXDIST_PLATFORMDIR)/build-target/$(LUA)/src
+ALL_PATH_INC=\-\I\ \$(INC_MTD_UTILS)\ \-\I\ \$(INC_LIBCURL)\ \-\I\ 
\$(INC_OPENSSL)\ \-\I\ \$(INC_ZLIB)\ \-\I\ \$(INC_LIBARCHIVE)\ \-\I\ 
\$(INC_LIBCONFIG)\ \-\I\ \$(INC_JSON_C)\ \-\I\ \$(INC_LUA)
+
+LIB_MTD_UTILS=$(PTXDIST_PLATFORMDIR)/build-target/$(MTD_UTILS)/arm-cortexa8-linux-gnueabihf/lib
+LIB_MTD_UTILS_UBI=$(PTXDIST_PLATFORMDIR)/build-target/$(MTD_UTILS)/arm-cortexa8-linux-gnueabihf/ubi-utils
+LIB_LIBCURL=$(PTXDIST_PLATFORMDIR)/build-target/$(LIBCURL)/lib/.libs
+LIB_OPENSSL=$(PTXDIST_PLATFORMDIR)/build-target/$(OPENSSL)
+LIB_ZLIB=$(PTXDIST_PLATFORMDIR)/build-target/$(ZLIB)
+LIB_LIBARCHIVE=$(PTXDIST_PLATFORMDIR)/build-target/$(LIBARCHIVE)/.libs
+LIB_LIBCONFIG=$(PTXDIST_PLATFORMDIR)/build-target/$(LIBCONFIG)/lib/.libs
+LIB_JSON_C=$(PTXDIST_PLATFORMDIR)/build-target/$(JSON_C)/.libs
+LIB_LUA=$(PTXDIST_PLATFORMDIR)/build-target/$(LUA)/src/.libs
+ALL_PATH_LIB=\-\L\ \$(LIB_MTD_UTILS)\ \-\L\ \$(LIB_MTD_UTILS_UBI)\ 
\-\L\ \$(LIB_LIBCURL)\ \-\L\ \$(LIB_LIBCURL)\ \-\L\ \$(LIB_OPENSSL)\ 
\-\L\ \$(LIB_ZLIB)\ \-\L\ \$(LIB_LIBARCHIVE)\ \-\L\ \$(LIB_LIBCONFIG)\ 
\-\L\ \$(LIB_JSON_C)\ \-\L\ \$(LIB_LUA)
+
+$(STATEDIR)/swupdate.prepare:
+    @$(call targetinfo)
+    @$(call clean, $(SWUPDATE_DIR)/config.cache)
+    cd $(SWUPDATE_DIR) && \
+    make allyesconfig
+    sed -i 's,^\(CONFIG_SCRIPTS=\).*,\1'$(PTXCONF_SCRIPTS)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_HW_COMPATIBILITY=\).*,\1'$(PTXCONF_HW_COMPATIBILITY)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_HW_COMPATIBILITY_FILE=\).*,\1"'$(PTXCONF_HW_COMPATIBILITY_FILE)'",' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SW_VERSIONS_FILE=\).*,\1"'$(PTXCONF_SW_VERSIONS_FILE)'",' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_MTD=\).*,\1'$(PTXCONF_MTD)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_LUA=\).*,\1'$(PTXCONF_SWUPDATE_LUA)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_FEATURE_SYSLOG=\).*,\1'$(PTXCONF_FEATURE_SYSLOG)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_STATIC=\).*,\1'$(PTXCONF_STATIC)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_DEBUG=\).*,\1'$(PTXCONF_SW_UPDATE_DEBUG)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_DEBUG_PESSIMIZE=\).*,\1'$(PTXCONF_DEBUG_PESSIMIZE)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_WERROR=\).*,\1'$(PTXCONF_WERROR)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_NOCLEANUP=\).*,\1'$(PTXCONF_NOCLEANUP)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_DOWNLOAD=\).*,\1'$(PTXCONF_DOWNLOAD)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_HASH_VERIFY=\).*,\1'$(PTXCONF_HASH_VERIFY)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_SIGNED_IMAGES=\).*,\1'$(PTXCONF_SCRIPTS)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_ENCRYPTED_IMAGES=\).*,\1'$(PTXCONF_ENCRYPTED_IMAGES)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_SURICATTA=\).*,\1'$(PTXCONF_SURICATTA)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SURICATTA_SSL=\).*,\1'$(PTXCONF_SURICATTA_SSL)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SURICATTA_STATE_CHOICE_NONE=\).*,\1'$(PTXCONF_SURICATTA_STATE_CHOICE_NONE)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SURICATTA_STATE_CHOICE_UBOOT=\).*,\1'$(PTXCONF_SURICATTA_STATE_CHOICE_UBOOT)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SURICATTA_STATE_UBOOT=\).*,\1'$(PTXCONF_SCRIPTS)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SURICATTA_HAWKBIT=\).*,\1'$(PTXCONF_SURICATTA_HAWKBIT)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SURICATTA_SERVER_NONE=\).*,\1'$(PTXCONF_SURICATTA_SERVER_NONE)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_WEBSERVER=\).*,\1'$(PTXCONF_WEBSERVER)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_MONGOOSE=\).*,\1'$(PTXCONF_MONGOOSE)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_MONGOOSELUA=\).*,\1'$(PTXCONF_MONGOOSELUA)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_MONGOOSEIPV6=\).*,\1'$(PTXCONF_MONGOOSEIPV6)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_MONGOOSESSL=\).*,\1'$(PTXCONF_MONGOOSESSL)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_GUNZIP=\).*,\1'$(PTXCONF_GUNZIP)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_LIBCONFIG=\).*,\1'$(PTXCONF_LIBCONFIG)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_LIBCONFIGROOT=\).*,\1"'$(PTXCONF_LIBCONFIGROOT)'",' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_JSON=\).*,\1'$(PTXCONF_JSON)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_LUAEXTERNAL=\).*,\1'$(PTXCONF_LUAEXTERNAL)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SETEXTPARSERNAME=\).*,\1'$(PTXCONF_SETEXTPARSERNAME)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_EXTPARSERNAME=\).*,\1'$(PTXCONF_EXTPARSERNAME)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SETSWDESCRIPTION=\).*,\1'$(PTXCONF_SETSWDESCRIPTION)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SWDESCRIPTION=\).*,\1'$(PTXCONF_SWDESCRIPTION)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_UBIVOL=\).*,\1'$(PTXCONF_UBIVOL)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_UBIBLACKLIST=\).*,\1'$(PTXCONF_UBIBLACKLIST)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_UBIVIDOFFSET=\).*,\1'$(PTXCONF_UBIVIDOFFSET)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_CFI=\).*,\1'$(PTXCONF_CFI)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_CFIHAMMING1=\).*,\1'$(PTXCONF_CFIHAMMING1)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_RAW=\).*,\1'$(PTXCONF_RAW)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_LUASCRIPTHANDLER=\).*,\1'$(PTXCONF_LUASCRIPTHANDLER)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_SHELLSCRIPTHANDLER=\).*,\1'$(PTXCONF_SHELLSCRIPTHANDLER)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_HANDLER_IN_LUA=\).*,\1'$(PTXCONF_HANDLER_IN_LUA)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_ARCHIVE=\).*,\1'$(PTXCONF_ARCHIVE)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_REMOTE_HANDLER=\).*,\1'$(PTXCONF_REMOTE_HANDLER)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_UBOOT=\).*,\1'$(PTXCONF_SWUPDATE_UBOOT)',' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_UBOOT_FWENV=\).*,\1"'$(PTXCONF_UBOOT_FWENV)'",' 
$(SWUPDATE_DIR)/.config
+
+#sed -i 
's,^\(CONFIG_CROSS_COMPILE=\).*,\1"'$(PTXCONF_CROSS_COMPILE)'",' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_CROSS_COMPILE=\).*,\1"'$(CROSS_COMPILE_PATH)'",' 
$(SWUPDATE_DIR)/.config
+#sed -i 's,^\(CONFIG_SYSROOT=\).*,\1"'$(PTXCONF_SYSROOT)'",' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_SYSROOT=\).*,\1"'$(SYS_ROOT_PATH)'",' 
$(SWUPDATE_DIR)/.config
+
+#sed -i 's,^\(CONFIG_EXTRA_CFLAGS=\).*,\1"'$(PTXCONF_EXTRA_CFLAGS)'",' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_EXTRA_CFLAGS=\).*,\1"'$(ALL_PATH_INC)'",' 
$(SWUPDATE_DIR)/.config
+#sed -i 
's,^\(CONFIG_EXTRA_LDFLAGS=\).*,\1"'$(PTXCONF_EXTRA_LDFLAGS)'",' 
$(SWUPDATE_DIR)/.config
+    sed -i 's,^\(CONFIG_EXTRA_LDFLAGS=\).*,\1"'$(ALL_PATH_LIB)'",' 
$(SWUPDATE_DIR)/.config
+    sed -i 
's,^\(CONFIG_EXTRA_LDLIBS=\).*,\1"'$(PTXCONF_EXTRA_LDLIBS)'",' 
$(SWUPDATE_DIR)/.config
+    sed -e '/=$$/s/^#*/# /' -e '/^#/s/=$$/ is not set /' -i 
$(SWUPDATE_DIR)/.config
+    @$(call touch)
+
+# 
----------------------------------------------------------------------------
+# Compile
+# 
----------------------------------------------------------------------------
+$(STATEDIR)/swupdate.compile:
+    @$(call targetinfo)
+    @$(call world/compile, SWUPDATE)
+    @$(call touch)
+
+# 
----------------------------------------------------------------------------
+# Install
+# 
----------------------------------------------------------------------------
+
+$(STATEDIR)/swupdate.install:
+    @$(call targetinfo)
+#    @$(call world/install, SWUPDATE)
+    @$(call touch)
+
+# 
----------------------------------------------------------------------------
+# Target-Install
+# 
----------------------------------------------------------------------------
+
+$(STATEDIR)/swupdate.targetinstall:
+    @$(call targetinfo)
+
+    @$(call install_init, swupdate)
+    @$(call install_fixup, swupdate,PRIORITY,optional)
+    @$(call install_fixup, swupdate,SECTION,base)
+    @$(call install_fixup, swupdate,AUTHOR,"Pedro Lafuente 
<pedro.lafuente@avt-stoye.de>")
+    @$(call install_fixup, swupdate,DESCRIPTION,missing)
+
+    @$(call install_copy, swupdate, 0, 0, 0755, 
$(SWUPDATE_DIR)/swupdate_unstripped, /usr/bin/swupdate_unstripped)
+    @$(call install_copy, swupdate, 0, 0, 0755, 
$(SWUPDATE_DIR)/swupdate, /usr/bin/swupdate)
+    @$(call install_copy, swupdate, 0, 0, 0755, 
$(SWUPDATE_DIR)/progress_unstripped, /usr/bin/progress_unstripped)
+    @$(call install_copy, swupdate, 0, 0, 0755, 
$(SWUPDATE_DIR)/progress, /usr/bin/progress)
+    @$(call install_tree, swupdate, 0, 0, $(SWUPDATE_DIR)/www/, /www/)
+
+    @$(call install_finish, swupdate)
+    @$(call touch)
+
+# 
----------------------------------------------------------------------------
+# Clean
+# 
----------------------------------------------------------------------------
+
+$(STATEDIR)/swupdate.clean:
+    @$(call targetinfo)
+    @$(call clean_pkg, SWUPDATE)
+
+# vim: syntax=make


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-25 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 13:41 [ptxdist] SWupdate patch Pedro Lafuente
2017-04-25 12:42 ` Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox