Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions package/boot/uboot-fritz4040/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ include $(INCLUDE_DIR)/kernel.mk

PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=9d89013f9cc963eca25856c61fa066091d35f8de
PKG_SOURCE_DATE:=2022-05-01
PKG_MIRROR_HASH:=4e8106a7877ae6aa8da44bf95401b860d11f7d51417cc5a61ce59a353d4ee866
PKG_SOURCE_VERSION:=6909090cb82db96f8ef0cd211ca91e87d69a07fc
PKG_SOURCE_DATE:=2026-03-04
PKG_MIRROR_HASH:=741da058f24e559befff1f2d28d057dbfe9b3a6af67e60191cbefdbacc9143bb

PKG_RELEASE:=5
PKG_RELEASE:=6

include $(INCLUDE_DIR)/u-boot.mk
include $(INCLUDE_DIR)/package.mk
Expand Down Expand Up @@ -51,6 +51,12 @@ define U-Boot/fritz7530
BUILD_DEVICES:=avm_fritzbox-7530
endef

define U-Boot/huawei_ap4050dn
NAME:=Huawei AP4050DN
BUILD_DEVICES:=huawei_ap4050dn
UBOOT_IMAGE:=uImage
endef

UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
UBOOT_MAKE_FLAGS = USE_PRIVATE_LIBGCC=yes
export DTC
Expand All @@ -64,7 +70,14 @@ endef

define Build/Compile
$(Build/Compile/U-Boot)
(cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh $(UBOOT_BOARD);)
@( \
cd $(PKG_BUILD_DIR) ; \
if [ "$(UBOOT_BOARD)" = "huawei_ap4050dn" ]; then \
./huawei/huaweicreator.sh $(UBOOT_BOARD) ; \
else \
./fritz/fritzcreator.sh $(UBOOT_BOARD) ; \
fi \
)
endef

define Build/InstallDev
Expand All @@ -74,9 +87,9 @@ endef

define Package/u-boot/install
$(Package/u-boot/install/default)
$(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/
$(if $(filter fritz%,$(BUILD_VARIANT)),$(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/)
endef

UBOOT_TARGETS := fritz1200 fritz3000 fritz4040 fritz7520 fritz7530
UBOOT_TARGETS := fritz1200 fritz3000 fritz4040 fritz7520 fritz7530 huawei_ap4050dn

$(eval $(call BuildPackage/U-Boot))
2 changes: 2 additions & 0 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ALLWIFIBOARDS:= \
glinet_gl-ax1800 \
glinet_gl-axt1800 \
glinet_gl-b3000 \
huawei_ap4050dn \
ignitenet_ss-w2-ac2600 \
iodata_wn-dax3000gr \
jdcloud_re-cs-02 \
Expand Down Expand Up @@ -237,6 +238,7 @@ $(eval $(call generate-ipq-wifi-package,elecom_wrc-x3000gs2,ELECOM WRC-X3000GS2)
$(eval $(call generate-ipq-wifi-package,glinet_gl-ax1800,GL.iNet GL-AX1800))
$(eval $(call generate-ipq-wifi-package,glinet_gl-axt1800,GL.iNet GL-AXT1800))
$(eval $(call generate-ipq-wifi-package,glinet_gl-b3000,GL.iNet GL-B3000))
$(eval $(call generate-ipq-wifi-package,huawei_ap4050dn,Huawei AP4050DN))
$(eval $(call generate-ipq-wifi-package,ignitenet_ss-w2-ac2600,Ignitenet SS-W2-AC2600))
$(eval $(call generate-ipq-wifi-package,iodata_wn-dax3000gr,I-O DATA WN-DAX3000GR))
$(eval $(call generate-ipq-wifi-package,jdcloud_re-cs-02,JDCloud RE-CS-02))
Expand Down
1 change: 1 addition & 0 deletions target/linux/ipq40xx/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ ipq40xx_setup_interfaces()
dlink,dap-2610|\
engenius,eap1300|\
extreme-networks,ws-ap3915i|\
huawei,ap4050dn|\
meraki,mr20|\
meraki,mr33|\
meraki,mr70|\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x1000 0x2f20
ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR0)
;;
huawei,ap4050dn)
caldata_extract "0:ART" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
;;
mikrotik,cap-ac|\
mikrotik,hap-ac2|\
mikrotik,hap-ac3|\
Expand Down Expand Up @@ -159,6 +163,10 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x5000 0x2f20
ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR1)
;;
huawei,ap4050dn)
caldata_extract "0:ART" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
;;
mikrotik,cap-ac|\
mikrotik,hap-ac2|\
mikrotik,hap-ac3|\
Expand Down
10 changes: 10 additions & 0 deletions target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,16 @@ platform_do_upgrade() {
CI_ROOTPART="rootfs"
emmc_do_upgrade "$1"
;;
huawei,ap4050dn)
# Store beginning address of the "uboot" partition
# as KernelA address and KernelB address, each to ResultA & ResultB
# This is the address from which the bootloader will try to load the u-boot that we use as loader.
export HUAWEI_AP4050DN_LOADADDR="\x00\x00\x70\x00\x00\x00\x70\x00"
echo -n -e $HUAWEI_AP4050DN_LOADADDR | dd of=$(find_mtd_part ResultA) bs=1 seek=$((0x4264)) conv=notrunc
echo -n -e $HUAWEI_AP4050DN_LOADADDR | dd of=$(find_mtd_part ResultA) bs=1 seek=$((0x40264)) conv=notrunc
echo -n -e $HUAWEI_AP4050DN_LOADADDR | dd of=$(find_mtd_part ResultB) bs=1 seek=$((0x4264)) conv=notrunc
default_do_upgrade "$1"
;;
linksys,ea6350v3|\
linksys,ea8300|\
linksys,mr6350|\
Expand Down
4 changes: 4 additions & 0 deletions target/linux/ipq40xx/config-6.12
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_FIT_FW=y
CONFIG_MTD_SPLIT_WRGG_FW=y
CONFIG_MTD_VIRT_CONCAT=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SRCU_NMI_SAFE=y
Expand All @@ -323,6 +324,7 @@ CONFIG_NET_FLOW_LIMIT=y
CONFIG_NET_INGRESS=y
CONFIG_NET_PTP_CLASSIFY=y
CONFIG_NET_SELFTESTS=y
CONFIG_NET_SWITCHDEV=y
CONFIG_NET_XGRESS=y
CONFIG_NLS=y
CONFIG_NO_HZ=y
Expand Down Expand Up @@ -353,6 +355,7 @@ CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_PAGE_POOL=y
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
CONFIG_PCI=y
CONFIG_PCIEAER=y
CONFIG_PCIEPORTBUS=y
Expand Down Expand Up @@ -480,6 +483,7 @@ CONFIG_SGL_ALLOC=y
CONFIG_SKB_EXTENSIONS=y
CONFIG_SMP=y
CONFIG_SMP_ON_UP=y
# CONFIG_SM_GCC_7150 is not set
CONFIG_SOCK_RX_QUEUE_MAPPING=y
CONFIG_SOFTIRQ_ON_OWN_STACK=y
CONFIG_SPARSE_IRQ=y
Expand Down
Loading
Loading