Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-04-22 04:24:36 +08:00
commit 4125e01174
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
29 changed files with 457 additions and 287 deletions

View File

@ -97,21 +97,45 @@ identify_tar() {
}
nand_restore_config() {
sync
local ubidev=$( nand_find_ubi $CI_UBIPART )
local ubidev=$( nand_find_ubi "$CI_UBIPART" )
local ubivol="$( nand_find_volume $ubidev rootfs_data )"
[ ! "$ubivol" ] &&
ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )"
if [ ! "$ubivol" ]; then
ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )"
if [ ! "$ubivol" ]; then
echo "cannot find ubifs data volume"
return 1
fi
fi
mkdir /tmp/new_root
if ! mount -t ubifs /dev/$ubivol /tmp/new_root; then
echo "mounting ubifs $ubivol failed"
echo "cannot mount ubifs volume $ubivol"
rmdir /tmp/new_root
return 1
fi
mv "$1" "/tmp/new_root/$BACKUP_FILE"
umount /tmp/new_root
sync
if mv "$1" "/tmp/new_root/$BACKUP_FILE"; then
if umount /tmp/new_root; then
echo "configuration saved"
rmdir /tmp/new_root
return 0
fi
else
umount /tmp/new_root
fi
echo "could not save configuration to ubifs volume $ubivol"
rmdir /tmp/new_root
return 1
}
nand_remove_ubiblock() {
local ubivol=$1
local ubiblk=ubiblock${ubivol:3}
if [ -e /dev/$ubiblk ]; then
echo "removing $ubiblk"
if ! ubiblock -r /dev/$ubivol; then
echo "cannot remove $ubiblk"
return 1
fi
fi
}
nand_upgrade_prepare_ubi() {
@ -134,56 +158,49 @@ nand_upgrade_prepare_ubi() {
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
if [ ! "$ubidev" ]; then
ubiattach -m "$mtdnum"
sync
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
fi
if [ ! "$ubidev" ]; then
ubiformat /dev/mtd$mtdnum -y
ubiattach -m "$mtdnum"
sync
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
[ ! "$ubidev" ] && return 1
[ "$has_env" -gt 0 ] && {
ubimkvol /dev/$ubidev -n 0 -N ubootenv -s 1MiB
ubimkvol /dev/$ubidev -n 1 -N ubootenv2 -s 1MiB
}
fi
if [ ! "$ubidev" ]; then
ubiformat /dev/mtd$mtdnum -y
ubiattach -m "$mtdnum"
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
local kern_ubivol="$( nand_find_volume $ubidev $CI_KERNPART )"
local root_ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )"
local data_ubivol="$( nand_find_volume $ubidev rootfs_data )"
if [ ! "$ubidev" ]; then
echo "cannot attach ubi mtd partition $CI_UBIPART"
return 1
fi
local ubiblk ubiblkvol
for ubiblk in /dev/ubiblock${ubidev:3}_* ; do
[ -e "$ubiblk" ] || continue
case "$ubiblk" in
/dev/ubiblock*_*p*)
continue
;;
esac
echo "removing ubiblock${ubiblk:13}"
ubiblkvol=ubi${ubiblk:13}
if ! ubiblock -r /dev/$ubiblkvol; then
echo "cannot remove $ubiblk"
return 1
if [ "$has_env" -gt 0 ]; then
ubimkvol /dev/$ubidev -n 0 -N ubootenv -s 1MiB
ubimkvol /dev/$ubidev -n 1 -N ubootenv2 -s 1MiB
fi
fi
done
fi
local kern_ubivol="$( nand_find_volume $ubidev "$CI_KERNPART" )"
local root_ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )"
local data_ubivol="$( nand_find_volume $ubidev rootfs_data )"
[ "$root_ubivol" = "$kern_ubivol" ] && root_ubivol=
# remove ubiblocks
[ "$kern_ubivol" ] && { nand_remove_ubiblock $kern_ubivol || return 1; }
[ "$root_ubivol" ] && { nand_remove_ubiblock $root_ubivol || return 1; }
[ "$data_ubivol" ] && { nand_remove_ubiblock $data_ubivol || return 1; }
# kill volumes
[ "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N $CI_KERNPART || :
[ "$root_ubivol" -a "$root_ubivol" != "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N $CI_ROOTPART || :
[ "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N "$CI_KERNPART" || :
[ "$root_ubivol" ] && ubirmvol /dev/$ubidev -N "$CI_ROOTPART" || :
[ "$data_ubivol" ] && ubirmvol /dev/$ubidev -N rootfs_data || :
# update kernel
# create kernel vol
if [ -n "$kernel_length" ]; then
if ! ubimkvol /dev/$ubidev -N $CI_KERNPART -s $kernel_length; then
if ! ubimkvol /dev/$ubidev -N "$CI_KERNPART" -s $kernel_length; then
echo "cannot create kernel volume"
return 1;
fi
fi
# update rootfs
# create rootfs vol
if [ -n "$rootfs_length" ]; then
local rootfs_size_param
if [ "$rootfs_type" = "ubifs" ]; then
@ -191,13 +208,13 @@ nand_upgrade_prepare_ubi() {
else
rootfs_size_param="-s $rootfs_length"
fi
if ! ubimkvol /dev/$ubidev -N $CI_ROOTPART $rootfs_size_param; then
if ! ubimkvol /dev/$ubidev -N "$CI_ROOTPART" $rootfs_size_param; then
echo "cannot create rootfs volume"
return 1;
fi
fi
# create rootfs_data for non-ubifs rootfs
# create rootfs_data vol for non-ubifs rootfs
if [ "$rootfs_type" != "ubifs" ]; then
local rootfs_data_size_param="-m"
if [ -n "$rootfs_data_max" ]; then
@ -210,16 +227,15 @@ nand_upgrade_prepare_ubi() {
fi
fi
fi
sync
return 0
}
nand_do_upgrade_success() {
local conf_tar="/tmp/sysupgrade.tgz"
sync
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
echo "sysupgrade successful"
if { [ ! -f "$conf_tar" ] || nand_restore_config "$conf_tar"; } && sync; then
echo "sysupgrade successful"
fi
umount -a
reboot -f
}
@ -229,11 +245,6 @@ nand_upgrade_ubinized() {
local ubi_file="$1"
local mtdnum="$(find_mtd_index "$CI_UBIPART")"
[ ! "$mtdnum" ] && {
CI_UBIPART="rootfs"
mtdnum="$(find_mtd_index "$CI_UBIPART")"
}
if [ ! "$mtdnum" ]; then
echo "cannot find mtd device $CI_UBIPART"
umount -a
@ -241,10 +252,10 @@ nand_upgrade_ubinized() {
fi
local mtddev="/dev/mtd${mtdnum}"
ubidetach -p "${mtddev}" || true
sync
ubidetach -p "${mtddev}" || :
ubiformat "${mtddev}" -y -f "${ubi_file}"
ubiattach -p "${mtddev}"
nand_do_upgrade_success
}
@ -255,7 +266,7 @@ nand_upgrade_ubifs() {
nand_upgrade_prepare_ubi "$rootfs_length" "ubifs" "" ""
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
local root_ubivol="$(nand_find_volume $ubidev $CI_ROOTPART)"
local root_ubivol="$(nand_find_volume $ubidev "$CI_ROOTPART")"
ubiupdatevol /dev/$root_ubivol -s $rootfs_length $1
nand_do_upgrade_success
@ -276,59 +287,64 @@ nand_upgrade_fit() {
nand_upgrade_tar() {
local tar_file="$1"
local kernel_mtd="$(find_mtd_index $CI_KERNPART)"
local board_dir=$(tar tf "$tar_file" | grep -m 1 '^sysupgrade-.*/$')
board_dir=${board_dir%/}
local board_dir="$(tar tf "$tar_file" | grep -m 1 '^sysupgrade-.*/$')"
board_dir="${board_dir%/}"
kernel_length=$( (tar xf "$tar_file" ${board_dir}/kernel -O | wc -c) 2> /dev/null)
local has_rootfs=0
local rootfs_length
local kernel_mtd kernel_length
if [ "$CI_KERNPART" != "none" ]; then
kernel_mtd="$(find_mtd_index "$CI_KERNPART")"
kernel_length=$( (tar xf "$tar_file" "$board_dir/kernel" -O | wc -c) 2> /dev/null)
[ "$kernel_length" = 0 ] && kernel_length=
fi
local rootfs_length=$( (tar xf "$tar_file" "$board_dir/root" -O | wc -c) 2> /dev/null)
[ "$rootfs_length" = 0 ] && rootfs_length=
local rootfs_type
[ "$rootfs_length" ] && rootfs_type="$(identify_tar "$tar_file" "$board_dir/root")"
tar tf "$tar_file" ${board_dir}/root 1>/dev/null 2>/dev/null && has_rootfs=1
[ "$has_rootfs" = "1" ] && {
rootfs_length=$( (tar xf "$tar_file" ${board_dir}/root -O | wc -c) 2> /dev/null)
rootfs_type="$(identify_tar "$tar_file" ${board_dir}/root)"
}
local has_kernel=1
local ubi_kernel_length
if [ "$kernel_length" ]; then
if [ "$kernel_mtd" ]; then
mtd erase "$CI_KERNPART"
else
ubi_kernel_length="$kernel_length"
fi
fi
local has_env=0
[ "$kernel_length" != 0 -a -n "$kernel_mtd" ] && {
tar xf "$tar_file" ${board_dir}/kernel -O | mtd write - $CI_KERNPART
}
[ "$kernel_length" = 0 -o ! -z "$kernel_mtd" ] && has_kernel=
[ "$CI_KERNPART" = "none" ] && has_kernel=
nand_upgrade_prepare_ubi "$rootfs_length" "$rootfs_type" "${has_kernel:+$kernel_length}" "$has_env"
nand_upgrade_prepare_ubi "$rootfs_length" "$rootfs_type" "$ubi_kernel_length" "$has_env"
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
[ "$has_kernel" = "1" ] && {
local kern_ubivol="$( nand_find_volume $ubidev $CI_KERNPART )"
tar xf "$tar_file" ${board_dir}/kernel -O | \
ubiupdatevol /dev/$kern_ubivol -s $kernel_length -
}
[ "$has_rootfs" = "1" ] && {
local root_ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )"
tar xf "$tar_file" ${board_dir}/root -O | \
if [ "$rootfs_length" ]; then
local root_ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )"
tar xf "$tar_file" "$board_dir/root" -O | \
ubiupdatevol /dev/$root_ubivol -s $rootfs_length -
}
fi
if [ "$kernel_length" ]; then
if [ "$kernel_mtd" ]; then
tar xf "$tar_file" "$board_dir/kernel" -O | \
mtd -n write - "$CI_KERNPART"
else
local kern_ubivol="$( nand_find_volume $ubidev "$CI_KERNPART" )"
tar xf "$tar_file" "$board_dir/kernel" -O | \
ubiupdatevol /dev/$kern_ubivol -s $kernel_length -
fi
fi
nand_do_upgrade_success
}
# Recognize type of passed file and start the upgrade process
nand_do_upgrade() {
local file_type=$(identify $1)
local file_type=$(identify "$1")
[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs"
[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART=rootfs
sync
case "$file_type" in
"fit") nand_upgrade_fit $1;;
"ubi") nand_upgrade_ubinized $1;;
"ubifs") nand_upgrade_ubifs $1;;
*) nand_upgrade_tar $1;;
"fit") nand_upgrade_fit "$1";;
"ubi") nand_upgrade_ubinized "$1";;
"ubifs") nand_upgrade_ubifs "$1";;
*) nand_upgrade_tar "$1";;
esac
}

