Commit Graph

19533 Commits

Author SHA1 Message Date
Hauke Mehrtens
139a5c2eec kernel: kmod-hwmon-tps23861: Add missing dependency to kmod-regmap-i2c
This fixes the following build error:
Package kmod-hwmon-tps23861 is missing dependencies for the following libraries:
regmap-i2c.ko

Fixes: b664646db7 ("kernel: add kmod-hwmon-tps23861 support")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-13 21:45:47 +02:00
Tomas Lara
24307b0351 kernel: remove CONFIG_MMC_BLOCK_BOUNCE
CONFIG_MMC_BLOCK_BOUNCE was removed in kernel v4.13-rc1
 c3dccb74be

Signed-off-by: Tomas Lara <tl849670@gmail.com>
2022-08-13 21:02:35 +02:00
Hauke Mehrtens
90bedc411b umbim: bump to git HEAD
146bc77 umbim: fix invalid mbim message string encoding

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-13 20:53:10 +02:00
Hauke Mehrtens
535bc61140 ubox: update to latest git HEAD
fa6cb9a kmodloader: fix bad realloc usage
4c7b720 kmodloader: fix GCC fanalyzer warnings

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-13 20:53:10 +02:00
Hauke Mehrtens
cc2dfc5e4d iwinfo: update to latest HEAD
705d3b5 iwinfo: Add missing auth_suites mappings for WPA3

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-13 20:53:10 +02:00
Nick Hainke
cc24c4ed5e binutils: update to 2.39
Changes:

* The ELF linker will now generate a warning message if the stack is made
  executable.  Similarly it will warn if the output binary contains a
  segment with all three of the read, write and execute permission
  bits set.  These warnings are intended to help developers identify
  programs which might be vulnerable to attack via these executable
  memory regions.
  The warnings are enabled by default but can be disabled via a command
  line option.  It is also possible to build a linker with the warnings
  disabled, should that be necessary.
* The ELF linker now supports a --package-metadata option that allows
  embedding a JSON payload in accordance to the Package Metadata
  specification.
* In linker scripts it is now possible to use TYPE=<type> in an output
  section description to set the section type value.
* The objdump program now supports coloured/colored syntax
  highlighting of its disassembler output for some architectures.
  (Currently: AVR, RiscV, s390, x86, x86_64).
* The nm program now supports a --no-weak/-W option to make it ignore
  weak symbols.
* The readelf and objdump programs now support a -wE option to prevent
  them from attempting to access debuginfod servers when following
  links.
* The objcopy program's --weaken, --weaken-symbol, and
  --weaken-symbols options now works with unique symbols as well.

Announcement:
https://sourceware.org/pipermail/binutils/2022-August/122246.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-13 20:53:10 +02:00
Nick Hainke
b3a0c14824 iproute2: shrink ip-tiny size by disabling features
With the 5.18 and 5.19 update ip-tiny grows in size. Remove some
features bringing it back to the size before 5.18.

Remove
- Identifier-locator addressing (ila)
- MACsec Device Configuration (macsec)
- Multicast Routing Cache Management (mroute)
- mrule
- Virtual Routing and Forwarding (vrf)
- Segment Routing (sr)

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-13 20:53:10 +02:00
Nick Hainke
e871144013 iproute2: update to 5.19.0
Add patch:
- 105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch

Refreshed:
- 170-ip_tiny.patch
- 195-build_variant_ip_tc.patch

Changes:
deb48554 v5.19.0
f8decf82 bpf_glue: include errno.h
71178ae0 rdma: update uapi/ib_user_verbs.h
96594fd2 vdpa: update uapi headers from 5.19-rc7
30c7b77f Revert "uapi: add vdpa.h"
c5433c4b ip neigh: Fix memory leak when doing 'get'
2cb76253 mptcp: Fix memory leak when getting limits
afdbb020 mptcp: Fix memory leak when doing 'endpoint show'
6db01afd bridge: Fix memory leak when doing 'fdb get'
1d540336 ip address: Fix memory leak when specifying device
325f706b uapi: add virtio_ring.h
291898c5 uapi: add vdpa.h
6e2fb804 uapi: update bpf.h
329fda18 ip: Fix size_columns() invocation that passes a 32-bit quantity
2a00a4b1 man: tc-fq_codel: add drop_batch
6bf5abef uapi: update mptcp.h
02410392 ip: Fix size_columns() for very large values
ed243312 man: tc-ct.8: fix example
2bb37e90 l2tp: fix typo in AF_INET6 checksum JSON print
855edb3d man: tc-fq_codel: Fix a typo.
4044a453 tc: declaration hides parameter
a44a7918 genl: fix duplicate include guard
703f2de6 uapi: change name for zerocopy sendfile in tls
248ad98e uapi: update socket.h
11e41a63 ip: Convert non-constant initializers to macros
8d3977ef Update kernel headers
5a1ad9f8 man: ip-stats.8: Describe groups xstats, xstats_slave and afstats
d9976d67 ipstats: Expose bond stats in ipstats
36e10429 ipstats: Expose bridge stats in ipstats
79f5ad95 iplink_bridge: Split bridge_print_stats_attr()
1247ed51 ipstats: Add groups "xstats", "xstats_slave"
c6900b79 ipstats: Add a third level of stats hierarchy, a "suite"
2ed73b9a iplink: Add JSON support to MPLS stats formatter
5ed8fd9d ipstats: Add a group "afstats", subgroup "mpls"
dff392fd iplink: Publish a function to format MPLS stats
72623b73 iplink: Fix formatting of MPLS stats
ce41750f ip: ipstats: Do not assume length of response attribute payload
40b50f15 bridge: vni: add support for stats dumping
c7f12a15 ip: iplink_vxlan: add support to set vnifiltering flag on vxlan device
45cd32f9 bridge: vxlan device vnifilter support
837294e4 libbpf: Remove use of bpf_map_is_offload_neutral
64e5ed77 libbpf: Remove use of bpf_program__set_priv and bpf_program__priv
ba6519cb libbpf: Use bpf_object__load instead of bpf_object__load_xattr
a6eb654d f_flower: add number of vlans man entry
5788732e f_flower: Check args with num_of_vlans
5ba31bcf f_flower: Add num of vlans parameter
b28eb051 man: Add man pages for the "stats" functions
a05a27c0 ipmonitor: Add monitoring support for stats events
0f1fd40c ipstats: Add offload subgroup "l3_stats"
179030fa ipstats: Add offload subgroup "hw_stats_info"
af5e7955 ipstats: Add a group "offload", subgroup "cpu_hit"
0517a2fd ipstats: Add a group "link"
df0b2c6d ipstats: Add a shell of "show" command
82f6444f ipstats: Add a "set" command
54d82b06 ip: Add a new family of commands, "stats"
5520cf16 ip: Publish functions for stats formatting
a463d6b1 libnetlink: Add filtering to rtnl_statsdump_req_filter()
38ae12d3 devlink: introduce -[he]x cmdline option to allow dumping numbers in hex format
bba95837 Update kernel headers
f6559bea ip-link: put types on man page in alphabetic order
ee53174b ip/iplink_virt_wifi: add support for virt_wifi

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-13 20:53:10 +02:00
Nick Hainke
d3b4422f62 iproute2: update to 5.18.0
The ip-tiny size grows from 124k (5.17.0) to 128k (5.18.0).

The update introduces a commit "configure: add check_libtirpc()" that
introduces a check for libtirpc. However, if libtirpc is already in the
staging directory due to an other dependency the check yields that the
library is installed and should be used resulting in failures like:

  Package ss is missing dependencies for the following libraries:
  libtirpc.so.3

To fix it add a patch making libtirpc optional again and setting it
"HAVE_TIRPC=n":
- 155-keep_tirpc_optional.patch

Fix patches:
- 130-no_netem_tipc_dcb_man_vdpa.patch

Refresh patches:
- 140-keep_libmnl_optional.patch
- 150-keep_libcap_optional.patch
- 180-drop_FAILED_POLICY.patch
- 200-drop_libbsd_dependency.patch

