From 1a1b5a12a49fa5f4144edeebad50fff7c6a50cf7 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 30 Aug 2023 15:42:17 +0800 Subject: [PATCH] mediatek: rename LC-HX3001 to ubootmod layout Keep it consistent with other devices. Signed-off-by: Tianling Shen --- package/boot/uboot-envtools/files/mediatek_filogic | 2 +- ...lc-hx3001.dts => mt7981b-imou-lc-hx3001-ubootmod.dts} | 4 ++-- .../mediatek/filogic/base-files/etc/board.d/01_leds | 2 +- .../mediatek/filogic/base-files/etc/board.d/02_network | 4 ++-- .../base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac | 2 +- target/linux/mediatek/image/filogic.mk | 9 +++++---- 6 files changed, 12 insertions(+), 11 deletions(-) rename target/linux/mediatek/dts/{mt7981b-imou-lc-hx3001.dts => mt7981b-imou-lc-hx3001-ubootmod.dts} (97%) diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index b3ba6d8150..219a668b73 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -40,7 +40,7 @@ bananapi,bpi-r3) glinet,gl-mt3000) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000" ;; -imou,lc-hx3001) +imou,lc-hx3001-ubootmod) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x80000" "1" ;; livinet,zr-3020|\ diff --git a/target/linux/mediatek/dts/mt7981b-imou-lc-hx3001.dts b/target/linux/mediatek/dts/mt7981b-imou-lc-hx3001-ubootmod.dts similarity index 97% rename from target/linux/mediatek/dts/mt7981b-imou-lc-hx3001.dts rename to target/linux/mediatek/dts/mt7981b-imou-lc-hx3001-ubootmod.dts index cfc8b6b3fc..6a320d380a 100644 --- a/target/linux/mediatek/dts/mt7981b-imou-lc-hx3001.dts +++ b/target/linux/mediatek/dts/mt7981b-imou-lc-hx3001-ubootmod.dts @@ -10,8 +10,8 @@ #include "mt7981.dtsi" / { - model = "Imou LC-HX3001"; - compatible = "imou,lc-hx3001", "mediatek,mt7981"; + model = "Imou LC-HX3001 (custom U-Boot layout)"; + compatible = "imou,lc-hx3001-ubootmod", "mediatek,mt7981"; aliases { led-boot = &power_led; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index 59b1b01ead..3d625a820d 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -9,7 +9,7 @@ case $board in cudy,wr3000-v1) ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" ;; -imou,lc-hx3001) +imou,lc-hx3001-ubootmod) ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" "link" ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan" "link" ucidef_set_led_netdev "wlan" "WLAN" "green:wlan" "phy1-ap0" "link" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 66a494c6ca..1b50c5663e 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -35,7 +35,7 @@ mediatek_setup_interfaces() ;; h3c,magic-nx30-pro|\ h3c,magic-nx30-pro-nmbm|\ - imou,lc-hx3001) + imou,lc-hx3001-ubootmod) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1 ;; mediatek,mt7986a-rfb) @@ -94,7 +94,7 @@ mediatek_setup_macs() lan_mac=$(macaddr_add "$wan_mac" 1) label_mac=$wan_mac ;; - imou,lc-hx3001) + imou,lc-hx3001-ubootmod) lan_mac=$(mtd_get_mac_ascii u-boot-env mac) [ -n "$lan_mac" ] || lan_mac=$(macaddr_add $(mtd_get_mac_binary Factory 0x4) -1) wan_mac=$(macaddr_add $lan_mac 2) diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 2a68ff6f3b..b928f6c2d5 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -49,7 +49,7 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress ;; - imou,lc-hx3001) + imou,lc-hx3001-ubootmod) addr=$(mtd_get_mac_ascii u-boot-env mac) [ -n "$addr" ] || addr=$(macaddr_add $(mtd_get_mac_binary Factory 0x4) -1) [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index fa1843fcff..b80eb2795f 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -274,12 +274,13 @@ define Device/h3c_magic-nx30-pro-nmbm endef TARGET_DEVICES += h3c_magic-nx30-pro-nmbm -define Device/imou_lc-hx3001 +define Device/imou_lc-hx3001-ubootmod DEVICE_VENDOR := Imou - DEVICE_MODEL := LC-HX3001 - DEVICE_DTS := mt7981b-imou-lc-hx3001 + DEVICE_MODEL := LC-HX3001 (custom U-Boot layout) + DEVICE_DTS := mt7981b-imou-lc-hx3001-ubootmod DEVICE_DTS_DIR := ../dts DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware + SUPPORTED_DEVICES += imou,lc-hx3001 UBINIZE_OPTS := -E 5 BLOCKSIZE := 128k PAGESIZE := 2048 @@ -293,7 +294,7 @@ define Device/imou_lc-hx3001 KERNEL_INITRAMFS = kernel-bin | lzma | \ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd endef -TARGET_DEVICES += imou_lc-hx3001 +TARGET_DEVICES += imou_lc-hx3001-ubootmod define Device/jcg_q30-ubootmod DEVICE_VENDOR := JCG