View File

@ -15,7 +15,7 @@
+ ranges;
+
+ /* 64 KiB reserved for ramoops/pstore */
+ ramoops@0x42ff0000 {
+ ramoops@42ff0000 {
+ compatible = "ramoops";
+ reg = <0 0x42ff0000 0 0x10000>;
+ record-size = <0x1000>;

View File

@ -1,60 +1,36 @@
From patchwork Mon Mar 21 23:22:23 2022
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
X-Patchwork-Id: 1607954
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Date: Mon, 21 Mar 2022 23:22:23 +0000
From 5f2d5915f8ea4785bc2b8a26955e176a7898c15b Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
To: u-boot@lists.denx.de
Cc: Simon Glass <sjg@chromium.org>, Alexandru Gagniuc <mr.nuke.me@gmail.com>,
Patrick Delaunay <patrick.delaunay@foss.st.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Tue, 12 Apr 2022 21:00:43 +0100
Subject: [PATCH] image-fdt: save name of FIT configuration in '/chosen' node
Message-ID: <YjkIr8wmz1XEOVNh@makrotopia.org>
MIME-Version: 1.0
Content-Disposition: inline
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
It can be useful for the OS (Linux) to know which configuration has
been chosen by U-Boot when launching a FIT image.
Store the name of the FIT configuration node used in a new string
attribute called 'bootconf' in the '/chosen' node in device tree.
property called 'u-boot,bootconf' in the '/chosen' node in device tree.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
boot/image-fdt.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 692a9ad3e4..4017bc94a6 100644
index 692a9ad3e4..fdb69926a2 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -601,6 +601,12 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
goto err;
}
+ /* Store name of configuration node as bootconf in /chosen node */
+ /* Store name of configuration node as u-boot,bootconf in /chosen node */
+ if (images->fit_uname_cfg)
+ fdt_find_and_setprop(blob, "/chosen", "bootconf",
+ fdt_find_and_setprop(blob, "/chosen", "u-boot,bootconf",
+ images->fit_uname_cfg,
+ strlen(images->fit_uname_cfg) + 1, 1);
+
/* Update ethernet nodes */
fdt_fixup_ethernet(blob);
#if CONFIG_IS_ENABLED(CMD_PSTORE)
--
2.35.3

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=linux-firmware
PKG_VERSION:=20220209
PKG_VERSION:=20220411
PKG_RELEASE:=1
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_HASH:=e2e46fa618414952bbf2f6920cd3abcddbef45bfb7d1352994b4bfc35394d177
PKG_HASH:=020b11f6412f4956f5a6f98de7d41867d2b30ea0ce81b1e2d206ec9840363849
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>

View File

@ -0,0 +1,47 @@
From 4509e523dba46f789377cfec6f20579adf743416 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= <hacks+kernel@slashdirt.org>
Date: Sun, 17 Apr 2022 11:31:35 +0200
Subject: [PATCH v2] ath9k: fix QCA9561 PA bias level
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This patch fixes an invalid TX PA DC bias level on QCA9561, which
results in a very low output power and very low throughput as devices
are further away from the AP (compared to other 2.4GHz APs).
This patch was suggested by Felix Fietkau, who noted[1]:
"The value written to that register is wrong, because while the mask
definition AR_CH0_TOP2_XPABIASLVL uses a different value for 9561, the
shift definition AR_CH0_TOP2_XPABIASLVL_S is hardcoded to 12, which is
wrong for 9561."
In real life testing, without this patch the 2.4GHz throughput on
Yuncore XD3200 is around 10Mbps sitting next to the AP, and closer to
practical maximum with the patch applied.
[1] https://lore.kernel.org/all/91c58969-c60e-2f41-00ac-737786d435ae@nbd.name
Signed-off-by: Thibaut VARÈNE <hacks+kernel@slashdirt.org>
---
v2: Adjust #define per Felix's suggestion
---
drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
index a171dbb29..ad949eb02 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
@@ -720,7 +720,7 @@
#define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \
(AR_SREV_9462(ah) ? 0x16290 : 0x16284))
#define AR_CH0_TOP2_XPABIASLVL (AR_SREV_9561(ah) ? 0x1e00 : 0xf000)
-#define AR_CH0_TOP2_XPABIASLVL_S 12
+#define AR_CH0_TOP2_XPABIASLVL_S (AR_SREV_9561(ah) ? 9 : 12)
#define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \
((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16298 : \
--
2.30.2

View File

@ -1,18 +0,0 @@
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3604,10 +3604,13 @@ static void ar9003_hw_xpa_bias_level_app
{
int bias = ar9003_modal_header(ah, is2ghz)->xpaBiasLvl;
+
+
if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah) ||
- AR_SREV_9531(ah) || AR_SREV_9561(ah))
+ AR_SREV_9531(ah))
REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias);
- else if (AR_SREV_9462(ah) || AR_SREV_9550(ah) || AR_SREV_9565(ah))
+ else if (AR_SREV_9462(ah) || AR_SREV_9550(ah) || AR_SREV_9565(ah) ||
+ AR_SREV_9561(ah))
REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
else {
REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);

