Skip to content

Commit

Permalink
Merge branch 'openwrt:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aUsernameWoW authored Dec 9, 2024
2 parents 7442038 + 3d8d818 commit b9e5bb6
Show file tree
Hide file tree
Showing 117 changed files with 7,878 additions and 727 deletions.
2 changes: 1 addition & 1 deletion feeds.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ src-git packages https://git.openwrt.org/feed/packages.git
src-git luci https://git.openwrt.org/project/luci.git
src-git routing https://git.openwrt.org/feed/routing.git
src-git telephony https://git.openwrt.org/feed/telephony.git
#src-git video https://github.com/openwrt/video.git
src-git video https://github.com/openwrt/video.git
#src-git targets https://github.com/openwrt/targets.git
#src-git oldpackages http://git.openwrt.org/packages.git
#src-link custom /usr/src/openwrt/custom-feed
4 changes: 2 additions & 2 deletions include/feeds.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ define FeedSourcesAppendOPKG
echo 'src/gz %d_core %U/targets/%S/packages'; \
$(strip $(if $(CONFIG_PER_FEED_REPO), \
echo 'src/gz %d_base %U/packages/%A/base'; \
$(if $(filter %SNAPSHOT-y,$(VERSION_NUMBER)-$(CONFIG_BUILDBOT)), \
$(if $(CONFIG_BUILDBOT), \
echo 'src/gz %d_kmods %U/targets/%S/kmods/$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)';) \
$(foreach feed,$(FEEDS_AVAILABLE), \
$(if $(CONFIG_FEED_$(feed)), \
Expand All @@ -51,7 +51,7 @@ define FeedSourcesAppendAPK
echo '%U/targets/%S/packages/packages.adb'; \
$(strip $(if $(CONFIG_PER_FEED_REPO), \
echo '%U/packages/%A/base/packages.adb'; \
$(if $(filter %SNAPSHOT-y,$(VERSION_NUMBER)-$(CONFIG_BUILDBOT)), \
$(if $(CONFIG_BUILDBOT), \
echo '%U/targets/%S/kmods/$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)/packages.adb';) \
$(foreach feed,$(FEEDS_AVAILABLE), \
$(if $(CONFIG_FEED_$(feed)), \
Expand Down
4 changes: 2 additions & 2 deletions include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ define Build/fit
$(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtbo)) \
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION), gen-cpio$(if $(TARGET_PER_DEVICE_ROOTFS),.$(ROOTFS_ID/$(DEVICE_NAME))))
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\
-E -B 0x1000 $(if $(findstring static,$(word 3,$(1))),-p 0x1000)) -f $@.its $@.new
$(call locked,PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\
-E -B 0x1000 $(if $(findstring static,$(word 3,$(1))),-p 0x1000)) -f $@.its $@.new)
@mv $@.new $@
endef

Expand Down
12 changes: 9 additions & 3 deletions include/meson.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ else
MESON_CPU:="$(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))"
endif

ifeq ($(MESON_USE_STAGING_PYTHON),)
PYTHON_BIN:=$(STAGING_DIR_HOST)/bin/$(PYTHON)
else
PYTHON_BIN:=$(STAGING_DIR_HOSTPKG)/bin/$(PYTHON)
endif

define Meson
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(STAGING_DIR_HOST)/bin/meson.py $(1)
$(2) $(PYTHON_BIN) $(STAGING_DIR_HOST)/bin/meson.py $(1)
endef

define Meson/CreateNativeFile
Expand All @@ -65,7 +71,7 @@ define Meson/CreateNativeFile
-e "s|@CXX@|$(foreach BIN,$(HOSTCXX),'$(BIN)',)|" \
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
-e "s|@PYTHON@|$(STAGING_DIR_HOST)/bin/python3|" \
-e "s|@PYTHON@|$(PYTHON_BIN)|" \
-e "s|@CFLAGS@|$(foreach FLAG,$(HOST_CFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@CXXFLAGS@|$(foreach FLAG,$(HOST_CXXFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@LDFLAGS@|$(foreach FLAG,$(HOST_LDFLAGS),'$(FLAG)',)|" \
Expand All @@ -84,7 +90,7 @@ define Meson/CreateCrossFile
-e "s|@NM@|$(TARGET_NM)|" \
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
-e "s|@PYTHON@|$(STAGING_DIR_HOST)/bin/python3|" \
-e "s|@PYTHON@|$(PYTHON_BIN)|" \
-e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \
Expand Down
1 change: 1 addition & 0 deletions include/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ define BuildTargets/DumpCurrent
echo 'Target-Description:'; \
echo "$$$$DESCRIPTION"; \
echo '@@'; \
$(if $(DEFAULT_PROFILE),echo 'Target-Default-Profile: $(DEFAULT_PROFILE)';) \
echo 'Default-Packages: $(DEFAULT_PACKAGES) $(call extra_packages,$(DEFAULT_PACKAGES))'; \
$(DUMPINFO)
$(if $(CUR_SUBTARGET),$(SUBMAKE) -r --no-print-directory -C image -s DUMP=1 SUBTARGET=$(CUR_SUBTARGET))
Expand Down
17 changes: 1 addition & 16 deletions include/toplevel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,7 @@ endif

_ignore = $(foreach p,$(IGNORE_PACKAGES),--ignore $(p))

# Config that will invalidate the .targetinfo as they will affect
# DEFAULT_PACKAGES.
# Keep DYNAMIC_DEF_PKG_CONF in sync with target.mk to reflect the same configs
DYNAMIC_DEF_PKG_CONF := CONFIG_USE_APK CONFIG_SELINUX CONFIG_SMALL_FLASH CONFIG_USE_SECCOMP
check-dynamic-def-pkg: FORCE
@+DEF_PKG_CONFS=""; \
if [ -f $(TOPDIR)/.config ]; then \
for config in $(DYNAMIC_DEF_PKG_CONF); do \
DEF_PKG_CONFS="$$DEF_PKG_CONFS "$$(grep "$$config"=y $(TOPDIR)/.config); \
done; \
fi; \
[ ! -f tmp/.packagedynamicdefault ] || OLD_DEF_PKG_CONFS=$$(cat tmp/.packagedynamicdefault); \
[ "$$DEF_PKG_CONFS" = "$$OLD_DEF_PKG_CONFS" ] || rm -rf tmp/info/.targetinfo*; \
mkdir -p tmp && echo "$$DEF_PKG_CONFS" > tmp/.packagedynamicdefault;

prepare-tmpinfo: check-dynamic-def-pkg FORCE
prepare-tmpinfo: FORCE
@+$(MAKE) -r -s $(STAGING_DIR_HOST)/.prereq-build $(PREP_MK)
mkdir -p tmp/info feeds
[ -e $(TOPDIR)/feeds/base ] || ln -sf $(TOPDIR)/package $(TOPDIR)/feeds/base
Expand Down
28 changes: 28 additions & 0 deletions package/base-files/files/etc/init.d/led
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

START=96

extra_command "turnon" "Put the LEDs into their default state"
extra_command "turnoff" "Turn all LEDs off"
extra_command "blink" "Blink all LEDs"

led_color_set() {
local cfg="$1"
local sysfs="$2"
Expand Down Expand Up @@ -168,7 +172,31 @@ load_led() {
}
}

turnoff() {
for led in `ls /sys/class/leds/`; do
echo 0 > /sys/class/leds/$led/brightness
done
}

turnon() {
turnoff
. /etc/diag.sh
set_state done
start
}

blink() {
for led in `ls /sys/class/leds/`; do
echo 0 > /sys/class/leds/$led/brightness
echo timer > /sys/class/leds/$led/trigger
done
}

start() {
[ "$(uci -q get system.@system[-1].leds_off)" = '1' ] && {
turnoff
exit 0
}
[ -e /sys/class/leds/ ] && {
[ -s /var/run/led.state ] && {
local led trigger brightness color
Expand Down
2 changes: 1 addition & 1 deletion package/base-files/files/etc/rc.button/reset
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ released)
elif [ "$SEEN" -ge 5 -a -n "$OVERLAY" ]
then
echo "FACTORY RESET" > /dev/console
jffs2reset -y && reboot &
factoryreset -y && reboot &
fi
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion package/base-files/files/sbin/firstboot
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

/sbin/jffs2reset $@
/sbin/factoryreset $@
5 changes: 5 additions & 0 deletions package/boot/uboot-envtools/files/qualcommax_ipq60xx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ cambiumnetworks,xe3-4)
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
;;
linksys,mr7350)
idx="$(find_mtd_index u_env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
;;
netgear,wax214)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
Expand Down
6 changes: 4 additions & 2 deletions package/boot/uboot-mediatek/patches/453-add-openwrt-one.patch
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
+CONFIG_LMB_MAX_REGIONS=64
--- /dev/null
+++ b/openwrt-one-nor_env
@@ -0,0 +1,47 @@
@@ -0,0 +1,48 @@
+ethaddr_factory=mtd read factory 0x46000000 0x0 0x20000 && env readmem -b ethaddr 0x4600002a 0x6 ; setenv ethaddr_factory
+bl2_mtd_write=mtd erase bl2-nor && mtd write bl2-nor $loadaddr 0x0 0x40000
+bl2_tftp_write=tftpboot $loadaddr $bootfile_bl2_nor && run bl2_mtd_write
Expand Down Expand Up @@ -510,6 +510,7 @@
+serverip=192.168.11.23
+tftp_boot=run led_start ; tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
+tftp_write=run led_start ; tftpboot $loadaddr $bootfile && mtd erase recovery 0x0 ${filesize} && mtd write recovery $loadaddr 0x0 ${filesize}
+usb_pgood_delay=4000
+usb_recovery=run led_start ; usb start && run usb_recovery_bl2 && run usb_recovery_ubi && run led_loop_done
+usb_recovery_bl2=fatload usb 0:1 ${loadaddr} ${recoverfile_bl2} && run recovery_write_bl2
+usb_recovery_ubi=fatload usb 0:1 ${loadaddr} ${recoverfile_ubi} && run recovery_write_ubi
Expand All @@ -519,7 +520,7 @@
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"
--- /dev/null
+++ b/openwrt-one-spi-nand_env
@@ -0,0 +1,60 @@
@@ -0,0 +1,61 @@
+ethaddr_factory=mtd read factory 0x46000000 0x0 0x20000 && env readmem -b ethaddr 0x4600002a 0x6 ; setenv ethaddr_factory
+ipaddr=192.168.11.11
+serverip=192.168.11.23
Expand Down Expand Up @@ -571,6 +572,7 @@
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
+usb_pgood_delay=4000
+usb_recover=run led_start ; usb start && run usb_recover_production && run led_loop_done
+usb_recover_production=fatload usb 0:1 ${loadaddr} ${bootfile_upg} && iminfo $loadaddr && run ubi_write_production
+ubi_write_fip=run ubi_remove_rootfs ; ubi check fip && ubi remove fip ; ubi create fip $filesize static && ubi write $loadaddr fip $filesize
Expand Down
10 changes: 7 additions & 3 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
PKG_SOURCE_DATE:=2024-10-08
PKG_SOURCE_VERSION:=dcbab62272bf5cab2ed857bc655d240970e14f2a
PKG_MIRROR_HASH:=e53a3872abf5e35db6baaceb56e6ffa289f8dd9b6226cf8a4d5b87b541179175
PKG_SOURCE_DATE:=2024-11-28
PKG_SOURCE_VERSION:=e1f6c9ac9e1508852f292a2b8167823e180db4e8
PKG_MIRROR_HASH:=cc7ef25d43bbea4d521e0cb69887b975295be98ddf83b29f52c3c0e7d1ceeb25
PKG_FLAGS:=nonshared

include $(INCLUDE_DIR)/package.mk
Expand Down Expand Up @@ -37,6 +37,7 @@ ALLWIFIBOARDS:= \
dynalink_dl-wrx36 \
edgecore_eap102 \
edimax_cax1800 \
linksys_mr7350 \
linksys_mx4200 \
linksys_mx5300 \
linksys_mx8500 \
Expand All @@ -49,6 +50,7 @@ ALLWIFIBOARDS:= \
netgear_wax620 \
netgear_wax630 \
prpl_haze \
qihoo_360v6 \
qnap_301w \
redmi_ax6 \
skspruce_wia3300-20 \
Expand Down Expand Up @@ -164,6 +166,7 @@ $(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873))
$(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
$(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
$(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
$(eval $(call generate-ipq-wifi-package,linksys_mr7350,Linksys MR7350))
$(eval $(call generate-ipq-wifi-package,linksys_mx4200,Linksys MX4200))
$(eval $(call generate-ipq-wifi-package,linksys_mx5300,Linksys MX5300))
$(eval $(call generate-ipq-wifi-package,linksys_mx8500,Linksys MX8500))
Expand All @@ -175,6 +178,7 @@ $(eval $(call generate-ipq-wifi-package,netgear_wax214,Netgear WAX214))
$(eval $(call generate-ipq-wifi-package,netgear_wax218,Netgear WAX218))
$(eval $(call generate-ipq-wifi-package,netgear_wax620,Netgear WAX620))
$(eval $(call generate-ipq-wifi-package,netgear_wax630,Netgear WAX630))
$(eval $(call generate-ipq-wifi-package,qihoo_360v6,Qihoo 360V6))
$(eval $(call generate-ipq-wifi-package,qnap_301w,QNAP 301w))
$(eval $(call generate-ipq-wifi-package,prpl_haze,prpl Haze))
$(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
Expand Down
2 changes: 1 addition & 1 deletion package/kernel/mac80211/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ PKG_CONFIG_DEPENDS += \
define KernelPackage/cfg80211
$(call KernelPackage/mac80211/Default)
TITLE:=cfg80211 - wireless configuration API
DEPENDS+= +iw +iwinfo +wifi-scripts +wireless-regdb +USE_RFKILL:kmod-rfkill
DEPENDS+= +iw +!WIFI_SCRIPTS_UCODE:iwinfo +wifi-scripts +wireless-regdb +USE_RFKILL:kmod-rfkill
ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
FILES:= \
$(PKG_BUILD_DIR)/compat/compat.ko \
Expand Down
3 changes: 3 additions & 0 deletions package/network/config/wifi-scripts/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
config WIFI_SCRIPTS_UCODE
bool "Use new ucode based scripts"
default n
10 changes: 9 additions & 1 deletion package/network/config/wifi-scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@ PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0

PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_CONFIG_DEPENDS:=CONFIG_WIFI_SCRIPTS_UCODE

include $(INCLUDE_DIR)/package.mk

define Package/wifi-scripts
SECTION:=utils
CATEGORY:=Base system
DEPENDS:=+netifd +ucode +ucode-mod-nl80211 +ucode-mod-rtnl +ucode-mod-ubus +ucode-mod-uci
DEPENDS:=+netifd +ucode +ucode-mod-nl80211 +ucode-mod-rtnl +ucode-mod-ubus +ucode-mod-uci +ucode-mod-digest
TITLE:=Wi-Fi configuration scripts
PKGARCH:=all
endef

define Package/wifi-scripts/config
source "$(SOURCE)/Config.in"
endef

define Package/wifi-scripts/description
A set of scripts that handle setup and configuration of Wi-Fi devices.
endef
Expand All @@ -40,6 +45,9 @@ endef
define Package/wifi-scripts/install
$(INSTALL_DIR) $(1)
$(CP) ./files/* $(1)/
ifeq ($(CONFIG_WIFI_SCRIPTS_UCODE),y)
$(CP) ./files-ucode/* $(1)/
endif
endef

$(eval $(call BuildPackage,wifi-scripts))
Loading

0 comments on commit b9e5bb6

Please sign in to comment.