diff --git a/config/Config-kernel.in b/config/Config-kernel.in index eb1c135b4d..ad17ceeaf6 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -232,6 +232,30 @@ config KERNEL_BLK_DEV_BSG bool "Compile the kernel with SCSI generic v4 support for any block device" default n +config KERNEL_TRANSPARENT_HUGEPAGE + bool + +choice + prompt "Transparent Hugepage Support sysfs defaults" + depends on KERNEL_TRANSPARENT_HUGEPAGE + default KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS + + config KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS + bool "always" + + config KERNEL_TRANSPARENT_HUGEPAGE_MADVISE + bool "madvise" +endchoice + +config KERNEL_HUGETLBFS + bool + +config KERNEL_HUGETLB_PAGE + bool "Compile the kernel with HugeTLB support" + select KERNEL_TRANSPARENT_HUGEPAGE + select KERNEL_HUGETLBFS + default n + config KERNEL_MAGIC_SYSRQ bool "Compile the kernel with SysRq support" default y @@ -373,21 +397,29 @@ if KERNEL_CGROUPS config KERNEL_FREEZER bool - default y if KERNEL_CGROUP_FREEZER config KERNEL_CGROUP_FREEZER - bool "Freezer cgroup subsystem" - default y + bool "legacy Freezer cgroup subsystem" + default n + select KERNEL_FREEZER help Provides a way to freeze and unfreeze all tasks in a cgroup. + (legacy cgroup1-only controller, in cgroup2 freezer + is integrated in the Memory controller) config KERNEL_CGROUP_DEVICE - bool "Device controller for cgroups" - default y + bool "legacy Device controller for cgroups" + default n help Provides a cgroup implementing whitelists for devices which a process in the cgroup can mknod or open. + (legacy cgroup1-only controller) + + config KERNEL_CGROUP_HUGETLB + bool "HugeTLB controller" + default y if KERNEL_HUGETLB_PAGE + depends on KERNEL_HUGETLB_PAGE config KERNEL_CGROUP_PIDS bool "PIDs cgroup subsystem" @@ -396,6 +428,14 @@ if KERNEL_CGROUPS Provides enforcement of process number limits in the scope of a cgroup. + config KERNEL_CGROUP_RDMA + bool "RDMA controller for cgroups" + default y + + config KERNEL_CGROUP_BPF + bool "Support for eBPF programs attached to cgroups" + default y + config KERNEL_CPUSETS bool "Cpuset support" default y if !SMALL_FLASH @@ -431,6 +471,7 @@ if KERNEL_CGROUPS config KERNEL_MEMCG bool "Memory Resource Controller for Control Groups" default y if !SMALL_FLASH + select KERNEL_FREEZER depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18 help Provides a memory resource controller that manages both anonymous @@ -453,7 +494,7 @@ if KERNEL_CGROUPS config KERNEL_MEMCG_SWAP bool "Memory Resource Controller Swap Extension" - default n + default y if !SMALL_FLASH depends on KERNEL_MEMCG help Add swap management feature to memory resource controller. When you @@ -585,12 +626,16 @@ if KERNEL_CGROUPS files in a cgroup which can be useful for debugging. config KERNEL_NET_CLS_CGROUP - bool "Control Group Classifier" - default y + bool "legacy Control Group Classifier" + default n + + config KERNEL_CGROUP_NET_CLASSID + bool "legacy Network classid cgroup" + default n config KERNEL_CGROUP_NET_PRIO - bool "Network priority cgroup" - default y + bool "legacy Network priority cgroup" + default n endif diff --git a/include/image-commands.mk b/include/image-commands.mk index a168af4bd9..76fe2dfb55 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -275,13 +275,6 @@ define Build/check-size } endef -define Build/check-kernel-size - @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $(IMAGE_KERNEL))" ] || { \ - echo "WARNING: Kernel for $@ is too big > $(1)" >&2; \ - rm -f $@; \ - } -endef - define Build/combined-image -sh $(TOPDIR)/scripts/combined-image.sh \ "$(IMAGE_KERNEL)" \ diff --git a/package/ctcgfw/luci-app-oled/luasrc/model/cbi/oled/setting.lua b/package/ctcgfw/luci-app-oled/luasrc/model/cbi/oled/setting.lua index 2b622c7086..7bc8fbf05f 100644 --- a/package/ctcgfw/luci-app-oled/luasrc/model/cbi/oled/setting.lua +++ b/package/ctcgfw/luci-app-oled/luasrc/model/cbi/oled/setting.lua @@ -14,6 +14,23 @@ s:tab("screensaver", translate("screensaver")) o = s:taboption("info", Flag, "enable", translate("Enable")) o.default=0 +o = s:taboption("info", Flag, "autoswitch", translate("Enable Auto switch")) +o.default=0 +from = s:taboption("info", ListValue, "from", translate("From")) +to = s:taboption("info", ListValue, "to", translate("To")) +for i=0,23 do + for j=0,30,30 do + from:value(i*60+j,string.format("%02d:%02d",i,j)) + to:value(i*60+j,string.format("%02d:%02d",i,j)) + end +end +from:value(1440,"24:00") +to:value(1440,"24:00") +from:depends("autoswitch",'1') +to:depends("autoswitch",'1') +from.default=0 +to.default=1440 + --informtion options---- o = s:taboption("info", Flag, "date", translate("Date"), translate('Format YYYY-MM-DD HH:MM:SS')) o.default=0 diff --git a/package/ctcgfw/luci-app-oled/po/zh-cn/oled.po b/package/ctcgfw/luci-app-oled/po/zh-cn/oled.po index 5432ea5604..bc3f8b056a 100644 --- a/package/ctcgfw/luci-app-oled/po/zh-cn/oled.po +++ b/package/ctcgfw/luci-app-oled/po/zh-cn/oled.po @@ -18,6 +18,15 @@ msgstr "CPU温度" msgid "Scroll Text" msgstr "文字滚动" +msgid "Enable Auto switch" +msgstr "启用定时开关" + +msgid "From" +msgstr "起始时间" + +msgid "To" +msgstr "结束时间" + msgid "Text you want to scroll" msgstr "你想要显示的文字" diff --git a/package/ctcgfw/luci-app-oled/root/etc/config/oled b/package/ctcgfw/luci-app-oled/root/etc/config/oled index 25f5208d7f..fd5b0daa68 100644 --- a/package/ctcgfw/luci-app-oled/root/etc/config/oled +++ b/package/ctcgfw/luci-app-oled/root/etc/config/oled @@ -17,4 +17,6 @@ config oled option cputemp '1' option time '60' option enable '0' - + option from '0' + option to '1440' + option autoswitch '0' diff --git a/package/ctcgfw/luci-app-oled/root/etc/init.d/oled b/package/ctcgfw/luci-app-oled/root/etc/init.d/oled index 7beda6f8d5..018962edaf 100755 --- a/package/ctcgfw/luci-app-oled/root/etc/init.d/oled +++ b/package/ctcgfw/luci-app-oled/root/etc/init.d/oled @@ -3,11 +3,34 @@ START=1OO PROG=/usr/bin/oled +stop() { + kill -2 $(pgrep /usr/bin/oled) + kill -9 $(pgrep -f /usr/sbin/netspeed) + echo "oled exit..." +} + start() { enabled=$(uci get oled.@oled[0].enable) if [ $enabled -eq 0 ]; then exit 0 fi + + autoswitch=$(uci get oled.@oled[0].autoswitch) + from=$(uci get oled.@oled[0].from) + to=$(uci get oled.@oled[0].to) + + if [ ${autoswitch} -eq 1 ]; then + hour=$(date +"%H") + min=$(date +"%M") + ihour=`expr $hour + 0` + imin=`expr $min + 0` + now=$(($ihour*60+$imin)) + if [[ $now -lt $from || $now -gt $to ]]; then + stop + exit 0 + fi + fi + #crontab daemon if ! grep "/etc/init.d/oled \+restart" /etc/crontabs/root >/dev/null 2>&1; then echo "*/5 * * * * /etc/init.d/oled restart >/dev/null 2>&1" >> /etc/crontabs/root @@ -33,6 +56,8 @@ start() { scroll=$(uci get oled.@oled[0].scroll) text=$(uci get oled.@oled[0].text) netsource=$(uci get oled.@oled[0].netsource) + + if [ ${netspeed} -eq 1 ]; then nohup /usr/sbin/netspeed ${netsource} >/dev/null 2>&1 & else @@ -43,19 +68,27 @@ start() { } -stop() { - kill -2 $(pgrep /usr/bin/oled) - kill -9 $(pgrep -f /usr/sbin/netspeed) - echo "oled exit..." -} + restart(){ enabled=$(uci get oled.@oled[0].enable) pgrep -f ${PROG} >/dev/null if [ $? -eq 0 ]; then if [ $enabled -eq 1 ]; then - kill -9 $(pgrep /usr/bin/oled) - kill -9 $(pgrep -f /usr/sbin/netspeed) + autoswitch=$(uci get oled.@oled[0].autoswitch) + from=$(uci get oled.@oled[0].from) + to=$(uci get oled.@oled[0].to) + if [ ${autoswitch} -eq 1 ]; then + hour=$(date +"%H") + min=$(date +"%M") + ihour=`expr $hour + 0` + imin=`expr $min + 0` + now=$(($ihour*60+$imin)) + if [[ $now -lt $from || $now -gt $to ]]; then + stop + exit 0 + fi + fi date=$(uci get oled.@oled[0].date) lanip=$(uci get oled.@oled[0].lanip) @@ -77,6 +110,11 @@ restart(){ scroll=$(uci get oled.@oled[0].scroll) text=$(uci get oled.@oled[0].text) netsource=$(uci get oled.@oled[0].netsource) + + + kill -9 $(pgrep /usr/bin/oled) + kill -9 $(pgrep -f /usr/sbin/netspeed) + if [ ${netspeed} -eq 1 ]; then nohup /usr/sbin/netspeed ${netsource} >/dev/null 2>&1 & else diff --git a/package/kernel/exfat/Makefile b/package/kernel/exfat/Makefile new file mode 100644 index 0000000000..f129da9410 --- /dev/null +++ b/package/kernel/exfat/Makefile @@ -0,0 +1,55 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=exfat +PKG_VERSION:=5.8.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/namjaejeon/linux-exfat-oot/tar.gz/$(PKG_VERSION)? +PKG_HASH:=47162495bdf9a7e02d6142dfcd4364d7325a4cf75a0439926cf9e8a9d959627b + +PKG_MAINTAINER:= +PKG_LICENSE:=GPL-2.0-only + +#PKG_BUILD_PARALLEL:=1 +#PKG_USE_MIPS16:=0 + +# exfat-oot's makefile needs this to know where to build the kernel module +#export KERNELDIR:=$(LINUX_DIR) + +include $(INCLUDE_DIR)/package.mk +#include $(INCLUDE_DIR)/kernel-defaults.mk + +TAR_OPTIONS+= --strip-components 1 +TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) + +define KernelPackage/fs-exfat + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Filesystems + TITLE:=exFAT kernel module + FILES:=$(PKG_BUILD_DIR)/exfat.ko + AUTOLOAD:=$(call AutoProbe,exfat) + DEPENDS:=+kmod-nls-base +endef + +define KernelPackage/exfat/description + This package provides the kernel module for exfat. +endef + +define Build/Compile + $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + $(PKG_EXTRA_KCONFIG) \ + CONFIG_EXFAT_FS=m \ + modules +# $(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) M="$(PKG_BUILD_DIR)" modules +endef + +$(eval $(call KernelPackage,fs-exfat)) diff --git a/package/kernel/exfat/patches/010-fstream.patch b/package/kernel/exfat/patches/010-fstream.patch new file mode 100644 index 0000000000..dc1221c611 --- /dev/null +++ b/package/kernel/exfat/patches/010-fstream.patch @@ -0,0 +1,23 @@ +--- a/super.c ++++ b/super.c +@@ -292,14 +292,14 @@ static const struct fs_parameter_spec exfat_param_specs[] = { + #endif + fsparam_flag("discard", Opt_discard), + fsparam_s32("time_offset", Opt_time_offset), +- __fsparam(NULL, "utf8", Opt_utf8, fs_param_deprecated, +- NULL), +- __fsparam(NULL, "debug", Opt_debug, fs_param_deprecated, +- NULL), ++ __fsparam(NULL, "utf8", Opt_utf8, fs_param_deprecated ++ ), ++ __fsparam(NULL, "debug", Opt_debug, fs_param_deprecated ++ ), + __fsparam(fs_param_is_u32, "namecase", Opt_namecase, +- fs_param_deprecated, NULL), ++ fs_param_deprecated), + __fsparam(fs_param_is_u32, "codepage", Opt_codepage, +- fs_param_deprecated, NULL), ++ fs_param_deprecated), + {} + }; + diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index a2b155188c..5967f358d5 100644 --- a/package/lean/autocore/Makefile +++ b/package/lean/autocore/Makefile @@ -44,11 +44,7 @@ define Package/autocore-arm/install $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/arm/090-cover-index_htm $(1)/etc/uci-defaults/090-cover-index_htm $(INSTALL_DIR) $(1)/sbin -ifneq ($(BOARD),ipq40xx) - $(CP) ./files/arm/sbin/cpuinfo $(1)/sbin/cpuinfo -else - $(CP) ./files/arm/sbin/cpuinfo-ipq40xx $(1)/sbin/cpuinfo -endif + $(INSTALL_BIN) ./files/arm/sbin/cpuinfo $(1)/sbin/cpuinfo endef define Package/autocore-x86/install diff --git a/package/lean/autocore/files/arm/sbin/cpuinfo b/package/lean/autocore/files/arm/sbin/cpuinfo index ff2691ecc2..88cf35d430 100755 --- a/package/lean/autocore/files/arm/sbin/cpuinfo +++ b/package/lean/autocore/files/arm/sbin/cpuinfo @@ -5,6 +5,10 @@ cpu_arch="$(cat "/proc/cpuinfo" | grep "model name" | sed -n "1p" | awk -F ': ' cpu_cores="$(cat "/proc/cpuinfo" | grep "processor" | wc -l)" cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz" -sys_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C" +if grep -q "ipq40xx" "/etc/openwrt_release"; then + sys_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')" +else + sys_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C" +fi echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq}, ${sys_temp})" diff --git a/package/lean/autocore/files/arm/sbin/cpuinfo-ipq40xx b/package/lean/autocore/files/arm/sbin/cpuinfo-ipq40xx deleted file mode 100755 index 329675b81c..0000000000 --- a/package/lean/autocore/files/arm/sbin/cpuinfo-ipq40xx +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -cpu_arch="$(cat "/proc/cpuinfo" | grep "model name" | sed -n "1p" | awk -F ': ' '{print $2}')" -cpu_cores="$(cat "/proc/cpuinfo" | grep "processor" | wc -l)" - -cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz" -sys_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')" - -echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq}, ${sys_temp})" diff --git a/package/lienol/luci-app-passwall/Makefile b/package/lienol/luci-app-passwall/Makefile index 19952d4a76..daa176f1dd 100644 --- a/package/lienol/luci-app-passwall/Makefile +++ b/package/lienol/luci-app-passwall/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall PKG_VERSION:=3.9 -PKG_RELEASE:=27 -PKG_DATE:=20200730 +PKG_RELEASE:=28 +PKG_DATE:=20200801 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/lienol/luci-app-passwall/root/usr/share/passwall/subscribe.lua b/package/lienol/luci-app-passwall/root/usr/share/passwall/subscribe.lua index b9da53d90d..e2e2d320fe 100644 --- a/package/lienol/luci-app-passwall/root/usr/share/passwall/subscribe.lua +++ b/package/lienol/luci-app-passwall/root/usr/share/passwall/subscribe.lua @@ -753,7 +753,7 @@ local function update_node(manual) if next(CONFIG) then local nodes = {} - local ucic3 = uci.cursor() + local ucic3 = luci.model.uci.cursor() ucic3:foreach(application, uciType, function(node) nodes[node['.name']] = node end) diff --git a/package/network/utils/wireguard-tools/Makefile b/package/network/utils/wireguard-tools/Makefile index 3232060bd1..2137a8b4a1 100644 --- a/package/network/utils/wireguard-tools/Makefile +++ b/package/network/utils/wireguard-tools/Makefile @@ -22,7 +22,6 @@ PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package-defaults.mk diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 5224ea49c3..24793e19d8 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -391,7 +391,7 @@ sub top_of_openwrt_tree { my ($root) = @_; my @tree_check = ( - "BSDmakefile", "Config.in", "LICENSE", "Makefile", "README", + "BSDmakefile", "Config.in", "LICENSE", "Makefile", "README.md", "feeds.conf.default", "include", "package", "rules.mk", "scripts", "target", "toolchain", "tools" ); diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 0f5a5df181..6c7c0e429b 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -217,6 +217,7 @@ platform_check_image() { archer-c60-v2|\ archer-c7-v4|\ archer-c7-v5|\ + arduino-yun|\ bullet-m|\ c-55|\ carambola2|\ @@ -345,7 +346,6 @@ platform_check_image() { ap152|\ ap91-5g|\ ap96|\ - arduino-yun|\ bhr-4grv2|\ bxu2000n-2-a1|\ db120|\ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c index 5873248edf..8ab07d514b 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c @@ -117,8 +117,7 @@ static void __init ds_setup(void) ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN | AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN | AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN | - AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN | - AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN); + AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN); //Disable the Function for some pins to have GPIO functionality active // GPIO6-7-8 and GPIO11 diff --git a/target/linux/ar71xx/patches-4.14/821-serial-core-add-support-for-boot-console-with-arbitr.patch b/target/linux/ar71xx/patches-4.14/821-serial-core-add-support-for-boot-console-with-arbitr.patch new file mode 100644 index 0000000000..23b6d73959 --- /dev/null +++ b/target/linux/ar71xx/patches-4.14/821-serial-core-add-support-for-boot-console-with-arbitr.patch @@ -0,0 +1,54 @@ +From 4d3c17975c7814884a721fe693b3adf5c426d759 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Tue, 10 Nov 2015 22:18:39 +0100 +Subject: [RFC] serial: core: add support for boot console with arbitrary + baud rates + +The Arduino Yun uses a baud rate of 250000 by default. The serial is +going over the Atmel ATmega and is used to connect to this chip. +Without this patch Linux wants to switch the console to 9600 Baud. + +With this patch Linux will use the configured baud rate and not a +default one specified in uart_register_driver(). + +Signed-off-by: Hauke Mehrtens +[rebased to 4.14, slightly reworded commit message] +Signed-off-by: Sungbo Eo +--- + drivers/tty/serial/serial_core.c | 6 +++++- + include/linux/console.h | 1 + + 2 files changed, 6 insertions(+), 1 deletions(-) + +--- a/drivers/tty/serial/serial_core.c ++++ b/drivers/tty/serial/serial_core.c +@@ -232,6 +232,8 @@ static int uart_port_startup(struct tty_ + if (retval == 0) { + if (uart_console(uport) && uport->cons->cflag) { + tty->termios.c_cflag = uport->cons->cflag; ++ tty->termios.c_ospeed = uport->cons->baud; ++ tty->termios.c_ispeed = uport->cons->baud; + uport->cons->cflag = 0; + } + /* +@@ -2072,8 +2074,10 @@ uart_set_options(struct uart_port *port, + * Allow the setting of the UART parameters with a NULL console + * too: + */ +- if (co) ++ if (co) { + co->cflag = termios.c_cflag; ++ co->baud = baud; ++ } + + return 0; + } +--- a/include/linux/console.h ++++ b/include/linux/console.h +@@ -145,6 +145,7 @@ struct console { + short flags; + short index; + int cflag; ++ int baud; + void *data; + struct console *next; + }; diff --git a/target/linux/ar71xx/patches-4.9/821-serial-core-add-support-for-boot-console-with-arbitr.patch b/target/linux/ar71xx/patches-4.9/821-serial-core-add-support-for-boot-console-with-arbitr.patch new file mode 100644 index 0000000000..23b6d73959 --- /dev/null +++ b/target/linux/ar71xx/patches-4.9/821-serial-core-add-support-for-boot-console-with-arbitr.patch @@ -0,0 +1,54 @@ +From 4d3c17975c7814884a721fe693b3adf5c426d759 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Tue, 10 Nov 2015 22:18:39 +0100 +Subject: [RFC] serial: core: add support for boot console with arbitrary + baud rates + +The Arduino Yun uses a baud rate of 250000 by default. The serial is +going over the Atmel ATmega and is used to connect to this chip. +Without this patch Linux wants to switch the console to 9600 Baud. + +With this patch Linux will use the configured baud rate and not a +default one specified in uart_register_driver(). + +Signed-off-by: Hauke Mehrtens +[rebased to 4.14, slightly reworded commit message] +Signed-off-by: Sungbo Eo +--- + drivers/tty/serial/serial_core.c | 6 +++++- + include/linux/console.h | 1 + + 2 files changed, 6 insertions(+), 1 deletions(-) + +--- a/drivers/tty/serial/serial_core.c ++++ b/drivers/tty/serial/serial_core.c +@@ -232,6 +232,8 @@ static int uart_port_startup(struct tty_ + if (retval == 0) { + if (uart_console(uport) && uport->cons->cflag) { + tty->termios.c_cflag = uport->cons->cflag; ++ tty->termios.c_ospeed = uport->cons->baud; ++ tty->termios.c_ispeed = uport->cons->baud; + uport->cons->cflag = 0; + } + /* +@@ -2072,8 +2074,10 @@ uart_set_options(struct uart_port *port, + * Allow the setting of the UART parameters with a NULL console + * too: + */ +- if (co) ++ if (co) { + co->cflag = termios.c_cflag; ++ co->baud = baud; ++ } + + return 0; + } +--- a/include/linux/console.h ++++ b/include/linux/console.h +@@ -145,6 +145,7 @@ struct console { + short flags; + short index; + int cflag; ++ int baud; + void *data; + struct console *next; + }; diff --git a/target/linux/gemini/image/dns313_gen_hdd_img.sh b/target/linux/gemini/image/dns313_gen_hdd_img.sh index 813852232f..d302ca6348 100755 --- a/target/linux/gemini/image/dns313_gen_hdd_img.sh +++ b/target/linux/gemini/image/dns313_gen_hdd_img.sh @@ -15,14 +15,20 @@ ROOTFSSIZE="$5" head=4 sect=63 -# Create two empty partitions followed by the boot partition with -# the ./boot/zImage and then the rootfs partition. -set $(ptgen -o $OUTPUT -h $head -s $sect -t 83 -n -p 0 -p 0 -p ${BOOTFSSIZE}M -p ${ROOTFSSIZE}M) +# Create one empty partitions followed by the swap partition, then the +# boot partition with the ./boot/zImage and then the rootfs partition. +# The swap partition with type 82 is 128 MB since the DNS-313 has 64 MB of +# memory so we assign twice of that as swap. +# The boot partition must always be the third partition. +# The user should use the first (blank) partition for user data storage, +# this will typically be named /dev/sda1 +set $(ptgen -o $OUTPUT -h $head -s $sect -n -t 83 -p 0 -t 82 -p 128M -t 83 -p ${BOOTFSSIZE}M -t 83 -p ${ROOTFSSIZE}M) -BOOTOFFSET="$(($1 / 512))" -BOOTSIZE="$(($2 / 512))" -ROOTFSOFFSET="$(($3 / 512))" -ROOTFSSIZE="$(($4 / 512))" +# Swapoffset and swapsize will be $1 and $2 +BOOTOFFSET="$(($3 / 512))" +BOOTSIZE="$(($4 / 512))" +ROOTFSOFFSET="$(($5 / 512))" +ROOTFSSIZE="$(($6 / 512))" dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index 76f049808d..7570d5960b 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -733,13 +733,6 @@ CONFIG_CC_STACKPROTECTOR_NONE=y # CONFIG_CFG80211 is not set # CONFIG_CFG80211_CERTIFICATION_ONUS is not set # CONFIG_CFQ_GROUP_IOSCHED is not set -# CONFIG_CGROUPS is not set -# CONFIG_CGROUP_BPF is not set -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_HUGETLB is not set -# CONFIG_CGROUP_NET_CLASSID is not set -# CONFIG_CGROUP_NET_PRIO is not set -# CONFIG_CGROUP_RDMA is not set # CONFIG_CHARGER_BQ2415X is not set # CONFIG_CHARGER_BQ24190 is not set # CONFIG_CHARGER_BQ24257 is not set @@ -1034,6 +1027,7 @@ CONFIG_CRYPTO_PCRYPT=y # CONFIG_DEBUG_CREDENTIALS is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_EFI is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set @@ -1768,7 +1762,6 @@ CONFIG_HPET_MMAP_DEFAULT=y # CONFIG_HTC_PASIC3 is not set # CONFIG_HTS221 is not set # CONFIG_HTU21 is not set -# CONFIG_HUGETLB_PAGE is not set # CONFIG_HVC_DCC is not set # CONFIG_HVC_UDBG is not set # CONFIG_HWLAT_TRACER is not set @@ -5157,7 +5150,6 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_TRACING_EVENTS_GPIO is not set CONFIG_TRACING_SUPPORT=y CONFIG_TRAD_SIGNALS=y -# CONFIG_TRANSPARENT_HUGEPAGE is not set # CONFIG_TREE_RCU is not set # CONFIG_TREE_RCU_TRACE is not set # CONFIG_TRIM_UNUSED_KSYMS is not set diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19 index 43cbd740cc..12eecf38df 100644 --- a/target/linux/generic/config-4.19 +++ b/target/linux/generic/config-4.19 @@ -762,12 +762,6 @@ CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CEPH_LIB is not set # CONFIG_CFG80211 is not set # CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CGROUPS is not set -# CONFIG_CGROUP_BPF is not set -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_NET_CLASSID is not set -# CONFIG_CGROUP_NET_PRIO is not set -# CONFIG_CGROUP_RDMA is not set # CONFIG_CHARGER_ADP5061 is not set # CONFIG_CHARGER_BQ2415X is not set # CONFIG_CHARGER_BQ24190 is not set @@ -1092,6 +1086,7 @@ CONFIG_CRYPTO_PCRYPT=y # CONFIG_DEBUG_CREDENTIALS is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_EFI is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set @@ -1886,7 +1881,6 @@ CONFIG_HPET_MMAP_DEFAULT=y # CONFIG_HTC_PASIC3 is not set # CONFIG_HTS221 is not set # CONFIG_HTU21 is not set -# CONFIG_HUGETLB_PAGE is not set # CONFIG_HVC_DCC is not set # CONFIG_HVC_UDBG is not set # CONFIG_HWLAT_TRACER is not set @@ -5436,7 +5430,6 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_TRACING_EVENTS_GPIO is not set CONFIG_TRACING_SUPPORT=y CONFIG_TRAD_SIGNALS=y -# CONFIG_TRANSPARENT_HUGEPAGE is not set # CONFIG_TREE_RCU is not set # CONFIG_TREE_RCU_TRACE is not set # CONFIG_TRIM_UNUSED_KSYMS is not set diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9 index de009509ee..7985f1d9be 100644 --- a/target/linux/generic/config-4.9 +++ b/target/linux/generic/config-4.9 @@ -689,10 +689,6 @@ CONFIG_CC_STACKPROTECTOR_NONE=y # CONFIG_CEPH_LIB is not set # CONFIG_CFG80211 is not set # CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CGROUPS is not set -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_NET_CLASSID is not set -# CONFIG_CGROUP_NET_PRIO is not set # CONFIG_CHARGER_BQ2415X is not set # CONFIG_CHARGER_BQ24190 is not set # CONFIG_CHARGER_BQ24257 is not set @@ -949,6 +945,7 @@ CONFIG_CRYPTO_PCRYPT=y # CONFIG_DEBUG_CREDENTIALS is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_EFI is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set @@ -1581,7 +1578,6 @@ CONFIG_HPET_MMAP_DEFAULT=y # CONFIG_HTC_I2CPLD is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_HTU21 is not set -# CONFIG_HUGETLB_PAGE is not set # CONFIG_HVC_DCC is not set # CONFIG_HVC_UDBG is not set # CONFIG_HWLAT_TRACER is not set @@ -4684,7 +4680,6 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_TRACING_EVENTS_GPIO is not set CONFIG_TRACING_SUPPORT=y CONFIG_TRAD_SIGNALS=y -# CONFIG_TRANSPARENT_HUGEPAGE is not set # CONFIG_TREE_RCU is not set # CONFIG_TREE_RCU_TRACE is not set # CONFIG_TRIM_UNUSED_KSYMS is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 951a92854d..6e646329ec 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -790,13 +790,6 @@ CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CEPH_LIB is not set # CONFIG_CFG80211 is not set # CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CGROUPS is not set -# CONFIG_CGROUP_BPF is not set -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_HUGETLB is not set -# CONFIG_CGROUP_NET_CLASSID is not set -# CONFIG_CGROUP_NET_PRIO is not set -# CONFIG_CGROUP_RDMA is not set # CONFIG_CHARGER_ADP5061 is not set # CONFIG_CHARGER_BQ2415X is not set # CONFIG_CHARGER_BQ24190 is not set @@ -1145,6 +1138,7 @@ CONFIG_CRYPTO_PCRYPT=y # CONFIG_DEBUG_CREDENTIALS is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_EFI is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set @@ -2004,8 +1998,6 @@ CONFIG_HPET_MMAP_DEFAULT=y # CONFIG_HTC_PASIC3 is not set # CONFIG_HTS221 is not set # CONFIG_HTU21 is not set -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set # CONFIG_HVC_DCC is not set # CONFIG_HVC_UDBG is not set # CONFIG_HWLAT_TRACER is not set @@ -4224,6 +4216,7 @@ CONFIG_RCU_TORTURE_TEST_SLOW_INIT_DELAY=3 # CONFIG_RD_LZO is not set # CONFIG_RD_XZ is not set # CONFIG_READABLE_ASM is not set +# CONFIG_READ_ONLY_THP_FOR_FS is not set # CONFIG_REALTEK_PHY is not set # CONFIG_REDWOOD is not set # CONFIG_REED_SOLOMON_TEST is not set @@ -5773,7 +5766,6 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_TRACING_EVENTS_GPIO is not set CONFIG_TRACING_SUPPORT=y CONFIG_TRAD_SIGNALS=y -# CONFIG_TRANSPARENT_HUGEPAGE is not set # CONFIG_TREE_RCU is not set # CONFIG_TREE_RCU_TRACE is not set # CONFIG_TRIM_UNUSED_KSYMS is not set diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index ca7d2f25ab..e3fcb8c051 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -1192,8 +1192,8 @@ define Device/zyxel_keenetic IMAGE_SIZE := 7872k DEVICE_VENDOR := ZyXEL DEVICE_MODEL := Keenetic - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ehci kmod-usb-ledtrig-usbport \ - kmod-usb-dwc2 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ehci \ + kmod-usb-ledtrig-usbport kmod-usb-dwc2 SUPPORTED_DEVICES += kn endef TARGET_DEVICES += zyxel_keenetic