Commit c34f9649 authored by SZ Lin (林上智)'s avatar SZ Lin (林上智)

New upstream version 2019.04~rc1+git20190320.bad559b+dfsg

parents
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# Normal rules
#
*.rej
*.orig
*.a
*.o
*.su
*~
*.swp
*.patch
*.bin
#
# Kbuild ignores
#
.*
*.o
*.o.*
*.a
*.s
scripts/basic/fixdep
scripts/kconfig/mconf
scripts/kconfig/zconf.hash.c
scripts/kconfig/zconf.lex.c
scripts/kconfig/zconf.tab.c
#
swupdate
swupdate_unstripped*
lua_swupdate.so*
tools/*_unstripped
tools/client
tools/progress
tools/sendtohawkbit
tools/hawkbitcfg
tools/*.map
tools/*.out
#
# Generated files
#
*.depend*
include/autoconf.h
include/config/
include/generated/
doc/build
# stgit generated dirs
patches-*
.stgit-edit.txt
# quilt's files
patches
series
#
# Backups / patches
#
*~
*.orig
*.rej
/*.patch
#
# debugging stuff
#
.gdb_history
.gdbinit
.gdb_history
# cscope files
cscope.*
# tags files
/tags
/ctags
/etags
#
# acceptance-tests
#
scripts/acceptance-tests
#
# mischellaneous
#
scripts/basic/docproc
scripts/basic/split-include
scripts/kconfig/conf
scripts/kconfig/lex.zconf.c
scripts/kconfig/lxdialog/lxdialog
#
# web-app
#
web-app/dist/
web-app/node_modules/
web-app/package-lock.json
web-app/swupdate-www.tar.gz
dist: trusty
sudo: required
language: c
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y build-essential
- sudo apt-get install -y automake
- sudo apt-get install -y libzmq3-dev
- sudo apt-get install -y libcurl4-openssl-dev
- sudo apt-get install -y liblua5.2-dev
- sudo apt-get install -y libconfig-dev
- sudo apt-get install -y libarchive-dev
- sudo apt-get install -y libjson0-dev
- sudo apt-get install -y zlib1g-dev
- sudo apt-get install -y git
- sudo apt-get install -y uuid
- sudo apt-get install -y uuid-dev
- sudo apt-get install -y liblzo2-dev
- sudo apt-get install -y libsystemd-daemon-dev
- sudo apt-get install -y libsystemd-daemon0
- sudo apt-get install -y check
- sudo apt-get install -y librsync1
- sudo apt-get install -y librsync-dev
script:
- sudo ln -sf /usr/lib/x86_64-linux-gnu/pkgconfig/lua5.2.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua.pc
- sudo mkdir -p /usr/local/lib
- sudo mkdir -p /usr/local/include
- sudo mkdir -p /usr/local/include/mtd
- git clone git://git.infradead.org/mtd-utils.git
- cd mtd-utils
- git checkout -b tmp v2.0.0
- ./autogen.sh
- ./configure
- make
- sudo install -m 644 include/libubi.h /usr/local/include/mtd
- sudo install -m 644 include/libmtd.h /usr/local/include/mtd
- sudo install -m 644 include/mtd/ubi-media.h /usr/local/include/mtd
- sudo install -m 644 *.a /usr/local/lib
- cd ..
- git clone git://git.denx.de/u-boot
- cd u-boot
- git checkout -b tmp v2017.07
- make sandbox_defconfig
- make env
- sudo install -m 644 tools/env/lib.a /usr/local/lib/libubootenv.a
- cd ..
- git clone https://github.com/siemens/efibootguard.git
- cd efibootguard
- autoreconf -fi
- ./configure
- make libebgenv.a
- sudo install -m 644 libebgenv.a /usr/local/lib/libebgenv.a
- sudo install -m 755 -d /usr/include/efibootguard
- sudo install -m 644 include/ebgenv.h /usr/include/efibootguard/ebgenv.h
- cd ..
# Accommodate to trusty's rusty systemd version
- sudo ln -sf /lib/x86_64-linux-gnu/libsystemd-daemon.so.0 /lib/x86_64-linux-gnu/libsystemd.so
- for i in configs/*;do echo $i;make `basename $i` && make || exit 1;done
This diff is collapsed.
#
# For a description of the syntax of this configuration file,
# see scripts/kbuild/config-language.txt.
#
mainmenu "Swupdate Configuration"
config HAVE_LINUX
bool
option env="HAVE_LINUX"
config HAVE_FREEBSD
bool
option env="HAVE_FREEBSD"
config HAVE_DOT_CONFIG
bool
default y
config HAVE_LUA
bool
option env="HAVE_LUA"
config HAVE_LIBCONFIG
bool
option env="HAVE_LIBCONFIG"
config HAVE_LIBARCHIVE
bool
option env="HAVE_LIBARCHIVE"
config HAVE_LIBCURL
bool
option env="HAVE_LIBCURL"
config HAVE_LIBGPIOD
bool
option env="HAVE_LIBGPIOD"
config HAVE_LIBMTD
bool
option env="HAVE_LIBMTD"
config HAVE_LIBUBI
bool
option env="HAVE_LIBUBI"
config HAVE_LIBUBOOTENV
bool
option env="HAVE_LIBUBOOTENV"
config HAVE_LIBEBGENV
bool
option env="HAVE_LIBEBGENV"
config HAVE_LIBZEROMQ
bool
option env="HAVE_LIBZEROMQ"
config HAVE_ZLIB
bool
option env="HAVE_ZLIB"
config HAVE_LIBSSL
bool
option env="HAVE_LIBSSL"
config HAVE_LIBCRYPTO
bool
option env="HAVE_LIBCRYPTO"
config HAVE_JSON_C
bool
option env="HAVE_JSON_C"
menu "Swupdate Settings"
menu "General Configuration"
config CURL
bool
default n
config CURL_SSL
bool
default n
config SYSTEMD
bool "enable systemd support"
depends on HAVE_LINUX
default n
help
Enable support for systemd's start-up completion
notification and socket-based activation features.
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.
menu "Socket Paths"
config SOCKET_CTRL_PATH
string "SWUpdate control socket path"
default "/tmp/sockinstctrl"
help
Path to SWUpdate's IPC socket.
config SOCKET_PROGRESS_PATH
string "SWUpdate progress socket path"
default "/tmp/swupdateprog"
help
Path to the socket progress information is sent to.
config SOCKET_REMOTE_HANDLER_DIRECTORY
string "SWUpdate remote handler socket directory"
default "/tmp/"
help
Directory where sockets to remote handler processes
are expected to be found.
config SOCKET_NOTIFIER_DIRECTORY
string "SWUpdate notifier socket directory"
depends on HAVE_FREEBSD
default "/tmp/"
help
Path to SWUpdate's Notifier sockets on FreeBSD as
Linux-like abstract sockets are not available.
endmenu
config MTD
bool "MTD support"
default y
depends on HAVE_LIBMTD
help
Enable MTD support.
comment "MTD support needs libmtd"
depends on !HAVE_LIBMTD && HAVE_LINUX
config LUA
bool "lua"
default y
depends on HAVE_LUA
help
Enable Lua interpreter.
comment "Lua support needs a Lua interpreter"
depends on !HAVE_LUA
config LUAPKG
string "Lua pkg-config name"
default "lua"
depends on LUA
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 CROSS_COMPILE
string "Cross Compiler prefix"
default ""
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 ""
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 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 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 the directory
pointed to by the environment variable TMPDIR (/tmp as fallback
if unset) to restart in a clean state. For debugging purposes, it
helps to check the consistency of the files extracted by SWUpdate.
For production, answer N.
endmenu
endmenu
source bootloader/Config.in
config DOWNLOAD
bool "Enable image downloading"
default n
depends on HAVE_LIBCURL
select CHANNEL_CURL
help
Enable update from image URL using libcurl. The stream is sent via IPC
to the installer as it is done for other interfaces.
comment "Image downloading support needs libcurl"
depends on !HAVE_LIBCURL
config DOWNLOAD_SSL
bool "Enable SSL support for image downloading"
default n
depends on DOWNLOAD
depends on HAVE_LIBSSL
depends on HAVE_LIBCRYPTO
select CHANNEL_CURL_SSL
help
Enable SSL and checksum verification support in channels
using libcurl.
config CHANNEL_CURL
bool
depends on HAVE_LIBCURL
select CURL
config CHANNEL_CURL_SSL
bool
depends on CHANNEL_CURL
depends on HAVE_LIBSSL
depends on HAVE_LIBCRYPTO
select CURL_SSL
config HASH_VERIFY
bool "Allow to add sha256 hash to each image"
depends on HAVE_LIBSSL
help
Allow to add a sha256 hash to an artifact.
This is automatically set in case of Signed Image
comment "Hash verification needs libssl"
depends on !HAVE_LIBSSL
config SIGNED_IMAGES
bool "Enable verification of signed images"
depends on HAVE_LIBSSL
select HASH_VERIFY
comment "Image verification (signed images) needs libssl"
depends on !HAVE_LIBSSL
choice
prompt "Signature verification algorithm"
depends on SIGNED_IMAGES
default SIGALG_RAWRSA
help
Select if the signature algorithm for signed images is a raw RSA signature
(following PKCS#1.5) or if it uses Cryptographic Message Syntax (CMS).
config SIGALG_RAWRSA
bool "RSA PKCS#1.5"
config SIGALG_CMS
bool "Cryptographic Message Syntax (CMS)"
endchoice
menu "CMS signature verification options"
depends on SIGALG_CMS
config CMS_IGNORE_EXPIRED_CERTIFICATE
bool "Ignore expired certificates"
depends on SIGALG_CMS
config CMS_IGNORE_CERTIFICATE_PURPOSE
bool "Ignore X.509 certificate purpose"
depends on SIGALG_CMS
endmenu
config ENCRYPTED_IMAGES
bool "Images can be encrypted with a symmetric key"
depends on HAVE_LIBSSL
comment "Image encryption needs libssl"
depends on !HAVE_LIBSSL
source suricatta/Config.in
source mongoose/Config.in
config GUNZIP
bool
depends on HAVE_ZLIB
default y
source parser/Config.in
source handlers/Config.in
GPL License Exception:
In addition, as a special exception, the copyright holders give
permission to link the code of portions of this program with the
OpenSSL library under certain conditions as described in each
individual source file, and distribute linked combinations
including the two.
You must obey the GNU General Public License in all respects
for all of the code used other than OpenSSL. If you modify
file(s) with this exception, you may extend this exception to your
version of the file(s), but you are not obligated to do so. If you
do not wish to do so, delete this exception statement from your
version. If you delete this exception statement from all source
files in the program, then also delete it here.
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
1. Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer,
without modification.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The names of the above-listed copyright holders may not be used
to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This diff is collapsed.
This diff is collapsed.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This diff is collapsed.
ifeq ($(HAVE_LUA),)
export HAVE_LUA = y
endif
ifeq ($(HAVE_LIBCONFIG),)
export HAVE_LIBCONFIG = y