Changes:
6474b7c8 v5.18.0
4429a6c9 tipc: fix keylen check
6b6979b9 iplink: remove GSO_MAX_SIZE definition
19c3e009 doc: fix 'infact' --> 'in fact' typo
ed706c78 man: fix some typos
03589beb man: devlink-region: fix typo in example
b84fc332 tc: em_u32: fix offset parsing
b6d17086 uapi: update of virtio_ids
17bf51b7 libbpf: Remove use of bpf_map_is_offload_neutral
fa305925 libbpf: Remove use of bpf_program__set_priv and bpf_program__priv
9e0057b4 libbpf: Use bpf_object__load instead of bpf_object__load_xattr
e81fd551 devlink: fix "devlink health dump" command without arg
6f3b5843 man: use quote instead of acute accent
42d351fa man: 'allow to' -> 'allow one to'
d8a7a0f4 uapi: upstream update to stddef.h
5b2ff061 uapi: update from 5.18-rc1
292509f9 ss: remove an implicit dependency on rpcinfo
1ee309a4 configure: add check_libtirpc()
41848100 ip/geneve: add support for IFLA_GENEVE_INNER_PROTO_INHERIT
28add137 f_flower: Implement gtp options support
b25599c5 ip: GTP support in ip link
e4880869 man: bridge: document per-port mcast_router settings
9e82e828 bridge: support for controlling mcast_router per port
f1d18e2e Update kernel headers
8130653d vdpa: Update man page with added support to configure max vq pair
56eb8bf4 vdpa: Support reading device features
16482fd4 vdpa: Support for configuring max VQ pairs for a device
bd91c764 vdpa: Allow for printing negotiated features of a device
2d1954c8 vdpa: Remove unsupported command line option
93fb6810 Makefile: move HAVE_MNL check to top-level Makefile
2dee2101 man: ip-link: whitespace fixes to odd line breaks mid sentence
609b90aa man: ip-link: mention bridge port's default mcast_flood state
b1c3ad84 man: ip-link: document new bcast_flood flag on bridge ports
c354a434 ip: iplink_bridge_slave: support for broadcast flooding
909f0d51 man: bridge: add missing closing " in bridge show mdb
3b681cf9 man: bridge: document new bcast_flood flag for bridge ports
a6c848eb bridge: support for controlling flooding of broadcast per port
8acb5247 ip/batadv: allow to specify RA when creating link
0431d8e8 Import batman_adv.h header from last kernel sync point
239bfd45 Revert "configure: Allow command line override of toolchain"
a93c90c7 tc: separate action print for filter and action dump
d9977eaf bpf: Remove use of bpf_create_map_xattr
ac4e0913 bpf: Export bpf syscall wrapper
873bb975 bpf_glue: Remove use of bpf_load_program from libbpf
5e17b715 ss: display advertised TCP receive window and out-of-order counter
712ec66e tc: bash-completion: Add profinet and ethercat to procotol completion list
75061b35 lib: add profinet and ethercat as link layer protocol names
0a685b98 man8/ip-link.8: add locked port feature description and cmd syntax
d4fe3673 man8/bridge.8: add locked port feature description and cmd syntax
092af16b ip: iplink_bridge_slave: add locked port flag support
0e51a185 bridge: link: add command to set port in locked mode
04a0077d Update kernel headers
386ae64c configure: Allow command line override of toolchain
bea92cb0 mptcp: add port support for setting flags
2dbc6c90 mptcp: add fullmesh support for setting flags
5fb6bda0 mptcp: add fullmesh check for adding address
9831202f bond: add ns_ip6_target option
e8fd4d4b devlink: Remove strtouint8_t in favor of get_u8
2688abf0 devlink: Remove strtouint16_t in favor of get_u16
95c03f40 devlink: Remove strtouint32_t in favor of get_u32
7cb0e24d devlink: Remove strtouint64_t in favor of get_u64
7848f6bb Update kernel headers
4f015972 f_flower: fix indentation for enc_key_id and u32
25a9c4fa tunnel: Fix missing space after local/remote print
ff14875e Update documentation
8908cb25 Add support for the IOAM insertion frequency
cd24451e Update kernel headers
e4ba36f7 iplink: add ip-link documentation
5d57e130 iplink: add gro_max_size attribute handling
721435dc tc: u32: add json support in `print_raw`, `print_ipv4`, `print_ipv6`
c733722b tc: u32: add support for json output
5f44590d tc/f_flower: fix indentation
9948b6cb tc_util: fix breakage from clang changes
f4cd4f12 tc: add skip_hw and skip_sw to control action offload
ba5ac984 json_print: suppress clang format warning
bf71c8f2 libbpf: fix clang warning about format non-literal
5632cf69 tunnel: fix clang warning
c0248878 tipc: fix clang warning about empty format string
371c13e8 can: fix clang warning
8d27eee5 ipl2tp: fix clang warning
560d2336 tc_util: fix clang warning in print_masked_type
b2450e46 flower: fix clang warnings
4e27d538 netem: fix clang warnings
9d5e29e6 utils: add format attribute
343c4f52 tc: add format attribute to tc_print_rate

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-13 20:53:10 +02:00
Nick Hainke
e65337ce65 iproute2: update to 5.17.0
Remove backports:
- 0001-lib-fix-ax25.h-include-for-musl.patch

Changes:
4c424dfd v5.17.0
7846496b link_xfrm: if_id must be non zero
eed4bb1a testsuite: link xfrm delete no if_id test
ac0a54b2 rdma: make RES_PID and RES_KERN_NAME alternative to each other
885e281e uapi: update vdpa.h
19c0def1 ipaddress: remove 'label' compatibility with Linux-2.0 net aliases
1808f002 lib/fs: fix memory leak in get_task_name()
62c0700c uapi: update magic.h
c8d9d925 rdma: Fix the logic to print unsigned int.
a42dfaa4 Revert "rdma: Fix res_print_uint() and add res_print_u64()"
9d0badec rdma: Fix res_print_uint() and add res_print_u64()
86a1452b uapi: update to xfrm.h
09c6a3d2 bridge: Remove vlan listing from `bridge link`
e4fda259 bridge: Fix error string typo
cc143bda lnstat: fix strdup leak in -w argument parsing
90bbf861 iplink_can: print_usage: typo fix, add missing spaces
1b5c7414 dcb: Fix error reporting when accessing "dcb app"
a38d305d tc: fix duplicate fall-through
f8beda6e libnetlink: fix socket leak in rtnl_open_byproto()
7f70eb2a tc_util: Fix parsing action control with space and slash
29da83f8 iprule: Allow option dsfield in 'ip rule show'
07012a1f ss: use freecon() instead of free() when appropriate
03b4de0b man: Fix a typo in the flag documentation of ip address
924f6b4a dcb: app: Add missing "dcb app show dev X default-prio"
5c9571bc uapi: update kernel headers from 5.17-rc1
d542543b tc/action: print error to stderr
52370c61 mptcp: add id check for deleting address
c556f577 dcb: Rewrite array-formatting code to not cause warnings with Clang
0dc5da8e f_flower: fix checkpatch warnings
ffbcb246 netem: fix checkpatch warnings
8bced38a lib: fix ax25.h include for musl
e27bb8e5 uapi: add missing virtio headers
26ff0afa uapi: add missing rose and ax25 files
eb4206ec q_cake: allow changing to diffserv3
db530529 iplink_can: add ctrlmode_{supported,_static} to the "--details --json" output
ac2e9148 Update kernel headers
bb4cc9cc rdma: Don't allocate sparse array
b8767168 rdma: Limit copy data by the destination size
167e33f3 vdpa: Enable user to set mtu of the vdpa device
384938f9 vdpa: Enable user to set mac address of vdpa device
a311f0c4 vdpa: Enable user to query vdpa device config layout
9d8882d5 vdpa: Update kernel headers
5cb7ec0c Update kernel headers and import virtio_net
26113360 mptcp: add support for changing the backup flag
4b301b87 tc: Add support for ce_threshold_value/mask in fq_codel
99d09ee9 bond: add arp_missed_max option
432cb06b mptcp: add support for fullmesh flag
2d777dfe Update kernel headers
a21458fc vdpa: Remove duplicate vdpa UAPI header file

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-13 20:53:10 +02:00
Nick Hainke
9913514319 iproute2: update to 5.16.0
Import patch:
- 0001-lib-fix-ax25.h-include-for-musl.patch

Refreshed patches:
- 100-configure.patch
- 130-no_netem_tipc_dcb_man_vdpa.patch
- 140-keep_libmnl_optional.patch
- 145-keep_libelf_optional.patch
- 150-keep_libcap_optional.patch
- 170-ip_tiny.patch
- 190-fix-nls-rpath-link.patch
- 195-build_variant_ip_tc.patch
- 200-drop_libbsd_dependency.patch
- 300-selinux-configurable.patch

Size ip-full (mips_24kc):
- 176K	ip-full_5.16.0-1_mips_24kc.ipk
- 172K	ip-full_5.15.0-2_mips_24kc.ipk

Size ip-tiny (mips_24kc):
- 124K	ip-tiny_5.16.0-1_mips_24kc.ipk
- 124K	ip-tiny_5.15.0-2_mips_24kc.ipk

