aboutsummaryrefslogtreecommitdiffstats
path: root/package/system
Commit message (Collapse)AuthorAgeFilesLines
* mtd: cleanup unused code and variables in fis.cPetr Štetiar2019-07-171-20/+0
| | | | | | | | | | | | | | | While compile checking mtd changes in PR#1359 I've noticed following compiler warnings and cleaned them up: fis.c: In function 'fis_remap': fis.c:143:25: warning: variable 'redboot' set but not used [-Wunused-but-set-variable] struct fis_image_desc *redboot = NULL; ^~~~~~~ fis.c:142:25: warning: variable 'fisdir' set but not used [-Wunused-but-set-variable] struct fis_image_desc *fisdir = NULL; ^~~~~~ Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mtd: add CRC signature to RedBoot partition mapDaniel Gimpelevich2019-07-173-3/+26
| | | | | | | | | | The code for calculating the CRC32 signatures for RedBoot FIS partitions was already included, but for unknown reasons, it was never invoked. Some bootloaders enforce checking these for loaded kernels, so they should be written. This patch does so. Tested-by: Brian Gonyer <bgonyer@gmail.com> Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
* package: mtd: add fixseama command for ath79Chuanhong Guo2019-07-162-1/+2
| | | | | | This is needed by Qihoo C301. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ubox: implement service_running() in log init.d scriptRafał Miłecki2019-07-152-1/+5
| | | | | | It allows checking if service is running. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* rpcd: implement service_running() in init.d scriptRafał Miłecki2019-07-152-1/+4
| | | | | | It allows checking if service is running. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* fstools: add direct dependencies on libblobmsg-json and libjson-cPetr Štetiar2019-07-151-2/+2
| | | | | | | | | | | | | | | | The OpenWrt buildroot ABI version rebuild tracker does not handle transient dependencies, therefore add all libraries linked by block-mount and blockd as direct dependencies to the corresponding binary package definition. This ensures that block-mount and blockd is automatically rebuilt and relinked if any of these libraries has its ABI_VERSION updated in the future. Fixes: FS#2373 [jow: similar fix for procd and 98.42% of commit message] Signed-off-by: Jo-Philip Wich <jow@mein.io> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* procd: update to latest git HEADHans Dedecker2019-07-131-2/+2
| | | | | | 31f0765 procd: check strchr() result before using it Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* zram-swap: Add extra commands for status/compactionEmil Muratov2019-07-071-21/+34
| | | | | | | | | This patch adds two new commands: zram status - shows memory stats for all zram swaps zram compaction - trigger compaction for all zram swaps Signed-off-by: Emil Muratov <gpm@hotplug.ru> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* zram-swap: Add zram compaction and statistics info outputEmil Muratov2019-07-072-2/+58
| | | | | | | | | Executing '/etc/init.d/zram start' during runtime (with a swap being already mounted) triggers zram device compaction and prints out nice stats info about zram memory usage Signed-off-by: Emil Muratov <gpm@hotplug.ru> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [use IEC's MiB unit]
* zram-swap: Fix busybox dependency checkEmil Muratov2019-07-071-1/+1
| | | | | | | | - fix dependency on BUSYBOX_CONFIG_SWAPONOFF (removed in 84da2a6) - add busybox defaults checking (fix zram-swap always installs swap-utils and libblkid as dependency, even if busybox includes mkswap by default) Signed-off-by: Emil Muratov <gpm@hotplug.ru>
* rpcd: add direct dependency on libjson-cJo-Philipp Wich2019-06-211-1/+1
| | | | | | | | | | | The OpenWrt buildroot ABI version rebuild tracker does not handle transient dependencies, therefor add all libraries linked by rpcd as direct dependencies to the corresponding binary package definition. This ensures that rpcd is automatically rebuilt and relinked if any of these libraries has its ABI_VERSION updated in the future. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* fstools: block-mount: fix restart of fstab serviceKarel Kočí2019-06-212-1/+5
| | | | | | | | | | | | | | | Restarting service causes file-systems to be unmounted without being mounted back. When this service was obsoleted it should have been implemented in a way that all actions are ignored. Up to this commit default handler was called when restart was requested. This default handler just simply calls stop and start. That means that stop called unmount but start just printed that this service is obsoleted. This instead implements restart that just prints same message like start does. It just calls start in reality. This makes restart unavailable for call. Signed-off-by: Karel Kočí <karel.koci@nic.cz>
* treewide: fix syntax errors exposed after kconfig updateJo-Philipp Wich2019-06-201-1/+1
| | | | | | | | | | | | | | After commit e82a4d9cfb ("config: regenerate *_shipped sources") the mconf parser became more strict as a side effect and started to spew a series of warnings when evaluating our generated kconfig sources: tmp/.config-package.in:705:warning: ignoring unsupported character '@' The root cause of these warnings is a wrong use of the @SYMBOL dependency syntax in various Makefile. Fix the corresponding Makefiles by turning `@SYM||@SYM2` expressions into the proper `@(SYM||SYM2)` form. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* procd: add direct dependencies on libblobmsg-json and libjson-cJo-Philipp Wich2019-06-201-1/+1
| | | | | | | | | | | | The OpenWrt buildroot ABI version rebuild tracker does not handle transient dependencies, therefor add all libraries linked by procd as direct dependencies to the corresponding binary package definition. This ensures that procd is automatically rebuilt and relinked if any of these libraries has its ABI_VERSION updated in the future. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* urngd: move project to git.openwrt.orgPetr Štetiar2019-06-172-15/+4
| | | | | | Let's move project to a proper place. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* urngd: Fix more wrong type in format stringHauke Mehrtens2019-06-161-1/+1
| | | | | | | | Also the other type is worng and causes compile problems on ARM64 platforms. Fixes: 9b53201d9c53 ("urngd: Fix wrong type in format string") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* urngd: Fix wrong type in format stringHauke Mehrtens2019-06-161-0/+11
| | | | | | | GCC 9.1 complains about this wrong type used in the format string, fix this to make the compiler happy. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ubox: bump to git HEADHauke Mehrtens2019-06-161-3/+3
| | | | | | 4df34a4 kmodloader: Increase path array size to make it always fit Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* opkg: bump to version 2019-06-14Yousong Zhou2019-06-141-3/+3
| | | | | | | | Opkg starting from this version special-cases busybox as alternatives provider. There should be no need to add entries to ALTERNATIVES of busybox package Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* base-files: move urandom seed bits into separate packagePetr Štetiar2019-06-114-0/+88
| | | | | | | So it's possible to install or remove it as needed. Tested-by: Lucian Cristian <lucian.cristian@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ubox: move getrandom into separate getrandom packagePetr Štetiar2019-06-111-3/+14
| | | | | | | So it's possible to install or remove it as needed. Tested-by: Lucian Cristian <lucian.cristian@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* urng: add micro non-physical true RNG based on timing jitterPetr Štetiar2019-06-112-0/+65
| | | | | | | | | | | | | | | | | μrngd is OpenWrt's micro non-physical true random number generator based on timing jitter. Using the Jitter RNG core, the rngd provides an entropy source that feeds into the Linux /dev/random device if its entropy runs low. It updates the /dev/random entropy estimator such that the newly provided entropy unblocks /dev/random. The seeding of /dev/random also ensures that /dev/urandom benefits from entropy. Especially during boot time, when the entropy of Linux is low, the Jitter RNGd provides a source of sufficient entropy. Tested-by: Lucian Cristian <lucian.cristian@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* rpcd: fix init script reload actionJo-Philipp Wich2019-06-062-6/+3
| | | | | | | Drop the legacy start() and stop() procedures and define a proper reload signal action instead. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* rpcd: update to the latest git headPetr Štetiar2019-06-061-3/+3
| | | | | | | 89bfaa424606 Fix possible linker errors by using CMake find_library macro 569284a119f9 session: handle NULL return values of crypt() Signed-off-by: Petr Štetiar <ynezz@true.cz>
* procd: update to latest git HEADPetr Štetiar2019-05-301-3/+3
| | | | | | | ade00ca585a4 container: fix .dockerenv stat check 385b904b2f0a hotplug: improve error message during group ownership change Signed-off-by: Petr Štetiar <ynezz@true.cz>
* procd: update to latest git HEADPaul Spooren2019-05-291-3/+3
| | | | | | 7f0f6b2 procd: add docker support Signed-off-by: Paul Spooren <mail@aparcar.org>
* uci: fix heap use after free (FS#2288)Hans Dedecker2019-05-231-3/+3
| | | | | | f199b96 uci: fix options list of section after type change Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* gemini: Fix up firmware checksum on DIR-685Linus Walleij2019-05-181-0/+1
| | | | | | | | | | | | | | | | | | Using the same method as the D-Link DAP-2695 A1 we use the "mtd" tool to augment the firmware checkum in flash on first boot of a new firmware on the D-Link DIR-685. We need to augment the Makefile for "mtd" to build in the special WRGG fixup support for Gemini as well. This works around the problem of the machine not booting after factory install unless the sysupgrade is applied immediately. Based on commit e3875350f3e4185020b64e0588bba521cd1d6e64 "ar71xx: add support for D-Link DAP-2695 rev. A1" Cc: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* mtd: Make fixwrgg command work on DIR-685Linus Walleij2019-05-181-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The D-Link DIR-685 has the same problem as the D-Link DAP-2695: when flashing the factory image, the checksum includes the whole flashed image, even the rootfs_data part with the end of filesystem mark. Also the whole flashed image is stored in the flash, so on the first boot, the whole rootfs image is loaded into memory with the kernel. This is fixed using the fixwrgg command to mtd, but for this to work we need to make fixwrgg work with the Little-Endian ARM DIR-685. The code tries to be endian agnostic but this fails because the WRGG image loader doesn't. On ARM, the file size is stored in little endian format, and on big-endian systems it is stored in big endian format, so we can just drop all the friendly htonl() that will make the shdr->size big endian: this will actually break the little endian systems, and on the big endian systems the native endianness will still be correct. The magic number is always stored in little endian format however, so make sure this is always read in LE32 format. I chose to create a straight-forward le32_to_cpu() static inline that IMO is simple and easy to read. Cc: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* mtd: base-files: Unify dual-firmware devices (Linksys)Jeff Kletsky2019-05-183-134/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consistently handle boot-count reset and upgrade across ipq40xx, ipq806x, kirkwood, mvebu Dual-firmware devices often utilize a specific MTD partition to record the number of times the boot loader has initiated boot. Most of these devices are NAND, typically with a 2k erase size. When this code was ported to the ipq40xx platform, the device in hand used NOR for this partition, with a 16-byte "record" size. As the implementation of `mtd resetbc` is by-platform, the hard-coded nature of this change prevented proper operation of a NAND-based device. * Unified the "NOR" variant with the rest of the Linksys variants * Added logging to indicate success and failure * Provided a meaningful return value for scripting * "Protected" the use of `mtd resetbc` in start-up scripts so that failure does not end the boot sequence * Moved Linksys-specific actions into common `/etc/init.d/bootcount` For upgrade, these devices need to determine which partition to flash, as well as set certain U-Boot envirnment variables to change the next boot to the newly flashed version. * Moved upgrade-related environment changes out of bootcount * Combined multiple flashes of environment into single one * Current-partition detection now handles absence of `boot_part` Runtime-tested: Linksys EA8300 Signed-off-by: Jeff Kletsky <git-commits@allycomm.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [checkpatch.pl fixes, traded split strings for 80+ chars per line]
* system: uci: Use config dir on uci_add and support add_/del_listKristian Evensen2019-05-172-2/+20
| | | | | | | | | | | | | | | | This commit makes three changes to the uci shell library: * A check for UCI_CONFIG_DIR has been added to the command line when adding anonymous sections. Without this change, adding anonymous sections to configs not stored in /etc/config is not possible. * Support for adding/removing items from lists were missing, so I have added the functions uci_add_list() and uci_remove_list() to simplify working with uci lists from scripts. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> [added missing package version bump] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* procd: fix compile issueHans Dedecker2019-05-091-3/+3
| | | | | | 1361b97 container: include stdbool.h Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* procd: update to latest git HEADHans Dedecker2019-05-081-4/+4
| | | | | | 9b35439 procd: detect lxc container and behave accordingly Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* procd: add procd_running() helper for checking running stateRafał Miłecki2019-05-022-1/+16
| | | | | | | | This should be helpful for implementing service_running() in procd init scripts. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: John Crispin <john@phrozen.org>
* procd: update to latest git HEADHans Dedecker2019-05-021-2/+2
| | | | | | 01f3dc8 instance: dump user and group as well Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* procd: allow passing optional group instance parameterMichael Heimpold2019-05-022-4/+5
| | | | | | | | | Sometimes is desirable to run a process with a specific group id instead of the default one which is derived from passwd entry. This can be achived now by using procd_set_param group $mygroup. Signed-off-by: Michael Heimpold <mhei@heimpold.de> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_SOURCE_VERSION update]
* procd: allow passing optional syslog facility as instance parameterMichael Heimpold2019-05-022-5/+8
| | | | | | | | | Optional syslog facility can be set by adding procd_set_param facility $myfacility. While at, also add stdout/stderr documentation. Signed-off-by: Michael Heimpold <mhei@heimpold.de> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_SOURCE_VERSION update]
* procd: update to latest git HEADHans Dedecker2019-04-291-3/+3
| | | | | | | cfaed56 procd: add SIGPWR as signal a30a8fd procd: copy the respawn property of new instance Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* procd/hotplug: add dependency to dialout and audio groupMartin Schiller2019-04-161-1/+2
| | | | | | | | | | | | | | | | Commit 6e060bd62c85 introduced a dependency to the dialout group. Adding this group to the "group" file in the base-files package is not enough to handle this dependency, because after a sysupgrade this entry will be missing in the "group" file. To address this problem the dependencies to the required groups needs to be set in the Makefile of the procd package. Then, the uci-default script "13_fix_group_user" will add the groups on first boot-up after a sysupgrade. Fixes: 6e060bd62c85 ("base-files/hotplug: fix dedicated group for tty devices") Tested-by: Michael Heimpold <mhei@heimpold.de> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* procd: update to latest git HEADHans Dedecker2019-04-101-3/+3
| | | | | | baaf38c procd: instance: Support deleting stopped instances Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* ubox: bump to git HEADStijn Tintel2019-04-071-3/+3
| | | | | | 5130fa4 kmodloader: fix and optimize loading of failed modules Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* base-files/hotplug: fix dedicated group for tty devicesMichael Heimpold2019-04-041-0/+4
| | | | | | | | | | | | | | | | | Commit 124ab1dc0a and 5523ee3459 introduced the assignment of the group "tty" to /dev/tty* devices in order to support unprivileged user access to serial devices. However, due to an improperly rebased commit this feature broke. This patch restores the lost hunk in hotplug.json file to re-introduce this feature and also renames the existing "tty" group to "dialout" as this is the more typical name for such a group on desktop systems. Fixes: 5209cfa534 ("procd: fix hotplug.json syntax") Signed-off-by: Michael Heimpold <mhei@heimpold.de> Acked-by: Jo-Philipp Wich <jo@mein.io>
* fstools: update to the latest master branchPetr Štetiar2019-03-281-3/+3
| | | | | | | ff1ded6 libfstools: Fix overflow of F2FS_MINSIZE constant bc2c876 libfstools: Print error in case of loop blkdev failure Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ubox: update to latest git HEADHauke Mehrtens2019-03-211-3/+3
| | | | | | a782779 kmodloader: increase module name length Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ca-certificates: update to version 20190110Josef Schlehofer2019-03-211-4/+3
| | | | | | | | | | - Tested on Turris MOX, OpenWrt master - Removed PKG_BUILD_DIR In build_dir there were two folders ca-certificates and ca-certificates-20190110 and it failed as files were in ca-certificates-20190110 Signed-off-by: Josef Schlehofer <josef.schlehofer@nic.cz>
* procd: Enable seccomp for powerpcWojciech Dubowik2019-03-111-4/+4
| | | | Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
* ucert: add PROVIDES also for minimal 'ucert' packageDaniel Golle2019-03-081-0/+1
| | | | | | | Otherwise ucert-full gets selected instead of ucert when depending on ucert. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* fwtool: add support for extracting the truncated data part to stdoutFelix Fietkau2019-02-121-2/+23
| | | | | | | This allows extracing the firmware + metadata from a signed firmware without altering the original image file Signed-off-by: Felix Fietkau <nbd@nbd.name>
* fwtool: do not strip metadata if extracting signatureFelix Fietkau2019-02-121-1/+3
| | | | | | This allows the signature to cover the metadata area Signed-off-by: Felix Fietkau <nbd@nbd.name>
* opkg: update to latest Git headJo-Philipp Wich2019-01-311-2/+2
| | | | | | | d4ba162 libopkg: only perform size check when information is available Fixes: e079591b84 ("opkg: update to latest Git head") Signed-off-by: Jo-Philipp Wich <jo@mein.io>