aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils
Commit message (Collapse)AuthorAgeFilesLines
* yafut: add a kernel update tool for MikroTik NANDMichał Kępień2023-04-181-0/+35
| | | | | | | | | | | | | | | | | | | | | | Commit 9d96b6fb72 ("ath79/mikrotik: disable building NAND images") disabled building images for MikroTik devices with NAND flash due to a less than satisfactory method used for updating the kernel on those devices back then. To address the problem, add support for updating the kernel on MikroTik devices with NAND flash using a new tool, Yafut, which enables copying files from/to Yaffs file systems even if the kernel does not have native support for the Yaffs file system compiled in. Instead of erasing the entire NAND partition holding the kernel during every system upgrade (which is what the previously-used approach employing kernel2minor involved), Yafut preserves the Yaffs filesystem present on that partition and only replaces the kernel executable. This allows bad block information to be preserved across sysupgrade runs and also enables wear leveling on the NAND partition holding the kernel. Yafut does not rely on kernel2minor in any way and intends to eventually supersede the latter for NAND devices. Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
* busybox: enable taskset by defaultFelix Fietkau2023-04-011-3/+3
| | | | | | This is useful for controlling process affinity on SMP systems Signed-off-by: Felix Fietkau <nbd@nbd.name>
* util-linux: add rev utility packageOskari Rauta2023-03-251-1/+18
| | | | | | | | | | | | I found use for this in my scripts; I noticed that it is already compiled with util-linux - there just isn't package for it - let's package it then. Description: The rev utility copies the specified files to the standard output, reversing the order of characters in everyline. Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
* treewide: add support for "lto" in PKG_BUILD_FLAGSAndre Heider2023-03-212-7/+3
| | | | | | | | | | | | | | | | This reduces open coding and allows to easily add a knob to enable it treewide, where chosen packages can still opt-out via "no-lto". Some packages used LTO, but not the linker plugin. This unifies 'em all to attempt to produce better code. Quoting man gcc(1): "This improves the quality of optimization by exposing more code to the link-time optimizer." Also use -flto=auto instead of -flto=jobserver, as it's not guaranteed that every buildsystem uses +$(MAKE) correctly. Signed-off-by: Andre Heider <a.heider@gmail.com>
* treewide: add support for "gc-sections" in PKG_BUILD_FLAGSAndre Heider2023-03-213-8/+4
| | | | | | | | | | | | | | | This reduces open coding and allows to easily add a knob to enable it treewide, where chosen packages can still opt-out via "no-gc-sections". Note: libnl, mbedtls and opkg only used the CFLAGS part without the LDFLAGS counterpart. That doesn't help at all if the goal is to produce smaller binaries. I consider that an accident, and this fixes it. Note: there are also packages using only the LDFLAGS part. I didn't touch those, as gc might have been disabled via CFLAGS intentionally. Signed-off-by: Andre Heider <a.heider@gmail.com>
* treewide: replace PKG_USE_MIPS16:=0 with PKG_BUILD_FLAGS:=no-mips16Andre Heider2023-03-212-2/+2
| | | | | | | Keep backwards compatibility via PKG_USE_MIPS16 for now, as this is used in all package feeds. Signed-off-by: Andre Heider <a.heider@gmail.com>
* uencrypt: split common and library-specific codeEneas U de Queiroz2023-03-176-294/+382
| | | | | | | | | | | | | | This splits the code in 4 files: - uencrypt.h - uencrypt.c - main program - uencrypt-openssl.c - OpenSSL/wolfSSL implementation - uencrypt-mbedtls - mbedTLS implementation Other changes, accounting for ~400 bytes increase in ipk size: - more error condition checking and reporting, - hide key and iv command line arguments Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* uencrypt: add support for mbedtlsEneas U de Queiroz2023-03-174-52/+309
| | | | | | | | | | | | | | This commit includes some additional changes: - better handling of iv and keys in openssl/wolfssl variants - fix compiler warnings and whitespace - build all 3 variants as separate packages - adjust the new package name in targets' DEVICE_PACKAGES - remove PKG_FLAGS:=nonshared [Beeline SmartBox Flash - OK] Tested-by: Mikhail Zhilkin <csharper2005@gmail.com> [after test: replaced a hardcoded IV size of 16 by cipher_info->iv_size] Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* dtc: update to 1.7.0Nick Hainke2023-03-052-139/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changelog: 039a994 Bump version to v1.7.0 3f29d6d pylibfdt: add size_hint parameter for get_path 2022bb1 checks: Update #{size,address}-cells check for 'dma-ranges' abbd523 pylibfdt: Work-around SWIG limitations with flexible arrays a41509b libfdt: Replace deprecated 0-length arrays with proper flexible arrays 2cd89f8 dtc: Warning rather than error on possible truncation of cell values 55778a0 libfdt: tests: add get_next_tag_invalid_prop_len 7359034 libfdt: prevent integer overflow in fdt_next_tag 035fb90 libfdt: add fdt_get_property_by_offset_w helper 98a0700 Makefile: fix infinite recursion by dropping non-existent `%.output` a036cc7 Makefile: limit make re-execution to avoid infinite spin c6e9210 libdtc: remove duplicate judgments e37c256 Don't generate erroneous fixups from reference to path 5045465 libfdt: Don't mask fdt_get_name() returned error e64a204 manual.txt: Follow README.md and remove Jon f508c83 Update README in MANIFEST.in and setup.py to README.md c2ccf8a Add description of Signed-off-by lines 90b9d9d Split out information for contributors to CONTRIBUTING.md 0ee1d47 Remove Jon Loeliger from maintainers list b33a73c Convert README to README.md 7ad6073 Allow static building with meson fd9b8c9 Allow static building with make fda71da libfdt: Handle failed get_name() on BEGIN_NODE c7c7f17 Fix test script to run also on dash shell 01f23ff Add missing relref_merge test to meson test list ed31080 pylibfdt: add FdtRo.get_path() c001fc0 pylibfdt: fix swig build in install 26c54f8 tests: add test cases for label-relative path references ec7986e dtc: introduce label relative path references 651410e util: introduce xstrndup helper 4048aed setup.py: fix out of tree build ff5afb9 Handle integer overflow in check_property_phandle_args() ca72944 README: Explain how to add a new API function c0c2e11 Fix a UB when fdt_get_string return null cd5f69c tests: setprop_inplace: use xstrdup instead of unchecked strdup a04f690 pylibfdt: add Property.as_*int*_array() 8310271 pylibfdt: add Property.as_stringlist() d152126 Fix Python crash on getprop deallocation 17739b7 Support 'r' format for printing raw bytes with fdtget 45f3d1a libfdt: overlay: make overlay_get_target() public c19a4ba libfdt: fix an incorrect integer promotion 1cc41b1 pylibfdt: Add packaging metadata db72398 README: Update pylibfdt install instructions 383e148 pylibfdt: fix with Python 3.10 23b56cb pylibfdt: Move setup.py to the top level 69a7607 pylibfdt: Split setup.py author name and email 0b106a7 pylibfdt: Use setuptools_scm for the version c691776 pylibfdt: Use setuptools instead of distutils 5216f3f libfdt: Add static lib to meson build 4eda259 CI: Cirrus: bump used FreeBSD from 12.1 to 13.0 0a3a9d3 checks: Add an interrupt-map check 8fd2474 checks: Ensure '#interrupt-cells' only exists in interrupt providers d8d1a9a checks: Drop interrupt provider '#address-cells' check 52a16fd checks: Make interrupt_provider check dependent on interrupts_extended_is_cell 37fd700 treesource: Maintain phandle label/path on output e33ce1d flattree: Use '\n', not ';' to separate asm pseudo-ops d24cc18 asm: Use assembler macros instead of cpp macros ff3a30c asm: Use .asciz and .ascii instead of .string 5eb5927 fdtdump: fix -Werror=int-to-pointer-cast 0869f82 libfdt: Add ALIGNMENT error string 69595a1 checks: Fix bus-range check 72d09e2 Makefile: add -Wsign-compare to warning options b587787 checks: Fix signedness comparisons warnings 69bed6c dtc: Wrap phandle validity check 9102211 fdtget: Fix signedness comparisons warnings d966f08 tests: Fix signedness comparisons warnings ecfb438 dtc: Fix signedness comparisons warnings: pointer diff 5bec74a dtc: Fix signedness comparisons warnings: reservednum 24e7f51 fdtdump: Fix signedness comparisons warnings Remove upstreamed: - 0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
* fritz-tools: fix segfault in caldata-extractDavid Bauer2023-03-022-4/+6
| | | | | | | * Fix incorrect error message in case input file opening fails * Don't close files in case the pointers are invalid Signed-off-by: David Bauer <mail@david-bauer.net>
* ucode: update to the latest versionFelix Fietkau2023-02-141-4/+4
| | | | | | | | | | | | | | 08c709c58187 rtnl: add support for registering an uloop based listener 599a7fb59380 Merge pull request #140 from nbd168/rtnl c4125c516e0a nl80211: fix NL80211_ATTR_SURVEY_INFO c43bb9d8fe8d Merge pull request #141 from dhewg/master c1342d934b2d nl80211: add missing ucv_get() calls 9022b270683a rtnl: add missing ucv_get() calls 837cffec5a5c Merge pull request #142 from nbd168/ref-fixes 65b1f181e642 rtnl: add missing uc_vm_registry_set call ab2f3f70257d Merge pull request #143 from nbd168/rtnl-fix Signed-off-by: Felix Fietkau <nbd@nbd.name>
* e2fsprogs: update to 1.47.0Nick Hainke2023-02-131-2/+2
| | | | | | | Release notes: https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.0 Signed-off-by: Nick Hainke <vincent@systemli.org>
* e2fsprogs: update to 1.46.6Nick Hainke2023-02-082-53/+3
| | | | | | | | | | Release information: https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.46.6 Remove upstreamed patch: - 004-CVE-2022-1304-libext2fs-add-sanity-check-to-extent-manipulation.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
* ucode: update to the latest versionFelix Fietkau2023-01-291-4/+4
| | | | | | | | | | | 1c8df08824ef style: add .editorconfig file ec167d39b803 nl80211: refactor command bitmask handling 6704ec0d5b29 nl80211: add support for registering an uloop based listener 48a6eac1da15 fs: implement `fs.pipe()` f1be0d725735 types: fix array unshift operations and add test coverage 941d14837faf Merge pull request #138 from nbd168/nl80211 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ucode: move to the lang submenuAndre Heider2023-01-281-5/+9
| | | | | | | Just as lua or the various languages from the package feed. libucode is the exception, so move it to the libs menu instead. Signed-off-by: Andre Heider <a.heider@gmail.com>
* px5g-mbedtls: Use getrandom()Hauke Mehrtens2023-01-281-4/+8
| | | | | | | | | | | | | | | | Instead of accessing /dev/urandom use the getrandom syscall. This way we do not have to keep the file open all the time. This also fixes a compile error with glibc: -------- px5g-mbedtls.c: In function '_urandom': px5g-mbedtls.c:48:9: error: ignoring return value of 'read' declared with attribute 'warn_unused_result' [-Werror=unused-result] 48 | read(urandom_fd, out, len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -------- Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ucode: update to latest Git HEADBrian Norris2023-01-211-3/+3
| | | | | | | | | | | | | To bring in isatty() support. Includes new commits: be30472bfdbb fs: add `isatty()` function 0a58d510529e nl80211: add support for NL80211_ATTR_MPATH_INFO Signed-off-by: Brian Norris <computersforpeace@gmail.com> [ remove additional merge commit ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ucode-mod-bpf: add new package for a ucode libbpf bindingFelix Fietkau2023-01-092-0/+854
| | | | | | | | | | The bpf plugin provides functionality for loading and interacting with eBPF modules. It allows loading full modules and pinned maps/programs and supports interacting with maps and attaching programs as tc classifiers. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ucode: update to the latest versionFelix Fietkau2023-01-091-3/+3
| | | | | | | | | 34cfbb922c96 README.md: various spelling and documentation fixes ff32355ea645 build: make rtnl/nl80211 depend on linux instead of !APPLE c0e413c21f7b include: add uc_fn_thisval() 1e4d20932646 Merge pull request #134 from nbd168/thisval Signed-off-by: Felix Fietkau <nbd@nbd.name>
* busybox: update to 1.36.0Hannu Nyman2023-01-078-54/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update busybox to version 1.36.0 * refresh patches (remove the backported upstream fix) * refresh config Config refresh: Refresh commands, run after busybox is first built once: cd package/utils/busybox/config/ ../convert_menuconfig.pl ../../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0 cd .. ./convert_defaults.pl ../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0/.config > Config-defaults.in Manual edits needed after config refresh: * Config-defaults.in: OpenWrt config symbol IPV6 logic applied to BUSYBOX_DEFAULT_FEATURE_IPV6 * Config-defaults.in: OpenWrt config TARGET_bcm53xx logic applied to BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec) * Config-defaults.in: OpenWrt logic applied to BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917) * Config-defaults.in: correct the default ports that get reset BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT 80 BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT 23 * config/editors/Config.in: Add USE_GLIBC dependency to BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090) * config/shell/Config.in: change at "Options common to all shells" the conditional symbol SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html Apparently our script does not see the hidden option while prepending config options with "BUSYBOX_CONFIG_" which leads to a missed dependency when the options are later evaluated.) * Edit a few Config.in files by adding quotes to sourced items in config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f) Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* util-linux: update to 2.38.1Linhui Liu2023-01-074-66/+3
| | | | | | | | | | | | Release Notes: https://cdn.kernel.org/pub/linux/utils/util-linux/v2.38/v2.38.1-ReleaseNotes Remove upstreamed: - 010-meson-typo.patch - 020-meson-fix-compilation-without-systemd.patch - 110-meson-fix-when-HAVE_CLOCK_GETTIME-is-set.patch Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
* zyxel-bootconfig: clean up scriptDavid Bauer2023-01-071-3/+1
| | | | | | Drop unused variable and fix identation. Signed-off-by: David Bauer <mail@david-bauer.net>
* treewide: Trigger reinstall of all wolfssl dependenciesHauke Mehrtens2023-01-012-2/+2
| | | | | | | | The ABI of the wolfssl library changed a bit between version 5.5.3 and 5.5.4. This release update will trigger a rebuild of all packages which are using wolfssl to make sure they are adapted to the new ABI. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* tree-wide: Do not use package librt and libpthreadHauke Mehrtens2022-12-292-2/+1
| | | | | | | | | | | The libraries libpthread, libdl, libutil, libanl have been integrated into the libc library in version 2.34. it is not needed to explicitly link them any more. Most of the functions have been moved from the librt.so into libc.so some time ago already. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* fritz-tools: fritz_tffs_nand: cache already read sector idsAndre Heider2022-12-071-1/+17
| | | | | | | This speeds up the tool significantly, especially when using the "-a" argument. Signed-off-by: Andre Heider <a.heider@gmail.com>
* fritz-tools: fritz_tffs_nand: get rid of struct tffs_sectorsAndre Heider2022-12-071-12/+8
| | | | | | This doesn't help and "[0]" gets in the way of bounds checks. Signed-off-by: Andre Heider <a.heider@gmail.com>
* fritz-tools: fritz_tffs_nand: exclude oob code when disabledAndre Heider2022-12-071-6/+9
| | | | | | Skip unnecessary stuff if checking the oob data is disabled. Signed-off-by: Andre Heider <a.heider@gmail.com>
* e2fsprogs: Fix CVE-2022-1304Hauke Mehrtens2022-12-062-1/+51
| | | | | | | | | This fixes CVE-2022-1304: An out-of-bounds read/write vulnerability was found in e2fsprogs 1.46.5. This issue leads to a segmentation fault and possibly arbitrary code execution via a specially crafted filesystem. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ucode: update to latest Git HEADJo-Philipp Wich2022-12-061-3/+3
| | | | | | | | | | | | | | | | | 46d93c9 tests: fixup testcases 4c654df types: adjust double printing format eac2add compiler: fix bytecode for logical assignments of properties 3903b18 fs: add `realpath()` function 8366102 math: add isnan() function eef83d3 tests: relax sleep() test 394e901 lib: uc_json(): accept trailing whitespace when parsing strings 1867c8b uloop: terminate parent uloop in task child processes d2cc003 uci: auto-load package in `ctx.foreach()` and `ctx.get_first()` 6c5ee53 compiler: ensure that arrow functions with block bodies return no value fdc9b6a compiler: fix `??=`, `||=` and `&&=` logical assignment semantics 88dcca7 add cmake to install requires for debian Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* busybox: awk: fix use after free (CVE-2022-30065)Hauke Mehrtens2022-11-051-0/+42
| | | | | | | | | | | This backports a commit which fixes a use after free bug in awk. CVE-2022-30065 description: A use-after-free in Busybox 1.35-x's awk applet leads to denial of service and possibly code execution when processing a crafted awk pattern in the copyvar function. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mtd-utils: update to 2.1.5Nick Hainke2022-10-222-3/+3
| | | | | | | | | | Release Notes: https://lore.kernel.org/buildroot/c0992bbb-9487-9a51-ea9f-39cf074b61ec@sigma-star.at/ Refresh patches: - 130-lzma_jffs2.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
* ucode: update to latest Git HEADJo-Philipp Wich2022-10-181-3/+3
| | | | | | | 00af065 fs: expose `getdelim()` functionality through `fd.read()` 21ace5e lexer: fixes for regex literal parsing Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ucode: update to latest Git HEADJo-Philipp Wich2022-10-151-3/+3
| | | | | | | | | | | | | | | 4ae7072 fs: use `getline()` for line wise read operations 21ace5e lexer: fixes for regex literal parsing 00965fa lib: implement slice() function 76d396d main: implement print mode 7bbba78 compiler: optimize function return opcode generation a45f2a3 lexer: improve regex literal handling d64d5d6 vm: maintain export symbol tables per program f4b4ded uloop: task: gracefully handle absent output callback a58fe47 ubus: hold reference to underlying connection until deferred is concluded e23b58a lib: uc_system(): retry waitpid() on EINTR Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* busybox: nslookup: ensure unique transaction IDs for the DNS queriesUwe Kleine-König2022-10-141-0/+42
| | | | | | | | | | | On machines with a coarse monotonic clock (here: TP-Link RE200 powered by a MediaTek MT7620A) it can happen that the two DNS requests (for A and AAAA) share the same transaction ID. If this happens the second reply is wrongly dropped and nslookup reports "No answer". Fix this by ensuring that the transaction IDs are unique. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
* build: prefer HTTPS if available (for packages)Daniel Cousens2022-10-053-9/+9
| | | | | | | | Changes PKG_SOURCE_URL's for arptables, bsdiff, dnsmasq, fortify-headers, ipset, ipset-dns, libaudit, libpcap, libressl, lua, lua5.3, tcpdump and valgrind, to HTTPS Signed-off-by: Daniel Cousens <github@dcousens.com>
* treewide: fix security issues by bumping all packages using libwolfsslPetr Štetiar2022-10-032-2/+2
| | | | | | | | | | | | | | | | | As wolfSSL is having hard time maintaining ABI compatibility between releases, we need to manually force rebuild of packages depending on libwolfssl and thus force their upgrade. Otherwise due to the ABI handling we would endup with possibly two libwolfssl libraries in the system, including the patched libwolfssl-5.5.1, but still have vulnerable services running using the vulnerable libwolfssl-5.4.0. So in order to propagate update of libwolfssl to latest stable release done in commit ec8fb542ec3e4 ("wolfssl: fix TLSv1.3 RCE in uhttpd by using 5.5.1-stable (CVE-2022-39173)") which fixes several remotely exploitable vulnerabilities, we need to bump PKG_RELEASE of all packages using wolfSSL library. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ucode: update to latest Git HEADJo-Philipp Wich2022-09-161-3/+3
| | | | | | | | | | | cc4eb79 ubus: support obtaining numeric error code 01c412c ubus: add toplevel constants for ubus status codes 8e240fa ubus: allow object method call handlers to return a numeric status code 5cdddd3 lib: add limit support to split() and replace() 0ba9c3e fs: add optional third permission argument to fs.open() c1f7b3b lib: remove fixed capture group limit in match() and regex replace() Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* px5g-wolfssl: replace unnecessary strncmp()Jian Huang2022-09-111-21/+21
| | | | | | Replace some of the calls to strncmp() with strcmp(). Signed-off-by: Jian Huang <JyanHw@outlook.com>
* mtd-utils: add PKG_CPE_IDNick Hainke2022-09-061-0/+1
| | | | | | Add CPE ID for tracking CVEs. Signed-off-by: Nick Hainke <vincent@systemli.org>
* f2fs-tools: add PKG_CPE_IDNick Hainke2022-09-061-0/+1
| | | | | | Add CPE ID for tracking CVEs. Signed-off-by: Nick Hainke <vincent@systemli.org>
* update: update to latest Git HEADJo-Philipp Wich2022-08-301-3/+3
| | | | | | | 344fa9e lib: extend render() to support function values 89452b2 lib: improve getenv() and split() implementations Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ucode: update to latest Git HEADJo-Philipp Wich2022-08-241-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bcdd2cb examples: add module search path initialization and freeing ee1946f ubus: fix GCC strncpy() truncation warning 131d99c lib: introduce three new functions call(), loadstring() and loadfile() 8e8dae0 lib: introduce helper function for indenting error messages 476f02b lib: simplify include_path() d84b53a source: avoid null pointer access in uc_source_runpath_set() c43a54f types: gracefully handle unpatched upvalues in ucv_free() e2fb11a README.md: document gc() function b41cb2d main: introduce -g flag to allow enabling periodic gc from cli 85d7885 lib: implement gc() 47528f0 vm: support automatic periodic GC runs 381cc75 types: treat vm->exports as GC roots fcc49e6 compiler: add import statement support for dynamic extensions c9442f1 vm: introduce new I_DYNLOAD opcode b6fd8a2 lib: internally expose new uc_require_library() helper a486adc vm: don't treat offset 0 special for exceptions 41ccd19 compiler: don't treat offset 0 special at syntax errors b4a3f68 compiler: improve formatting of nested syntax error messages 5d5dadc program: remove now unused uc_program_export_lookup() 304995b compiler: rework export index allocation 506cc37 compiler: fix deriving module path from source runpath 54b7fac compiler: enforce stricter module compilation rules d62e372 vm: don't initialize upvalues for module functions b856602 program: add serialization and deserialization for module function flag d7d1bde compiler: add a flag denoting module functions 156d584 treewide: unexport libucode internal functions 10e056d compiler: add support for import/export statements 862e49d compiler: resolve predeclared upvalues 78dfb08 compiler: require a name in function declarations afd78c1 compiler: fix reported source position in inc/dec operator error e1c3db0 tests: run_tests.sh: substitute dynamic test directory path in output 3c168b5 vm, cli: move search path into global configuration structure d85bc71 vm: introduce import and export opcodes 365782e vm: honor constant flag of objects and arrays 6becc64 vm: transparently resolve upvalue references 3418967 vm: gracefully handle unresolved upvalues 50cf572 program: add function to globally lookup exported name c441f65 program: add infrastructure to handle multiple sources per program 2322468 program: fix reporting source position of first instruction 9c9a9ec program: fix en/decoding debuginfo upvalue slots in precompiled bytecode 41114a0 source: add tracking of exported symbols 70ae304 lib: honor constant flag of arrays 3c104f5 types: resolve upvalue references on stringification 3a6f9cb types: add ability to mark array and object values as constant b738f3a lexer: recognize module related keywords 03c8e4b lexer: rewrite token scanner fd433aa lexer: fix parsing with disabled block left stripping 557577a rtnl: fix parsing/creation of IFLA_AF_SPEC RTA for the AF_BRIDGE family 35c6b73 compiler: fix stack mismatch on continue statements nested in switches f673096 uloop: end uloop on exceptions in managed code 2e5426c ubus: end uloop on exceptions in managed code c024270 rtnl: expose IFLA_STATS64 contents d3c58c0 rtnl: expose ifinfomsg.ifi_change member c4dde50 rtnl: update NETLINK_GET_STRICT_CHK socket flag with every request 7ef0d02 nl80211: fix NL80211_SURVEY_INFO_NOISE datatype 9a2e592 compiler: fix stack mismatch on nonmatching switch statements with locals 03c8ca5 nl80211: recognize further NL80211_STA_INFO_* NLAs a1ed566 struct: add optional offset argument to `unpack()` 230e595 rtnl: fix segmentation fault on parsing linkinfo RTA without data 523566d rtnl: zero request message headers 56be30d rtnl: fix premature netlink reply receive abort 1347440 rtnl: avoid stray "netlink: %d bytes leftover after parsing attributes." 44b0a3b struct: fix packing `*` format after other repeated formats Also package uloop binding module which has been introduced by a previous ucode update and introduce a host build with the basic set of modules. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* uencrypt: support all available ciphersNick French2022-08-192-18/+52
| | | | | | | | | | | | | Modify uencrypt to support any cipher provided by ssl library. Original tool supported only AES-128-CBC to decrypt the config mtd of Arcadyan WG430223/WG443223. TP-Link Deco S4 has mtd configuration encrypted with DES-ECB, so make the cipher generic to support both routers. Signed-off-by: Nick French <nickfrench@gmail.com> Reviewed-by: Eneas U de Queiroz >cotequeiroz@gmail.com>
* ramips: add support for ZyXEL NWA50AX / NWA55AXEDavid Bauer2022-07-204-0/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- CPU: Mediatek MT7621 RAM: 256M DDR3 FLASH: 128M NAND ETH: 1x Gigabit Ethernet WiFi: Mediatek MT7915 (2.4/5GHz 802.11ax 2x2 DBDC) BTN: 1x Reset (NWA50AX only) LED: 1x Multi-Color (NWA50AX only) UART Console ------------ NWA50AX: Available below the rubber cover next to the ethernet port. NWA55AXE: Available on the board when disassembling the device. Settings: 115200 8N1 Layout: <12V> <LAN> GND-RX-TX-VCC Logic-Level is 3V3. Don't connect VCC to your UART adapter! Installation Web-UI ------------------- Upload the Factory image using the devices Web-Interface. As the device uses a dual-image partition layout, OpenWrt can only installed on Slot A. This requires the current active image prior flashing the device to be on Slot B. If the currently installed image is started from Slot A, the device will flash OpenWrt to Slot B. OpenWrt will panic upon first boot in this case and the device will return to the ZyXEL firmware upon next boot. If this happens, first install a ZyXEL firmware upgrade of any version and install OpenWrt after that. Installation TFTP ----------------- This installation routine is especially useful in case * unknown device password (NWA55AXE lacks reset button) * bricked device Attach to the UART console header of the device. Interrupt the boot procedure by pressing Enter. The bootloader has a reduced command-set available from CLI, but more commands can be executed by abusing the atns command. Boot a OpenWrt initramfs image available on a TFTP server at 192.168.1.66. Rename the image to owrt.bin $ atnf owrt.bin $ atna 192.168.1.88 $ atns "192.168.1.66; tftpboot; bootm" Upon booting, set the booted image to the correct slot: $ zyxel-bootconfig /dev/mtd10 get-status $ zyxel-bootconfig /dev/mtd10 set-image-status 0 valid $ zyxel-bootconfig /dev/mtd10 set-active-image 0 Copy the OpenWrt ramboot-factory image to the device using scp. Write the factory image to NAND and reboot the device. $ mtd write ramboot-factory.bin firmware $ reboot Signed-off-by: David Bauer <mail@david-bauer.net>
* uencrypt: add package to decrypt WG4хх223 configEneas U de Queiroz2022-07-193-0/+194
| | | | | | | | This adds a simple AES-128-CBC encryption/decryption program using either wolfSSL or OpenSSL as backend to decrypt Arcadyan WG4xx223 configuration partitions. The ipk size is 3,355 bytes. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* sdk: add spidev-test to the bundle of userspace sourcesChristian Lamparter2022-07-171-2/+3
| | | | | | | | | | | | | moves and extends the current facilities, which have been added some time ago for the the usbip utility, to support more utilites that are shipped with the Linux kernel tree to the SDK. this allows to drop all the hand-waving and code for failed previous attempts to mitigate the SDK build failures. Fixes: bdaaf66e28bd ("utils/spidev_test: build package directly from Linux") Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* utils/spidev_test: side-step build-system woesChristian Lamparter2022-07-151-1/+1
| | | | | | | | | | | | | The spidev_test is build in phase2 even though it should be disabled. My best guess is that we hit the same issue that I had with nu801. The build-system thinks it's a tool that is necessary for building the kernel. In this case, the same fix (adding a dependency on the presence of the module) could work in this case as well? Fixes: bdaaf66e28bd ("utils/spidev_test: build package directly from Linux") Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* f2fs-tools: import patch to fix compilationNick Hainke2022-07-042-1/+83
| | | | | | | | | | | | | | Disable lz4 and lzo2 manually. Fixes errors in the form of: Package f2fsck is missing dependencies for the following libraries: liblz4.so.1 liblzo2.so.2 Fixes: 8b9e80616011 ("f2fs-tools: update to 1.15.0") Acked-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de> Signed-off-by: Nick Hainke <vincent@systemli.org>
* f2fs-tools: update to 1.15.0Nick Hainke2022-07-033-49/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add patches: - 100-configure.ac-fix-AC_ARG_WITH.patch Remove upstreamed patches: - 200-resize_f2fs-fix_wrong_ovp_calculation.patch Changelog: 64f2596 f2fs-tools: upgrade version 1.15.0 d9d5b11 f2fs-tools: build silently 299c0b5 fsck.f2fs: fix broken file_map output 3af62be f2fs-tools: show segment/section layout correctly 4d9c009 f2fs-tools: use android config only if there's no config.h 0b9b89f dump.f2fs: compress: fix dstlen of LZ4_compress_fast_extState() eee3969 mkfs.f2fs: check uuid library e5fe1a2 f2fs-tools: use fsync() in Android ea9921f f2fs-tools: support zoned device in Android a8fefc2 android_config.h: add missing liblz4 0c54cf7 libf2fs_io: add unused mactor to avoid build failure 6eebd13 ci: Enable -Wall, -Wextra and -Werror c491657 Fix PowerPC format string warnings 70e4139 Suppress a compiler warning about integer truncation 7a1206a Annotate switch/case fallthrough b964b79 Change #ifdef _WIN32 checks into #ifdef HAVE_.* 28de4d1 tools/f2fs_io: Fix the type of 'ret' fdff1ab fsck/segment.c: Remove dead code ede3bde fsck/main.c: Suppress a compiler warning 93c6483 tools/f2fscrypt.c: Fix build without uuid/uuid.h header file 559e60e fsck: Remove a superfluous include directive 98f7f56 mkfs/f2fs_format.c: Suppress a compiler warning ef011a4 configure.ac: Detect selinux/android.h 2e59ab8 configure.ac: Detect the sparse/sparse.h header 1790203 Fix the MinGW build ecd27dc Use %zu to format size_t 24663b6 Include <stddef.h> instead of defining offsetof() cdefef0 Move the be32_to_cpu() definition 1612bf9 Remove unnecessary __attribute__((packed)) annotations 7a5109f f2fs_fs.h: Use standard fixed width integer types e61203c Suppress a compiler warning 9425b47 Verify structure sizes at compile time 006bb13 Change one array member into a flexible array member cb4c5d6 ci: Build f2fstools upon push and pull requests f3033fb Change the ANDROID_WINDOWS_HOST macro into _WIN32 87d7a95 Switch from the u_int to the uint types c483354 configure.ac: Enable cross-compilation 3e97d07 configure.ac: Sort header file names alphabetically 91ba5e5 configure.ac: Enable the automake -Wall option ae65a15 configure.ac: Remove two prototype tests d24fd5c configure.ac: Stop using obsolete macros 6afcf64 libf2fs: don't allow mkfs / fsck on non power-of-2 zoned devices c7757ec man: update mkfs.f2fs to give the default android option 46e1b83 f2fs-tools: use proper 64bit types for PPC 97ce230 mkfs.f2fs: fix wrong indentation and clean up 0d3d26d mkfs.f2fs: set project quota by default for -g android for v4.14+ 1de1db8 f2fs-tools: add atomic write related options to f2fs_io write command 85cd72a mkfs.f2fs: set required quota types only 028af9f fsck.f2fs: Add progression feedback 972d710 fsck.f2fs: do not assert if i_size is missing i_blocks in symlink f63551b f2fs-tools: separate other bugs in fsck_verify ade81b9 f2fs-tools: remove false failure alarm when fixing quota 99bc497 f2fs-tools: fall back to the original version check when clock_gettime is not supported 1603a3d mkfs.f2fs: wipe other FS magics given -f 63d5004 fsck.f2fS: is_valid_summary(): check whether offset is out of bounds 3fd996c Avoid redefined ALIGN_UP 1edc138 fsck.f2fs: Update the usage about option of preen mode 49159df f2fs-tools: change fiemap print out format 8bcb58e f2fs_io: add rename w/ fsync option 9429e86 fsck.f2fs: add basic compress related check/fix 529967e f2fs-tools: make fiemap command in accordance with uapi 1228009 f2fs-tools: rebuild the quota inode if it is corrupted 9ee091e f2fs-tools: add periodic check in kernel version check 1bc7658 dump.f2fs: minor clean ups 69952e3 f2fs-tools: fix wrong value of reserve_new_block parameter in page_symlink 76d2a91 f2fs-tools: add extent cache for each file 8d464ee f2fs-tools: fix wrong file offset acd2518 fsck|dump.f2fs: add -M to get file map 027488e mkfs.f2fs: remove android features for RO e01ad31 f2fs-tools: fix metadata region overlap with zoned block device zones f3b93bf sload.f2fs: Reword "IMMUTABLE" in strings/comments 820b5e3 sload.f2fs: use F2FS_COMPRESS_RELEASED instead of IMMUTABLE bit 1d2683f f2fs-tools: support small RO partition a9594c6 fsck.f2fs: add "-l" to show the layout information 38e3115 f2fs_io: add to show immutable bit 6afd3e9 tools: Introduce f2fslabel 3218ff9 f2fs-tools: correct get kernel version logic 19d49b5 dump.f2fs: fix memory leak caused by dump_node_blk() 15d4d7b fsck.f2fs: fix memory leak caused by fsck_chk_orphan_node() 1900c22 mkfs.f2fs: fix memory leak in not enough segments error path 5cc365c resize.f2fs: fix memory leak caused by migrate_nat() 870915f f2fs_io: split definition check for crypto ioctl 91f9db2 fsck.f2fs: update kernel version in superblock on forced check 1531853 f2fs_io: Add get file name encryption mode 3bfcca8 f2fs-tool: increase debug level from 0 to 1 in migrate_block 5263ae2 resize.f2fs: fix to check free space before shrink 159752d resize.f2fs: fix wrong sit/nat bitmap during rebuild_checkpoint() 98e6463 resize.f2fs: add force option to rewrite broken calculation f056fbe resize.f2fs: fix wrong ovp calculation 80dba0f Add -P option to preserve file owner f0fda11 libf2fs: fix memory leak caused by get_rootdev() 5144f2f mkfs.f2fs: add VM disk files to hot data types 73c0871 libzoned: use blk_zone_v2 and blk_zone_report_v2 by default 9cb5150 f2fs-tools: fix wrong blk_zone_rep_v2 definition 15474db mkfs.f2fs: allocate zones together to avoid random access 316e128 mkfs.f2fs: adjust zone alignment when using multi-partitions cc57f2c fsck.f2fs: fix alignment on multi-partition support ff7172e f2fs-tools: Miscellaneous cleanup to README. 2b26417 mkfs.f2fs.8: Better document the -g argument. e05afe5 mkfs.f2fs.8: fix formatting for -l parameter in man page 747b74c f2fs-tools: Make sload.f2fs reproduce hard links b585244 f2fs-tools:sload.f2fs compression support 7b63f7b f2fs_io: add compress/decompress commands 457392a f2fs-tools: Added #ifdef WITH_func d322d47 f2fs-tools: fix a few spelling errors in f2fs-tools fcd5cd0 f2fs-tools: skipped to end on error syntax error 31d30f0 mkfs.f2fs: show a message when compression is enabled 1d4c7e7 f2fs_io: add get/set compression option 4bd7008 Fix ASSERT() macro with '%' in the expression ca0ed8a f2fs-toos: fsck.f2fs Fix bad return value c954e7c fsck.f2fs: do xnid sanity check only during fsck 1bfc173 f2fs_io: add erase option e59bb17 mkfs.f2fs.8: document the verity feature 8fd836f fsck: clear unexpected casefold flags 1a7415a mkfs.f2fs: add -h and --help 717d70d f2fs_io: change fibmap to fiemap Signed-off-by: Nick Hainke <vincent@systemli.org>
* ucode: update to latest Git HEADJo-Philipp Wich2022-06-011-3/+3
| | | | | | | | d996047 syntax: adjust number literal parsing and string to number conversion 9efbe18 lib: refactor `uc_int()` Fixes: #9923 Signed-off-by: Jo-Philipp Wich <jo@mein.io>