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:
  hostapd: sync upstream (coolsnowwolf#7925)
  base-files: reduce sed calls (coolsnowwolf#7924)
  ramips: mt7530 use lock to protect registers access
  iproute2: update to 5.14 (coolsnowwolf#7887)
  qbittorrent: bump to v4.3.8 (coolsnowwolf#7919)
  x86: add missing symbol
  rtl8821cu: add package
  luci-app-diskman: sync upstream source code
  x86: add missing kernel config
  • Loading branch information
github-actions[bot] committed Sep 24, 2021
2 parents f210434 + be087a4 commit 5e78f77
Show file tree
Hide file tree
Showing 42 changed files with 2,903 additions and 146 deletions.
42 changes: 21 additions & 21 deletions package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,45 +142,45 @@ define Package/base-files/install

$(VERSION_SED_SCRIPT) \
$(1)/etc/banner \
$(1)/etc/device_info \
$(1)/etc/openwrt_release \
$(1)/etc/openwrt_version \
$(1)/usr/lib/os-release

$(VERSION_SED_SCRIPT) \
$(1)/etc/openwrt_release \
$(1)/etc/device_info \
$(1)/usr/lib/os-release

$(SED) "s#%PATH%#$(TARGET_INIT_PATH)#g" \
$(1)/sbin/hotplug-call \
$(1)/etc/preinit \
$(1)/etc/profile

mkdir -p $(1)/CONTROL
mkdir -p $(1)/dev
mkdir -p $(1)/etc/config
mkdir -p $(1)/etc/crontabs
mkdir -p $(1)/etc/rc.d
mkdir -p $(1)/overlay
mkdir -p $(1)/lib/firmware
mkdir -p \
$(1)/CONTROL \
$(1)/dev \
$(1)/etc/config \
$(1)/etc/crontabs \
$(1)/etc/rc.d \
$(1)/overlay \
$(1)/lib/firmware \
$(1)/mnt \
$(1)/proc \
$(1)/tmp \
$(1)/usr/lib \
$(1)/usr/bin \
$(1)/sys \
$(1)/www \
$(1)/root

$(LN) /proc/mounts $(1)/etc/mtab
$(if $(LIB_SUFFIX),-$(LN) lib $(1)/lib$(LIB_SUFFIX))
mkdir -p $(1)/mnt
mkdir -p $(1)/proc
mkdir -p $(1)/tmp
mkdir -p $(1)/usr/lib
$(if $(LIB_SUFFIX),-$(LN) lib $(1)/usr/lib$(LIB_SUFFIX))
mkdir -p $(1)/usr/bin
mkdir -p $(1)/sys
mkdir -p $(1)/www
mkdir -p $(1)/root
$(LN) /proc/mounts $(1)/etc/mtab

ifneq ($(CONFIG_TARGET_ROOTFS_PERSIST_VAR),y)
rm -f $(1)/var
$(LN) tmp $(1)/var
else
mkdir -p $(1)/var
$(LN) /tmp/run $(1)/var/run
endif
mkdir -p $(1)/etc
$(LN) /tmp/resolv.conf /tmp/TZ /tmp/localtime $(1)/etc/

chmod 0600 $(1)/etc/shadow
Expand Down
86 changes: 86 additions & 0 deletions package/kernel/rtl8821cu/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#
# Copyright (C) 2021 ImmortalWrt
# <https://immortalwrt.org>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=rtl8821cu
PKG_RELEASE:=1

PKG_SOURCE_URL:=https://github.com/brektrou/rtl8821CU.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2020-12-19
PKG_SOURCE_VERSION:=428a0820487418ec69c0edb91726d1cf19763b1e
PKG_MIRROR_HASH:=77958d3bff8b0145504a10959765be0e3743b9c4880a5173d156238c2c569a56

PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINTER:=CN_SZTL <[email protected]>

PKG_BUILD_PARALLEL:=1

STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h

include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk

define KernelPackage/rtl8821cu
SUBMENU:=Wireless Drivers
TITLE:=Realtek RTL8811CU/RTL8821CU support
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
FILES:=$(PKG_BUILD_DIR)/rtl8821cu.ko
AUTOLOAD:=$(call AutoProbe,rtl8821cu)
PROVIDES:=kmod-rtl8821cu
endef

NOSTDINC_FLAGS = \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211 \
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
-include backport/autoconf.h \
-include backport/backport.h

EXTRA_KCONFIG:= \
CONFIG_RTL8821CU=m \
USER_MODULE_NAME=rtl8821cu

ifeq ($(ARCH),aarch64)
EXTRA_KCONFIG += CONFIG_MP_VHT_HW_TX_MODE=n
endif

EXTRA_CFLAGS:= \
-DRTW_SINGLE_WIPHY \
-DRTW_USE_CFG80211_STA_EVENT \
-DCONFIG_IOCTL_CFG80211 \
-DCONFIG_CONCURRENT_MODE \
-DBUILD_OPENWRT

ifeq ($(ARCH),arm)
EXTRA_CFLAGS += -mfloat-abi=softfp
endif

ifeq ($(BOARD),x86)
EXTRA_CFLAGS += -mhard-float
endif

MAKE_OPTS:= \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
USER_EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)

define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef

$(eval $(call KernelPackage,rtl8821cu))
15 changes: 15 additions & 0 deletions package/kernel/rtl8821cu/patches/001-use-kernel-byteorder.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Fix compile problem when rtw_byteorder.h and asm/byteorder.h gets
included in addition for example indirectly, do not use realtek own copy
of the byteorder headers.

--- a/include/drv_types.h
+++ b/include/drv_types.h
@@ -25,7 +25,7 @@
#include <drv_conf.h>
#include <basic_types.h>
#include <osdep_service.h>
-#include <rtw_byteorder.h>
+#include <asm/byteorder.h>
#include <wlan_bssdef.h>
#include <wifi.h>
#include <ieee80211.h>
11 changes: 11 additions & 0 deletions package/kernel/rtl8821cu/patches/010-remove-extra-cflags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/Makefile
+++ b/Makefile
@@ -2103,8 +2103,6 @@ ifeq ($(ARCH), i386)
EXTRA_CFLAGS += -mhard-float
else ifeq ($(ARCH), x86_64)
EXTRA_CFLAGS += -mhard-float
-else ifeq ($(ARCH), arm)
-EXTRA_CFLAGS += -mfloat-abi=hard
endif

ifeq ($(CONFIG_MULTIDRV), y)
39 changes: 39 additions & 0 deletions package/kernel/rtl8821cu/patches/020-remove-repeat-flies.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 9b2b0ec1bc2d31ddf93ed74d63fdfa6044e329a4 Mon Sep 17 00:00:00 2001
From: Ben Greear <[email protected]>
Date: Fri, 9 Nov 2018 16:21:43 -0800
Subject: [PATCH] Fix build against openwrt backports tree.

Like breaks builds elsewhere, can fix it up later.

Signed-off-by: Ben Greear <[email protected]>
---
include/drv_conf.h | 4 +++-
.../{wireless.h => old_unused_rtl_wireless.h} | 0
include/{autoconf.h => rtl_autoconf.h} | 0
3 files changed, 3 insertions(+), 1 deletions(-)
rename include/linux/{wireless.h => old_unused_rtl_wireless.h} (100%)
rename include/{autoconf.h => rtl_autoconf.h} (100%)

diff --git a/include/drv_conf.h b/include/drv_conf.h
index 0d20a7e..f0a9f88 100644
--- a/include/drv_conf.h
+++ b/include/drv_conf.h
@@ -14,7 +14,9 @@
*****************************************************************************/
#ifndef __DRV_CONF_H__
#define __DRV_CONF_H__
-#include "autoconf.h"
+
+#include <generated/autoconf.h>
+#include "rtl_autoconf.h"
#include "hal_ic_cfg.h"

#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
diff --git a/include/linux/wireless.h b/include/linux/old_unused_rtl_wireless.h
similarity index 100%
rename from include/linux/wireless.h
rename to include/linux/old_unused_rtl_wireless.h
diff --git a/include/autoconf.h b/include/rtl_autoconf.h
similarity index 100%
rename from include/autoconf.h
rename to include/rtl_autoconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -238,7 +238,7 @@
#endif /* CONFIG_80211N_HT */

#ifdef CONFIG_80211AC_VHT
-int rtw_vht_enable = 1; /* 0:disable, 1:enable, 2:force auto enable */
+int rtw_vht_enable = 2; /* 0:disable, 1:enable, 2:force auto enable */
module_param(rtw_vht_enable, int, 0644);

int rtw_ampdu_factor = 7;
58 changes: 58 additions & 0 deletions package/kernel/rtl8821cu/patches/040-wireless-5.8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index d9c81c9..3e7e27a 100755
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -7149,7 +7149,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
#else
struct net_device *ndev,
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT)
struct mgmt_frame_regs *upd)
#else
u16 frame_type, bool reg)
@@ -7178,7 +7178,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
/* Wait QC Verify */
return;

