Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
329714b778
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_CPE_ID:=cpe:/a:gnu:grub2
|
||||
PKG_VERSION:=2.06~rc1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=grub-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/grub
|
||||
@ -49,6 +49,7 @@ CONFIGURE_ARGS += \
|
||||
--disable-nls \
|
||||
--disable-device-mapper \
|
||||
--disable-libzfs \
|
||||
--disable-liblzma \
|
||||
--disable-grub-mkfont \
|
||||
--with-platform=none
|
||||
|
||||
|
||||
@ -12,9 +12,11 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=default-settings
|
||||
PKG_VERSION:=1.1
|
||||
PKG_RELEASE:=61
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_RELEASE:=$(COMMITCOUNT)
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_DEFAULT_SETTINGS_OPTIMIZE_FOR_CHINESE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -23,7 +25,14 @@ define Package/default-settings
|
||||
CATEGORY:=LuCI
|
||||
TITLE:=LuCI support for Default Settings
|
||||
PKGARCH:=all
|
||||
DEPENDS:=+luci-base +@LUCI_LANG_en +@LUCI_LANG_zh-cn
|
||||
DEPENDS:=+luci-base +@LUCI_LANG_en
|
||||
endef
|
||||
|
||||
define Package/default-settings/config
|
||||
config DEFAULT_SETTINGS_OPTIMIZE_FOR_CHINESE
|
||||
bool "Optimize for mainland China users"
|
||||
select LUCI_LANG_zh-cn
|
||||
default y
|
||||
endef
|
||||
|
||||
define Package/default-settings/description
|
||||
@ -31,7 +40,6 @@ define Package/default-settings/description
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/default-settings/install
|
||||
@ -41,9 +49,13 @@ define Package/default-settings/install
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/zzz-default-settings $(1)/etc/uci-defaults/99-default-settings
|
||||
|
||||
ifeq ($(CONFIG_DEFAULT_SETTINGS_OPTIMIZE_FOR_CHINESE),y)
|
||||
$(INSTALL_BIN) ./files/zzz-default-settings-chinese $(1)/etc/uci-defaults/99-default-settings-chinese
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
||||
po2lmo ./i18n/default.zh-cn.po $(1)/usr/lib/lua/luci/i18n/default.zh-cn.lmo
|
||||
po2lmo ./i18n/more.zh-cn.po $(1)/usr/lib/lua/luci/i18n/more.zh-cn.lmo
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,default-settings))
|
||||
|
||||
@ -3,10 +3,6 @@
|
||||
uci set luci.main.lang=auto
|
||||
uci commit luci
|
||||
|
||||
uci set system.@system[0].timezone=CST-8
|
||||
uci set system.@system[0].zonename=Asia/Shanghai
|
||||
uci commit system
|
||||
|
||||
uci set fstab.@global[0].anon_mount=1
|
||||
uci commit fstab
|
||||
|
||||
@ -29,7 +25,6 @@ sed -i 's/services/nas/g' /usr/lib/lua/luci/view/minidlna_status.htm
|
||||
|
||||
ln -sf /sbin/ip /usr/bin/ip
|
||||
|
||||
sed -i 's#https://downloads.openwrt.org#https://mirrors.tencent.com/lede#g' /etc/opkg/distfeeds.conf
|
||||
sed -i '/openwrt_luci/ { s/snapshots/releases\/18.06.9/g; }' /etc/opkg/distfeeds.conf
|
||||
sed -i "s/# //g" /etc/opkg/distfeeds.conf
|
||||
|
||||
|
||||
9
package/emortal/default-settings/files/zzz-default-settings-chinese
Executable file
9
package/emortal/default-settings/files/zzz-default-settings-chinese
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci set system.@system[0].timezone=CST-8
|
||||
uci set system.@system[0].zonename=Asia/Shanghai
|
||||
uci commit system
|
||||
|
||||
sed -i 's#https://downloads.openwrt.org#https://mirrors.tencent.com/lede#g' /etc/opkg/distfeeds.conf
|
||||
|
||||
exit 0
|
||||
56
package/kernel/r8152/Makefile
Normal file
56
package/kernel/r8152/Makefile
Normal file
@ -0,0 +1,56 @@
|
||||
#Download realtek r8152 linux driver from official site [https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software]
|
||||
#Unpack source file
|
||||
#Replace orginal Makefile with this file
|
||||
#Put this source to 'package' folder of OpenWRT/LEDE SDK
|
||||
#Build(make menuconfig, make defconfig, make)
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=r8152
|
||||
PKG_VERSION:=2.14
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/wget/realtek-r8152-linux/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=617c159eb72355c240be3f78971e5a01c9dffe5545a7ae76bb2bd87bb7a346ed
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-linux-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINTER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/usb-net-rtl8152-vendor
|
||||
TITLE:=Kernel module for USB-to-Ethernet Realtek convertors
|
||||
SUBMENU:=USB Support
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=@LINUX_5_4 +kmod-usb-net
|
||||
CONFLICTS:=kmod-usb-net-rtl8152
|
||||
FILES:= $(PKG_BUILD_DIR)/r8152.ko
|
||||
AUTOLOAD:=$(call AutoProbe,r8152)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-net-rtl8152-vendor/description
|
||||
Kernel module for Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
|
||||
endef
|
||||
|
||||
R8152_MAKEOPTS= -C $(PKG_BUILD_DIR) \
|
||||
PATH="$(TARGET_PATH)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
TARGET="$(HAL_TARGET)" \
|
||||
TOOLPREFIX="$(KERNEL_CROSS)" \
|
||||
TOOLPATH="$(KERNEL_CROSS)" \
|
||||
KERNELPATH="$(LINUX_DIR)" \
|
||||
KERNELDIR="$(LINUX_DIR)" \
|
||||
LDOPTS=" " \
|
||||
DOMULTI=1
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) $(R8152_MAKEOPTS) modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-net-rtl8152-vendor))
|
||||
@ -0,0 +1,74 @@
|
||||
From 82985725e071f2a5735052f18e109a32aeac3a0b Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sun, 26 Jul 2020 02:38:31 +0200
|
||||
Subject: [PATCH] add LED configuration from OF
|
||||
|
||||
This adds the ability to configure the LED configuration register using
|
||||
OF. This way, the correct value for board specific LED configuration can
|
||||
be determined.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
r8152.c | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
--- a/r8152.c
|
||||
+++ b/r8152.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/mii.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/usb.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/uaccess.h>
|
||||
@@ -9736,6 +9737,22 @@ static void rtl_tally_reset(struct r8152
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data);
|
||||
}
|
||||
|
||||
+static int r8152_led_configuration(struct r8152 *tp)
|
||||
+{
|
||||
+ u32 led_data;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = of_property_read_u32(tp->udev->dev.of_node, "realtek,led-data",
|
||||
+ &led_data);
|
||||
+
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_LEDSEL, led_data);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void r8152b_init(struct r8152 *tp)
|
||||
{
|
||||
u32 ocp_data;
|
||||
@@ -9797,6 +9814,8 @@ static void r8152b_init(struct r8152 *tp
|
||||
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
|
||||
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
|
||||
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
|
||||
+
|
||||
+ r8152_led_configuration(tp);
|
||||
}
|
||||
|
||||
static void r8153_init(struct r8152 *tp)
|
||||
@@ -9937,6 +9956,8 @@ static void r8153_init(struct r8152 *tp)
|
||||
tp->coalesce = COALESCE_SLOW;
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ r8152_led_configuration(tp);
|
||||
}
|
||||
|
||||
static void r8153b_init(struct r8152 *tp)
|
||||
@@ -10026,6 +10047,8 @@ static void r8153b_init(struct r8152 *tp
|
||||
rtl_tally_reset(tp);
|
||||
|
||||
tp->coalesce = 15000; /* 15 us */
|
||||
+
|
||||
+ r8152_led_configuration(tp);
|
||||
}
|
||||
|
||||
static void r8153c_init(struct r8152 *tp)
|
||||
@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=wireguard-tools
|
||||
|
||||
PKG_VERSION:=1.0.20210315
|
||||
PKG_VERSION:=1.0.20210424
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
|
||||
PKG_HASH:=af001d5492be6bf58ef0bebe04b446b6f50eb53e1226fab679cc34af40733a22
|
||||
PKG_HASH:=b288b0c43871d919629d7e77846ef0b47f8eeaa9ebc9cedeee8233fc6cc376ad
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
@ -98,6 +98,10 @@ endif
|
||||
|
||||
LDLIBS += $(call BUSYBOX_IF_ENABLED,PAM,pam pam_misc pthread)
|
||||
|
||||
ifeq ($(CONFIG_USE_GLIBC),y)
|
||||
LDLIBS += $(call BUSYBOX_IF_ENABLED,NSLOOKUP,resolv)
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),selinux)
|
||||
LDLIBS += selinux sepol
|
||||
endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user