mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
bump version to 2022.02.9
add miyoo_defconfig
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
From 305a7a5a74a612801d9df2b2efc86dd952b8c4e7 Mon Sep 17 00:00:00 2001
|
||||
From: Stefano Babic <sbabic@denx.de>
|
||||
Date: Tue, 9 Jun 2020 13:58:06 +0000
|
||||
Subject: [PATCH] diskpart: force kernel to reread partition table
|
||||
|
||||
After writing a partition table to disk, the kernel should be informed
|
||||
(like the partconf tool does), else it is not possible to install images
|
||||
in the new created partitions.
|
||||
|
||||
Signed-off-by: Stefano Babic <sbabic@denx.de>
|
||||
Signed-off-by: Joris Offouga <offougajoris@gmail.com>
|
||||
---
|
||||
handlers/diskpart_handler.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/handlers/diskpart_handler.c b/handlers/diskpart_handler.c
|
||||
index 16adc17..372412b 100644
|
||||
--- a/handlers/diskpart_handler.c
|
||||
+++ b/handlers/diskpart_handler.c
|
||||
@@ -273,7 +273,8 @@ static int diskpart(struct img_type *img,
|
||||
/*
|
||||
* Everything done, write into disk
|
||||
*/
|
||||
- ret = fdisk_write_disklabel(cxt);
|
||||
+ ret = fdisk_write_disklabel(cxt) |
|
||||
+ fdisk_reread_partition_table(cxt);
|
||||
|
||||
handler_exit:
|
||||
if (fdisk_deassign_device(cxt, 0))
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
From bd08e45d7b25f06da2fc6dc824146b471db5f1f4 Mon Sep 17 00:00:00 2001
|
||||
From: Stefano Babic <sbabic@denx.de>
|
||||
Date: Tue, 16 Jun 2020 10:29:55 +0200
|
||||
Subject: [PATCH] Shellscript stops before completing
|
||||
|
||||
Commit 8fb94d7 reworks the way shell script are called, redirecting
|
||||
stdout and stderr to SWUpdate. A shell script runs then in a child
|
||||
process. Under some circumstances, SWUpdate closes the forked process
|
||||
before the child process completes.
|
||||
|
||||
Be sure that the child process has terminated before to go on.
|
||||
|
||||
Signed-off-by: Stefano Babic <sbabic@denx.de>
|
||||
Reported-by: Piotr Piwko <piotr.piwko@gmail.com>
|
||||
Tested-by: Piotr Piwko <piotr.piwko@gmail.com>
|
||||
Signed-off-by: Joris Offouga <offougajoris@gmail.com>
|
||||
---
|
||||
core/pctl.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/pctl.c b/core/pctl.c
|
||||
index 8b1c667..01ad540 100644
|
||||
--- a/core/pctl.c
|
||||
+++ b/core/pctl.c
|
||||
@@ -263,6 +263,7 @@ int run_system_cmd(const char *cmd)
|
||||
}
|
||||
} else {
|
||||
int fds[2];
|
||||
+ pid_t w;
|
||||
|
||||
close(stdoutpipe[PIPE_WRITE]);
|
||||
close(stderrpipe[PIPE_WRITE]);
|
||||
@@ -276,7 +277,6 @@ int run_system_cmd(const char *cmd)
|
||||
* and from stderr (of the child process) as ERROR
|
||||
*/
|
||||
do {
|
||||
- pid_t w;
|
||||
int n1 = 0;
|
||||
struct timeval tv;
|
||||
fd_set readfds;
|
||||
@@ -373,7 +373,7 @@ int run_system_cmd(const char *cmd)
|
||||
}
|
||||
}
|
||||
} while (ret > 0 && n1 > 0);
|
||||
- } while (!WIFEXITED(wstatus));
|
||||
+ } while (w != process_id);
|
||||
|
||||
close(stdoutpipe[PIPE_READ]);
|
||||
close(stderrpipe[PIPE_READ]);
|
||||
--
|
||||
2.25.1
|
||||
|
||||
1
package/swupdate/10-mongoose-args
Normal file
1
package/swupdate/10-mongoose-args
Normal file
@@ -0,0 +1 @@
|
||||
SWUPDATE_WEBSERVER_ARGS="-r /var/www/swupdate ${SWUPDATE_MONGOOSE_EXTRA_ARGS:--p 8080}"
|
||||
1
package/swupdate/90-start-progress
Normal file
1
package/swupdate/90-start-progress
Normal file
@@ -0,0 +1 @@
|
||||
exec /usr/bin/swupdate-progress -w -r &
|
||||
@@ -1,5 +1,6 @@
|
||||
config BR2_PACKAGE_SWUPDATE
|
||||
bool "swupdate"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
# swupdate requires a parser and uses libconfig as default
|
||||
@@ -59,9 +60,25 @@ config BR2_PACKAGE_SWUPDATE_CONFIG
|
||||
I you wish to use your own modified swupdate configuration
|
||||
file specify the config file location with this option.
|
||||
|
||||
config BR2_PACKAGE_SWUPDATE_USB
|
||||
bool "swupdate usb"
|
||||
depends on BR2_PACKAGE_SYSTEMD
|
||||
help
|
||||
Enable update from USB disk.
|
||||
|
||||
comment "swupdate usb needs systemd"
|
||||
depends on !BR2_PACKAGE_SYSTEMD
|
||||
|
||||
config BR2_PACKAGE_SWUPDATE_WEBSERVER
|
||||
bool "swupdate webserver"
|
||||
default y
|
||||
help
|
||||
Enable update from remote using a web server on the target.
|
||||
|
||||
config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE
|
||||
bool "install default website"
|
||||
default y
|
||||
depends on BR2_PACKAGE_SWUPDATE_WEBSERVER
|
||||
help
|
||||
Install the provided website to /var/www/swupdate.
|
||||
|
||||
@@ -70,6 +87,6 @@ config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE
|
||||
installed to /var/www/swupdate.
|
||||
endif
|
||||
|
||||
comment "swupdate needs a toolchain w/ threads"
|
||||
comment "swupdate needs a toolchain w/ dynamic library, threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
9
package/swupdate/swupdate-progress.service
Normal file
9
package/swupdate/swupdate-progress.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=swupdate progress service
|
||||
After=swupdate.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/swupdate-progress -r -w
|
||||
|
||||
[Install]
|
||||
WantedBy=swupdate.service
|
||||
1
package/swupdate/swupdate-usb.rules
Normal file
1
package/swupdate/swupdate-usb.rules
Normal file
@@ -0,0 +1 @@
|
||||
ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block", ENV{ID_BUS}=="usb", ENV{ID_FS_USAGE}=="filesystem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="swupdate-usb@%k.service"
|
||||
8
package/swupdate/swupdate-usb@.service
Normal file
8
package/swupdate/swupdate-usb@.service
Normal file
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=usb media swupdate service
|
||||
Requires=swupdate-progress.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/bin/mount /dev/%I /mnt
|
||||
ExecStart=/bin/sh -c "swupdate-client -v /mnt/*.swu"
|
||||
ExecStopPost=/bin/umount /mnt
|
||||
@@ -1,6 +1,12 @@
|
||||
# Locally calculated
|
||||
sha256 132df2ff1ad41c7aabd0fbef6a23d28607cbd5cad52aab050c4822977a107486 swupdate-2020.04.tar.gz
|
||||
sha256 43492b377cf2fb67942d1dd231146bd4e6578646ad13ef289297c9dd75cbc478 Licenses/Exceptions
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Licenses/gpl-2.0.txt
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 Licenses/lgpl-2.1.txt
|
||||
sha256 89807acf2309bd285f033404ee78581602f3cd9b819a16ac2f0e5f60ff4a473e Licenses/mit.txt
|
||||
sha256 4d078e57bb91e17025ee8cb1bb54c25532e8d2dbe329bba6a7a0328ac34a07e3 swupdate-2021.11.tar.gz
|
||||
sha256 4cf04ed34ff0ebbf5c71345b56e6af5093fc17206364cca0ebbae92ef3940683 LICENSES/BSD-1-Clause.txt
|
||||
sha256 e27a3e87706b3aa5ff2e50eaafe2e6ed5397fbf2d7679eaf444a6d000518a3a6 LICENSES/BSD-3-Clause.txt
|
||||
sha256 0558101984550fa84d1d13c2af11d116c20079d2be58711e8d99cadce7009192 LICENSES/CC0-1.0.txt
|
||||
sha256 cde7883b9050a1104f4ac19a1572aafd6e5d7323b68351aaf51fbf4beba54966 LICENSES/CC-BY-SA-4.0.txt
|
||||
sha256 5d51b52a40391a26cbb2accf5dc5d1c165de49a022d9d5efb50b22204d2682ec LICENSES/GPL-2.0-only.txt
|
||||
sha256 43fd695e9b198a9a4997cc2d02e10d26cae937e2c4930b9eff9c6d349c85cd32 LICENSES/GPL-2.0-or-later.txt
|
||||
sha256 492e801f1b0632185431472f148885a4fe8e990b10da57b4986a8bcf140a5374 LICENSES/ISC.txt
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSES/LGPL-2.1-or-later.txt
|
||||
sha256 89807acf2309bd285f033404ee78581602f3cd9b819a16ac2f0e5f60ff4a473e LICENSES/MIT.txt
|
||||
sha256 8f2368a292194be10b1223a8875815240a9208bb30785cb13d8849eb6a750fe9 LICENSES/OFL-1.1.txt
|
||||
|
||||
@@ -4,19 +4,34 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SWUPDATE_VERSION = 2020.04
|
||||
SWUPDATE_VERSION = 2021.11
|
||||
SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION))
|
||||
SWUPDATE_LICENSE = GPL-2.0+ with OpenSSL exception, LGPL-2.1+, MIT
|
||||
SWUPDATE_LICENSE_FILES = Licenses/Exceptions Licenses/gpl-2.0.txt \
|
||||
Licenses/lgpl-2.1.txt Licenses/mit.txt
|
||||
SWUPDATE_LICENSE = GPL-2.0, GPL-2.0+, LGPL-2.1+, MIT, ISC, BSD-1-Clause, BSD-3-Clause, CC0-1.0, CC-BY-SA-4.0, OFL-1.1
|
||||
SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \
|
||||
LICENSES/BSD-3-Clause.txt \
|
||||
LICENSES/CC0-1.0.txt \
|
||||
LICENSES/CC-BY-SA-4.0.txt \
|
||||
LICENSES/GPL-2.0-only.txt \
|
||||
LICENSES/GPL-2.0-or-later.txt \
|
||||
LICENSES/ISC.txt \
|
||||
LICENSES/LGPL-2.1-or-later.txt \
|
||||
LICENSES/MIT.txt \
|
||||
LICENSES/OFL-1.1.txt
|
||||
|
||||
# swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not
|
||||
# available in all external toolchains, and use CC for linking. Ensure
|
||||
# TARGET_CC is used for both.
|
||||
SWUPDATE_MAKE_ENV = CC="$(TARGET_CC)" LD="$(TARGET_CC)"
|
||||
SWUPDATE_MAKE_ENV = CC="$(TARGET_CC)" LD="$(TARGET_CC)" SKIP_STRIP=y
|
||||
|
||||
# swupdate bundles its own version of mongoose (version 6.16)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_E2FSPROGS),y)
|
||||
SWUPDATE_DEPENDENCIES += e2fsprogs
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBEXT2FS=y
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBEXT2FS=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_EFIBOOTMGR),y)
|
||||
SWUPDATE_DEPENDENCIES += efibootmgr
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBEBGENV=y
|
||||
@@ -38,6 +53,13 @@ else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBARCHIVE=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y)
|
||||
SWUPDATE_DEPENDENCIES += util-linux
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBBLKID=y
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBBLKID=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCONFIG),y)
|
||||
SWUPDATE_DEPENDENCIES += libconfig
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=y
|
||||
@@ -52,6 +74,13 @@ else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBCURL=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),y)
|
||||
SWUPDATE_DEPENDENCIES += util-linux
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBFDISK=y
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBFDISK=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGPIOD),y)
|
||||
SWUPDATE_DEPENDENCIES += libgpiod
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBGPIOD=y
|
||||
@@ -59,6 +88,10 @@ else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBGPIOD=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBUBOOTENV),y)
|
||||
SWUPDATE_DEPENDENCIES += libubootenv
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBURIPARSER),y)
|
||||
SWUPDATE_DEPENDENCIES += liburiparser
|
||||
SWUPDATE_MAKE_ENV += HAVE_URIPARSER=y
|
||||
@@ -73,7 +106,7 @@ else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBWEBSOCKETS=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HAS_LUAINTERPRETER):$(BR2_STATIC_LIBS),y:)
|
||||
ifeq ($(BR2_PACKAGE_HAS_LUAINTERPRETER),y)
|
||||
SWUPDATE_DEPENDENCIES += luainterpreter host-pkgconf
|
||||
# defines the base name for the pkg-config file ("lua" or "luajit")
|
||||
define SWUPDATE_SET_LUA_VERSION
|
||||
@@ -84,6 +117,13 @@ else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LUA=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MBEDTLS),y)
|
||||
SWUPDATE_DEPENDENCIES += mbedtls
|
||||
SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=y
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MTD),y)
|
||||
SWUPDATE_DEPENDENCIES += mtd
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBMTD=y
|
||||
@@ -93,25 +133,33 @@ SWUPDATE_MAKE_ENV += HAVE_LIBMTD=n
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBUBI=n
|
||||
endif
|
||||
|
||||
# OpenSSL or mbedTLS
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
SWUPDATE_DEPENDENCIES += openssl
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBSSL=y
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=y
|
||||
SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=n
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBSSL=n
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=n
|
||||
ifeq ($(BR2_PACKAGE_MBEDTLS),y)
|
||||
SWUPDATE_DEPENDENCIES += mbedtls
|
||||
SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=y
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_P11_KIT),y)
|
||||
SWUPDATE_DEPENDENCIES += p11-kit
|
||||
SWUPDATE_MAKE_ENV += HAVE_P11KIT=y
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_P11KIT=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
SWUPDATE_DEPENDENCIES += systemd
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBSYSTEMD=y
|
||||
define SWUPDATE_SET_SYSTEMD
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SYSTEMD)
|
||||
endef
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBSYSTEMD=n
|
||||
define SWUPDATE_SET_SYSTEMD
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_SYSTEMD)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBUBOOTENV),y)
|
||||
@@ -121,6 +169,20 @@ else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBUBOOTENV=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WOLFSSL),y)
|
||||
SWUPDATE_DEPENDENCIES += wolfssl
|
||||
SWUPDATE_MAKE_ENV += HAVE_WOLFSSL=y
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_WOLFSSL=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZCHUNK),y)
|
||||
SWUPDATE_DEPENDENCIES += zchunk
|
||||
SWUPDATE_MAKE_ENV += HAVE_ZCK=y
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_ZCK=n
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZEROMQ),y)
|
||||
SWUPDATE_DEPENDENCIES += zeromq
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBZEROMQ=y
|
||||
@@ -144,35 +206,43 @@ endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBRSYNC),y)
|
||||
SWUPDATE_DEPENDENCIES += librsync
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBRSYNC=y
|
||||
else
|
||||
SWUPDATE_MAKE_ENV += HAVE_LIBRSYNC=n
|
||||
endif
|
||||
|
||||
SWUPDATE_BUILD_CONFIG = $(@D)/.config
|
||||
ifeq ($(BR2_PACKAGE_SWUPDATE_WEBSERVER),y)
|
||||
define SWUPDATE_SET_WEBSERVER
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_WEBSERVER)
|
||||
endef
|
||||
else
|
||||
define SWUPDATE_SET_WEBSERVER
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_WEBSERVER)
|
||||
endef
|
||||
endif
|
||||
|
||||
SWUPDATE_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG))
|
||||
SWUPDATE_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
define SWUPDATE_PREFER_STATIC
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_STATIC)
|
||||
endef
|
||||
endif
|
||||
|
||||
SWUPDATE_MAKE_OPTS = \
|
||||
SWU_VER="$(SWUPDATE_VERSION) (Buildroot $(BR2_VERSION_FULL))" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CONFIG_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
|
||||
CONFIG_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)"
|
||||
|
||||
define SWUPDATE_KCONFIG_FIXUP_CMDS
|
||||
$(SWUPDATE_PREFER_STATIC)
|
||||
$(SWUPDATE_SET_LUA_VERSION)
|
||||
$(SWUPDATE_SET_SYSTEMD)
|
||||
$(SWUPDATE_SET_WEBSERVER)
|
||||
endef
|
||||
|
||||
define SWUPDATE_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) $(SWUPDATE_MAKE_OPTS) -C $(@D)
|
||||
$(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D) $(SWUPDATE_MAKE_OPTS)
|
||||
endef
|
||||
|
||||
define SWUPDATE_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/swupdate $(TARGET_DIR)/usr/bin/swupdate
|
||||
$(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
$(SWUPDATE_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
|
||||
$(if $(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE), \
|
||||
mkdir -p $(TARGET_DIR)/var/www/swupdate; \
|
||||
cp -dpfr $(@D)/examples/www/v2/* $(TARGET_DIR)/var/www/swupdate)
|
||||
@@ -186,23 +256,39 @@ $(error No Swupdate configuration file specified, check your BR2_PACKAGE_SWUPDAT
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE),y)
|
||||
# Services and configs derived from meta-swupdate(MIT license)
|
||||
# https://github.com/sbabic/meta-swupdate/tree/master/recipes-support/swupdate/swupdate
|
||||
define SWUPDATE_INSTALL_COMMON
|
||||
mkdir -p $(TARGET_DIR)/etc/swupdate/conf.d \
|
||||
$(TARGET_DIR)/usr/lib/swupdate/conf.d
|
||||
$(INSTALL) -D -m 755 package/swupdate/swupdate.sh \
|
||||
$(INSTALL) -D -m 755 $(SWUPDATE_PKGDIR)/swupdate.sh \
|
||||
$(TARGET_DIR)/usr/lib/swupdate/swupdate.sh
|
||||
$(if $(BR2_PACKAGE_SWUPDATE_WEBSERVER), \
|
||||
$(INSTALL) -D -m 644 $(SWUPDATE_PKGDIR)/10-mongoose-args \
|
||||
$(TARGET_DIR)/usr/lib/swupdate/conf.d/10-mongoose-args)
|
||||
endef
|
||||
define SWUPDATE_INSTALL_INIT_SYSTEMD
|
||||
$(SWUPDATE_INSTALL_COMMON)
|
||||
$(INSTALL) -D -m 644 package/swupdate/swupdate.service \
|
||||
$(INSTALL) -D -m 644 $(SWUPDATE_PKGDIR)/swupdate.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/swupdate.service
|
||||
$(INSTALL) -D -m 644 $(SWUPDATE_PKGDIR)/swupdate.socket \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/swupdate.socket
|
||||
$(INSTALL) -D -m 644 $(SWUPDATE_PKGDIR)/swupdate-usb@.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/swupdate-usb@.service
|
||||
$(if $(BR2_PACKAGE_SWUPDATE_USB), \
|
||||
$(INSTALL) -D -m 644 $(SWUPDATE_PKGDIR)/swupdate-usb.rules \
|
||||
$(TARGET_DIR)/lib/udev/rules.d/swupdate-usb.rules)
|
||||
$(INSTALL) -D -m 644 $(SWUPDATE_PKGDIR)/swupdate-progress.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/swupdate-progress.service
|
||||
$(INSTALL) -D -m 644 $(SWUPDATE_PKGDIR)/tmpfiles-swupdate.conf \
|
||||
$(TARGET_DIR)/usr/lib/tmpfiles.d/tmpfiles-swupdate.conf
|
||||
endef
|
||||
define SWUPDATE_INSTALL_INIT_SYSV
|
||||
$(SWUPDATE_INSTALL_COMMON)
|
||||
$(INSTALL) -D -m 755 package/swupdate/S80swupdate \
|
||||
$(INSTALL) -D -m 755 $(SWUPDATE_PKGDIR)/S80swupdate \
|
||||
$(TARGET_DIR)/etc/init.d/S80swupdate
|
||||
$(INSTALL) -D -m 644 $(SWUPDATE_PKGDIR)/90-start-progress \
|
||||
$(TARGET_DIR)/usr/lib/swupdate/conf.d/90-start-progress
|
||||
endef
|
||||
endif
|
||||
|
||||
$(eval $(kconfig-package))
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
# Override these variables in sourced script(s) located
|
||||
# in /usr/lib/swupdate/conf.d or /etc/swupdate/conf.d
|
||||
# NOTE: There are substrings used in some swupdate commands which will
|
||||
# need to be wrapped in a script to prevent tokenizing
|
||||
# ( -p/-P post/pre cmds are good examples)
|
||||
SWUPDATE_ARGS="-v ${SWUPDATE_EXTRA_ARGS}"
|
||||
SWUPDATE_WEBSERVER_ARGS=""
|
||||
SWUPDATE_SURICATTA_ARGS=""
|
||||
|
||||
11
package/swupdate/swupdate.socket
Normal file
11
package/swupdate/swupdate.socket
Normal file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=SWUpdate socket listener
|
||||
Documentation=https://github.com/sbabic/swupdate
|
||||
Documentation=https://sbabic.github.io/swupdate
|
||||
|
||||
[Socket]
|
||||
ListenStream=/tmp/sockinstctrl
|
||||
ListenStream=/tmp/swupdateprog
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
2
package/swupdate/tmpfiles-swupdate.conf
Normal file
2
package/swupdate/tmpfiles-swupdate.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
X /tmp/datadst
|
||||
X /tmp/scripts
|
||||
Reference in New Issue
Block a user