Add boards Makefile definitions with sysupgrade image generation. Add default led/network settings and profiles. Switch from UBI_GLUEBI to UBI_BLOCK.
Signed-off-by: Sylwester Petela <[email protected]> --- target/linux/lantiq/base-files/etc/uci-defaults/01_leds | 7 +++++++ target/linux/lantiq/base-files/etc/uci-defaults/02_network | 12 +++++++----- target/linux/lantiq/base-files/lib/upgrade/platform.sh | 9 +++++++++ target/linux/lantiq/image/Makefile | 8 +++++--- target/linux/lantiq/xrx200/config-default | 4 ++-- target/linux/lantiq/xrx200/profiles/zyxel.mk | 25 ++++++++++++++++++++----- 6 files changed, 50 insertions(+), 15 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds index b0e0b2a..739f983 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds +++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds @@ -32,6 +32,13 @@ VGV7519) ucidef_set_led_netdev "internet_yellow" "internet_yellow" "internet_yellow" "nas0" ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "pppoe-wan" ;; +P2812HNUF*) + ucidef_set_led_default "power" "power" "power" "1" + ucidef_set_led_default "power2" "power2" "power2" "0" + ucidef_set_led_wlan "wifi2" "wifi2" "wifi2" "phy0radio" + ucidef_set_led_netdev "internet" "internet" "internet" "nas0" + ucidef_set_led_netdev "internet2" "internet2" "internet2" "pppoe-wan" + ;; *) ;; esac diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network b/target/linux/lantiq/base-files/etc/uci-defaults/02_network index 777e38d..ec80bf6 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network @@ -145,7 +145,9 @@ P2601HNFX) ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t" ;; -P2812HNUFX) +P2812HNUF*) + lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) + wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_set_interface_lan 'eth0.1' ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "0 1 2 4 5 6t" diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh index bef395a..330932c 100755 --- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh +++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh @@ -13,6 +13,15 @@ platform_check_image() { ;; esac + + case "$board" in + P2812HNUF* ) + nand_do_platform_check $board $1 + return $?; + ;; + esac + + case "$(get_magic_word "$1")" in # uImage 2705) return 0;; diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 5c96b63..9c2915e 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -397,9 +397,11 @@ endif ifeq ($(CONFIG_TARGET_lantiq_xrx200),y) # VR9 -Image/BuildKernel/Profile/P2812HNUFX=$(call Image/BuildKernel/Template,P2812HNUFX) -Image/InstallKernel/Template/P2812HNUFX=$(call Image/InstallKernel/Template,P2812HNUFX) -Image/Build/Profile/P2812HNUFX=$(call Image/Build/$(1),$(1),P2812HNUFX) +Image/BuildKernel/Profile/P2812HNUF1=$(call Image/BuildKernel/Template,P2812HNUF1) +Image/Build/Profile/P2812HNUF1=$(call Image/BuildNAND/$(1),$(1),P2812HNUF1) + +Image/BuildKernel/Profile/P2812HNUF3=$(call Image/BuildKernel/Template,P2812HNUF3) +Image/Build/Profile/P2812HNUF3=$(call Image/BuildNAND/$(1),$(1),P2812HNUF3) Image/BuildKernel/Profile/ARV7519RW22=$(call Image/BuildKernel/Template,ARV7519RW22,$(1)) Image/Build/Profile/ARV7519RW22=$(call Image/Build/$(1),$(1),ARV7519RW22) diff --git a/target/linux/lantiq/xrx200/config-default b/target/linux/lantiq/xrx200/config-default index 09dfbdd..73dad50 100644 --- a/target/linux/lantiq/xrx200/config-default +++ b/target/linux/lantiq/xrx200/config-default @@ -30,9 +30,9 @@ CONFIG_MTD_NAND_XWAY=y # CONFIG_MTD_SM_COMMON is not set CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 -# CONFIG_MTD_UBI_BLOCK is not set +CONFIG_MTD_UBI_BLOCK=y # CONFIG_MTD_UBI_FASTMAP is not set -CONFIG_MTD_UBI_GLUEBI=y +# CONFIG_MTD_UBI_GLUEBI is not set CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_NLS=y CONFIG_PCIE_LANTIQ=y diff --git a/target/linux/lantiq/xrx200/profiles/zyxel.mk b/target/linux/lantiq/xrx200/profiles/zyxel.mk index e758a50..83bd4a7 100644 --- a/target/linux/lantiq/xrx200/profiles/zyxel.mk +++ b/target/linux/lantiq/xrx200/profiles/zyxel.mk @@ -1,5 +1,5 @@ -define Profile/P2812HNUFX - NAME:=ZyXEL P-2812HNU-Fx +define Profile/P2812HNUF1 + NAME:=ZyXEL P-2812HNU-F1 PACKAGES:=kmod-rt2800-pci wpad-mini \ kmod-ltq-deu-vr9 kmod-ltq-hcd-vr9 \ kmod-ltq-vdsl-vr9-mei kmod-ltq-vdsl-vr9 \ @@ -8,7 +8,22 @@ define Profile/P2812HNUFX swconfig endef -P2812HNUFX_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096" -P2812HNUFX_UBI_OPTS:="-m 2048 -p 128KiB -s 512" +P2812HNUF1_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096" +P2812HNUF1_UBI_OPTS:="-m 2048 -p 128KiB -s 512" -$(eval $(call Profile,P2812HNUFX)) +$(eval $(call Profile,P2812HNUF1)) + +define Profile/P2812HNUF3 + NAME:=ZyXEL P-2812HNU-F3 + PACKAGES:=kmod-rt2800-pci wpad-mini \ + kmod-ltq-deu-vr9 kmod-ltq-hcd-vr9 \ + kmod-ltq-vdsl-vr9-mei kmod-ltq-vdsl-vr9 \ + kmod-ltq-atm-vr9 ltq-vdsl-vr9-fw-installer \ + ltq-vdsl-app ppp-mod-pppoa \ + swconfig +endef + +P2812HNUF3_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096" +P2812HNUF3_UBI_OPTS:="-m 2048 -p 128KiB -s 512" + +$(eval $(call Profile,P2812HNUF3)) _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