View File

@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-04-07
PKG_SOURCE_VERSION:=506bb0605e3e2fa4c5285e6c8866167691a6d71b
PKG_MIRROR_HASH:=4c60255d5899e2aac48dad6129d000163aa9ce18ed3ed0cd7e223298a10cc4e7
PKG_SOURCE_DATE:=2022-04-20
PKG_SOURCE_VERSION:=eecbb49920732b9b364f15c1ef0066342544b22b
PKG_MIRROR_HASH:=1a5c171d1713baadd5ba7da3c036a129a0ac318e5b3f4e98f719e9a92a510c44
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_USE_NINJA:=0

View File

@ -0,0 +1,19 @@
From 096889927d9528d4fbeb3aab56d1fe8225d2e7ec Mon Sep 17 00:00:00 2001
From: Daniel Pouzzner <douzzer@wolfssl.com>
Date: Thu, 14 Apr 2022 20:23:31 -0500
Subject: [PATCH] wolfcrypt/src/port/devcrypto/devcrypto_aes.c: remove
redundant "int ret" in wc_AesCtrEncrypt() (supersedes #5052).
diff --git a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
index 3bc1d5bb1..28e145e27 100644
--- a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
+++ b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
@@ -208,7 +208,6 @@ int wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
int ret;
struct crypt_op crt;
byte* tmp;
- int ret;
if (aes == NULL || out == NULL || in == NULL) {
return BAD_FUNC_ARG;

View File

@ -179,20 +179,20 @@ for file_mode in $file_modes; do
chown "$uid:$gid" "$pkg_dir/$path"
chmod "$mode" "$pkg_dir/$path"
done
$TAR -X "$tmp_dir"/tarX --format=gnu --sort=name -cpf - --mtime="$TIMESTAMP" . | gzip -n - > "$tmp_dir"/data.tar.gz
$TAR -X "$tmp_dir"/tarX --format=gnu --numeric-owner --sort=name -cpf - --mtime="$TIMESTAMP" . | gzip -n - > "$tmp_dir"/data.tar.gz
installed_size=$(stat -c "%s" "$tmp_dir"/data.tar.gz)
sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
"$pkg_dir"/$CONTROL/control
( cd "$pkg_dir"/$CONTROL && $TAR --format=gnu --sort=name -cf - --mtime="$TIMESTAMP" . | gzip -n - > "$tmp_dir"/control.tar.gz )
( cd "$pkg_dir"/$CONTROL && $TAR --format=gnu --numeric-owner --sort=name -cf - --mtime="$TIMESTAMP" . | gzip -n - > "$tmp_dir"/control.tar.gz )
rm "$tmp_dir"/tarX
echo "2.0" > "$tmp_dir"/debian-binary
pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk
rm -f "$pkg_file"
( cd "$tmp_dir" && $TAR --format=gnu --sort=name -cf - --mtime="$TIMESTAMP" ./debian-binary ./data.tar.gz ./control.tar.gz | gzip -n - > "$pkg_file" )
( cd "$tmp_dir" && $TAR --format=gnu --numeric-owner --sort=name -cf - --mtime="$TIMESTAMP" ./debian-binary ./data.tar.gz ./control.tar.gz | gzip -n - > "$pkg_file" )
rm "$tmp_dir"/debian-binary "$tmp_dir"/data.tar.gz "$tmp_dir"/control.tar.gz
rmdir "$tmp_dir"

View File

@ -0,0 +1,58 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca9533_mikrotik_routerboard-16m.dtsi"
/ {
compatible = "mikrotik,routerboard-wap-2nd", "qca,qca9533";
model = "MikroTik RouterBOARD wAP-2nD (wAP)";
aliases {
led-boot = &led_user;
led-failsafe = &led_user;
led-running = &led_user;
led-upgrade = &led_user;
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_lan_pin>;
lan {
label = "green:lan";
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
wlan {
label = "green:wlan";
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led_user: user {
label = "green:user";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
};
};
&eth0 {
status = "okay";
phy-handle = <&swphy0>;
gmac-config {
device = <&gmac>;
switch-phy-swap = <1>;
};
};
&eth1 {
compatible = "syscon", "simple-mfd";
};
&pinmux {
led_lan_pin: pinmux_led_lan_pin {
pinctrl-single,bits = <0x4 0x0 0xff>;
};
};

View File

@ -101,3 +101,11 @@ define Device/mikrotik_routerboard-wapr-2nd
IMAGE_SIZE := 16256k
endef
TARGET_DEVICES += mikrotik_routerboard-wapr-2nd
define Device/mikrotik_routerboard-wap-2nd
$(Device/mikrotik_nor)
SOC := qca9533
DEVICE_MODEL := RouterBOARD wAP-2nD (wAP)
IMAGE_SIZE := 16256k
endef
TARGET_DEVICES += mikrotik_routerboard-wap-2nd

View File

@ -7,7 +7,8 @@ board=$(board_name)
case "$board" in
mikrotik,routerboard-lhg-2nd|\
mikrotik,routerboard-mapl-2nd)
mikrotik,routerboard-mapl-2nd|\
mikrotik,routerboard-wap-2nd)
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
;;
mikrotik,routerboard-lhg-5nd)

View File

@ -19,6 +19,7 @@ ath79_setup_interfaces()
mikrotik,routerboard-lhg-5nd|\
mikrotik,routerboard-mapl-2nd|\
mikrotik,routerboard-sxt-5nd-r2|\
mikrotik,routerboard-wap-2nd|\
mikrotik,routerboard-wap-g-5hact2hnd|\
mikrotik,routerboard-wapr-2nd)
ucidef_set_interface_lan "eth0"
@ -47,6 +48,7 @@ ath79_setup_macs()
mikrotik,routerboard-lhg-5nd|\
mikrotik,routerboard-mapl-2nd|\
mikrotik,routerboard-sxt-5nd-r2|\
mikrotik,routerboard-wap-2nd|\
mikrotik,routerboard-wap-g-5hact2hnd|\
mikrotik,routerboard-wapr-2nd)
label_mac="$mac_base"

