Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  fstools: fix ntfs3 mount with utf-8
  treewide: sync with upstream (coolsnowwolf#10658)
  rockchip: add wireless support for H68K
  • Loading branch information
github-actions[bot] committed Dec 22, 2022
2 parents 22bd2c9 + 317d92d commit 23a34d4
Show file tree
Hide file tree
Showing 37 changed files with 137 additions and 5,500 deletions.
2 changes: 1 addition & 1 deletion include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ define Build/fit
endef

define Build/gzip
gzip -f -9n -c $@ $(1) > $@.new
$(STAGING_DIR_HOST)/bin/gzip -f -9n -c $@ $(1) > $@.new
@mv $@.new $@
endef

Expand Down
1 change: 1 addition & 0 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ define Device/Build/compile
$$(_COMPILE_TARGET): $(KDIR)/$(1)
$(eval $(call Device/Export,$(KDIR)/$(1)))
$(KDIR)/$(1): FORCE
rm -f $(KDIR)/$(1)
$$(call concat_cmd,$(COMPILE/$(1)))

endef
Expand Down
2 changes: 1 addition & 1 deletion include/trusted-firmware-a.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME ?= trusted-firmware-a
PKG_CPE_ID ?= cpe:/a:arm:arm_trusted_firmware
PKG_CPE_ID ?= cpe:/a:arm:trusted_firmware-a

ifndef PKG_SOURCE_PROTO
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
Expand Down
3 changes: 1 addition & 2 deletions package/kernel/ath10k-ct/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
endif

define Build/Compile
+$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
+$(KERNEL_MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
Expand Down
3 changes: 1 addition & 2 deletions package/kernel/broadcom-wl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ define Package/nas/description
proprietary Broadcom wl driver.
endef

MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
MAKE_KMOD := $(KERNEL_MAKE) \
PATH="$(TARGET_PATH)" \
M="$(PKG_BUILD_DIR)/kmod" \

Expand Down
8 changes: 1 addition & 7 deletions package/kernel/gpio-button-hotplug/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,8 @@ define KernelPackage/gpio-button-hotplug/description
an overkill for OpenWrt simple needs.
endef

MAKE_OPTS:= \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)"

define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules
endef

$(eval $(call KernelPackage,gpio-button-hotplug))
3 changes: 1 addition & 2 deletions package/kernel/gpio-nct5104d/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ define KernelPackage/gpio-nct5104d/description
endef

define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
$(KERNEL_MAKE) \
M="$(PKG_BUILD_DIR)" \
modules
endef
Expand Down
3 changes: 1 addition & 2 deletions package/kernel/hwmon-gsc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ define KernelPackage/hwmon-gsc/description
endef

define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
$(KERNEL_MAKE) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
Expand Down
3 changes: 1 addition & 2 deletions package/kernel/mt76/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,7 @@ ifdef CONFIG_PACKAGE_kmod-mt7921e
endif

define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
+$(KERNEL_MAKE) $(PKG_JOBS) \
$(PKG_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
Expand Down
3 changes: 1 addition & 2 deletions package/kernel/mwlwifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ NOSTDINC_FLAGS := \
-include backport/backport.h

define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
+$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
Expand Down
3 changes: 1 addition & 2 deletions package/kernel/rtc-rv5c386a/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ define KernelPackage/rtc-rv5c386a
endef

define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
$(KERNEL_MAKE) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
Expand Down
3 changes: 1 addition & 2 deletions package/kernel/rtl8812au-ct/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ NOSTDINC_FLAGS := \
NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT

define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
+$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
Expand Down
4 changes: 2 additions & 2 deletions package/lean/automount/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=automount
PKG_VERSION:=1
PKG_RELEASE:=38
PKG_RELEASE:=39
PKG_ARCH:=all

include $(INCLUDE_DIR)/package.mk
Expand All @@ -18,7 +18,7 @@ define Package/automount
TITLE:=Mount autoconfig hotplug script.
MAINTAINER:=Lean
DEPENDS:=+block-mount +kmod-fs-exfat +kmod-fs-ext4 +kmod-fs-vfat +libblkid \
+kmod-usb-storage +kmod-usb-storage-extras +!TARGET_ramips:kmod-usb-storage-uas +ntfs3-mount
+kmod-usb-storage +kmod-usb-storage-extras +!TARGET_ramips:kmod-usb-storage-uas
endef

define Package/automount/description
Expand Down
6 changes: 3 additions & 3 deletions package/network/utils/iproute2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=iproute2
PKG_VERSION:=5.19.0
PKG_VERSION:=6.1.0
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
PKG_HASH:=26b7a34d6a7fd2f7a42e2b39c5a90cb61bac522d1096067ffeb195e5693d7791
PKG_HASH:=5ce12a0fec6b212725ef218735941b2dab76244db7e72646a76021b0537b43ab
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=iptables
PKG_LICENSE:=GPL-2.0
Expand Down Expand Up @@ -82,7 +82,7 @@ define Package/tc-mod-iptables
$(call Package/iproute2/Default)
TITLE:=Traffic control module - iptables action
VARIANT:=tcfull
DEPENDS:=+libxtables
DEPENDS:=+libxtables +libbpf
endef

define Package/genl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -411,7 +411,7 @@ check_tirpc()
@@ -412,7 +412,7 @@ check_tirpc()

check_mnl()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -266,7 +266,7 @@ EOF
@@ -267,7 +267,7 @@ EOF

check_elf()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -469,7 +469,7 @@ EOF
@@ -470,7 +470,7 @@ EOF

check_cap()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -398,7 +398,7 @@ check_selinux()
@@ -399,7 +399,7 @@ check_selinux()

check_tirpc()
{
Expand Down
6 changes: 3 additions & 3 deletions package/network/utils/iproute2/patches/170-ip_tiny.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -64,11 +64,17 @@ static void usage(void)
@@ -65,11 +65,17 @@ static void usage(void)
fprintf(stderr,
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
" ip [ -force ] -batch filename\n"
Expand All @@ -43,7 +43,7 @@
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
" -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
@@ -91,37 +97,49 @@ static const struct cmd {
@@ -92,37 +98,49 @@ static const struct cmd {
int (*func)(int argc, char **argv);
} cmds[] = {
{ "address", do_ipaddr },
Expand Down Expand Up @@ -105,4 +105,4 @@
+
UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \
names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o
names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o ppp_proto.o
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -290,7 +290,7 @@ int main(int argc, char **argv) {
@@ -291,7 +291,7 @@ int main(int argc, char **argv) {
}
EOF

Expand All @@ -9,7 +9,7 @@
local ret=$?

rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
@@ -308,7 +308,7 @@ int main(int argc, char **argv) {
@@ -309,7 +309,7 @@ int main(int argc, char **argv) {
}
EOF

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -455,14 +455,8 @@ EOF
@@ -456,14 +456,8 @@ EOF
if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
echo "no"
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -385,7 +385,7 @@ check_libbpf()
@@ -386,7 +386,7 @@ check_libbpf()
check_selinux()
# SELinux is a compile time option in the ss utility
{
Expand Down
23 changes: 23 additions & 0 deletions package/system/fstools/patches/0200-ntfs3-with-utf8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- a/block.c
+++ b/block.c
@@ -943,6 +943,11 @@
{
size_t mount_opts_len;
char *mount_opts = NULL, *ptr;
+ char _data[128] = {0};
+ if (strstr(fstype, "fat") || strstr(fstype, "ntfs")) {
+ snprintf(_data, sizeof(_data), "%s", "iocharset=utf8,uid=65534,gid=65534");
+ }
+
const char * const *filesystems;
int err = -EINVAL;
size_t count;
@@ -960,7 +965,7 @@
const char *fs = filesystems[i];

err = mount(source, target, fs, m ? m->flags : 0,
- (m && m->options) ? m->options : "");
+ (m && m->options) ? m->options : _data);
if (!err || errno != ENODEV)
break;
}
53 changes: 34 additions & 19 deletions package/utils/fritz-tools/src/fritz_tffs_nand_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,18 @@ static uint8_t readbuf[TFFS_SECTOR_SIZE];
static uint8_t oobbuf[TFFS_SECTOR_OOB_SIZE];
static uint32_t blocksize;
static int mtdfd;
struct tffs_sectors *sectors;

struct tffs_sectors {
uint32_t num_sectors;
uint8_t sectors[0];
};
static uint32_t num_sectors;
static uint8_t *sectors;
static uint32_t *sector_ids;

static inline void sector_mark_bad(int num)
{
sectors->sectors[num / 8] &= ~(0x80 >> (num % 8));
sectors[num / 8] &= ~(0x80 >> (num % 8));
};

static inline uint8_t sector_get_good(int num)
{
return sectors->sectors[num / 8] & 0x80 >> (num % 8);
return sectors[num / 8] & 0x80 >> (num % 8);
};

struct tffs_entry_segment {
Expand Down Expand Up @@ -139,6 +136,8 @@ static int read_sector(off_t pos)
return -1;
}

sector_ids[pos / TFFS_SECTOR_SIZE] = read_uint32(readbuf, 0x00);

return 0;
}

Expand Down Expand Up @@ -176,25 +175,39 @@ static int find_entry(uint32_t id, struct tffs_entry *entry)

off_t pos = 0;
uint8_t block_end = 0;
for (uint32_t sector = 0; sector < sectors->num_sectors; sector++, pos += TFFS_SECTOR_SIZE) {
for (uint32_t sector = 0; sector < num_sectors; sector++, pos += TFFS_SECTOR_SIZE) {
if (block_end) {
if (pos % blocksize == 0) {
block_end = 0;
}
} else if (sector_get_good(sector)) {
if (sector_ids[sector]) {
if (sector_ids[sector] == TFFS_ID_END) {
/* no more entries in this block */
block_end = 1;
continue;
}

if (sector_ids[sector] != id)
continue;
}

if (read_sectoroob(pos) || read_sector(pos)) {
fprintf(stderr, "ERROR: sector isn't readable, but has been previously!\n");
exit(EXIT_FAILURE);
}
uint32_t oob_id = read_uint32(oobbuf, 0x02);
uint32_t oob_len = read_uint32(oobbuf, 0x06);
uint32_t oob_rev = read_uint32(oobbuf, 0x0a);
uint32_t read_id = read_uint32(readbuf, 0x00);
uint32_t read_len = read_uint32(readbuf, 0x04);
uint32_t read_rev = read_uint32(readbuf, 0x0c);
if (read_oob_sector_health && (oob_id != read_id || oob_len != read_len || oob_rev != read_rev)) {
fprintf(stderr, "Warning: sector has inconsistent metadata\n");
continue;
if (read_oob_sector_health) {
uint32_t oob_id = read_uint32(oobbuf, 0x02);
uint32_t oob_len = read_uint32(oobbuf, 0x06);
uint32_t oob_rev = read_uint32(oobbuf, 0x0a);

if (oob_id != read_id || oob_len != read_len || oob_rev != read_rev) {
fprintf(stderr, "Warning: sector has inconsistent metadata\n");
continue;
}
}
if (read_id == TFFS_ID_END) {
/* no more entries in this block */
Expand Down Expand Up @@ -414,13 +427,14 @@ static int scan_mtd(void)

blocksize = info.erasesize;

sectors = malloc(sizeof(*sectors) + (info.size / TFFS_SECTOR_SIZE + 7) / 8);
if (sectors == NULL) {
num_sectors = info.size / TFFS_SECTOR_SIZE;
sectors = malloc((num_sectors + 7) / 8);
sector_ids = calloc(num_sectors, sizeof(uint32_t));
if (!sectors || !sector_ids) {
fprintf(stderr, "ERROR: memory allocation failed!\n");
exit(EXIT_FAILURE);
}
sectors->num_sectors = info.size / TFFS_SECTOR_SIZE;
memset(sectors->sectors, 0xff, (info.size / TFFS_SECTOR_SIZE + 7) / 8);
memset(sectors, 0xff, (num_sectors + 7) / 8);

uint32_t sector = 0, valid_blocks = 0;
uint8_t block_ok = 0;
Expand Down Expand Up @@ -564,6 +578,7 @@ int main(int argc, char *argv[])
out_free_entry:
free(name_table.val);
out_free_sectors:
free(sector_ids);
free(sectors);
out_close:
close(mtdfd);
Expand Down
2 changes: 1 addition & 1 deletion rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ $(shell \
if git log -1 >/dev/null 2>/dev/null; then \
if [ -n "$(1)" ]; then \
last_bump="$$(git log --pretty=format:'%h %s' . | \
grep --max-count=1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \
grep -m 1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \
cut -f 1 -d ' ')"; \
fi; \
if [ -n "$$last_bump" ]; then \
Expand Down
Loading

0 comments on commit 23a34d4

Please sign in to comment.