Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2024-11-17 19:36:20 +08:00
commit 42fa354f2d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
39 changed files with 457 additions and 311 deletions

View File

@ -372,12 +372,10 @@ target-dir-%: FORCE
ifneq ($(CONFIG_USE_APK),) ifneq ($(CONFIG_USE_APK),)
rm -rf $(mkfs_cur_target_dir) rm -rf $(mkfs_cur_target_dir)
$(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir) $(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir)
mv $(mkfs_cur_target_dir)/etc/apk/repositories $(mkfs_cur_target_dir).repositories
$(if $(mkfs_packages_remove), \ $(if $(mkfs_packages_remove), \
$(apk_target) del $(mkfs_packages_remove)) $(apk_target) del $(mkfs_packages_remove))
$(if $(mkfs_packages_add), \ $(if $(mkfs_packages_add), \
$(apk_target) add $(mkfs_packages_add)) $(apk_target) add $(mkfs_packages_add))
mv $(mkfs_cur_target_dir).repositories $(mkfs_cur_target_dir)/etc/apk/repositories
else else
rm -rf $(mkfs_cur_target_dir) $(mkfs_cur_target_dir).opkg rm -rf $(mkfs_cur_target_dir) $(mkfs_cur_target_dir).opkg
$(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir) $(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir)

View File

@ -101,6 +101,7 @@ ifneq ($(CONFIG_USE_APK),)
$(call apk,$(TARGET_DIR)) add --no-cache --initdb --no-scripts --arch $(ARCH_PACKAGES) \ $(call apk,$(TARGET_DIR)) add --no-cache --initdb --no-scripts --arch $(ARCH_PACKAGES) \
--repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb \ --repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
$$(cat $(TMP_DIR)/apk_install_list) $$(cat $(TMP_DIR)/apk_install_list)
rm -rf $(TARGET_DIR)/run
else else
$(file >$(TMP_DIR)/opkg_install_list,\ $(file >$(TMP_DIR)/opkg_install_list,\
$(call opkg_package_files,\ $(call opkg_package_files,\

View File

@ -250,9 +250,9 @@ endif
rm -f $(1)/etc/banner.failsafe,) rm -f $(1)/etc/banner.failsafe,)
ifneq ($(CONFIG_USE_APK),) ifneq ($(CONFIG_USE_APK),)
mkdir -p $(1)/etc/apk/ mkdir -p $(1)/etc/apk/repositories.d
$(call FeedSourcesAppendAPK,$(1)/etc/apk/repositories) $(call FeedSourcesAppendAPK,$(1)/etc/apk/repositories.d/distfeeds.list)
$(VERSION_SED_SCRIPT) $(1)/etc/apk/repositories $(VERSION_SED_SCRIPT) $(1)/etc/apk/repositories.d/distfeeds.list
rm -f $(1)/etc/uci-defaults/13_fix-group-user rm -f $(1)/etc/uci-defaults/13_fix-group-user
rm -f $(1)/sbin/pkg_check rm -f $(1)/sbin/pkg_check

View File

@ -24,6 +24,8 @@ boot() {
chmod 1777 /var/lock chmod 1777 /var/lock
mkdir -p /var/log mkdir -p /var/log
mkdir -p /var/run mkdir -p /var/run
ln -s /var/run /run
ln -s /var/lock /run/lock
mkdir -p /var/state mkdir -p /var/state
mkdir -p /var/tmp mkdir -p /var/tmp
mkdir -p /tmp/.uci mkdir -p /tmp/.uci
@ -34,9 +36,9 @@ boot() {
touch /tmp/resolv.conf.d/resolv.conf.auto touch /tmp/resolv.conf.d/resolv.conf.auto
ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf.auto ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf.auto
ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug grep -q debugfs /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime -t debugfs debugfs /sys/kernel/debug
grep -q bpf /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime,mode=0700 -t bpf bpffs /sys/fs/bpf grep -q bpf /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime,mode=0700 -t bpf bpffs /sys/fs/bpf
grep -q pstore /proc/filesystems && /bin/mount -o noatime -t pstore pstore /sys/fs/pstore grep -q pstore /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime -t pstore pstore /sys/fs/pstore
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
touch /tmp/.config_pending touch /tmp/.config_pending

View File

@ -475,7 +475,8 @@ $(eval $(call KernelPackage,drm-amdgpu))
define KernelPackage/drm-i915 define KernelPackage/drm-i915
SUBMENU:=$(VIDEO_MENU) SUBMENU:=$(VIDEO_MENU)
TITLE:=Intel i915 DRM support TITLE:=Intel i915 DRM support
DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \ DEPENDS:=@(TARGET_x86_64||TARGET_x86_generic||TARGET_x86_legacy) \
@DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \
+kmod-drm-ttm-helper +kmod-drm-kms-helper +kmod-i2c-algo-bit +i915-firmware-dmc \ +kmod-drm-ttm-helper +kmod-drm-kms-helper +kmod-i2c-algo-bit +i915-firmware-dmc \
+kmod-drm-display-helper +kmod-drm-buddy +kmod-acpi-video \ +kmod-drm-display-helper +kmod-drm-buddy +kmod-acpi-video \
+kmod-drm-exec +kmod-drm-suballoc-helper +kmod-drm-exec +kmod-drm-suballoc-helper

View File

@ -7,12 +7,13 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=elfutils PKG_NAME:=elfutils
PKG_VERSION:=0.191 PKG_VERSION:=0.192
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) \
PKG_HASH:=df76db71366d1d708365fc7a6c60ca48398f14367eb2b8954efc8897147ad871 https://mirrors.kernel.org/sourceware/$(PKG_NAME)/$(PKG_VERSION)
PKG_HASH:=616099beae24aba11f9b63d86ca6cc8d566d968b802391334c91df54eab416b4
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com> PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE:=GPL-3.0-or-later

View File

@ -11,7 +11,7 @@
Requires.private: zlib @LIBZSTD@ Requires.private: zlib @LIBZSTD@
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -717,6 +717,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo @@ -728,6 +728,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo
AM_GNU_GETTEXT_VERSION([0.19.6]) AM_GNU_GETTEXT_VERSION([0.19.6])
AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6]) AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])

View File

@ -8,4 +8,4 @@
+ libasm + libasm
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING SECURITY \ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING SECURITY \
COPYING COPYING-GPLV2 COPYING-LGPLV3 COPYING COPYING-GPLV2 COPYING-LGPLV3 CONDUCT

View File