View File

@ -27,6 +27,7 @@ case "$FIRMWARE" in
mikrotik,routerboard-lhg-2nd|\
mikrotik,routerboard-lhg-5nd|\
mikrotik,routerboard-sxt-5nd-r2|\
mikrotik,routerboard-wap-2nd|\
mikrotik,routerboard-wapr-2nd)
caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 1)
;;

View File

@ -3534,6 +3534,8 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_MPL115_SPI is not set
# CONFIG_MPL3115 is not set
# CONFIG_MPLS is not set
# CONFIG_MPLS_IPTUNNEL is not set
# CONFIG_MPLS_ROUTING is not set
# CONFIG_MPTCP is not set
# CONFIG_MPU3050_I2C is not set
# CONFIG_MQ_IOSCHED_DEADLINE is not set

View File

@ -3666,6 +3666,8 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_MPL115_SPI is not set
# CONFIG_MPL3115 is not set
# CONFIG_MPLS is not set
# CONFIG_MPLS_IPTUNNEL is not set
# CONFIG_MPLS_ROUTING is not set
# CONFIG_MPTCP is not set
# CONFIG_MPU3050_I2C is not set
# CONFIG_MQ_IOSCHED_DEADLINE is not set

View File

@ -148,7 +148,7 @@ int parse_fit_partitions(struct parsed_partitions *state, u64 fit_start_sector,
np = of_find_node_by_path("/chosen");
if (np)
bootconf = of_get_property(np, "bootconf", NULL);
bootconf = of_get_property(np, "u-boot,bootconf", NULL);
else
bootconf = NULL;

View File

@ -38,26 +38,3 @@ define KernelPackage/sdhci-mtk
endef
$(eval $(call KernelPackage,sdhci-mtk))
define KernelPackage/crypto-hw-mtk
TITLE:= MediaTek's Crypto Engine module
DEPENDS:=@TARGET_mediatek
KCONFIG:= \
CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_AES=y \
CONFIG_CRYPTO_AEAD=y \
CONFIG_CRYPTO_SHA1=y \
CONFIG_CRYPTO_SHA256=y \
CONFIG_CRYPTO_SHA512=y \
CONFIG_CRYPTO_HMAC=y \
CONFIG_CRYPTO_DEV_MEDIATEK
FILES:=$(LINUX_DIR)/drivers/crypto/mediatek/mtk-crypto.ko
AUTOLOAD:=$(call AutoLoad,90,mtk-crypto)
$(call AddDepends/crypto)
endef
define KernelPackage/crypto-hw-mtk/description
MediaTek's EIP97 Cryptographic Engine driver.
endef
$(eval $(call KernelPackage,crypto-hw-mtk))

View File

@ -14,7 +14,7 @@
ranges;
+ /* 64 KiB reserved for ramoops/pstore */
+ ramoops@0x42ff0000 {
+ ramoops@42ff0000 {
+ compatible = "ramoops";
+ reg = <0 0x42ff0000 0 0x10000>;
+ record-size = <0x1000>;

View File

@ -14,7 +14,7 @@
ranges;
+ /* 64 KiB reserved for ramoops/pstore */
+ ramoops@0x42ff0000 {
+ ramoops@42ff0000 {
+ compatible = "ramoops";
+ reg = <0 0x42ff0000 0 0x10000>;
+ record-size = <0x1000>;

View File

@ -0,0 +1,158 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "oraybox,x3a", "mediatek,mt7621-soc";
model = "OrayBox X3A";
aliases {
led-boot = &led_status_green;
led-failsafe = &led_status_red;
led-running = &led_status_blue;
led-upgrade = &led_status_green;
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
led_status_red: status-red {
label = "red:status";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_status_blue: status-blue {
label = "blue:status";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
led_status_green: status-green {
label = "green:status";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <30000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xf00000>;
};
partition@fe0000 {
label = "bdinfo";
reg = <0xfe0000 0x10000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_bdinfo_9: macaddr@9 {
reg = <0x9 0x6>;
};
};
partition@ff0000 {
label = "reserve";
reg = <0xff0000 0x10000>;
read-only;
};
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_bdinfo_9>;
nvmem-cell-names = "mac-address";
};
&switch0 {
ports {
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan1";
};
port@4 {
status = "okay";
label = "wan";
nvmem-cells = <&macaddr_bdinfo_9>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
groups = "jtag", "wdt";
function = "gpio";
};
};

View File

@ -1389,6 +1389,16 @@ define Device/netis_wf2881
endef
TARGET_DEVICES += netis_wf2881
define Device/oraybox_x3a
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 15360k
DEVICE_VENDOR := OrayBox
DEVICE_MODEL := X3A
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += oraybox_x3a
define Device/phicomm_k2p
$(Device/dsa-migration)
IMAGE_SIZE := 15744k

View File

@ -103,6 +103,10 @@ netgear,r7450)
ucidef_set_led_netdev "lan3" "LAN3" "white:lan3" "lan3"
ucidef_set_led_netdev "lan4" "LAN4" "white:lan4" "lan4"
;;
oraybox,x3a)
ucidef_set_led_netdev "wan" "wan link" "red:status" "wan"
ucidef_set_led_netdev "lan" "lan link" "green:status" "br-lan"
;;
tplink,archer-a6-v3|\
tplink,archer-c6-v3|\
tplink,archer-c6u-v1)

View File

@ -44,6 +44,7 @@ ramips_setup_interfaces()
jcg,q20|\
lenovo,newifi-d1|\
mikrotik,routerboard-m33g|\
oraybox,x3a|\
renkforce,ws-wn530hp3-a|\
xiaomi,mi-router-3g|\
xiaomi,mi-router-3g-v2|\

View File

@ -71,6 +71,12 @@ case "$board" in
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
;;
oraybox,x3a)
if [ "$PHYNBR" = "1" ]; then
hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
macaddr_setbit_la "$(macaddr_add $hw_mac_addr 0x100000)" > /sys${DEVPATH}/macaddress
fi
;;
raisecom,msg1500-x-00)
[ "$PHYNBR" = "0" ] && \
macaddr_setbit_la "$(mtd_get_mac_ascii Config protest_lan_mac)" \

View File

@ -1,50 +0,0 @@
From 3d00da1de3ea36ba44f4a7ba76c8c8b16f98204b Mon Sep 17 00:00:00 2001
From: "Enrico Weigelt, metux IT consult" <info@metux.net>
Date: Thu, 12 Dec 2019 14:27:56 +0100
Subject: [PATCH] platform/x86: pcengines-apuv2: detect apuv4 board
GPIO stuff on APUv4 seems to be the same as on APUv2, so we just
need to match on DMI data.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/platform/x86/pcengines-apuv2.c | 27 ++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
--- a/drivers/platform/x86/pcengines-apuv2.c
+++ b/drivers/platform/x86/pcengines-apuv2.c
@@ -215,6 +215,33 @@ static const struct dmi_system_id apu_gp
},
.driver_data = (void *)&board_apu2,
},
+ /* APU4 w/ legacy bios < 4.0.8 */
+ {
+ .ident = "apu4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "APU4")
+ },
+ .driver_data = (void *)&board_apu2,
+ },
+ /* APU4 w/ legacy bios >= 4.0.8 */
+ {
+ .ident = "apu4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "apu4")
+ },
+ .driver_data = (void *)&board_apu2,
+ },
+ /* APU4 w/ mainline bios */
+ {
+ .ident = "apu4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu4")
+ },
+ .driver_data = (void *)&board_apu2,
+ },
{}
};