-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT)
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, upd->interface_stypes & BIT(IEEE80211_STYPE_PROBE_REQ >> 4));
#else
switch (frame_type) {
@@ -9467,7 +9467,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
.mgmt_tx = cfg80211_rtw_mgmt_tx,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT)
.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
#else
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
index 257c581..f97fa24 100755
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -1302,6 +1302,14 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
}


+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
+static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
+ , struct net_device *sb_dev
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0))
+ , select_queue_fallback_t fallback
+ #endif
+)
+#else
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
, void *accel_priv
@@ -1310,6 +1318,7 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
#endif
#endif
)
+#endif
{
_adapter *padapter = rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
68 changes: 18 additions & 50 deletions package/lean/luci-app-diskman/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,52 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-diskman
PKG_VERSION:=v0.2.11
PKG_RELEASE:=beta
PKG_MAINTAINER:=lisaac <https://github.com/lisaac/luci-app-diskman>
PKG_LICENSE:=AGPL-3.0
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/lisaac/luci-app-diskman.git
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_MAINTAINER:=lisaac <[email protected]>
PKG_LICENSE:=AGPL-3.0

PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)/applications/luci-app-diskman
LUCI_TITLE:=Disk Manager interface for LuCI
LUCI_DEPENDS:=+blkid +e2fsprogs +parted +smartmontools \
+PACKAGE_$(PKG_NAME)_INCLUDE_btrfs_progs:btrfs-progs \
+PACKAGE_$(PKG_NAME)_INCLUDE_lsblk:lsblk \
+PACKAGE_$(PKG_NAME)_INCLUDE_mdadm:mdadm \
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_raid456:mdadm \
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_raid456:kmod-md-raid456 \
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linears:mdadm \
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linears:kmod-md-linear