@ -32,8 +32,8 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+# include <sys/uio.h> +# include <sys/uio.h>
# include <sys/user.h> # include <sys/user.h>
# include <sys/ptrace.h> # include <sys/ptrace.h>
/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ # include <asm/ptrace.h>
@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t @@ -94,7 +94,7 @@ aarch64_set_initial_registers_tid (pid_t
Dwarf_Word dwarf_fregs[32]; Dwarf_Word dwarf_fregs[32];
for (int r = 0; r < 32; r++) for (int r = 0; r < 32; r++)

View File

@ -0,0 +1,31 @@
From f5d6e088f84dd05278c4698a21cbf1ff4569978d Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Tue, 22 Oct 2024 15:03:42 +0200
Subject: [PATCH] libelf: Add libeu objects to libelf.a static archive
libelf might use some symbols from libeu.a, specifically the eu-search
wrappers. But we don't ship libeu.a separately. So include the libeu
objects in the libelf.a archive to facilitate static linking.
* libelf/Makefile.am (libeu_objects): New variable.
(libelf_a_LIBADD): New, add libeu_objects.
https://sourceware.org/bugzilla/show_bug.cgi?id=32293
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
libelf/Makefile.am | 3 +++
1 file changed, 3 insertions(+)
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -122,6 +122,9 @@ libelf.so: $(srcdir)/libelf.map $(libelf
@$(textrel_check)
$(AM_V_at)ln -fs $@ $@.$(VERSION)
+libeu_objects = $(shell $(AR) t ../lib/libeu.a)
+libelf_a_LIBADD = $(addprefix ../lib/,$(libeu_objects))
+
install: install-am libelf.so
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so

View File

@ -0,0 +1,24 @@
From f3c664d069d81a4872a1ec8241ee709f37c53e9c Mon Sep 17 00:00:00 2001
From: Aaron Merey <amerey@redhat.com>
Date: Tue, 29 Oct 2024 14:16:57 -0400
Subject: [PATCH] configure.ac: Fix ENABLE_IMA_VERIFICATION conditional
Fix test statement for ENABLE_IMA_VERIFICATION always evalutating to
false due to a missing 'x'.
Signed-off-by: Aaron Merey <amerey@redhat.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/configure.ac
+++ b/configure.ac
@@ -895,7 +895,7 @@ AS_IF([test "x$enable_debuginfod" != "xn
AM_CONDITIONAL([DEBUGINFOD],[test "x$enable_debuginfod" = "xyes"])
AS_IF([test "x$enable_debuginfod_ima_verification" = "xyes"],AC_DEFINE([ENABLE_IMA_VERIFICATION],[1],[Build IMA verification]))
AS_IF([test "x$have_libarchive" = "xyes"],AC_DEFINE([HAVE_LIBARCHIVE],[1],[Define to 1 if libarchive is available]))
-AM_CONDITIONAL([ENABLE_IMA_VERIFICATION],[test "$enable_debuginfod_ima_verification" = "xyes"])
+AM_CONDITIONAL([ENABLE_IMA_VERIFICATION],[test "x$enable_debuginfod_ima_verification" = "xyes"])
AM_CONDITIONAL([OLD_LIBMICROHTTPD],[test "x$old_libmicrohttpd" = "xyes"])
dnl for /etc/profile.d/elfutils.{csh,sh}

View File

@ -0,0 +1,193 @@
From 8707194a9f2f0b13e53041b03ebfdbdbd2942e43 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Tue, 5 Nov 2024 23:31:14 +0100
Subject: [PATCH 1/1] libelf: Only fetch shdr once in elf_compress[_gnu]
Some compilers assume the second call to elf[32|64]_getshdr can fail
and produce error: potential null pointer dereference. Just store the
result of the first call and reuse (when not NULL).
* libelf/elf_compress.c (elf_compress): Store getshdr result in
a shdr union var.
* libelf/elf_compress_gnu.c (): Likewise
https://sourceware.org/bugzilla/show_bug.cgi?id=32311
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
libelf/elf_compress.c | 55 +++++++++++++++++++++------------------
libelf/elf_compress_gnu.c | 45 ++++++++++++++------------------
2 files changed, 48 insertions(+), 52 deletions(-)
--- a/libelf/elf_compress.c
+++ b/libelf/elf_compress.c
@@ -584,25 +584,30 @@ elf_compress (Elf_Scn *scn, int type, un
Elf64_Xword sh_flags;
Elf64_Word sh_type;
Elf64_Xword sh_addralign;
+ union shdr
+ {
+ Elf32_Shdr *s32;
+ Elf64_Shdr *s64;
+ } shdr;
if (elfclass == ELFCLASS32)
{
- Elf32_Shdr *shdr = elf32_getshdr (scn);
- if (shdr == NULL)
+ shdr.s32 = elf32_getshdr (scn);
+ if (shdr.s32 == NULL)
return -1;
- sh_flags = shdr->sh_flags;
- sh_type = shdr->sh_type;
- sh_addralign = shdr->sh_addralign;
+ sh_flags = shdr.s32->sh_flags;
+ sh_type = shdr.s32->sh_type;
+ sh_addralign = shdr.s32->sh_addralign;
}
else
{
- Elf64_Shdr *shdr = elf64_getshdr (scn);
- if (shdr == NULL)
+ shdr.s64 = elf64_getshdr (scn);
+ if (shdr.s64 == NULL)
return -1;
- sh_flags = shdr->sh_flags;
- sh_type = shdr->sh_type;
- sh_addralign = shdr->sh_addralign;
+ sh_flags = shdr.s64->sh_flags;
+ sh_type = shdr.s64->sh_type;
+ sh_addralign = shdr.s64->sh_addralign;
}
if ((sh_flags & SHF_ALLOC) != 0)
@@ -679,17 +684,17 @@ elf_compress (Elf_Scn *scn, int type, un
correctly and ignored when SHF_COMPRESSED is set. */
if (elfclass == ELFCLASS32)
{
- Elf32_Shdr *shdr = elf32_getshdr (scn);
- shdr->sh_size = new_size;
- shdr->sh_addralign = __libelf_type_align (ELFCLASS32, ELF_T_CHDR);
- shdr->sh_flags |= SHF_COMPRESSED;
+ shdr.s32->sh_size = new_size;
+ shdr.s32->sh_addralign = __libelf_type_align (ELFCLASS32,
+ ELF_T_CHDR);
+ shdr.s32->sh_flags |= SHF_COMPRESSED;
}
else
{
- Elf64_Shdr *shdr = elf64_getshdr (scn);
- shdr->sh_size = new_size;
- shdr->sh_addralign = __libelf_type_align (ELFCLASS64, ELF_T_CHDR);
- shdr->sh_flags |= SHF_COMPRESSED;
+ shdr.s64->sh_size = new_size;
+ shdr.s64->sh_addralign = __libelf_type_align (ELFCLASS64,
+ ELF_T_CHDR);
+ shdr.s64->sh_flags |= SHF_COMPRESSED;
}
__libelf_reset_rawdata (scn, out_buf, new_size, 1, ELF_T_CHDR);
@@ -731,17 +736,15 @@ elf_compress (Elf_Scn *scn, int type, un
correctly and ignored when SHF_COMPRESSED is set. */
if (elfclass == ELFCLASS32)
{
- Elf32_Shdr *shdr = elf32_getshdr (scn);
- shdr->sh_size = scn->zdata_size;
- shdr->sh_addralign = scn->zdata_align;
- shdr->sh_flags &= ~SHF_COMPRESSED;
+ shdr.s32->sh_size = scn->zdata_size;
+ shdr.s32->sh_addralign = scn->zdata_align;
+ shdr.s32->sh_flags &= ~SHF_COMPRESSED;
}
else
{
- Elf64_Shdr *shdr = elf64_getshdr (scn);
- shdr->sh_size = scn->zdata_size;
- shdr->sh_addralign = scn->zdata_align;
- shdr->sh_flags &= ~SHF_COMPRESSED;
+ shdr.s64->sh_size = scn->zdata_size;
+ shdr.s64->sh_addralign = scn->zdata_align;
+ shdr.s64->sh_flags &= ~SHF_COMPRESSED;
}
__libelf_reset_rawdata (scn, scn->zdata_base,
--- a/libelf/elf_compress_gnu.c
+++ b/libelf/elf_compress_gnu.c
@@ -59,25 +59,30 @@ elf_compress_gnu (Elf_Scn *scn, int infl
Elf64_Xword sh_flags;
Elf64_Word sh_type;
Elf64_Xword sh_addralign;
+ union shdr
+ {
+ Elf32_Shdr *s32;
+ Elf64_Shdr *s64;
+ } shdr;
if (elfclass == ELFCLASS32)
{
- Elf32_Shdr *shdr = elf32_getshdr (scn);
- if (shdr == NULL)
+ shdr.s32 = elf32_getshdr (scn);
+ if (shdr.s32 == NULL)
return -1;
- sh_flags = shdr->sh_flags;
- sh_type = shdr->sh_type;
- sh_addralign = shdr->sh_addralign;
+ sh_flags = shdr.s32->sh_flags;
+ sh_type = shdr.s32->sh_type;
+ sh_addralign = shdr.s32->sh_addralign;
}
else
{
- Elf64_Shdr *shdr = elf64_getshdr (scn);
- if (shdr == NULL)
+ shdr.s64 = elf64_getshdr (scn);
+ if (shdr.s64 == NULL)
return -1;
- sh_flags = shdr->sh_flags;
- sh_type = shdr->sh_type;
- sh_addralign = shdr->sh_addralign;
+ sh_flags = shdr.s64->sh_flags;
+ sh_type = shdr.s64->sh_type;
+ sh_addralign = shdr.s64->sh_addralign;
}
/* Allocated sections, or sections that are already are compressed
@@ -122,15 +127,9 @@ elf_compress_gnu (Elf_Scn *scn, int infl
sh_flags won't have a SHF_COMPRESSED hint in the GNU format.
Just adjust the sh_size. */
if (elfclass == ELFCLASS32)
- {
- Elf32_Shdr *shdr = elf32_getshdr (scn);
- shdr->sh_size = new_size;
- }
+ shdr.s32->sh_size = new_size;
else
- {
- Elf64_Shdr *shdr = elf64_getshdr (scn);
- shdr->sh_size = new_size;
- }
+ shdr.s64->sh_size = new_size;
__libelf_reset_rawdata (scn, out_buf, new_size, 1, ELF_T_BYTE);
@@ -187,15 +186,9 @@ elf_compress_gnu (Elf_Scn *scn, int infl
sh_flags won't have a SHF_COMPRESSED hint in the GNU format.
Just adjust the sh_size. */
if (elfclass == ELFCLASS32)
- {
- Elf32_Shdr *shdr = elf32_getshdr (scn);
- shdr->sh_size = size;
- }
+ shdr.s32->sh_size = size;
else
- {
- Elf64_Shdr *shdr = elf64_getshdr (scn);
- shdr->sh_size = size;
- }
+ shdr.s64->sh_size = size;
__libelf_reset_rawdata (scn, buf_out, size, sh_addralign,
__libelf_data_type (&ehdr, sh_type,

View File

@ -0,0 +1,55 @@
strip.c: Pointer `arhdr` created at strip.c:2741 and then dereferenced without NULL-check.
The same situation for the `arhdr` pointer at the objdump.c:313 and
the `h` pointer at the readelf.c:13545.
Triggers found by static analyzer Svace.
Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
---
src/objdump.c | 5 +++++
src/readelf.c | 5 +++++
src/strip.c | 5 +++++
3 files changed, 15 insertions(+)
--- a/src/objdump.c
+++ b/src/objdump.c
@@ -311,6 +311,11 @@ handle_ar (int fd, Elf *elf, const char
{
/* The the header for this element. */
Elf_Arhdr *arhdr = elf_getarhdr (subelf);
+ if (arhdr == NULL)
+ {
+ printf ("cannot get arhdr: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
/* Skip over the index entries. */
if (strcmp (arhdr->ar_name, "/") != 0
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -13543,6 +13543,11 @@ dump_archive_index (Elf *elf, const char
as_off, fname, elf_errmsg (-1));
const Elf_Arhdr *h = elf_getarhdr (subelf);
+ if (h == NULL)
+ {
+ printf ("cannot get arhdr: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
printf (_("Archive member '%s' contains:\n"), h->ar_name);
--- a/src/strip.c
+++ b/src/strip.c
@@ -2739,6 +2739,11 @@ handle_ar (int fd, Elf *elf, const char
{
/* The the header for this element. */
Elf_Arhdr *arhdr = elf_getarhdr (subelf);
+ if (arhdr == NULL)
+ {
+ printf ("cannot get arhdr: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
if (elf_kind (subelf) == ELF_K_ELF)
result |= handle_elf (fd, subelf, new_prefix, arhdr->ar_name, 0, NULL);

View File

@ -69,7 +69,7 @@ endef
define Package/libreadline/install define Package/libreadline/install
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so.* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so* $(1)/usr/lib/
endef endef
$(eval $(call HostBuild)) $(eval $(call HostBuild))

View File

@ -10,7 +10,14 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c +++ b/pppd/sys-linux.c
@@ -231,7 +231,7 @@ static int driver_is_old = 0; @@ -224,14 +224,10 @@ static fd_set in_fds; /* set of fds tha
static int max_in_fd; /* highest fd set in in_fds */
static int has_proxy_arp = 0;
-static int driver_version = 0;
-static int driver_modification = 0;
-static int driver_patch = 0;
-static int driver_is_old = 0;
static int restore_term = 0; /* 1 => we've munged the terminal */ static int restore_term = 0; /* 1 => we've munged the terminal */
static struct termios inittermios; /* Initial TTY termios */ static struct termios inittermios; /* Initial TTY termios */
@ -19,17 +26,18 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
static char loop_name[20]; static char loop_name[20];
static unsigned char inbuf[512]; /* buffer for chars read from loopback */ static unsigned char inbuf[512]; /* buffer for chars read from loopback */
@@ -250,8 +250,8 @@ static int looped; /* 1 if using loop @@ -249,9 +245,8 @@ static int dynaddr_set; /* 1 if ip_dyna
static int looped; /* 1 if using loop */
static int link_mtu; /* mtu for the link (not bundle) */ static int link_mtu; /* mtu for the link (not bundle) */
static struct utsname utsname; /* for the kernel version */ -static struct utsname utsname; /* for the kernel version */
-static int kernel_version; -static int kernel_version;
#define KVERSION(j,n,p) ((j)*1000000 + (n)*1000 + (p)) #define KVERSION(j,n,p) ((j)*1000000 + (n)*1000 + (p))
+static const int kernel_version = KVERSION(2,6,37); +static const int kernel_version = KVERSION(4,9,0);
#define MAX_IFS 100 #define MAX_IFS 100
@@ -1970,11 +1970,12 @@ int ccp_fatal_error (int unit) @@ -1970,11 +1965,12 @@ int ccp_fatal_error (int unit)
* *
* path_to_procfs - find the path to the proc file system mount point * path_to_procfs - find the path to the proc file system mount point
*/ */
@ -44,7 +52,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
struct mntent *mntent; struct mntent *mntent;
FILE *fp; FILE *fp;
@@ -1996,6 +1997,7 @@ static char *path_to_procfs(const char * @@ -1996,6 +1992,7 @@ static char *path_to_procfs(const char *
fclose (fp); fclose (fp);
} }
} }
@ -52,35 +60,24 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
strlcpy(proc_path + proc_path_len, tail, strlcpy(proc_path + proc_path_len, tail,
sizeof(proc_path) - proc_path_len); sizeof(proc_path) - proc_path_len);
@@ -2895,15 +2897,19 @@ int ppp_check_kernel_support(void) @@ -2889,6 +2886,8 @@ ppp_registered(void)
int my_version, my_modification, my_patch;
int osmaj, osmin, ospatch;
int ppp_check_kernel_support(void)
{
+ return 1; /* OpenWrt support ppp device "/dev/ppp" by default */
+#if 0 +#if 0
/* get the kernel version now, since we are called before sys_init */ int s, ok, fd;
uname(&utsname); struct ifreq ifr;
osmaj = osmin = ospatch = 0; int size;
sscanf(utsname.release, "%d.%d.%d", &osmaj, &osmin, &ospatch); @@ -3016,6 +3015,7 @@ int ppp_check_kernel_support(void)
kernel_version = KVERSION(osmaj, osmin, ospatch); }
close(s);
return ok;
+#endif +#endif
}
fd = open("/dev/ppp", O_RDWR); #ifndef HAVE_LOGWTMP
if (fd >= 0) { @@ -3577,6 +3577,7 @@ get_pty(int *master_fdp, int *slave_fdp,
+#if 0
new_style_driver = 1;
+#endif
/* XXX should get from driver */
driver_version = 2;
@@ -2963,6 +2969,7 @@ int ppp_check_kernel_support(void)
if (ok && ((ifr.ifr_hwaddr.sa_family & ~0xFF) != ARPHRD_PPP))
ok = 0;
+ return ok;
/*
* This is the PPP device. Validate the version of the driver at this
@@ -3577,6 +3584,7 @@ get_pty(int *master_fdp, int *slave_fdp,
} }
#endif /* TIOCGPTN */ #endif /* TIOCGPTN */
@ -88,7 +85,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
if (sfd < 0) { if (sfd < 0) {
/* the old way - scan through the pty name space */ /* the old way - scan through the pty name space */
for (i = 0; i < 64; ++i) { for (i = 0; i < 64; ++i) {
@@ -3601,6 +3609,7 @@ get_pty(int *master_fdp, int *slave_fdp, @@ -3601,6 +3602,7 @@ get_pty(int *master_fdp, int *slave_fdp,
} }
} }
} }
@ -96,23 +93,35 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
if (sfd < 0) if (sfd < 0)
return 0; return 0;
@@ -3716,6 +3718,7 @@ get_host_seed(void)
int
sys_check_options(void)
{
+#if 0
if (demand && driver_is_old) {
ppp_option_error("demand dialling is not supported by kernel driver "
"version %d.%d.%d", driver_version, driver_modification,
@@ -3726,6 +3729,7 @@ sys_check_options(void)
warn("Warning: multilink is not supported by the kernel driver");
multilink = 0;
}
+#endif
return 1;
}
--- a/pppd/plugins/pppoatm/pppoatm.c --- a/pppd/plugins/pppoatm/pppoatm.c
+++ b/pppd/plugins/pppoatm/pppoatm.c +++ b/pppd/plugins/pppoatm/pppoatm.c
@@ -179,14 +179,6 @@ static void disconnect_pppoatm(void) @@ -180,10 +180,6 @@ static void disconnect_pppoatm(void)
void plugin_init(void) void plugin_init(void)
{ {
-#ifdef linux #ifdef linux
- extern int new_style_driver; /* From sys-linux.c */ - extern int new_style_driver; /* From sys-linux.c */
- if (!ppp_check_kernel_support() && !new_style_driver) - if (!ppp_check_kernel_support() && !new_style_driver)
- fatal("Kernel doesn't support ppp_generic - " - fatal("Kernel doesn't support ppp_generic - "
- "needed for PPPoATM"); - "needed for PPPoATM");
-#else #else
- fatal("No PPPoATM support on this OS"); fatal("No PPPoATM support on this OS");
-#endif #endif
ppp_add_options(pppoa_options);
}
--- a/pppd/plugins/pppoe/plugin.c --- a/pppd/plugins/pppoe/plugin.c
+++ b/pppd/plugins/pppoe/plugin.c +++ b/pppd/plugins/pppoe/plugin.c
@@ -57,9 +57,6 @@ static char const RCSID[] = @@ -57,9 +57,6 @@ static char const RCSID[] =
@ -138,17 +147,14 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
info("PPPoE plugin from pppd %s", PPPD_VERSION); info("PPPoE plugin from pppd %s", PPPD_VERSION);
--- a/pppd/plugins/pppol2tp/pppol2tp.c --- a/pppd/plugins/pppol2tp/pppol2tp.c
+++ b/pppd/plugins/pppol2tp/pppol2tp.c +++ b/pppd/plugins/pppol2tp/pppol2tp.c
@@ -500,12 +500,7 @@ static void pppol2tp_cleanup(void) @@ -501,10 +501,6 @@ static void pppol2tp_cleanup(void)
void plugin_init(void) void plugin_init(void)
{ {
-#if defined(__linux__) #if defined(__linux__)
- extern int new_style_driver; /* From sys-linux.c */ - extern int new_style_driver; /* From sys-linux.c */
- if (!ppp_check_kernel_support() && !new_style_driver) - if (!ppp_check_kernel_support() && !new_style_driver)
- fatal("Kernel doesn't support ppp_generic - " - fatal("Kernel doesn't support ppp_generic - "
- "needed for PPPoL2TP"); - "needed for PPPoL2TP");
-#else #else
+#if !defined(__linux__)
fatal("No PPPoL2TP support on this OS"); fatal("No PPPoL2TP support on this OS");
#endif #endif
ppp_add_options(pppol2tp_options);

View File

@ -14,7 +14,7 @@ PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org> PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
PKG_LICENSE:=GPL-2.0-only PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE
PKG_INSTALL:=1 PKG_INSTALL:=2
HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST) HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
HOST_BUILD_DEPENDS:=lua/host HOST_BUILD_DEPENDS:=lua/host
@ -68,8 +68,12 @@ MESON_ARGS += \
$(MESON_COMMON_ARGS) \ $(MESON_COMMON_ARGS) \
-Dcrypto_backend=$(BUILD_VARIANT) -Dcrypto_backend=$(BUILD_VARIANT)
HOST_LDFLAGS += \ define Package/apk/conffiles
-Wl,-rpath $(STAGING_DIR_HOST)/lib /etc/apk/repositories.d/customfeeds.list
endef
Package/apk-mbedtls/conffiles = $(Package/apk/conffiles)
Package/apk-openssl/conffiles = $(Package/apk/conffiles)
define Package/apk/default/install define Package/apk/default/install
$(INSTALL_DIR) $(1)/lib/apk/db $(INSTALL_DIR) $(1)/lib/apk/db
@ -79,6 +83,9 @@ define Package/apk/default/install
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libapk.so.* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapk.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/apk/repositories.d
$(INSTALL_DATA) ./files/customfeeds.list $(1)/etc/apk/repositories.d/customfeeds.list
endef endef
Package/apk-mbedtls/install = $(Package/apk/default/install) Package/apk-mbedtls/install = $(Package/apk/default/install)

View File

@ -0,0 +1,3 @@
# add your custom package feeds here
#
# http://www.example.com/path/to/files/packages.adb

View File

@ -10,7 +10,7 @@ Signed-off-by: Paul Spooren <mail@aparcar.org>
--- a/src/database.c --- a/src/database.c
+++ b/src/database.c +++ b/src/database.c
@@ -1627,7 +1627,7 @@ const char *apk_db_layer_name(int layer) @@ -1631,7 +1631,7 @@ const char *apk_db_layer_name(int layer)
{ {
switch (layer) { switch (layer) {
case APK_DB_LAYER_ROOT: return "lib/apk/db"; case APK_DB_LAYER_ROOT: return "lib/apk/db";

View File

@ -11,6 +11,7 @@ PKG_MIRROR_HASH:=4cd7a770a05db28f496a60eb9fe015a4af677bba05053b4d4be21adcf95e52e
PKG_LICENSE:=BSD-3-Clause PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE
PKG_FLAGS:=nonshared
PKG_MAINTAINER:=Christian Marangi <ansuelsmth@gmail.com> PKG_MAINTAINER:=Christian Marangi <ansuelsmth@gmail.com>

View File

@ -15,6 +15,7 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/omnia-eeprom/-/archive/v$(PKG_VERSION)/ PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/omnia-eeprom/-/archive/v$(PKG_VERSION)/
PKG_HASH:=6f949d0b8080adca8bae088774ce615b563ba6ec2807cce97ee6769b4eee7bbf PKG_HASH:=6f949d0b8080adca8bae088774ce615b563ba6ec2807cce97ee6769b4eee7bbf
PKG_FLAGS:=nonshared
PKG_MAINTAINER:=Marek Behun <kabel@kernel.org> PKG_MAINTAINER:=Marek Behun <kabel@kernel.org>
PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE:=GPL-2.0-or-later

View File

@ -308,7 +308,7 @@ define Device/prpl_haze
DEVICE_DTS_CONFIG := config@hk09 DEVICE_DTS_CONFIG := config@hk09
SOC := ipq8072 SOC := ipq8072
DEVICE_PACKAGES := ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci \ DEVICE_PACKAGES := ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci \
mkf2fs f2fsck kmod-fs-f2fs kmod-leds-lp5562 kmod-fs-f2fs f2fs-tools kmod-leds-lp5562
endef endef
TARGET_DEVICES += prpl_haze TARGET_DEVICES += prpl_haze
@ -320,7 +320,7 @@ define Device/qnap_301w
DEVICE_DTS_CONFIG := config@hk01 DEVICE_DTS_CONFIG := config@hk01
KERNEL_SIZE := 16384k KERNEL_SIZE := 16384k
SOC := ipq8072 SOC := ipq8072
DEVICE_PACKAGES := ipq-wifi-qnap_301w DEVICE_PACKAGES := kmod-fs-f2fs f2fs-tools ipq-wifi-qnap_301w
endef endef
TARGET_DEVICES += qnap_301w TARGET_DEVICES += qnap_301w
@ -484,7 +484,7 @@ define Device/zyxel_nbg7815
DEVICE_MODEL := NBG7815 DEVICE_MODEL := NBG7815
DEVICE_DTS_CONFIG := config@nbg7815 DEVICE_DTS_CONFIG := config@nbg7815
SOC := ipq8074 SOC := ipq8074
DEVICE_PACKAGES := ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci \ DEVICE_PACKAGES := kmod-fs-f2fs f2fs-tools ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci \
kmod-bluetooth kmod-hwmon-tmp103 kmod-bluetooth kmod-hwmon-tmp103
endef endef
TARGET_DEVICES += zyxel_nbg7815 TARGET_DEVICES += zyxel_nbg7815

View File

@ -1,83 +0,0 @@
#
# Copyright (C) 2016 lede-project.org
#
# this can be used as a generic mmc upgrade script
# just add a device entry in platform.sh,
# define "kernelname" and "rootfsname" and call mmc_do_upgrade
# after the kernel and rootfs flash a loopdev (as overlay) is
# setup on top of the rootfs partition
# for the proper function a padded rootfs image is needed, basically
# append "pad-to 64k" to the image definition
# this is based on the ipq806x zyxel.sh mmc upgrade
. /lib/functions.sh
mmc_do_upgrade() {
local tar_file="$1"
local rootfs=
local kernel=
[ -z "$kernel" ] && kernel=$(find_mmc_part ${kernelname})
[ -z "$rootfs" ] && rootfs=$(find_mmc_part ${rootfsname})
[ -z "$kernel" ] && echo "Upgrade failed: kernel partition not found! Rebooting..." && reboot -f
[ -z "$rootfs" ] && echo "Upgrade failed: rootfs partition not found! Rebooting..." && reboot -f
mmc_do_flash $tar_file $kernel $rootfs
return 0
}
mmc_do_flash() {
local tar_file=$1
local kernel=$2
local rootfs=$3
# keep sure its unbound
losetup --detach-all || {
echo Failed to detach all loop devices. Skip this try.
reboot -f
}
# use the first found directory in the tar archive
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
board_dir=${board_dir%/}
echo "flashing kernel to $kernel"
tar xf $tar_file ${board_dir}/kernel -O >$kernel
echo "flashing rootfs to ${rootfs}"
tar xf $tar_file ${board_dir}/root -O >"${rootfs}"
# a padded rootfs is needed for overlay fs creation
local offset=$(tar xf $tar_file ${board_dir}/root -O | wc -c)
[ $offset -lt 65536 ] && {
echo Wrong size for rootfs: $offset
sleep 10
reboot -f
}
# Mount loop for rootfs_data
local loopdev="$(losetup -f)"
losetup -o $offset $loopdev $rootfs || {
echo "Failed to mount looped rootfs_data."
sleep 10
reboot -f
}
echo "Format new rootfs_data at position ${offset}."
mkfs.ext4 -F -L rootfs_data $loopdev
mkdir /tmp/new_root
mount -t ext4 $loopdev /tmp/new_root && {
echo "Saving config to rootfs_data at position ${offset}."
cp -v "$UPGRADE_BACKUP" "/tmp/new_root/$BACKUP_FILE"
umount /tmp/new_root
}
# Cleanup
losetup -d $loopdev >/dev/null 2>&1
sync
umount -a
reboot -f
}

View File

@ -185,12 +185,9 @@ platform_do_upgrade() {
;; ;;
prpl,haze|\ prpl,haze|\
qnap,301w) qnap,301w)
kernelname="0:HLOS" CI_KERNPART="0:HLOS"
rootfsname="rootfs" CI_ROOTPART="rootfs"
mmc_do_upgrade "$1" emmc_do_upgrade "$1"
;;
tplink,eap660hd-v1)
tplink_do_upgrade "$1"
;; ;;
redmi,ax6|\ redmi,ax6|\
xiaomi,ax3600|\ xiaomi,ax3600|\
@ -244,6 +241,9 @@ platform_do_upgrade() {
CI_DATAPART="rootfs_data" CI_DATAPART="rootfs_data"
emmc_do_upgrade "$1" emmc_do_upgrade "$1"
;; ;;
tplink,eap660hd-v1)
tplink_do_upgrade "$1"
;;
yuncore,ax880) yuncore,ax880)
active="$(fw_printenv -n active)" active="$(fw_printenv -n active)"
if [ "$active" -eq "1" ]; then if [ "$active" -eq "1" ]; then
@ -282,14 +282,13 @@ platform_do_upgrade() {
[ -z "$config_mtdnum" ] && reboot [ -z "$config_mtdnum" ] && reboot
part_num="$(hexdump -e '1/1 "%01x|"' -n 1 -s 168 -C /dev/mtd$config_mtdnum | cut -f 1 -d "|" | head -n1)" part_num="$(hexdump -e '1/1 "%01x|"' -n 1 -s 168 -C /dev/mtd$config_mtdnum | cut -f 1 -d "|" | head -n1)"
if [ "$part_num" -eq "0" ]; then if [ "$part_num" -eq "0" ]; then
kernelname="0:HLOS" CI_KERNPART="0:HLOS"
rootfsname="rootfs" CI_ROOTPART="rootfs"
mmc_do_upgrade "$1"
else else
kernelname="0:HLOS_1" CI_KERNPART="0:HLOS_1"
rootfsname="rootfs_1" CI_ROOTPART="rootfs_1"
mmc_do_upgrade "$1"
fi fi
emmc_do_upgrade "$1"
;; ;;
*) *)
default_do_upgrade "$1" default_do_upgrade "$1"
@ -299,7 +298,10 @@ platform_do_upgrade() {
platform_copy_config() { platform_copy_config() {
case "$(board_name)" in case "$(board_name)" in
spectrum,sax1v1k) prpl,haze|\
qnap,301w|\
spectrum,sax1v1k|\
zyxel,nbg7815)
emmc_copy_config emmc_copy_config
;; ;;
esac esac

View File

@ -1,5 +1,5 @@
# #
# Realtek RTL838x SoCs # Realtek RTL838x SoCs
# #
cflags-$(CONFIG_RTL83XX) += -I$(srctree)/arch/mips/include/asm/mach-rtl838x/ cflags-$(CONFIG_MACH_REALTEK_RTL) += -I$(srctree)/arch/mips/include/asm/mach-rtl838x/
load-$(CONFIG_RTL83XX) += 0xffffffff80100000 load-$(CONFIG_MACH_REALTEK_RTL) += 0xffffffff80100000

View File

@ -2,13 +2,13 @@
menuconfig COMMON_CLK_REALTEK menuconfig COMMON_CLK_REALTEK
bool "Support for Realtek's clock controllers" bool "Support for Realtek's clock controllers"
depends on RTL83XX depends on MACH_REALTEK_RTL
if COMMON_CLK_REALTEK if COMMON_CLK_REALTEK
config COMMON_CLK_RTL83XX config COMMON_CLK_RTL83XX
bool "Clock driver for Realtek RTL83XX" bool "Clock driver for Realtek RTL83XX"
depends on RTL83XX depends on MACH_REALTEK_RTL
select SRAM select SRAM
help help
This driver adds support for the Realtek RTL83xx series basic clocks. This driver adds support for the Realtek RTL83xx series basic clocks.

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
config NET_DSA_RTL83XX config NET_DSA_RTL83XX
tristate "Realtek RTL838x/RTL839x switch support" tristate "Realtek RTL838x/RTL839x switch support"
depends on RTL83XX depends on MACH_REALTEK_RTL
select NET_DSA_TAG_TRAILER select NET_DSA_TAG_TRAILER
help help
This driver adds support for Realtek RTL83xx series switching. This driver adds support for Realtek RTL83xx series switching.

View File

@ -9,64 +9,67 @@ configurations for the SoCs, which are introduced in addition.
Submitted-by: Birger Koblitz <git@birger-koblitz.de> Submitted-by: Birger Koblitz <git@birger-koblitz.de>
--- ---
arch/mips/Kbuild.platforms | 1 +
arch/mips/Kconfig | 57 ++++++++++++++
2 files changed, 58 insertions(+)
--- a/arch/mips/Kbuild.platforms --- a/arch/mips/Kbuild.platforms
+++ b/arch/mips/Kbuild.platforms +++ b/arch/mips/Kbuild.platforms
@@ -22,6 +22,7 @@ platform-$(CONFIG_MACH_NINTENDO64) += n6 @@ -22,6 +22,7 @@ platform-$(CONFIG_MACH_NINTENDO64) += n6
platform-$(CONFIG_PIC32MZDA) += pic32/ platform-$(CONFIG_PIC32MZDA) += pic32/
platform-$(CONFIG_RALINK) += ralink/ platform-$(CONFIG_RALINK) += ralink/
platform-$(CONFIG_MIKROTIK_RB532) += rb532/ platform-$(CONFIG_MIKROTIK_RB532) += rb532/
+platform-$(CONFIG_RTL83XX) += rtl838x/ +platform-$(CONFIG_MACH_REALTEK_RTL) += rtl838x/
platform-$(CONFIG_SGI_IP22) += sgi-ip22/ platform-$(CONFIG_SGI_IP22) += sgi-ip22/
platform-$(CONFIG_SGI_IP27) += sgi-ip27/ platform-$(CONFIG_SGI_IP27) += sgi-ip27/
platform-$(CONFIG_SGI_IP28) += sgi-ip22/ platform-$(CONFIG_SGI_IP28) += sgi-ip22/
--- a/arch/mips/Kconfig --- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig +++ b/arch/mips/Kconfig
@@ -968,8 +968,58 @@ config CAVIUM_OCTEON_SOC @@ -620,21 +620,23 @@ config RALINK
Hikari
Say Y here for most Octeon reference boards.
+config RTL83XX config MACH_REALTEK_RTL
+ bool "Realtek based platforms" bool "Realtek RTL838x/RTL839x based machines"
+ select DMA_NONCOHERENT - select MIPS_GENERIC
+ select IRQ_MIPS_CPU select DMA_NONCOHERENT
select IRQ_MIPS_CPU
- select CSRC_R4K
- select CEVT_R4K
select SYS_HAS_CPU_MIPS32_R1
select SYS_HAS_CPU_MIPS32_R2
select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_MIPS16
- select SYS_SUPPORTS_MULTITHREADING
- select SYS_SUPPORTS_VPE_LOADER
select BOOT_RAW
select PINCTRL
select USE_OF
+ select NO_EXCEPT_FILL + select NO_EXCEPT_FILL
+ select SYS_HAS_CPU_MIPS32_R1
+ select SYS_HAS_CPU_MIPS32_R2
+ select SYS_SUPPORTS_BIG_ENDIAN
+ select SYS_SUPPORTS_HIGHMEM + select SYS_SUPPORTS_HIGHMEM
+ select SYS_SUPPORTS_32BIT_KERNEL
+ select SYS_SUPPORTS_MIPS16
+ select SYS_HAS_EARLY_PRINTK + select SYS_HAS_EARLY_PRINTK
+ select SYS_HAS_EARLY_PRINTK_8250 + select SYS_HAS_EARLY_PRINTK_8250
+ select USE_GENERIC_EARLY_PRINTK_8250 + select USE_GENERIC_EARLY_PRINTK_8250
+ select BOOT_RAW
+ select PINCTRL
+ select ARCH_HAS_RESET_CONTROLLER + select ARCH_HAS_RESET_CONTROLLER
+ select RESET_CONTROLLER + select RESET_CONTROLLER
+ select USE_OF
+ config SGI_IP22
bool "SGI IP22 (Indy/Indigo2)"
@@ -970,6 +972,36 @@ config CAVIUM_OCTEON_SOC
endchoice endchoice
+config RTL838X +config RTL838X
+ bool "Realtek RTL838X based platforms" + bool "Realtek RTL838X based platforms"
+ depends on RTL83XX + depends on MACH_REALTEK_RTL
+ select CPU_SUPPORTS_CPUFREQ + select CPU_SUPPORTS_CPUFREQ
+ select MIPS_EXTERNAL_TIMER + select MIPS_EXTERNAL_TIMER
+ +
+config RTL839X +config RTL839X
+ bool "Realtek RTL839X based platforms" + bool "Realtek RTL839X based platforms"
+ depends on RTL83XX + depends on MACH_REALTEK_RTL
+ select CPU_SUPPORTS_CPUFREQ + select CPU_SUPPORTS_CPUFREQ
+ select MIPS_EXTERNAL_TIMER + select MIPS_EXTERNAL_TIMER
+ select SYS_SUPPORTS_MULTITHREADING + select SYS_SUPPORTS_MULTITHREADING
+ +
+config RTL930X +config RTL930X
+ bool "Realtek RTL930X based platforms" + bool "Realtek RTL930X based platforms"
+ depends on RTL83XX + depends on MACH_REALTEK_RTL
+ select MIPS_CPU_SCACHE + select MIPS_CPU_SCACHE
+ select MIPS_EXTERNAL_TIMER + select MIPS_EXTERNAL_TIMER
+ select SYS_SUPPORTS_MULTITHREADING + select SYS_SUPPORTS_MULTITHREADING

View File

@ -31,7 +31,7 @@ Submitted-by: John Crispin <john@phrozen.org>
+config GPIO_RTL8231 +config GPIO_RTL8231
+ tristate "RTL8231 GPIO" + tristate "RTL8231 GPIO"
+ depends on RTL83XX + depends on MACH_REALTEK_RTL
+ help + help
+ Say yes here to support Realtek RTL8231 GPIO expansion chips. + Say yes here to support Realtek RTL8231 GPIO expansion chips.
+ +

View File

@ -1,26 +0,0 @@
From 9bac1c20b8f39f2e0e342b087add5093b94feaed Mon Sep 17 00:00:00 2001
From: INAGAKI Hiroshi <musashino.open@gmail.com>
Date: Wed, 5 May 2021 22:05:39 +0900
Subject: realtek: backport gpio-realtek-otto driver from 5.13 to 5.10
This patch backports "gpio-realtek-otto" driver to Kernel 5.10.
"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
is used in OpenWrt, so update the dependency by the additional patch.
Submitted-by: INAGAKI Hiroshi <musashino.open@gmail.com>
---
drivers/gpio/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -527,8 +527,8 @@ config GPIO_RDA
config GPIO_REALTEK_OTTO
tristate "Realtek Otto GPIO support"
- depends on MACH_REALTEK_RTL
- default MACH_REALTEK_RTL
+ depends on RTL83XX
+ default RTL838X
select GPIO_GENERIC
select GPIOLIB_IRQCHIP
help

View File

@ -1,25 +0,0 @@
From 0b000cbfe0aa0323bffa855ef8449c0687a4c071 Mon Sep 17 00:00:00 2001
From: INAGAKI Hiroshi <musashino.open@gmail.com>
Date: Thu, 6 May 2021 19:30:58 +0900
Subject: realtek: backport spi-realtek-rtl driver from 5.12 to 5.10
This patch backports "spi-realtek-rtl" driver to Kernel 5.10 from 5.12.
"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
is used in OpenWrt, so update the dependency by the additional patch.
Submitted-by: INAGAKI Hiroshi <musashino.open@gmail.com>
---
drivers/spi/Makefile | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -114,7 +114,7 @@ obj-$(CONFIG_SPI_QUP) += spi-qup.o
obj-$(CONFIG_SPI_ROCKCHIP) += spi-rockchip.o
obj-$(CONFIG_SPI_ROCKCHIP_SFC) += spi-rockchip-sfc.o
obj-$(CONFIG_SPI_RB4XX) += spi-rb4xx.o
-obj-$(CONFIG_MACH_REALTEK_RTL) += spi-realtek-rtl.o
+obj-$(CONFIG_RTL83XX) += spi-realtek-rtl.o
obj-$(CONFIG_SPI_RPCIF) += spi-rpc-if.o
obj-$(CONFIG_SPI_RSPI) += spi-rspi.o
obj-$(CONFIG_SPI_RZV2M_CSI) += spi-rzv2m-csi.o

View File

@ -1,25 +0,0 @@
From 2cd00b51470a30198b048a5fca48a04db77e29cc Mon Sep 17 00:00:00 2001
From: INAGAKI Hiroshi <musashino.open@gmail.com>
Date: Fri, 21 May 2021 23:16:37 +0900
Subject: [PATCH] realtek: backport irq-realtek-rtl driver from 5.12 to 5.10
This patch backports "irq-realtek-rtl" driver to Kernel 5.10 from 5.12.
"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
is used in OpenWrt, so update the dependency by the additional patch.
Submitted-by: INAGAKI Hiroshi <musashino.open@gmail.com>
---
drivers/irqchip/Makefile | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -114,7 +114,7 @@ obj-$(CONFIG_LOONGSON_PCH_MSI) += irq-l
obj-$(CONFIG_LOONGSON_PCH_LPC) += irq-loongson-pch-lpc.o
obj-$(CONFIG_MST_IRQ) += irq-mst-intc.o
obj-$(CONFIG_SL28CPLD_INTC) += irq-sl28cpld.o
-obj-$(CONFIG_MACH_REALTEK_RTL) += irq-realtek-rtl.o
+obj-$(CONFIG_RTL83XX) += irq-realtek-rtl.o
obj-$(CONFIG_WPCM450_AIC) += irq-wpcm450-aic.o
obj-$(CONFIG_IRQ_IDT3243X) += irq-idt3243x.o
obj-$(CONFIG_APPLE_AIC) += irq-apple-aic.o

View File

@ -1,32 +0,0 @@
From b8fc5eecdc5d33cf261986436597b5482ab856da Mon Sep 17 00:00:00 2001
From: Sander Vanheule <sander@svanheule.net>
Date: Sun, 14 Nov 2021 19:45:32 +0100
Subject: [PATCH] realtek: Backport Realtek Otto WDT driver
Add patch submitted upstream to linux-watchdog and replace the MIPS
architecture symbols. Requires one extra patch for the DIV_ROUND_*
macros, which have moved to a different header since 5.10.
Submitted-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
---
drivers/watchdog/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -977,10 +977,10 @@ config RTD119X_WATCHDOG
config REALTEK_OTTO_WDT
tristate "Realtek Otto MIPS watchdog support"
- depends on MACH_REALTEK_RTL || COMPILE_TEST
+ depends on RTL83XX
depends on COMMON_CLK
select WATCHDOG_CORE
- default MACH_REALTEK_RTL
+ default RTL83XX
help
Say Y here to include support for the watchdog timer on Realtek
RTL838x, RTL839x, RTL930x SoCs. This watchdog has pretimeout

View File

@ -29,7 +29,7 @@ Submitted-by: John Crispin <john@phrozen.org>
+ +
+config NET_RTL838X +config NET_RTL838X
+ tristate "Realtek rtl838x Ethernet MAC support" + tristate "Realtek rtl838x Ethernet MAC support"
+ depends on RTL83XX + depends on MACH_REALTEK_RTL
+ help + help
+ Say Y here if you want to use the Realtek rtl838x Gbps Ethernet MAC. + Say Y here if you want to use the Realtek rtl838x Gbps Ethernet MAC.
+ +

View File

@ -20,7 +20,7 @@ Submitted-by: Birger Koblitz <mail@birger-koblitz.de>
+config REALTEK_SOC_PHY +config REALTEK_SOC_PHY
+ tristate "Realtek SoC PHYs" + tristate "Realtek SoC PHYs"
+ depends on RTL83XX + depends on MACH_REALTEK_RTL
+ help + help
+ Supports the PHYs found in combination with Realtek Switch SoCs + Supports the PHYs found in combination with Realtek Switch SoCs
+ +

View File

@ -116,6 +116,7 @@ CONFIG_JFFS2_ZLIB=y
CONFIG_LEDS_GPIO=y CONFIG_LEDS_GPIO=y
CONFIG_LIBFDT=y CONFIG_LIBFDT=y
CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_MACH_REALTEK_RTL=y
CONFIG_MARVELL_PHY=y CONFIG_MARVELL_PHY=y
CONFIG_MDIO_BUS=y CONFIG_MDIO_BUS=y
CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVICE=y
@ -192,7 +193,6 @@ CONFIG_REGMAP_MMIO=y
CONFIG_RESET_CONTROLLER=y CONFIG_RESET_CONTROLLER=y
CONFIG_RTL838X=y CONFIG_RTL838X=y
# CONFIG_RTL839X is not set # CONFIG_RTL839X is not set
CONFIG_RTL83XX=y
# CONFIG_RTL930X is not set # CONFIG_RTL930X is not set
CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_OF_PLATFORM=y

View File

@ -115,6 +115,7 @@ CONFIG_JFFS2_ZLIB=y
CONFIG_LEDS_GPIO=y CONFIG_LEDS_GPIO=y
CONFIG_LIBFDT=y CONFIG_LIBFDT=y
CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_MACH_REALTEK_RTL=y
CONFIG_MARVELL_PHY=y CONFIG_MARVELL_PHY=y
CONFIG_MDIO_BUS=y CONFIG_MDIO_BUS=y
CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVICE=y
@ -204,7 +205,6 @@ CONFIG_RFS_ACCEL=y
CONFIG_RPS=y CONFIG_RPS=y
# CONFIG_RTL838X is not set # CONFIG_RTL838X is not set
CONFIG_RTL839X=y CONFIG_RTL839X=y
CONFIG_RTL83XX=y
# CONFIG_RTL930X is not set # CONFIG_RTL930X is not set
CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_OF_PLATFORM=y

View File

@ -97,6 +97,7 @@ CONFIG_JFFS2_ZLIB=y
CONFIG_LEDS_GPIO=y CONFIG_LEDS_GPIO=y
CONFIG_LIBFDT=y CONFIG_LIBFDT=y
CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_MACH_REALTEK_RTL=y
CONFIG_MARVELL_PHY=y CONFIG_MARVELL_PHY=y
CONFIG_MDIO_BUS=y CONFIG_MDIO_BUS=y
CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVICE=y
@ -172,7 +173,6 @@ CONFIG_REGMAP_MMIO=y
CONFIG_RESET_CONTROLLER=y CONFIG_RESET_CONTROLLER=y
# CONFIG_RTL838X is not set # CONFIG_RTL838X is not set
# CONFIG_RTL839X is not set # CONFIG_RTL839X is not set
CONFIG_RTL83XX=y
CONFIG_RTL930X=y CONFIG_RTL930X=y
# CONFIG_RTL931X is not set # CONFIG_RTL931X is not set
CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_MCTRL_GPIO=y

View File

@ -106,6 +106,7 @@ CONFIG_KMAP_LOCAL=y
CONFIG_LEDS_GPIO=y CONFIG_LEDS_GPIO=y
CONFIG_LIBFDT=y CONFIG_LIBFDT=y
CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_MACH_REALTEK_RTL=y
CONFIG_MARVELL_PHY=y CONFIG_MARVELL_PHY=y
CONFIG_MDIO_BUS=y CONFIG_MDIO_BUS=y
CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVICE=y
@ -195,7 +196,6 @@ CONFIG_RFS_ACCEL=y
CONFIG_RPS=y CONFIG_RPS=y
# CONFIG_RTL838X is not set # CONFIG_RTL838X is not set
# CONFIG_RTL839X is not set # CONFIG_RTL839X is not set
CONFIG_RTL83XX=y
CONFIG_RTL930X=y CONFIG_RTL930X=y
CONFIG_RTL931X=y CONFIG_RTL931X=y
CONFIG_SENSORS_GPIO_FAN=y CONFIG_SENSORS_GPIO_FAN=y

View File

@ -48,6 +48,7 @@ CONFIG_COMPAT_32=y
CONFIG_COMPAT_32BIT_TIME=y CONFIG_COMPAT_32BIT_TIME=y
# CONFIG_COMPAT_VDSO is not set # CONFIG_COMPAT_VDSO is not set
CONFIG_CONSOLE_TRANSLATIONS=y CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_CONTEXT_TRACKING_USER_FORCE=y
# CONFIG_CPU5_WDT is not set # CONFIG_CPU5_WDT is not set
CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
@ -61,7 +62,10 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_HALTPOLL=y
CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_CPU_IDLE_GOV_TEO=y
CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_MITIGATIONS=y
CONFIG_CPU_SUP_AMD=y CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y CONFIG_CPU_SUP_CENTAUR=y
@ -180,7 +184,6 @@ CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_GEODE=y CONFIG_HW_RANDOM_GEODE=y
CONFIG_HW_RANDOM_VIA=y CONFIG_HW_RANDOM_VIA=y
# CONFIG_HYPERVISOR_GUEST is not set # CONFIG_HYPERVISOR_GUEST is not set
CONFIG_HZ_PERIODIC=y
CONFIG_I8253_LOCK=y CONFIG_I8253_LOCK=y
CONFIG_IA32_FEAT_CTL=y CONFIG_IA32_FEAT_CTL=y
# CONFIG_IB700_WDT is not set # CONFIG_IB700_WDT is not set
@ -276,6 +279,9 @@ CONFIG_NET_XGRESS=y
CONFIG_NLS=y CONFIG_NLS=y
# CONFIG_NMI_CHECK_CPU is not set # CONFIG_NMI_CHECK_CPU is not set
# CONFIG_NOHIGHMEM is not set # CONFIG_NOHIGHMEM is not set
CONFIG_NO_HZ=y
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_FULL=y
CONFIG_NR_CPUS=1 CONFIG_NR_CPUS=1
CONFIG_NR_CPUS_DEFAULT=1 CONFIG_NR_CPUS_DEFAULT=1
CONFIG_NR_CPUS_RANGE_BEGIN=1 CONFIG_NR_CPUS_RANGE_BEGIN=1
@ -331,6 +337,8 @@ CONFIG_PTP_1588_CLOCK_OPTIONAL=y
# CONFIG_PUNIT_ATOM_DEBUG is not set # CONFIG_PUNIT_ATOM_DEBUG is not set
CONFIG_RANDSTRUCT_NONE=y CONFIG_RANDSTRUCT_NONE=y
CONFIG_RATIONAL=y CONFIG_RATIONAL=y
CONFIG_RCU_LAZY=y
CONFIG_RCU_NOCB_CPU_DEFAULT_ALL=y
CONFIG_RD_BZIP2=y CONFIG_RD_BZIP2=y
CONFIG_RD_GZIP=y CONFIG_RD_GZIP=y
CONFIG_RETHUNK=y CONFIG_RETHUNK=y