Changes:
ade99e20 v5.16.0
1225e307 testsuite: Fix tc/vlan.t test
4734fdb9 uapi: update to mptcp.h
c04e45d0 lib/bpf: fix verbose flag when using libbpf
73590d95 tc: flower: Fix buffer overflow on large labels
3f77bc62 uapi: update to if_ether.h
5f8bb902 ip/ipnexthop: fix unsigned overflow in parse_nh_group_type_res()
3184de37 lib/bpf_legacy: remove always-true check
79026c12 rdma: update uapi headers
fa58de9b vdpa: align uapi headers
be31c264 lnstat: fix buffer overflow in header output
0e949725 tc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH
9bd5ab0f mptcp: fix JSON output when dumping endpoints by id
a787d9ae man: tc-u32: Fix page to match new firstfrag behavior
af96c7b5 Fix some typos detected by Lintian in manpages
35c81b18 uapi: update vdpa.h
0c263d7c iplink_can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC)
0f7bb8d8 iplink_can: print brp and dbrp bittiming variables
67f3c7a5 iplink_can: use PRINT_ANY to factorize code and fix signedness
fd5e958c iplink_can: code refactoring of print_ctrlmode()
8316df6e iplink_can: fix configuration ranges in print_usage() and add unit
6e15d27a ip: add AMT support
9cae1de5 Import amt.h
258e350c Update kernel headers
047e9ae5 devlink: Fix cmd_dev_param_set() to check configuration mode
9e009e78 ip, neigh: Add NTF_EXT_MANAGED support
040e5252 ip, neigh: Add missing NTF_USE support
c76a3849 ip, neigh: Fix up spacing in netlink dump
76b30805 xfrm: enable to manage default policies
95cd2a62 iplink: enable to specify index when changing netns
cee0cf84 configure: add the --libdir option
0ee1950b configure: add the --prefix option
4b8bca5f configure: support --param=value style
99245d17 configure: simplify options parsing
c330d097 configure: fix parsing issue with more than one value per option
48c379bc configure: fix parsing issue on libbpf_dir option
1d819dcc configure: fix parsing issue on include_dir option
19ba785f rdma: Add optional-counters set/unset support
7d5cb70e rdma: Add stat "mode" support
d480cb71 rdma: Update uapi headers
e4ca6a49 Update kernel headers
a31e7b79 mptcp: cleanup include section.
41020eb0 Update documentation
8fb522cd Add support for IOAM encap modes
b840c620 ip: nexthop: keep cache netlink socket open
b9017435 devlink: print maximum number of snapshots if available
6448ed37 Update kernel headers
7ca868a7 ip: nexthop: add print_cache_nexthop which prints and manages the nh cache
5d5dc549 ip: route: print and cache detailed nexthop information when requested
cb3d18c2 ip: nexthop: add a helper which retrieves and prints cached nh entry
60a97030 ip: nexthop: add cache helpers
53d7c43b ip: nexthop: factor out ipnh_get_id rtnl talk into a helper
a2ca4312 ip: nexthop: factor out print_nexthop's nh entry printing
945c26db ip: nexthop: parse attributes into nh entry structure before printing
7ec1cee6 ip: nexthop: add nh entry structure
60a7515b ip: nexthop: split print_nh_res_group into parse and print parts
cfb0a872 ip: nexthop: add resilient group structure
371e889d ip: export print_rta_gateway version which outputs prepared gateway string
f7278996 ip: print_rta_if takes ifindex as device argument instead of attribute
e2cc9840 ROSE: Print decoded addresses rather than hex numbers.
26c5782f ROSE: Add rose_ntop implementation.
fd4c1c81 NETROM: Print decoded addresses rather than hex numbers.
c63b769a NETROM: Add netrom_ntop implementation.
399ae00a AX.25: Print decoded addresses rather than hex numbers.
3a92669b AX.25: Add ax25_ntop implementation.
ebbb7017 lib: bpf_legacy: add prog name, load time, uid and btf id in prog info dump
0431e1e7 ip: Support filter links/neighs with no master
12b3d6a2 man: ip-macsec: fix gcm-aes-256 formatting issue
ae895504 bridge: vlan: add support for mcast_router option
12fbe3e4 bridge: vlan: set vlan option attributes while parsing
db28c944 Update kernel headers
6d676ad9 ip: rewrite routel in python
1eaebad2 ip: remove routef script
adddf30c ip: remove ifcfg script
2c811088 ip: remove old rtpr script
72222cd4 bridge: vlan: add support for dumping router ports
7ad5505b bridge: vlan: add global mcast_querier option
061da2e2 bridge: vlan: add global mcast_startup_query_interval option
60dcd5c3 bridge: vlan: add global mcast_query_response_interval option
0e4cfa03 bridge: vlan: add global mcast_query_interval option
ebcee09c bridge: vlan: add global mcast_querier_interval option
3ae784f5 bridge: vlan: add global mcast_membership_interval option
2b6cc38d bridge: vlan: add global mcast_last_member_interval option
7cc7dbf4 bridge: vlan: add global mcast_startup_query_count option
3399c075 bridge: vlan: add global mcast_last_member_count option
a8d7212a bridge: vlan: add global mcast_mld_version option
29fada0f bridge: vlan: add global mcast_igmp_version option
1f608d59 bridge: vlan: add global mcast_snooping option
dee5eb05 bridge: vlan: add support to set global vlan options
ecf6d8b4 bridge: vlan: add support for vlan filtering when dumping options
720f8613 bridge: vlan: add support to show global vlan options
d3a961a9 bridge: vlan: skip unknown attributes when printing options
312e22fe bridge: vlan: factor out vlan option printing
d2eecb9d ip: bridge: add support for mcast_vlan_snooping
ebaa603b ip/bond: add lacp active support
8d6134b2 Update kernel headers
51d8fc70 ip/tunnel: always print all known attributes
71ba9c18 ipioam6: use print_nl instead of print_null
e7841194 tc/skbmod: Introduce SKBMOD_F_ECN option
78832863 IOAM man8
32f4969d New IOAM6 encap type for routes
29098125 Add, show, link, remove IOAM namespaces and schemas
e53f4cd5 Import ioam6 uapi headers
236696e5 Update kernel headers
cf866f0a ipneigh: add support to print brief output of neigh cache in tabular format

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-13 20:53:10 +02:00
Mikhail Zhilkin
85b41cbd3b ramips: add support for Beeline SmartBox TURBO
Beeline SmartBox TURBO is a wireless WiFi 5 router manufactured by
Sercomm company.

Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB
Flash: 256 MiB, Micron MT29F2G08ABAGA3W
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7615E): a/n/ac, 4x4
Ethernet: 5xGbE (WAN, LAN1, LAN2, LAN3, LAN4)
USB ports: 1xUSB3.0
Button: 2 buttons (Reset & WPS)
LEDs: 1 RGB LED
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot

Installation
-----------------
1.  Login to the router web interface (admin:admin)
2.  Navigate to Settings -> WAN -> Add static IP interface (e.g.
    10.0.0.1/255.255.255.0)
3.  Navigate to Settings -> Remote cotrol -> Add SSH, port 22,
    10.0.0.0/255.255.255.0 and interface created before
4.  Change IP of your client to 10.0.0.2/255.255.255.0 and connect the
    ethernet cable to the WAN port of the router
5.  Connect to the router using SSH shell (SuperUser:SNxxxxxxxxxx, where
    SNxxxxxxxxxx is the serial number from the backplate label)
6.  Run in SSH shell:
       sh
7.  Make a mtd backup (optional, see related section)
8.  Change bootflag to Sercomm1 and reboot:
       printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
       reboot
9.  Login to the router web interface (admin:admin)
10. Remove dots from the OpenWrt factory image filename
11. Update firmware via web using OpenWrt factory image

Revert to stock
---------------
1. Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
      printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
2. Optional: Update with any stock (Beeline) firmware if you want to
   overwrite OpenWrt in Slot 0 completely.

mtd backup
----------
1. Set up a tftp server (e.g. tftpd64 for windows)
2. Connect to a router using SSH shell and run the following commands:
      cd /tmp
      for i in 0 1 2 3 4 5 6 7 8 9 10; do nanddump -f mtd$i /dev/mtd$i; \
      tftp -l mtd$i -p 10.0.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done
      tftp -l mtd.md5 -p 10.0.0.2

MAC Addresses
-------------
+-----+-----------+---------+
| use | address   | example |
+-----+-----------+---------+
| LAN | label     | *:54    |
| WAN | label + 1 | *:55    |
| 2g  | label + 4 | *:58    |
| 5g  | label + 5 | *:59    |
+-----+-----------+---------+
The label MAC address was found in Factory 0x21000

Co-developed-by: Maximilian Weinmann <x1@disroot.org>
Signed-off-by: Maximilian Weinmann <x1@disroot.org>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-08-13 20:52:37 +02:00
Alexandru Gagniuc
6d5873a162 realtek: add support for TP-Link SG2008P
Add support for the TP-Link SG2008P switch. This is an RTL8380 based
switch with 802.3af one the first four ports.

