While testing tools build on an alpine image it was found that with musl
libc some header are missing for elfutils tool.
Add extra prereq-build check to make sure these header are present in
the system to correctly compile host tools.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Add RequireCHeader helper that will try to compile a fake c program with
the requested header included.
This is useful to check if a specific header is present in the system
without checking for the specific path.
This is a generilized version of the current ncurses test.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The testing kernel has been available since early 2022, and is running
fine for several people. Let's switch to it by default.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Karl Palsson <karlp@etactica.com>
Tested-by: Jan-Niklas Burfeind <openwrt@aiyionpri.me>
While switching qoriq to kernel 5.15, the config for kernel 5.10 was
left behind. Drop it.
Fixes: 230f2fccd1 ("qoriq: switch to kernel 5.15")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
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>
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>
We're currently missing log output in cases where `configure` fails
which returns 77 as its error code:
make[3]: *** [Makefile:118: elfutils-0.188/.configured_889556d2f423f99e091beece9c8d870a] Error 77
So lets adjust the regexps so they can handle multiple digits.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This was build tested with all core packages on all targets
successfully.
Most packages from the feed are also building fine.
This was run tested on the following systems:
* lantiq/xrx200 musl
* pistachio/generic musl
* sunxi/cortexa53 musl
* x86/64 musl
* x86/64 glibc
* armvirt/64 musl
The size of the images stays more or less the same for MIPS BE and
aarch64. I haven't tested other architectures.
With GCC 11 I got these sizes for lantiq/xrx200:
7,219,848 openwrt-lantiq-xrx200-tplink_tdw8970-initramfs-kernel.bin
7,472,208 openwrt-lantiq-xrx200-tplink_tdw8970-squashfs-sysupgrade.bin
With GCC 12 I got these sizes for lantiq/xrx200:
7,217,355 openwrt-lantiq-xrx200-tplink_tdw8970-initramfs-kernel.bin
7,406,674 openwrt-lantiq-xrx200-tplink_tdw8970-squashfs-sysupgrade.bin
The sysupgrade image is probably padded. The initramfs image is 0.03% smaller.
With GCC 11 I got these sizes for armvirt/64:
4,143,943 openwrt-armvirt-64-default-rootfs.tar.gz
10,887,176 openwrt-armvirt-64-Image
24,911,880 openwrt-armvirt-64-Image-initramfs
4,141,572 openwrt-armvirt-64-rootfs.cpio.gz
4,255,854 openwrt-armvirt-64-rootfs-ext4.img.gz
3,391,178 openwrt-armvirt-64-rootfs-squashfs.img.gz
With GCC 12 I got these sizes for armvirt/64:
4,142,778 openwrt-armvirt-64-default-rootfs.tar.gz
10,887,176 openwrt-armvirt-64-Image
24,911,880 openwrt-armvirt-64-Image-initramfs
4,138,105 openwrt-armvirt-64-rootfs.cpio.gz
4,255,463 openwrt-armvirt-64-rootfs-ext4.img.gz
3,390,390 openwrt-armvirt-64-rootfs-squashfs.img.gz
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The version check which sets GCC_VERSION_FILE to the correct value only
worked when the advanced options menu was active and not when it was not
active.
Thank you Tony Butler for the fix.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
GCC 12.2.0 shows these error messages:
````
rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c: In function 'rtw_mfree_stainfo':
rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c:210:24: error: the comparison will always evaluate as 'true' for the address of 'lock' will never be NULL [-Werror=address]
210 | if(&psta->lock != NULL)
| ^~
In file included from rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:109,
from rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c:22:
rtl8812au-ct-2021-11-07-39df5596/include/sta_info.h:95:17: note: 'lock' declared here
95 | _lock lock;
| ^~~~
````
````
CC [M] rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.o
rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c: In function 'cfg80211_rtw_scan':
rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c:2176:32: warning: the comparison will always evaluate as 'true' for the address of 'ssid' will never be NULL [-Waddress]
2176 | if(ssids->ssid != NULL
| ^~
In file included from rtl8812au-ct-2021-11-07-39df5596/include/osdep_service_linux.h:88,
from rtl8812au-ct-2021-11-07-39df5596/include/osdep_service.h:41,
from rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:32,
from rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c:22:
/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/include/mac80211/net/cfg80211.h:2364:12: note: 'ssid' declared here
2364 | u8 ssid[IEEE80211_MAX_SSID_LEN];
| ^~~~
````
````
CC [M] rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.o
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c: In function 'phydm_cmd_parser':
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c:873:28: warning: the comparison will always evaluate as 'true' for the pointer operand in 'input + ((sizetype)i + 1) * 16' must not be NULL [-Waddress]
873 | if(input[i+1]) {
| ^~~~~
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c:894:28: warning: the comparison will always evaluate as 'true' for the pointer operand in 'input + ((sizetype)i + 1) * 16' must not be NULL [-Waddress]
894 | if(input[i+1]) {
| ^~~~~
````
This one was only seen on the rockchip/armv8 target:
````
CC [M] rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.o
In function '__nat25_add_pppoe_tag',
inlined from 'nat25_db_handle' at rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:909:10:
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:118:9: error: 'memcpy' reading between 2052 and 9220 bytes from a region of size 40 [-Werror=stringop-overread]
118 | memcpy((unsigned char *)ph->tag, tag, data_len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c: In function 'nat25_db_handle':
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:878:63: note: source object 'tag_buf' of size 40
878 | unsigned char tag_buf[40];
| ^~~~~~~
````
Most of them are looking like real errors to me, but some fixes need a
deeper understanding of the driver and probably bigger changes to the driver.
Ignore these error messages for now. It would be nice if someone would
fix them.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
GCC 12.2.0 shows this false positive error message:
````
uqmi-2022-05-04-56cb2d40/dev.c: In function 'qmi_request_wait':
uqmi-2022-05-04-56cb2d40/dev.c:217:23: error: storing the address of local variable 'complete' in '*req.complete' [-Werror=dangling-pointer=]
217 | req->complete = &complete;
| ~~~~~~~~~~~~~~^~~~~~~~~~~
uqmi-2022-05-04-56cb2d40/dev.c:208:14: note: 'complete' declared here
208 | bool complete = false;
| ^~~~~~~~
uqmi-2022-05-04-56cb2d40/dev.c:208:14: note: 'req' declared here
cc1: all warnings being treated as errors
````
and this one:
````
In file included from uqmi-2022-05-04-56cb2d40/commands.c:28:
In function 'blobmsg_close_table',
inlined from 'cmd_nas_get_cell_location_info_cb' at /home/haukeuqmi-2022-05-04-56cb2d40/commands-nas.c:897:4:
/usr/include/libubox/blobmsg.h:256:9: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized]
256 | blob_nest_end(buf, cookie);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from uqmi-2022-05-04-56cb2d40/commands.c:169:
uqmi-2022-05-04-56cb2d40/commands-nas.c: In function 'cmd_nas_get_cell_location_info_cb':
uqmi-2022-05-04-56cb2d40/commands-nas.c:713:15: note: 'c' was declared here
713 | void *c, *t, *cell, *freq;
| ^
cc1: all warnings being treated as errors
````
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
GCC 12.2.0 shows this false positive error message:
````
In function 'bigger_buffer',
inlined from '__libdw_gunzip' at gzip.c:374:12:
gzip.c:96:9: error: pointer may be used after 'realloc' [-Werror=use-after-free]
96 | b = realloc (state->buffer, more -= 1024);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gzip.c:94:13: note: call to 'realloc' here
94 | char *b = realloc (state->buffer, more);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
````
GCC bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The kernel configuration option is now available on kernel 5.10 and
5.15, add it to the config for 5.15 too.
Fixes: 8dfe69cdfc ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The kernel configuration option is now available on kernel 5.10 and
5.15, add it to the config for 5.15 too.
Fixes: 8dfe69cdfc ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Make the patches apply cleanly again.
Fixes: 8dfe69cdfc ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Added the full SFP description for both SFP ports (lan9, 10) on D-Link
DGS-1210-10MP, which enables hot-plug detection of SFP modules.
Added the patch to both kernel 5.10 and 5.15 dts files.
Signed-off-by: Daniel Groth <flygarn12@gmail.com>
The pins of the MT7530 switch that translate to GPIO 0, 3, 6, 9 and 12 has
got a function, by default, which does the same thing as the netdev
trigger. Because of bridge offloading on DSA, the netdev trigger won't see
the frames between the switch ports whilst the default function will.
Do not use the GPIO function on switch pins on devices that fall under this
category.
Keep it for:
mt7621_belkin_rt1800.dts: There's only one LED which is for the wan
interface and there's no bridge offloading between the "wan" interface and
other interfaces.
mt7621_yuncore_ax820.dts: There's no bridge offloading between the "wan"
and "lan" interfaces.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
The DAP-X1860 is a wall-plug AX1800 repeater.
Specifications:
- MT7621, 256 MiB RAM, 128 MiB SPI NAND
- MT7915 + MT7975 2x2 802.11ax (DBDC)
- Ethernet: 1 port 10/100/1000
- LED RSSI bargraph (2x green, 1x red/orange), status
and RSSI LEDs are incorrectly populated red/orange
(should be red/green according to documentation)
Installation:
- Keep reset button pressed during plug-in
- Web Recovery Updater is at 192.168.0.50
- Upload factory.bin, confirm flashing
(seems to work best with Chromium-based browsers)
Revert to OEM firmware:
- tar -xvf DAP-X1860_RevA_Firmware_101b94.bin
- openssl enc -d -md md5 -aes-256-cbc -in FWImage.st2 \
-out FWImage.st1 -k MB0dBx62oXJXDvt12lETWQ==
- tar -xvf FWImage.st1
- flash kernel_DAP-X1860.bin via Recovery
Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
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>
Changes from versions 4.1.* to version 4.2.0:
- The "fondue savoyarde" release.
- Binary compatible with MPFR 4.0.* and 4.1.*, though some minor changes in
the behavior of the formatted output functions may be visible, regarded
as underspecified behavior or bug fixes (see below).
- New functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_acosu, mpfr_asinu,
mpfr_atanu and mpfr_atan2u.
- New functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi, mpfr_acospi, mpfr_asinpi,
mpfr_atanpi and mpfr_atan2pi.
- New functions mpfr_log2p1, mpfr_log10p1, mpfr_exp2m1, mpfr_exp10m1 and
mpfr_compound_si.
- New functions mpfr_fmod_ui, mpfr_powr, mpfr_pown, mpfr_pow_uj, mpfr_pow_sj
and mpfr_rootn_si (mpfr_pown is actually a macro defined as an alias for
mpfr_pow_sj).
- Bug fixes.
In particular, for the formatted output functions (mpfr_printf, etc.),
the case where the precision consists only of a period has been fixed
to be like ".0" as specified in the ISO C standard, and the manual has
been corrected and clarified.
The macros of the custom interface have also been fixed: they now behave
like functions (except a minor limitation for mpfr_custom_init_set).
Remove upstreamed:
- 002-Fix-mpfr_custom_get_kind-macro-bug.patch
Refresh patches:
- 001-only_src.patch
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Add a separate firmware package to avoid installing the MT7615 firmware
on all MT7622 target devices by default. Now we only add MT7615 firmware
packages for devices that use MT7615E. This commit also removes the
explicit dependency on kmod-mt7615e to refine the package dependency.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
The mt7915e driver supports MT7915, MT7916 and MT7986 chips. And Only
MT7915 series chips need the MT7915 firmware. To save storage, extract
them from the common code package and create a new package to provide
the firmware.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
The kmod-mt7615-common package does not contain any code that
related to mt7915e Wi-Fi6 driver, so remove it.
Tested on ramips/mt7621: SIM SIMAX1800T
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
limit dictionary size patch was introduced to solve the well known
"LZMA ERROR 1 - must RESET board to recover" error.
09b6755946 "ramips: limit dictionary size for lzma compression"
It seems that it has failed recently and we can use lzma loader to fix
this error by adding "$(Device/uimage-lzma-loader)". So just remove it
to use the default parameter -d24 for a higher compression ratio.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Make the patches apply cleanly again.
Fixes: 8dfe69cdfc ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
1. Check for -EPROBE_DEFER
If it occurs we have to return immediately. Trying other properties
could result in another error and ignoring -EPROBE_DEFER which has a
special meaning.
2. Check for read result
Assuming property->read() success can result in NULL pointer
dereference. It happens e.g. for "mac-address" with NVMEM cell
containing invalid MAC.
3. Simplify code
Don't move cell reading & nvmem_cell_put() into a loop. Simplify loop
code.
Fixes: ecd81de7a5 ("ath79: add nvmem cell mac-address-ascii support")
Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This is no longer needed now that the kernel is built with a load
address that matches the one hard-coded in the bootloader.
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
In order to maximize the available space on UniFi AC boards using a
dual-image partition layout, combine the two OS partitions into a single
partition.
This allows users to access more usable space for additional packages.
Don't limit the usable image size to the size of a single OS partition.
The initial installation has to be done with an older version of OpenWrt
in case the generated image exceeds the space of a single kernel
partition in the future.
Signed-off-by: David Bauer <mail@david-bauer.net>
In order to maximize the available space on USW-Flex boards using a
dual-image partition layout, combine the two OS partitions into a single
partition.
This allows users to access more usable space for additional packages.
Don't limit the usable image size to the size of a single OS partition.
The initial installation has to be done with an older version of OpenWrt
in case the generated image exceeds the space of a single kernel
partition in the future.
Signed-off-by: David Bauer <mail@david-bauer.net>
In order to maximize the available space on OCEDO boards using a
dual-image partition layout, combine the two OS partitions into a single
partition.
This allows users to access more usable space for additional packages.
Don't limit the usable image size to the size of a single OS partition.
The initial installation has to be done with an older version of OpenWrt
in case the generated image exceeds the space of a single OS
partition in the future.
Signed-off-by: David Bauer <mail@david-bauer.net>
The GL-MV1000 ships with a 16MB spi-nor flash, containing a copy of the stock GL.iNet firmware.
Add the corresponding flash areas, so our view matches the one of the in-flash stock firmware.
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
Specifications
SoC: MT7621
CPU: 880 MHz
Flash: 32 MiB
RAM: 256 MiB
WLAN: MT7915 WiFi 6 (2.4/5 GHz)
Ethernet: 2x Gbit ports
MAC
LAN b4:4b:d6:2e:c7:b0 (label)
WAN b4:4b:d6:2e:c7:b1
WiFi 2.4 00:0c:43:26:46:08
WiFi 5 00:0c:43:26:59:97
Installation
There are two known options:
1) The Luci-based UI.
2) Press and hold the reset button during power up.
The router will request 'recovery.bin' from a TFTP server at
192.168.1.88.
Both options require a signed firmware binary.
The openwrt image supplied by cudy is signed and can be used to
install unsigned images.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
The EN25QH256A variant of the EN25QH256 doesn't initialize correctly from SFDP
alone and only accesses memory below 8m (addr_width is 4 but read_opcode takes
only 3 bytes).
Set SNOR_F_4B_OPCODES if the flash chip variant was detected using hwcaps.
The fix submitted upstream uses the PARSE_SFDP initializer that is not
available in the kernel used with Openwrt.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
22.03.1+ and snapshot builds no longer fit the 6M flash space
available for these models.
This disables failing buildbot image builds for these devices.
Images can still be built manually with ImageBuilder.
Signed-off-by: Joe Mullally <jwmullally@gmail.com>
This commits adds the makefile targets `depends` this wrapper is a call
to `opkg depends`. This command shows which runtime dependencies exist
if this package is installed into the image.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.
Merge art into partition node.
Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Keenetic KN-1613 is a 2.4/5 Ghz band 11ac (Wi-Fi 5) router, based on MT7628AN.
Specification:
- System-On-Chip: MT7628AN
- CPU/Speed: 580 MHz
- Flash-Chip: Winbond w25q256
- Flash size: 32768 KiB
- RAM: 128 MiB
- 4x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- UART (J1) header on PCB (115200 8n1)
- Wireless No1 (2T2R): SoC Built-in 2.4 GHz 802.11bgn
- Wireless No2 (2T2R): MT7613BE 5 GHz 802.11ac
- 4x LED, 2x button, 1x mode switch
Notes:
- The device supports dual boot mode
- The firmware partitions were concatinated into one
- The FN button led indicator has been reassigned as the 2.4GHz
wifi indicator.
Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:
1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-ramips-mt76x8-keenetic_kn-1613-squashfs-factory.bin"
to "KN-1613_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
the router and keep button pressed until power led start blinking.
4. Router will download file from server, write it to flash and reboot.
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>