include $(INCLUDE_DIR)/package.mk

define Package/$(PKG_NAME)/config
config PACKAGE_$(PKG_NAME)_INCLUDE_btrfs_progs
bool "Include btrfs-progs"
default y

config PACKAGE_$(PKG_NAME)_INCLUDE_lsblk
bool "Include lsblk"
default y

config PACKAGE_$(PKG_NAME)_INCLUDE_mdadm
bool "Include mdadm"
default n

config PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_raid456
depends on PACKAGE_$(PKG_NAME)_INCLUDE_mdadm
bool "Include kmod-md-raid456"
default n

config PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linear
depends on PACKAGE_$(PKG_NAME)_INCLUDE_mdadm
bool "Include kmod-md-linear"
default n
endef

define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=Disk Manager interface for LuCI
PKGARCH:=all
DEPENDS:=+e2fsprogs +parted +smartmontools +blkid \
+PACKAGE_$(PKG_NAME)_INCLUDE_btrfs_progs:btrfs-progs \
+PACKAGE_$(PKG_NAME)_INCLUDE_lsblk:lsblk \
+PACKAGE_$(PKG_NAME)_INCLUDE_mdadm:mdadm \
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_raid456:mdadm \
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_raid456:kmod-md-raid456 \
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linears:mdadm \
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linears:kmod-md-linear
endef

define Package/$(PKG_NAME)/description
Disk Manager interface for LuCI
endef

define Build/Prepare
tar -xzvf $(DL_DIR)/$(PKG_SOURCE) -C $(BUILD_DIR)
endef

define Build/Compile
endef

define Package/$(PKG_NAME)/postinst
#!/bin/sh
rm -fr /tmp/luci-indexcache /tmp/luci-modulecache
endef

define Package/$(PKG_NAME)/install
# $(INSTALL_DIR) $(1)/
# cp -pR $(PKG_BUILD_DIR)/root/* $(1)/
# $(INSTALL_DIR) $(1)/www
# cp -pR $(PKG_BUILD_DIR)/htdoc/* $(1)/www
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
cp -pR $(PKG_BUILD_DIR)/luasrc/* $(1)/usr/lib/lua/luci/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
$$(foreach po,$$(shell find $(PKG_BUILD_DIR)/po/*/*.po), \
po2lmo $$(po) \
$(1)/usr/lib/lua/luci/i18n/diskman.$$(shell echo $$(po) | awk -F'/' '{print $$$$(NF-1)}').lmo;)
#po2lmo $(PKG_BUILD_DIR)/po/zh-cn/diskman.po $(1)/usr/lib/lua/luci/i18n/diskman.zh-cn.lmo
endef
include $(TOPDIR)/feeds/luci/luci.mk

$(eval $(call BuildPackage,$(PKG_NAME)))
# call BuildPackage - OpenWrt buildroot signature
Loading

0 comments on commit 5e78f77

Please sign in to comment.