Specifications:
---------------
 * SoC:       Realtek RTL8380M
 * Flash:     32 MiB SPI flash (Vendor varies)
 * RAM:       256 MiB (Vendor varies)
 * Ethernet:  8x 10/100/1000 Mbps with PoE on 4 ports
 * Buttons:   1x "Reset" button on front panel
 * Power:     53.5V DC barrel jack
 * UART:      1x serial header, unpopulated
 * PoE:       1x TI TPS23861 I2C PoE controller

Works:
------
  - (8) RJ-45 ethernet ports
  - Switch functions
  - System LED

Not yet enabled:
----------------
  - Power-over-Ethernet (driver works, but doesn't enable "auto" mode)
  - PoE, Link/Act, PoE max and System LEDs

Install via web interface:
-------------------------

Not supported at this time.

Install via serial console/tftp:
--------------------------------

The footprints R27 (0201) and R28 (0402) are not populated. To enable
serial console, 50 ohm resistors should be soldered -- any value from
0 ohm to 50 ohm will work. R27 can be replaced by a solder bridge.

The u-boot firmware drops to a TP-Link specific "BOOTUTIL" shell at
38400 baud. There is no known way to exit out of this shell, and no
way to do anything useful.

Ideally, one would trick the bootloader into flashing the sysupgrade
image first. However, if the image exceeds 6MiB in size, it will not
work. The sysupgrade image can also be flashed. To install OpenWRT:

Prepare a tftp server with:
 1. server address: 192.168.0.146
 2. the image as: "uImage.img"

Power on device, and stop boot by pressing any key.
Once the shell is active:
 1. Ground out the CLK (pin 16) of the ROM (U7)
 2. Select option "3. Start"
 3. Bootloader notes that "The kernel has been damaged!"
 4. Release CLK as sson as bootloader thinks image is corrupted.
 5. Bootloader enters automatic recovery -- details printed on console
 6. Watch as the bootloader flashes and boots OpenWRT.

Blind install via tftp:
-----------------------

This method works when it's not feasible to install a serial header.

Prepare a tftp server with:
 1. server address: 192.168.0.146
 2. the image as: "uImage.img"
 3. Watch network traffic (tcpdump or wireshark works)
 4. Power on the device.
 5. Wait 1-2 seconds then ground out the CLK (pin 16) of the ROM (U7)
 6. When 192.168.0.30 makes tftp requests, release pin 16
 7. Wait 2-3 minutes for device to auto-flash and boot OpenWRT

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2022-08-13 19:59:47 +02:00
Alexandru Gagniuc
b664646db7 kernel: add kmod-hwmon-tps23861 support
Package the tps23861.ko module, which supports Texas Instruments
TPS23861 PoE+ controller.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2022-08-13 19:59:47 +02:00
Daniel Golle
c0109537d1 arm-trusted-firmware-mediatek: skip bad blocks on SPI-NAND (SNFI)
Add patch to skip bad blocks when reading from SPI-NAND. This is needed
in case erase block(s) early in the flash inside the FIP area are bad
and hence need to be skipped in order to be able to boot on such damaged
chips.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-08-12 22:16:00 +02:00
Florian Eckert
885f04b305 fstools: add uci fstab section to conffiles for package block-mount
The command 'opkg search /etc/config/fstab' does not return a package
name for this config file. In order to know to which package this config
file belongs to, a 'conffiles' entry was made for this file to package
'block-mount'.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-08-12 22:07:09 +02:00
Daniel Golle
1291a682f8 kernel: kmod-input-gpio-keys-polled depends on kmod-input-core
While kmod-input-core was previously indirectly selected by
kmod-input-polldev, this is now only the case on Linux 5.10.
Select kmod-input-core as dependency independently of the kernel
version to fix build error:

Package kmod-input-gpio-keys-polled is missing dependencies for the following libraries:
input-core.ko

Fixes: 54878fbbdd ("kernel: kmod-input-polldev: Depend on kernel 5.10")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-08-12 11:05:53 +02:00
Daniel Golle
87e09b692b uboot-mediatek: backport pinctrl fix to avoid error message
Import a3ba6adb70 arm: dts: mt7622: remove default pinctrl of uart0
and apply also to locally added boards.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-08-11 17:11:48 +02:00
Daniel Golle
7f5e70a534 uboot-mediatek: mt7621: use silent stage1 by default
Use faster and silent MT7621 stage1 blob by default unless
CONFIG_DEBUG is selected.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-08-11 17:11:36 +02:00
Manas Sambhus
1ea563ae13 base-files: wifi: add random MAC support for wifi-iface
Add support for randomly generating a MAC address for a wifi-iface
instance by setting `macaddr` to `random`
When set to `random`, a new locally administered unicast MAC address
is generated and assigned to the iface everytime it is (re-)configured

Signed-off-by: Manas Sambhus <manas.sambhus+github@gmail.com>
2022-08-11 12:56:15 +02:00
Hauke Mehrtens
5b016a88f9 kernel: kmod-phy-smsc: Add new PHY
This adds the SMSC PHY which is needed by the kmod-usb-net-smsc95xx
driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
712ff388bc kernel: kmod-phy-ax88796b: Add new PHY
This adds the AX88796B PHY which is needed by the kmod-usb-net-asix
driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
54878fbbdd kernel: kmod-input-polldev: Depend on kernel 5.10
The input-polldev.ko kernel module was removed from kernel 5.11. The
normal input implementation now supports polling.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
c281edb6ac kernel: kmod-iio-sps30: Add I2C driver
The sps30.ko driver was split into a main sps30.ko driver and a
sps30_i2c.ko driver for the I2C interface with kernel 5.14. Add the
sps30_i2c.ko module to the package too.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
db55dea5fc kernel: kmod-isdn4linux: Remove package
The isdn4linux drivers and subsystem was removed in kernel 5.3, remove
the kernel package also from OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
3986e7c174 kernel: kmod-mdio-gpio: kmod-switch-rtl8366-smi: Add kmod-of-mdio dependency for malta
These two modules also need a depend to kmod-of-mdio on malta.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
5ccf4dcf88 kenrel: kmod-rtc-pt7c4338: Remove package
The rtc-pt7c4338.ko was never upstream under this name, the driver was
removed from OpenWrt some years ago, remove the kmod-rtc-pt7c4338
package too.

Fixes: 74d00a8c38 ("kernel: split patches folder up into backport, pending and hack folders")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
3b5294beb7 kernel: kmod-wwan: Add package
This adds the kmod-wwan package. This provides the generic wwan driver
core which is needed for some existing packages.

Currently the drivers/net/wwan/wwan.ko driver is compiled into the
kernel when one of the wwan module is activated, better build it as a
kernel module.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
2a0284fb03 kernel: kmod-ipt-ulog: Remove package
The ulog iptables target was removed with kernel 3.17, remove the kernel
and also the iptables package in OpenWrt too.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
b75425370d kernel: kmod-nft-nat6: Remove package
The nft NAT packages for IPv4 and IPv6 were merged into the common
packages with kernel 5.1. The kmod-nft-nat6 package was empty in our
build, remove it.

Multiple kernel configuration options were also removed, remove them
from our generic kernel configuration too.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
5808973d14 kernel: kmod-w1-slave-ds2760: Remove package
The w1_ds2760.ko driver was merged into the ds2760_battery.ko driver.
The driver was removed and this package was never build any more.
This happened with kernel 4.19.

Remove this unused package.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
7ebe1dca47 kernel: kmod-net-rtl8192su: Remove package
The R8712U driver depends on cfg80211. cfg80211 is provided by mac80211
backports, we can not build any in kernel drivers which depend on
cfg80211 which is an out of tree module in OpenWrt.

The cfg80211 dependency was added with kernel 5.9.

We could add rtl8192su to backports and build it from there.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
16caa19c8c kernel: kmod-mdio-devres: Add kmod-of-mdio dependency for malta
The malta target does not compile CONFIG_OF_MDIO into the kernel. On
malta the kmod-mdio-devres package depends on kmod-of-mdio.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
724ef7b484 kernel: kmod-fs-fscache: Add cachefiles.ko
The CONFIG_CACHEFILES configuration option makes the kernel build
cachefiles.ko, also package it. Build CONFIG_CACHEFILES as module and do
not try to build it into the kernel. This did not work because it
depended on CONFIG_FSCACHE which was already build as module.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
d29353d30e kernel: kmod-nls-cp932: Add nls_euc-jp.ko too
The CONFIG_NLS_CODEPAGE_932 Config option builds the nls_cp932.ko and
the nls_euc-jp.ko kernel module, package both of them.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
ba8ab391a0 kernel: kmod-usb-dwc2-pci: Add new package
Add dwc2_pci kernel module into own kernel package.
The dwc2_pci.ko kernel module was always build when kmod-usb-dwc2
was selected, but it was not packaged.

Add the missing kmod-usb-phy-nop dependency to the kmod-usb-dwc2-pci
package too. The CONFIG_USB_DWC2_PLATFORM option is already gone for
some time.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
1e337a84de kernel: kmod-switch-ar8xxx: Add kmod-mdio-devres dependency
The ar8xxx.ko kernel module uses the devm_mdiobus_alloc() function
provided by kmod-mdio-devres, add the missing dependency.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Hauke Mehrtens
42db0ee13b kernel: kmod-crypto-authenc: Add authencesn.ko
The kernel configuration option CONFIG_CRYPTO_AUTHENC builds authenc.ko
and authencesn.ko, pack both kernel modules.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Jo-Philipp Wich
e6e4f97999 nftables: fix parsing date expressions
Musl libc does not support the non-POSIX "%F" format for strptime() so
replace all occurrences of it with an equivalent "%Y-%m-%d" format.

Fixes: #10419
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-08-09 11:51:46 +02:00
Jo-Philipp Wich
b5ec04f81a Revert "nftables: fix parsing date expressions"
This reverts commit eada892577.

The commit contained unrelated target changes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-08-09 11:50:52 +02:00
Petr Štetiar
f443e9de70 zlib: backport null dereference fix
The curl developers found test case that crashed in their testing when
using zlib patched against CVE-2022-37434, same patch we've backported
in commit 7df6795d4c ("zlib: backport fix for heap-based buffer
over-read (CVE-2022-37434)"). So we need to backport following patch in
order to fix issue introduced in that previous CVE-2022-37434 fix.

References: https://github.com/curl/curl/issues/9271
Fixes: 7df6795d4c ("zlib: backport fix for heap-based buffer over-read (CVE-2022-37434)")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-08-09 08:08:08 +02:00
Jo-Philipp Wich
eada892577 nftables: fix parsing date expressions
Musl libc does not support the non-POSIX "%F" format for strptime() so
replace all occurrences of it with an equivalent "%Y-%m-%d" format.

Fixes: #10419
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-08-09 00:20:14 +02:00
Jo-Philipp Wich
737671bcce jansson: revert ABI version bump
The soversion of the shipped libjansson.so library didn't change, so the
ABI version change is unwarranted and leads to opkg file clashes.

Also stop shipping an unversioned library symlink while we're at it as
it only needed at compile/link time and leading to file level clashes
between packages on future ABI bumps.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-08-09 00:20:09 +02:00
Koen Vandeputte
a5da8e6ecd kernel: fix missing mhi control devices
Both of these packages depend on CONFIG_WWAN
in the kernel.

Also fix the missing "wwan" subfolder in the path.

This fixes the missing devices in /dev after booting an MHI capable modem.

Fixes: 2519190fec ("kernel: package mhi wwan ctrl driver")
Fixes: 6af46796fa ("kernel: package mhi mbim driver")

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2022-08-08 15:37:34 +02:00
Koen Vandeputte
8b804cae5e mac80211: backport upstream fix for unitialized lock usage
Backports upstream fix from 5.19

lockdep complains use of uninitialized spinlock at ieee80211_do_stop() [1],
for commit f856373e2f31ffd3 ("wifi: mac80211: do not wake queues on a vif
that is being stopped") guards clear_bit() using fq.lock even before
fq_init() from ieee80211_txq_setup_flows() initializes this spinlock.

According to discussion [2], Toke was not happy with expanding usage of
fq.lock. Since __ieee80211_wake_txqs() is called under RCU read lock, we
can instead use synchronize_rcu() for flushing ieee80211_wake_txqs().

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2022-08-08 15:37:34 +02:00
Nick Hainke
23c77384f3 trace-cmd: import patch to fix autodetection of libzstd
libzstd from the packages feed gets picked up. Add patch adding
NO_LIBZSTD option like in perf and enable it.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-07 16:17:40 +02:00
Hauke Mehrtens
0582acf429 kernel: netsupport: Extract act_police
This extracts kmod-sched-act-police to allow using it without adding all
the packages from the big kmod-sched package.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2022-08-06 21:32:35 +02:00
Hauke Mehrtens
6a2e9f3da6 kernel: ipt-ipset: Add ipset/ip_set_hash_ipmac.ko
Add the ipset/ip_set_hash_ipmac.ko file. The CONFIG_IP_SET_HASH_IPMAC
KConfig option is already set by the package.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2022-08-06 21:32:35 +02:00
Thomas Langer
aba1bdaed8 kernel: netsupport: Add kmod-sched-act-sample
This adds the act_sample.ko and psample.ko kernel module which allows
traffic sampling.

Signed-off-by: Thomas Langer <tlanger@maxlinear.com>
Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2022-08-06 21:32:35 +02:00
Thomas Langer
0e3911b608 kernel: netsupport: Extract sched-prio and sched-red
Extract the kmod-sched-prio and kmod-sched-red kernel modules from the
big kmod-sched package. This allows adding the two kernel modules to
OpenWrt without adding the kmod-sched and all its depdnecy.

Signed-off-by: Thomas Langer <tlanger@maxlinear.com>
Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2022-08-06 21:32:35 +02:00
Hauke Mehrtens
fa85e44d3c kernel: netsupport: Add kmod-sched-drr
This adds a package with the DRR scheduler.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2022-08-06 21:32:35 +02:00
Hauke Mehrtens
c94ba95e6c kernel: netsupport: kmod-sched: Reorder packages
This puts the kmod-sched packages into an alphabetical order.
I kept the kmod-sched-core at the top as this is the main package.
No changes other than reordering were done.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2022-08-06 21:32:35 +02:00
Thomas Langer
1b956e66cc kernel: netsupport: kmod-sched: explicitly define included modules
Change SCHED_MODULES_EXTRA to an explicit list of modules
instead of taking everything that is not filtered out.
This removes the need of updating the filter each time an extra
sch_*, act_* or similar is added with an own kmod definition.

Signed-off-by: Thomas Langer <tlanger@maxlinear.com>
Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2022-08-06 21:32:35 +02:00
Hauke Mehrtens
3cc878a8d3 kernel: netsupport: kmod-sched: Add kmod-lib-textsearch dependency
The CONFIG_NET_EMATCH_TEXT configuration option depends on the
kmod-lib-textsearch package.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2022-08-06 21:32:35 +02:00
Hauke Mehrtens
606e357bf8 kernel: netsupport: kmod-sched: Remove sch_fq_codel and sch_fifo
The sch_fq_codel.ko and the sch_fifo.ko are always compiled into the
kernel, they are activated in the generic kernel configuration. There is
no need to activate the build of these kernel modules in the kmod-sched*
packages.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2022-08-06 21:32:35 +02:00
André Valentin
2cc5059240 ramips: add support for ZyXEL LTE3301-Plus
The ZyXEL LTE3301-PLUS is an 4G indoor CPE with 2 external LTE antennas.

Specifications:

 - SoC: MediaTek MT7621AT
 - RAM: 256 MB
 - Flash: 128 MB MB NAND (MX30LF1G18AC)
 - WiFi: MediaTek MT7615E
 - Switch: 4 LAN ports (Gigabit)
 - LTE: Quectel EG506 connected by USB3 to SoC
 - SIM: 1 micro-SIM slot
 - USB: USB3 port
 - Buttons: Reset, WPS
 - LEDs: Multicolour power, internet, LTE, signal, Wifi, USB
 - Power: 12V, 1.5A

The device is built as an indoor ethernet to LTE bridge or router with
Wifi.

UART Serial:

57600N1
Located on populated 5 pin header J5:

 [o] GND
 [ ] key - no pin
 [o] RX
 [o] TX
 [o] 3.3V Vcc

MAC assignment:
lan:  98:0d:67:ee:85:54 (base, on the device back)
wlan: 98:0d:67:ee:85:55

Installation from web GUI:

- Log in as "admin" on http://192.168.1.1/
- Upload OpenWrt initramfs-recovery.bin image on the
  Maintenance -> Firmware page
- Wait for OpenWrt to boot and ssh to root@192.168.1.1
- format ubi device: ubiformat /dev/mtd6
- attach ubi device: ubiattach -m6
- create rootfs volume: ubimkvol /dev/ubi0 -n0 -N rootfs -s 1MiB
- rootfs_data volume: ubimkvol /dev/ubi0 -n1 -N rootfs_data -s 1MiB
- run sysupgrade with sysupgrade image

For more details about flashing see
commit 2449a63208 ("ramips: mt7621: Add support for ZyXEL NR7101").

Please note that this commit is needed:
firmware-utils: add marcant changes for ZyXEL NBG6716 and LTE3301-PLUS

Signed-off-by: André Valentin <avalentin@marcant.net>
2022-08-06 20:33:59 +02:00
Manuel Niekamp
0dc5821489 ath79: add support for Sophos AP15
The Sophos AP15 seems to be very close to Sophos AP55/AP100.

Based on:
commit 6f1efb2898 ("ath79: add support for Sophos AP100/AP55 family")
author    Andrew Powers-Holmes <andrew@omnom.net>
          Fri, 3 Sep 2021 15:53:57 +0200 (23:53 +1000)
committer Hauke Mehrtens <hauke@hauke-m.de>
          Sat, 16 Apr 2022 16:59:29 +0200 (16:59 +0200)

Unique to AP15:
 - Green and yellow LED
 - 2T2R 2.4GHz 802.11b/g/n via SoC WMAC
 - No buttons
 - No piezo beeper
 - No 5.8GHz

Flashing instructions:
 - Derived from UART method described in referenced commit, methods
   described there should work too.
 - Set up a TFTP server; IP address has to be 192.168.99.8/24
 - Copy the firmware (initramfs-kernel) to your TFTP server directory
   renaming it to e.g. boot.bin
 - Open AP's enclosure and locate UART header (there is a video online)
 - Terminal connection parameters are 115200 8/N/1
 - Connect TFTP server and AP via ethernet
 - Power up AP and cancel autoboot when prompted
 - Prompt shows 'ath> '
 - Commands used to boot:
    ath> tftpboot 0x81000000 boot.bin
    ath> bootm 0x81000000
 - Device should boot OpenWRT
 - IP address after boot is 192.168.1.1/24
 - Connect to device via browser
 - Permanently flash using the web ui (flashing sysupgrade image)
 - (BTW: the AP55 images seem to work too, only LEDs are not working)

Testing done:
 - To be honest: Currently not so much testing done.
 - Flashed onto two devices
 - Devices are booting
 - MAC addresses are correct
 - LEDs are working
 - Scanning for WLANs is working

Big thanks to all the people working on this great project!
(Sorry about my english, it is not my native language)

Signed-off-by: Manuel Niekamp <m.niekamp@richter-leiterplatten.de>
2022-08-06 20:33:59 +02:00
Nick Hainke
9edda3169f trace-cmd: update to v3.1.2
Remove outdated patches:
- 100-musl.patch
- 110-mac80211_tracepoint.patch

Trace-cmd now uses libtracefs and livtraceevent as libraries.
The plugins moved to libtraceevent.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-06 19:58:46 +02:00
Nick Hainke
6d84e78cd9 libtracefs: add Linux kernel trace file system library
Needed by trace-cmd.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-06 19:58:46 +02:00
Nick Hainke
b108810601 libtraceevent: add Linux kernel trace event library
Needed by trace-cmd.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-06 19:58:46 +02:00
Nick Hainke
0cb1ce9748 elfutils: update to 0.187
Changes:
debuginfod: Support -C option for connection thread pooling.

debuginfod-client: Negative cache file are now zero sized instead of
                   no-permission files.

addr2line: The -A, --absolute option, which shows file names including
           the full compilation directory is now the default.  To get the
           old behavior use the new option --relative.

readelf, elflint: Recognize FDO Packaging Metadata ELF notes

libdw, debuginfo-client: Load libcurl lazily only when files need to
                         be fetched remotely. libcurl is now never
                         loaded when DEBUGINFOD_URLS is unset. And when
                         DEBUGINFOD_URLS is set, libcurl is only loaded
                         when the debuginfod_begin function is called.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-08-06 19:58:46 +02:00
Olliver Schinagl
404cad6470 base-files: LED/trigger/heartbeat: Add support for inversion
The heartbeat trigger has the option to be inverted, however
openwrt/uci/luci have no way to set this.

This patch adds this support.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2022-08-06 19:58:46 +02:00
Olliver Schinagl
b8f27251c9 base-files: LED/gpio: Ensure inverted is read as a boolean
The sysfs interface for the GPIO takes a boolean value. Ensure we get
one from uci.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2022-08-06 19:58:46 +02:00
Petr Štetiar
7df6795d4c zlib: backport fix for heap-based buffer over-read (CVE-2022-37434)
zlib through 1.2.12 has a heap-based buffer over-read or buffer overflow
in inflate in inflate.c via a large gzip header extra field. NOTE: only
applications that call inflateGetHeader are affected. Some common
applications bundle the affected zlib source code but may be unable to
call inflateGetHeader.

Fixes: CVE-2022-37434
References: https://github.com/ivd38/zlib_overflow
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-08-06 15:00:08 +02:00
Hans Dedecker
a23d132cff odhcp6c: update to git HEAD
7d21e8d dhcpv6: add option to ignore stateless advertise

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2022-08-05 18:31:24 +02:00
Chen Minqiang
31cca8f8d3 umdns: add missing syscall to seccomp filter
There is some syscall missing:
'getdents64'
'getrandom'
'statx'
'newfstatat'

Found with:
'mkdir /etc/umdns; ln -s /tmp/1.json /etc/umdns/; utrace /usr/sbin/umdns'

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2022-08-05 14:10:42 +02:00
Wenli Looi
4cccea02a6 ramips: fix fw_setsys
This change was included in the original pull request but later omitted
for some reason:

https://github.com/openwrt/openwrt/pull/4936

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
2022-08-05 14:10:42 +02:00
Wenli Looi
0bfe1cfbb1 ramips: support fw_printenv for Netgear WAX202
Config partition contains uboot env for the first 0x20000 bytes.
The rest of the partition contains other data including the device MAC
address and the password printed on the label.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
2022-08-05 14:10:42 +02:00
Leo Soares
2b03f207e0 kernel: add kmod-usb-hid-mcp2221
"The MCP2221 is a USB-to-UART/I2C serial converter which enables
USB connectivity in applications that have a UART and I2C interfaces."
<https://www.microchip.com/en-us/product/MCP2221>

Signed-off-by: Leo Soares <leo@hyper.ag>
(replaced GPIOLIB KConfig with @GPIO_SUPPORT)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-08-05 14:10:42 +02:00
Christian Lamparter
3678881773 kernel: usb-serial-cp210x: @GPIO_SUPPORT
all other drivers depend on @GPIO_SUPPORT rather than
forcing CONFIG_GPIOLIB=y.

(I wonder what would happen if someone decides to try
UML with USBIP?)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-08-05 14:10:42 +02:00
Roland Barenbrug
456b9029d7 ltq-vdsl-app: Fix counter overflow resulting in negative values
The re-transmit counters can overflow the 32 bit representation resulting
in negative values being displayed. Background being that the numbers are
treated at some point as signed INT rather than unsigned INT.
Change the counters from 32 bit to 64 bit, should provide sufficient room
to avoid any overflow. Not the nicest solution but it works

Fixes: #10077
Signed-off-by: Roland Barenbrug <roland@treslong.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-08-05 13:49:30 +02:00
Mark Mentovai
beeb49740b libmnl: fix build when bash is not located at /bin/bash
This fixes the libmnl build on macOS, which ships with an outdated bash
at /bin/bash. During the OpenWrt build, a modern host bash is built and
made available at staging_dir/host/bin/bash, which is present before
/bin/bash in the build's PATH.

This is similar to 8f7ce3aa6d, presently appearing at
package/kernel/mac80211/patches/build/001-fix_build.patch.

Signed-off-by: Mark Mentovai <mark@mentovai.com>
2022-07-31 20:30:20 +02:00
Shiji Yang
1330816178 ramips: add support for H3C TX1800 Plus / TX1801 Plus / TX1806
H3C TX180x series WiFi6 routers are customized by different carrier.
While these three devices look different, they use the same motherboard
inside. Another minor difference comes from the model name definition
in the u-boot environment variable.

Specifications:
 SOC:      MT7621 + MT7915
 ROM:      128 MiB
 RAM:      256 MiB
 LED:      status *2
 Button:   reset *1 + wps/mesh *1
 Ethernet:        lan *3 + wan *1 (10/100/1000Mbps)
 TTL Baudrate:    115200
 TFTP server IP:  192.168.124.99

MAC Address:
 use        address(sample 1)   address(sample 2)    source
 label      88:xx:xx:98:xx:12   88:xx:xx:a2:xx:a5   u-boot-env@ethaddr
 lan        88:xx:xx:98:xx:13   88:xx:xx:a2:xx:a6   $label +1
 wan        88:xx:xx:98:xx:12   88:xx:xx:a2:xx:a5   $label
 WiFi4_2G   8a:xx:xx:58:xx:14   8a:xx:xx:52:xx:a7   (Compatibility mode)
 WiFi5_5G   8a:xx:xx:b8:xx:14   8a:xx:xx:b2:xx:a7   (Compatibility mode)
 WiFi6_2G   8a:xx:xx:18:xx:14   8a:xx:xx:12:xx:a7
 WiFi6_5G   8a:xx:xx:78:xx:14   8a:xx:xx:72:xx:a7

Compatibility mode is used to guarantee the connection of old devices
that only support WiFi4 or WiFi5.

TFTP + TTL Installation:
Although a TTL connection is required for installation, we do not need
to tear down it. We can find the TTL port from the cooling hole at the
bottom. It is located below LAN3 and the pins are defined as follows:
|LAN1|LAN2|LAN3|----|WAN|
--------------------
    |GND|TX|RX|VCC|

1. Set tftp server IP to 192.168.124.99 and put initramfs firmware in
   server's root directory, rename it to a simple name "initramfs.bin".
2. Plug in the power supply and wait for power on, connect the TTL cable
   and open a TTL session, enter "reboot", then enter "Y" to confirm.
   Finally push "0" to interruput boot while booting.
3. Execute command to install a initramfs system:
   # tftp 0x80010000 192.168.124.99:initramfs.bin
   # bootm 0x80010000
4. Backup nand flash by OpenWrt LuCI or dd instruction. We need those
   partitions if we want to back to stock firmwre due to official
   website does not provide download link.
   # dd if=/dev/mtd1 of=/tmp/u-boot-env.bin
   # dd if=/dev/mtd4 of=/tmp/firmware.bin
5. Edit u-boot env to ensure use default bootargs and first image slot:
   # fw_setenv bootargs
   # fw_setenv bootflag 0
6. Upgrade sysupgrade firmware.
7. About restore stock firmware: flash the "firmware" and "u-boot-env"
   partitions that we backed up in step 4.
   # mtd write /tmp/u-boot-env.bin u-boot-env
   # mtd write /tmp/firmware.bin firmware

Additional Info:
The H3C stock firmware has a 160-byte firmware header that appears to
use a non-standard CRC32 verification algorithm. For this part of the
data, the u-boot does not check it so we can just directly replace it
with a placeholder.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-07-31 19:23:24 +02:00
Andre Heider
81bc733c33 arm-trusted-firmware-mvebu: update cm3 gcc to 11.2
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-07-31 18:53:24 +02:00
Andre Heider
794cefd3e3 arm-trusted-firmware-mvebu: update to v2.7
Remove the backported patches and add another to allow building with the
OpenWrt build system.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-07-31 18:53:24 +02:00
Andre Heider
0fbe36f945 arm-trusted-firmware-mvebu: bump mox-boot-builder to v2022.06.11
Remove the gold patch, since upstream doesn't hardcode it anymore.

406454d wtmi: Don't print another newline on standalone build
ec97868 Bump mox-imager commit
e4c4b9d wtmi: Call main from C code in startup
4c1d3ff wtmi: Move startup assmebly to C file as inline assmebly
ee570ea wtmi: Indent Makefiles
18a7c0b wtmi: Use -f{function,data}-sections and --gc-sections
47ad100 wtmi: Use bfd linker instead of gold
5e34aa1 wtmi: Keep .data* and .bss* sections in linker scripts
7a4e3d2 wtmi: compressed, reload_helper: Discard .ARM* section
d943726 wtmi: compressed: Keep main function in linker script
d4f0fc6 wtmi: Keep main function in linker script
092148c wtmi: Fix -Warray-bounds warning
469e1b6 wtmi: Add do_div() implementation from Linux
90f46a0 Bump mox-imager commit
8bc6254 wtmi: Always use gold and link with --rosegment and --gc-sections flags
0b68a33 wtmi: Implement Marvell's OTP write commands
53d2a1c Bump mox-imager commit
b4c34b4 Rename arm-trusted-firmware to trusted-firmware-a
5f79ace Sync mox-imager submodule URL
a1cdd32 Sync TF-A submodule URL
58ef1af Sync u-boot submodule URL
90d28e1 wtmi: Check argument validity in Marvell's CMD_OTP_READ_1B command more
3a48cf1 Bump mox-imager commit
807a3e1 wtmi: Implement Marvell's OTP read commands
77b1232 wtmi: Enable OTP read/write mailbox commands
9724d41 wtmi: Add is_secure_boot()
03de0c1 Bump mox-imager commit
2133601 wtmi: Fix efuse_write_row_with_ecc_lock() for masked ECC rows
545a89f wtmi: Don't allow masked rows in efuse_write_row_with_ecc_lock()
94ebc98 wtmi: Don't program already programmed bits in efuse_raw_write()
2369750 wtmi: Remove inline specifier from is_row_masked()
53e2636 wtmi: Use ARRAY_SIZE()
cc3e23b wtmi: Remove duplicate checks
89d24be Makefile: ignore clean target errors
9ee8b8d Bump mox-imager commit
489262b Bump mox-imager commit
79d2f32 deploy: Print board type in deploy output
78f15b0 deploy: Print board version without board type bits in deploy output
e69fdfa deploy: Always determine 512 MiB RAM when deploying RIPE Atlas Probe
d1f7d07 deploy: Write eMMC Boot Mode into OTP when deploying RIPE Atlas Probe
d43a089 Bump mox-imager commit
49ac21d deploy: Use get_ram_size() from ddr.c
1e7705d Print DDR type and size when initializing
6f85e72 Move get_ram_size() to ddr.c
edb1079 wtmi: Rename Atlas_RIPE to RIPE_Atlas
e6a3aee wtmi: Inform about board type in CMD_BOARD_INFO
50aeae5 wtmi: Read only bits 53:48 of row eFuse 42 as board version
b882398 wtmi: Add README.md (document OTP content)
c068431 wtmi: Add ARRAY_SIZE() macro
4af2317 wtmi: Use 50 MHz as SPI clock rate
226fc5c wtmi: Add fast spi_write() function
518c914 wtmi: clock: Check for zero loops, not argument, in ndelay() / udelay()
89a21c5 wtmi: Fix comment
7b3e11a wtmi: Add clk command to print xtal and TBG clock rates
5127638 wtmi: Use the signed keyword when defining signed types
fb31ed2 wtmi: Fix DDR training failure check
1b1b938 wtmi: clock: Check for zero in ndelay() / udelay()
c0ee09a wtmi: Print correct DDR version in debug message
edfb875 Bump mox-imager commit
85cb5e3 Bump mox-imager commit
c4e9334 wtmi: debug: interpret char 127 as backspace
a778fd9 Bump mox-imager commit

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-07-31 18:53:23 +02:00
Andre Heider
b0bbd273df arm-trusted-firmware-mvebu: bump mv-ddr-marvell to current version
6ff988f mv_ddr: a3700: Use the right size for memset to not overflow
0f3e893 mv_ddr: a38x: fix BYTE_HOMOGENEOUS_SPLIT_OUT decision
4bae770 mv_ddr: a38x: fix SPLIT_OUT_MIX state decision
cdefd8b mv_ddr: a38x: Fix Synchronous vs Asynchronous mode determination
8c42ad9 mv_ddr_4_training: cast uint64_t to unsigned long long

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-07-31 18:53:23 +02:00
Andre Heider
a547cb97c3 arm-trusted-firmware-mvebu: bump a3700-utils to current version
1d97715 wtmi: Discard ELF symbols from firmware binary
2d2a21c wtmi: Allow access to the 43th OTP row
e733e9f Fix boot from SATA build
4392eaf wtmi: Fix sending status code of cmd execution
14b3c61 Wtpdownloader: Remove out-of-dated x86-64 ELF binary WtpDownload_linux
e345b95 Wtpdownloader: Fix setting tty c_cflag options
0c502d5 Wtpdownloader: Call HandlePendingMessages() after Port->WtpCmd is freed
d91761a Wtpdownloader: Fix memory leaks
bc11d18 Wtpdownloader: Check for number of read bytes prior touching read buffer
58db335 Wtpdownloader: Add missing check in SendContinuousForceConsoleMode() if byte was really read
a4029c0 Wtpdownloader: Fix 32/64-bit host detection
3679034 Wtpdownloader: Print missing newline at the end of output

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-07-31 18:53:23 +02:00
Andre Heider
a2122b518e uboot-mvebu: update to v2022.07
Remove one merged patch.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Josef Schlehofer <pepe.schlehofer@gmail.com> [Turris Omnia]
2022-07-31 18:53:23 +02:00
Hauke Mehrtens
3aa18f71f9 mac80211: Update to version 5.15.58-1
This updates mac80211 to version 5.15.58-1 which is based on kernel
5.15.58.
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-07-31 16:22:08 +02:00
Boris Krasnovskiy
d94c94d795 ustream-ssl: prevent unused crypto lib dependencies from being compiled
Prevented unused crypto lib dependencies from being compiled

Signed-off-by: Boris Krasnovskiy <borkra@gmail.com>
2022-07-31 00:11:21 +02:00
Boris Krasnovskiy
00718b9d7a hostapd: prevent unused crypto lib dependencies from being compiled
Prevented unused crypto lib dependencies from being compiled

Signed-off-by: Boris Krasnovskiy <borkra@gmail.com>
2022-07-31 00:11:21 +02:00
John Audia
c2aa816f28 wolfssl: fix math library build
Apply upstream patch[1] to fix breakage around math libraries.
This can likely be removed when 5.5.0-stable is tagged and released.

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

1. https://github.com/wolfSSL/wolfssl/pull/5390

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-31 00:11:21 +02:00
Nick Hainke
7455457893 libcap: update to 2.65
Changes:
a47d86d Up the release version to 2.65
fc99e56 Include more signatures in pgp.keys.asc.
52288cc Close out this comment in the go/Makefile
eb0f1df Prevent 'capsh --user=xxx --' from generating a bash error.
9a95791 Improve documentation for cap_get_pid and cap_reset_ambient.
21d08b0 Fix syntax error in DEBUG protected setcap.c code.
9425048 More useful captree usage string and man page.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-30 23:50:44 +02:00
Nick Hainke
97daddffd0 libcap: update to 2.64
Changes:
38cfa2e Up the release version to 2.64
7617af6 Avoid a deadlock in forked psx thread exit.
fc029cb Include LIBCAP_{MAJOR,MINOR} #define's in sys/capability.h
ceaa591 Clarify how the cap_get_pid() argument is interpreted.
15cacf2 Fix prctl return code/errno handling in libcap.
aae9374 Be explicit about CGO_ENABLED=1 for compare-cap build.
66a8a14 psx: free allocated memory at exit.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-30 23:50:44 +02:00
Dávid Benko
f920908626 odhcp6c: update to latest git HEAD
9212bfc odhcp6c: fix IA discard when T1 > 0 and T2 = 0

Signed-off-by: Dávid Benko <davidbenko@davidbenko.dev>
2022-07-30 23:50:44 +02:00
Daniel Golle
dbe53352e3 kernel: add kmod-nvme package
Add driver for NVM Express block devices, ie. PCIe connected SSDs.

Targets which allow booting from NVMe (x86, maybe some mvebu boards come
to mind) should have it built-in, so rootfs can be mounted from there.
For targets without NVMe support in bootloader or BIOS/firmware it's
sufficient to provide the kernel module package.

On targets having the NVMe driver built-in the resulting kmod package
is an empty dummy. In any case, depending on or installing kmod-nvme
results in driver support being available (either because it was already
built-in or because the relevant kernel modules are added and loaded).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-30 19:04:36 +02:00
Daniel Golle
603aaceb42 uboot-mediatek: reorder patches
Rename/reorder patches to avoid duplicate usage of 300-* prefix.
No functional changes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-30 19:03:54 +02:00
Jo-Philipp Wich
0063e3421d wolfssl: make shared again
Disable the usage of target specific CPU crypto instructions by default
to allow the package being shared again. Since WolfSSL does not offer
a stable ABI or a long term support version suitable for OpenWrt release
timeframes, we're forced to frequently update it which is greatly
complicated by the package being nonshared.

People who want or need CPU crypto instruction support can enable it in
menuconfig while building custom images for the few platforms that support
them.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-07-30 12:21:54 +02:00
Rafał Miłecki
a8e1e30543 uboot-bcm4908: include SoC in output files
This fixes problem of overwriting BCM4908 U-Boot and DTB files by
BCM4912 ones. That bug didn't allow booting BCM4908 devices.

Fixes: f4c2dab544 ("uboot-bcm4908: add BCM4912 build")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-25 18:13:12 +02:00
Christian Lamparter
d4391ef073 layerscape: update remaining PKG_HASH / PKG_MIRROR_HASH
The change of the PKG_VERSION caused the hash of the package to
change. This is because the PKG_VERSION is present in the
internal directory structure of the archive.

Fixes: e879cccaa2 ("uboot-layerscape: update PKG_HASH")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-22 22:03:27 +02:00
David Bauer
a0b7fef0ff ramips: add support for ZyXEL NWA50AX / NWA55AXE
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>
2022-07-20 21:52:06 +02:00
Hauke Mehrtens
d1b5d17d03 wolfssl: Do not activate HW acceleration on armvirt by default
The armvirt target is also used to run OpenWrt in lxc on other targets
like a Raspberry Pi. If we set WOLFSSL_HAS_CPU_CRYPTO by default the
wolfssl binray is only working when the CPU supports the hardware crypto
extension.

Some targets like the Raspberry Pi do not support the ARM CPU crypto
extension, compile wolfssl without it by default. It is still possible
to activate it in custom builds.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-07-20 17:02:45 +02:00
Eneas U de Queiroz
bc43ad88ed
uencrypt: add package to decrypt WG4хх223 config
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>
2022-07-19 14:53:29 +02:00
Oleg S
6c7e337c80
ramips: Add support command fw_setsys for Xiaomi routers
The system parameters are contained in the Bdata partition.
To use the fw_setsys command, you need to create a file
fw_sys.config.
This file is created after calling the functions
ubootenv_add_uci_sys_config and ubootenv_add_app_config.

Signed-off-by: Oleg S <remittor@gmail.com>
[ wrapped commit description to 72 char ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-07-19 14:40:21 +02:00
Rosen Penev
5ad67cc513 libiconv-full: add host build
Now that libiconv-stub is gone, a replacement for its host build is
needed.

Fixes: c0ba4201f8 ("libiconv-stub: remove")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-17 14:21:03 +02:00
Christian Lamparter
b479db9062 sdk: add spidev-test to the bundle of userspace sources
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: bdaaf66e28 ("utils/spidev_test: build package directly from Linux")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-17 14:19:21 +02:00
Catalin Toda
488b25f5ac kernel: netconsole: add network console logging support
Accessing the console on many devices is difficult.
netconsole eases debugging on devices that crash
after the network is up.

Reference to the netconsole documentation in upstream Linux:
<https://www.kernel.org/doc/html/latest/networking/netconsole.html>
|
|netconsole=[+][src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]
|
| where
|  +            if present, enable extended console support
|  src-port     source for UDP packets (defaults to 6665)
|  src-ip       source IP to use (interface address)
|  dev          network interface (eth0)
|  tgt-port     port for logging agent (6666)
|  tgt-ip       IP address for logging agent
|  tgt-macaddr  ethernet MAC address for logging agent (broadcast)

OpenWrt specific notes:

OpenWrt's device userspace scripts are attaching the network
interface (i.e. eth0) to a (virtual) bridge (br-lan) device.
This will cause netconsole to report:
|network logging stopped on interface eth0 as it is joining a master device
(and unfortunately the traffic/logs to stop at this point)

As a workaround, the netconsole module can be manually loaded
again after the bridge has been setup with:

 insmod netconsole netconsole=@/br-lan,@192.168.1.x/MA:C...

One way of catching errors before the handoff, try to
append the /etc/modules.conf file with the following extra line:
 options netconsole netconsole=@/eth0,@192.168.1.x/MA:C...

and install the kmod-netconsole (=y) into the base image.

Signed-off-by: Catalin Toda <catalinii@yahoo.com>
(Added commit message from PR, added links to documentation)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-17 14:18:42 +02:00
Christian Lamparter
e879cccaa2 uboot-layerscape: update PKG_HASH
The change of the PKG_VERSION caused the hash of the package to
change. This is because the PKG_VERSION is present in the
internal directory structure of the uboot-layerscape-21.08.tar.xz
archive.

i.e:
 # tar tf uboot-layerscape-21.08.tar.xz:

uboot-layerscape-21.08/
uboot-layerscape-21.08/.azure-pipelines.yml
uboot-layerscape-21.08/.checkpatch.conf
uboot-layerscape-21.08/.gitattributes
uboot-layerscape-21.08/.github/
[...]

vs.

 # tar tf uboot-layerscape-LSDK-21.08.tar.xz
uboot-layerscape-LSDK-21.08/
uboot-layerscape-LSDK-21.08/.azure-pipelines.yml
uboot-layerscape-LSDK-21.08/.checkpatch.conf
uboot-layerscape-LSDK-21.08/.gitattributes
uboot-layerscape-LSDK-21.08/.github/
[...]

the (file) content of both archives are otherwise the same.

The PKG_HASH was taken from the builder log:
| Hash of the local file uboot-layerscape-21.08.tar.xz does not match
|(file: 54909a98bdcc26c7f9b35b35fcae09b977ecbf044be7bffa6dad9306c47cccf6,
|requested: 874e871755ef84ebbf3[...]) - deleting download.

without this update, the uboot-layerscape-21.08 package would
always try to download (from git), repacked the archive and
reupload to sources.openwrt.org (~14 MiB saved).

Fixes: 038d5bdab1 ("layerscape: use semantic versions for LSDK")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-17 14:14:54 +02:00
Rosen Penev
5dca7d7015 mbedtls: build with PIC
Fixes compilation with GCC12 and dependent packages for some reason.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-17 13:43:48 +02:00