View File

@ -1,50 +0,0 @@
From 3d00da1de3ea36ba44f4a7ba76c8c8b16f98204b Mon Sep 17 00:00:00 2001
From: "Enrico Weigelt, metux IT consult" <info@metux.net>
Date: Thu, 12 Dec 2019 14:27:56 +0100
Subject: [PATCH] platform/x86: pcengines-apuv2: detect apuv4 board
GPIO stuff on APUv4 seems to be the same as on APUv2, so we just
need to match on DMI data.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/platform/x86/pcengines-apuv2.c | 27 ++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
--- a/drivers/platform/x86/pcengines-apuv2.c
+++ b/drivers/platform/x86/pcengines-apuv2.c
@@ -215,6 +215,33 @@ static const struct dmi_system_id apu_gp
},
.driver_data = (void *)&board_apu2,
},
+ /* APU4 w/ legacy bios < 4.0.8 */
+ {
+ .ident = "apu4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "APU4")
+ },
+ .driver_data = (void *)&board_apu2,
+ },
+ /* APU4 w/ legacy bios >= 4.0.8 */
+ {
+ .ident = "apu4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "apu4")
+ },
+ .driver_data = (void *)&board_apu2,
+ },
+ /* APU4 w/ mainline bios */
+ {
+ .ident = "apu4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu4")
+ },
+ .driver_data = (void *)&board_apu2,
+ },
{}
};

View File

@ -12,8 +12,8 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=72123e1b56f53f9205bb105f8a62d0869b837b22
PKG_MIRROR_HASH:=934ec7067d41da0b76b8f29a1cd03b10ba9d98c2f761f7b32f8595e59ac2b428
PKG_SOURCE_VERSION:=b87b697f15d6bf7e576a2eeadc1f740172f9d013
PKG_MIRROR_HASH:=c65c9600292bfb73118793ff268aac7561e6c3c90f6c152a8b334fd6eddc0838
PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz

View File

@ -596,7 +596,7 @@ provides them.
/* The enhanced internationalization capabilities according to XPG4.2
are present. */
#define _XOPEN_ENH_I18N 1
@@ -1146,17 +1149,25 @@ ssize_t copy_file_range (int __infd, __o
@@ -1150,17 +1153,25 @@ ssize_t copy_file_range (int __infd, __o
extern int fdatasync (int __fildes);
#endif /* Use POSIX199309 */
@ -627,7 +627,7 @@ provides them.
range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -968,6 +968,12 @@ extern int getsubopt (char **__restrict
@@ -969,6 +969,12 @@ extern int getsubopt (char **__restrict
#endif