1config BR2_PACKAGE_SWUPDATE
2	bool "swupdate"
3	depends on !BR2_STATIC_LIBS
4	depends on BR2_TOOLCHAIN_HAS_THREADS
5	depends on BR2_USE_MMU # fork()
6	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
7	select BR2_PACKAGE_JSON_C
8	select BR2_PACKAGE_LIBUBOOTENV
9	help
10	  swupdate provides a reliable way to update the software on
11	  an embedded system.
12
13	  swupdate is highly configurable to fit the targets
14	  requirements and to minimize the footprint. The provided
15	  default configuration file BR2_PACKAGE_SWUPDATE_CONFIG will
16	  enable swupdate with an embedded webserver, a parser and a
17	  handler for raw NAND or NOR flash.
18
19	  The default configuration file builds a reasonable firmware
20	  update system with minimal external dependencies in mind.
21	  If you like to use your own modified configuration,
22	  you have to select the necessary packages manually:
23
24	  * Select BR2_PACKAGE_LUA or BR2_PACKAGE_LUAJIT if you want
25	    want to have Lua support.
26	  * Select BR2_PACKAGE_LIBCURL if you want to use the download
27	    feature.
28	  * Select BR2_PACKAGE_OPENSSL or BR2_PACKAGE_MBEDTLS if you
29	    want to add encryption support.
30	  * Select BR2_PACKAGE_MTD if you want to use swupdate with
31	    UBI partitions.
32	  * Select BR2_PACKAGE_ZLIB if you want to deal with gzip
33	    compressed archives.
34	  * Select BR2_PACKAGE_ZSTD if you want to deal with zstd
35	    compressed archives.
36	  * Select BR2_PACKAGE_ZEROMQ to add support for using a
37	    remote handler.
38	  * Select BR2_PACKAGE_LIBRSYNC to add support for using
39	    rdiff handler.
40	  * Select BR2_PACKAGE_LIBGPIOD or BR2_PACKAGE_LIBGPIOD2 to add
41	    support for microcontroller firmware update.
42	  * Select BR2_PACKAGE_EFIBOOTMGR to add support for EFI Boot
43	    Guard.
44	  * Select BR2_PACKAGE_LIBCURL, BR2_PACKAGE_LIBWEBSOCKETS,
45	    and BR2_PACKAGE_LIBURIPARSER
46	    to add support for the SWU forwarder.
47
48	  https://sbabic.github.io/swupdate
49
50if BR2_PACKAGE_SWUPDATE
51
52config BR2_PACKAGE_SWUPDATE_CONFIG
53	string "swupdate configuration file"
54	default "package/swupdate/swupdate.config"
55	help
56	  Path to the swupdate configuration file.
57
58	  I you wish to use your own modified swupdate configuration
59	  file specify the config file location with this option.
60
61config BR2_PACKAGE_SWUPDATE_USB
62	bool "swupdate usb"
63	depends on BR2_PACKAGE_SYSTEMD
64	help
65	  Enable update from USB disk.
66
67comment "swupdate usb needs systemd"
68	depends on !BR2_PACKAGE_SYSTEMD
69
70config BR2_PACKAGE_SWUPDATE_WEBSERVER
71	bool "swupdate webserver"
72	default y
73	help
74	  Enable update from remote using a web server on the target.
75
76config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE
77	bool "install default website"
78	default y
79	depends on BR2_PACKAGE_SWUPDATE_WEBSERVER
80	help
81	  Install the provided website to /var/www/swupdate.
82
83	  This is necessary if you want to run swupdate with the
84	  embedded webserver and do not provide an own website to be
85	  installed to /var/www/swupdate.
86endif
87
88comment "swupdate needs a toolchain w/ dynamic library, threads"
89	depends on BR2_USE_MMU
90	depends on BR2_TOOLCHAIN_HAS_SYNC_4
91	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
92