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: (46 commits)
  rockchip: sync rk3568 upstream dts changes
  rockchip: fix rk3568 nvme detection issue
  tools: fix build on macOS Sonoma (coolsnowwolf#12212)
  ramips: mt7621: fixes gpio config
  elfutils: fix build with GCC 12/13
  x86: 6.6: Activate CONFIG_FB_DEVICE
  kernel: Add CONFIG_FB_DEVICE to kmod-fb
  ramips: add support for JDCloud RE-CP-02
  ramips: gl-mt1300: downclock SPI to 50MHz
  build: introduce PKG_BUILD_FLAGS
  ramips: add support for OpenFi 5Pro (coolsnowwolf#12196)
  hostapd: fix mbo module build
  kernel: bump 6.6 to 6.6.32 (coolsnowwolf#12186)
  kernel: bump 6.1 to 6.1.92 (coolsnowwolf#12187)
  mtd: spi-nor: add support for Winbond W25Q512
  mvebu: add support for QNAP QHora-321/322 with commo image
  base-files: add legacy-sdcard sysupgrade support
  kernel: bump 5.4 to 5.4.277 (coolsnowwolf#12191)
  kernel: bump 5.10 to 5.10.218 (coolsnowwolf#12190)
  kernel: bump 5.15 to 5.15.160 (coolsnowwolf#12188)
  ...
  • Loading branch information
github-actions[bot] committed Jun 6, 2024
2 parents 564fa98 + a87cb8c commit 8833790
Show file tree
Hide file tree
Showing 209 changed files with 26,080 additions and 1,561 deletions.
15 changes: 15 additions & 0 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,21 @@ menu "Global build settings"
default n
help
Adds -g3 to the CFLAGS.

config USE_GC_SECTIONS
bool
prompt "Dead code and data elimination for all packages (EXPERIMENTAL)"
help
Places functions and data items into its own sections to use the linker's
garbage collection capabilites.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-gc-sections

config USE_LTO
bool
prompt "Use the link-time optimizer for all packages (EXPERIMENTAL)"
help
Adds LTO flags to the CFLAGS and LDFLAGS.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-lto

config IPV6
def_bool y
Expand Down
1 change: 1 addition & 0 deletions feeds.conf.default
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
src-git packages https://github.com/coolsnowwolf/packages
src-git luci https://github.com/coolsnowwolf/luci
#src-git luci https://github.com/coolsnowwolf/luci.git;openwrt-23.05
src-git routing https://github.com/coolsnowwolf/routing
src-git telephony https://git.openwrt.org/feed/telephony.git
#src-git helloworld https://github.com/fw876/helloworld.git
Expand Down
1 change: 1 addition & 0 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ define Image/BuildDTB/sub
-I$(DTS_DIR) \
-I$(DTS_DIR)/include \
-I$(LINUX_DIR)/include/ \
-I$(LINUX_DIR)/scripts/dtc/include-prefixes \
-undef -D__DTS__ $(3) \
-o $(2).tmp $(1)
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-5.10
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .215
LINUX_KERNEL_HASH-5.10.215 = 879ca159c34ea9d3a6775f292cc59c2d3931d57dca00f0bebe2675ea0c82c6a9
LINUX_VERSION-5.10 = .218
LINUX_KERNEL_HASH-5.10.218 = 9c36b243e8c3ec1d5963366618f336710b84340bf95be2037b26c452392cb2d6
4 changes: 2 additions & 2 deletions include/kernel-5.15
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .157
LINUX_KERNEL_HASH-5.15.157 = aff22351d34d69a16762dcf1fd51fe228da55d4b96b67247bdd598a86cc7a414
LINUX_VERSION-5.15 = .160
LINUX_KERNEL_HASH-5.15.160 = f41e718e33b88f269a6b6a7653e5e9824c4ba541f6ffe5bf26ecc37c540a1b05
4 changes: 2 additions & 2 deletions include/kernel-5.4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .274
LINUX_KERNEL_HASH-5.4.274 = eac7b421a43cd46a3dbebf7c85d075faa7e164d80d215d31fcd35544b6f79ed4
LINUX_VERSION-5.4 = .277
LINUX_KERNEL_HASH-5.4.277 = 7e1f5b28588e49ddfd18e7772476e4e8b52bdc9c3e19beafcbb7c103e6c01f51
4 changes: 2 additions & 2 deletions include/kernel-6.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .90
LINUX_KERNEL_HASH-6.1.90 = 83a3d72e764fceda2c1fc68a4ea6b91253a28da56a688a2b61776b0d19788e1d
LINUX_VERSION-6.1 = .92
LINUX_KERNEL_HASH-6.1.92 = 9019f427bfdc9ced5bc954d760d37ac08c0cdffb45ad28087fc45a73e64336c9
4 changes: 2 additions & 2 deletions include/kernel-6.6
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .30
LINUX_KERNEL_HASH-6.6.30 = b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6
LINUX_VERSION-6.6 = .32
LINUX_KERNEL_HASH-6.6.32 = aaa824eaf07f61911d22b75ff090a403c3dd0bd73e23933e0bba8b5971436ce1
45 changes: 39 additions & 6 deletions include/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ include $(INCLUDE_DIR)/download.mk
PKG_BUILD_DIR ?= $(BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
PKG_BUILD_PARALLEL ?=
PKG_USE_MIPS16 ?= 1
PKG_IREMAP ?= 1
PKG_SKIP_DOWNLOAD=$(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT)

MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
Expand All @@ -24,15 +22,50 @@ PKG_JOBS?=-j1
else
PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL),$(MAKE_J),-j1)
endif

PKG_BUILD_FLAGS?=
# TODO remove this when all packages moved to PKG_BUILD_FLAGS=no-mips16
PKG_USE_MIPS16?=1
ifneq ($(strip $(PKG_USE_MIPS16)),1)
PKG_BUILD_FLAGS+=no-mips16
endif

__unknown_flags=$(filter-out no-iremap no-mips16 gc-sections no-gc-sections lto no-lto no-mold,$(PKG_BUILD_FLAGS))
ifneq ($(__unknown_flags),)
$(error unknown PKG_BUILD_FLAGS: $(__unknown_flags))
endif

# $1=flagname, $2=default (0/1)
define pkg_build_flag
$(if $(filter no-$(1),$(PKG_BUILD_FLAGS)),0,$(if $(filter $(1),$(PKG_BUILD_FLAGS)),1,$(2)))
endef

ifeq ($(call pkg_build_flag,iremap,1),1)
IREMAP_CFLAGS = $(call iremap,$(PKG_BUILD_DIR),$(notdir $(PKG_BUILD_DIR)))
TARGET_CFLAGS += $(IREMAP_CFLAGS)
endif

ifdef CONFIG_USE_MIPS16
ifeq ($(strip $(PKG_USE_MIPS16)),1)
ifeq ($(call pkg_build_flag,mips16,1),1)
TARGET_ASFLAGS_DEFAULT = $(filter-out -mips16 -minterlink-mips16,$(TARGET_CFLAGS))
TARGET_CFLAGS += -mips16 -minterlink-mips16
TARGET_CXXFLAGS += -mips16 -minterlink-mips16
endif
endif
ifeq ($(strip $(PKG_IREMAP)),1)
IREMAP_CFLAGS = $(call iremap,$(PKG_BUILD_DIR),$(notdir $(PKG_BUILD_DIR)))
TARGET_CFLAGS += $(IREMAP_CFLAGS)
ifeq ($(call pkg_build_flag,gc-sections,$(if $(CONFIG_USE_GC_SECTIONS),1,0)),1)
TARGET_CFLAGS+= -ffunction-sections -fdata-sections
TARGET_CXXFLAGS+= -ffunction-sections -fdata-sections
TARGET_LDFLAGS+= -Wl,--gc-sections
endif
ifeq ($(call pkg_build_flag,lto,$(if $(CONFIG_USE_LTO),1,0)),1)
TARGET_CFLAGS+= -flto=auto -fno-fat-lto-objects
TARGET_CXXFLAGS+= -flto=auto -fno-fat-lto-objects
TARGET_LDFLAGS+= -flto=auto -fuse-linker-plugin
endif
ifdef CONFIG_USE_MOLD
ifeq ($(call pkg_build_flag,mold,1),1)
TARGET_LINKER:=mold
endif
endif

include $(INCLUDE_DIR)/hardening.mk
Expand Down
2 changes: 1 addition & 1 deletion include/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ DEFAULT_PACKAGES.nas:=\
DEFAULT_PACKAGES.router:=\
dnsmasq-full firewall iptables ppp ppp-mod-pppoe \
block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw kmod-tun \
iptables-mod-tproxy iptables-mod-extra ipset ip-full default-settings luci luci-newapi \
iptables-mod-tproxy iptables-mod-extra ipset ip-full default-settings luci \
ddns-scripts_aliyun ddns-scripts_dnspod luci-app-ddns luci-app-upnp luci-app-autoreboot \
luci-app-arpbind luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-vlmcsd \
luci-app-accesscontrol luci-app-nlbwmon luci-app-turboacc luci-app-wol curl ca-certificates
Expand Down
8 changes: 8 additions & 0 deletions package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PKG_LICENSE:=GPL-2.0
PKG_CONFIG_DEPENDS += \
CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \
CONFIG_NAND_SUPPORT \
CONFIG_LEGACY_SDCARD_SUPPORT \
CONFIG_EMMC_SUPPORT \
CONFIG_CLEAN_IPKG \
CONFIG_PER_FEED_REPO \
Expand Down Expand Up @@ -125,6 +126,12 @@ ifeq ($(CONFIG_NAND_SUPPORT),)
endef
endif

ifeq ($(CONFIG_LEGACY_SDCARD_SUPPORT),)
define Package/base-files/legacy-sdcard-support
rm -f $(1)/lib/upgrade/legacy-sdcard.sh
endef
endif

ifeq ($(CONFIG_EMMC_SUPPORT),)
define Package/base-files/emmc-support
rm -f $(1)/lib/upgrade/emmc.sh
Expand All @@ -135,6 +142,7 @@ define Package/base-files/install
$(CP) ./files/* $(1)/
$(Package/base-files/install-key)
$(Package/base-files/nand-support)
$(Package/base-files/legacy-sdcard-support)
$(Package/base-files/emmc-support)
if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \
$(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \
Expand Down
91 changes: 91 additions & 0 deletions package/base-files/files/lib/upgrade/legacy-sdcard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
legacy_sdcard_check_image() {
local file="$1"
local diskdev partdev diff

export_bootdevice && export_partdevice diskdev 0 || {
v "Unable to determine upgrade device"
return 1
}

get_partitions "/dev/$diskdev" bootdisk

v "Extract boot sector from the image"
get_image_dd "$1" of=/tmp/image.bs count=1 bs=512b

get_partitions /tmp/image.bs image

#compare tables
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"

rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image

if [ -n "$diff" ]; then
v "Partition layout has changed. Full image will be written."
ask_bool 0 "Abort" && exit 1
return 0
fi
}

legacy_sdcard_do_upgrade() {
local board=$(board_name)
local diskdev partdev diff

export_bootdevice && export_partdevice diskdev 0 || {
v "Unable to determine upgrade device"
return 1
}

sync

if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then
get_partitions "/dev/$diskdev" bootdisk

v "Extract boot sector from the image"
get_image_dd "$1" of=/tmp/image.bs count=1 bs=512b

get_partitions /tmp/image.bs image

#compare tables
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
else
diff=1
fi

if [ -n "$diff" ]; then
get_image_dd "$1" of="/dev/$diskdev" bs=4096 conv=fsync

# Separate removal and addtion is necessary; otherwise, partition 1
# will be missing if it overlaps with the old partition 2
partx -d - "/dev/$diskdev"
partx -a - "/dev/$diskdev"
else
v "Writing bootloader to /dev/$diskdev"
get_image_dd "$1" of="$diskdev" bs=512 skip=1 seek=1 count=2048 conv=fsync
#iterate over each partition from the image and write it to the boot disk
while read part start size; do
if export_partdevice partdev $part; then
v "Writing image to /dev/$partdev..."
get_image_dd "$1" of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
else
v "Unable to find partition $part device, skipped."
fi
done < /tmp/partmap.image

v "Writing new UUID to /dev/$diskdev..."
get_image_dd "$1" of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
fi

sleep 1
}

legacy_sdcard_copy_config() {
local partdev

if export_partdevice partdev 1; then
mkdir -p /boot
[ -f /boot/kernel.img ] || mount -o rw,noatime /dev/$partdev /boot
cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE"
sync
umount /boot
fi
}
27 changes: 27 additions & 0 deletions package/boot/arm-trusted-firmware-mediatek/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,30 @@ define Trusted-Firmware-A/mt7622-sdmmc-2ddr
DDR3_FLYBY:=1
endef

define Trusted-Firmware-A/mt7981-nor-ddr4
NAME:=MediaTek MT7981 (SPI-NOR, DDR4)
BOOT_DEVICE:=nor
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
endef

define Trusted-Firmware-A/mt7981-emmc-ddr4
NAME:=MediaTek MT7981 (eMMC, DDR4)
BOOT_DEVICE:=emmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
endef

define Trusted-Firmware-A/mt7981-spim-nand-ddr4
NAME:=MediaTek MT7981 (SPI-NAND via SPIM, DDR4)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
endef

define Trusted-Firmware-A/mt7981-nor-ddr3
NAME:=MediaTek MT7981 (SPI-NOR, DDR3)
BOOT_DEVICE:=nor
Expand Down Expand Up @@ -349,6 +373,9 @@ TFA_TARGETS:= \
mt7981-sdmmc-ddr3 \
mt7981-snand-ddr3 \
mt7981-spim-nand-ddr3 \
mt7981-emmc-ddr4 \
mt7981-nor-ddr4 \
mt7981-spim-nand-ddr4 \
mt7986-emmc-ddr3 \
mt7986-nor-ddr3 \
mt7986-sdmmc-ddr3 \
Expand Down
10 changes: 6 additions & 4 deletions package/boot/uboot-envtools/files/ramips
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,18 @@ zbtlink,zbt-wg2626|\
zte,mf283plus)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
;;
h3c,tx1800-plus|\
h3c,tx1801-plus|\
h3c,tx1806|\
jcg,q20)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;
hootoo,ht-tm05|\
ravpower,rp-wd03)
idx="$(find_mtd_index u-boot-env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
;;
c-life,xg1|\
jcg,q20)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;
linksys,ea7300-v1|\
linksys,ea7500-v2|\
linksys,ea8100-v1|\
Expand Down
2 changes: 1 addition & 1 deletion package/firmware/linux-firmware/realtek.mk
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ $(eval $(call BuildPackage,rtl8761bu-firmware))
Package/rtl8821ae-firmware = $(call Package/firmware-default,RealTek RTL8821AE firmware)
define Package/rtl8821ae-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8821aefw.bin $(1)/lib/firmware/rtlwifi
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8821aefw_29.bin $(1)/lib/firmware/rtlwifi
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8821aefw_wowlan.bin $(1)/lib/firmware/rtlwifi
endef
$(eval $(call BuildPackage,rtl8821ae-firmware))
Expand Down
12 changes: 12 additions & 0 deletions package/kernel/linux/modules/block.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ endef

$(eval $(call KernelPackage,ata-artop))

define KernelPackage/ata-ahci-dwc
TITLE:=Synopsys DWC AHCI SATA
KCONFIG:= \
CONFIG_AHCI_DWC \
CONFIG_SATA_HOST=y
FILES:=$(LINUX_DIR)/drivers/ata/ahci_dwc.ko
DEPENDS:=+kmod-ata-ahci-platform
AUTOLOAD:=$(call AutoLoad,41,ahci_dwc,1)
$(call AddDepends/ata,@TARGET_rockchip)
endef

$(eval $(call KernelPackage,ata-ahci-dwc))

define KernelPackage/ata-nvidia-sata
TITLE:=Nvidia Serial ATA support
Expand Down
1 change: 1 addition & 0 deletions package/kernel/linux/modules/video.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ define KernelPackage/fb
DEPENDS:=@DISPLAY_SUPPORT
KCONFIG:= \
CONFIG_FB \
CONFIG_FB_DEVICE=y \
CONFIG_FB_MXS=n \
CONFIG_FB_SM750=n \
CONFIG_FRAMEBUFFER_CONSOLE=y \
Expand Down
2 changes: 1 addition & 1 deletion package/lean/default-settings/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ define Package/default-settings
CATEGORY:=LuCI
TITLE:=LuCI support for Default Settings
PKGARCH:=all
DEPENDS:=+luci-base +luci +@LUCI_LANG_zh-cn
DEPENDS:=+luci-base +luci +@LUCI_LANG_zh-cn +@LUCI_LANG_zh_Hans
endef

define Package/default-settings/description
Expand Down
34 changes: 34 additions & 0 deletions package/lean/r8126/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Download realtek r8126 linux driver from official site:
# [https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software]
#

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=r8126
PKG_VERSION:=10.013.00
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

define KernelPackage/r8126
TITLE:=Driver for Realtek r8126 chipsets
SUBMENU:=Network Devices
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
DEPENDS:=@PCI_SUPPORT
FILES:= $(PKG_BUILD_DIR)/r8126.ko
AUTOLOAD:=$(call AutoProbe,r8126)
endef

define Package/r8126/description
This package contains a driver for Realtek r8126 chipsets.
endef

define Build/Compile
+$(KERNEL_MAKE) M=$(PKG_BUILD_DIR) modules
endef

$(eval $(call KernelPackage,r8126))
Loading

0 comments on commit 8833790

Please sign in to comment.