[OpenWrt-Devel] [PATCH] ramips:Add support for Aigale Ai-BR100

Yousong Zhou yszhou4tech at gmail.com
Sat Dec 13 02:04:04 EST 2014


Hi, gch

On 13 December 2014 at 10:41, 郭传鈜 <gch981213 at gmail.com> wrote:
> Aigale Ai-BR100 is a router with mt7620a soc.
> There are only 2 lights on the board (WAN and WLAN) so I used the wlan light as the status led.
>

IIRC, there are 3 LEDs, but one of them is for power supply indication
and cannot be controlled with software :)

> Signed-off-by: 郭传鈜 <gch981213 at gmail.com>
> ---
>  target/linux/ramips/base-files/etc/board.d/01_leds |   4 +
>  .../linux/ramips/base-files/etc/board.d/02_network |   1 +
>  target/linux/ramips/base-files/etc/diag.sh         |   3 +
>  target/linux/ramips/base-files/lib/ramips.sh       |   3 +
>  .../ramips/base-files/lib/upgrade/platform.sh      |   1 +
>  target/linux/ramips/dts/AIBR100.dts                | 106 +++++++++++++++++++++
>  target/linux/ramips/image/Makefile                 |   3 +
>  target/linux/ramips/mt7620/profiles/aigale.mk      |  20 ++++
>  8 files changed, 141 insertions(+)
>  create mode 100644 target/linux/ramips/dts/AIBR100.dts
>  create mode 100644 target/linux/ramips/mt7620/profiles/aigale.mk
>

<snip>

> diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
> index e0eb8c2..c5478ce 100644
> --- a/target/linux/ramips/image/Makefile
> +++ b/target/linux/ramips/image/Makefile
> @@ -770,6 +770,8 @@ Image/Build/Profile/MT7620a=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a,MT7
>  Image/Build/Profile/MT7620a_MT7610e=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_mt7610e,MT7620a_MT7610e)
>  Image/Build/Profile/MT7620a_MT7530=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_mt7530,MT7620a_MT7530)
>  Image/Build/Profile/MT7620a_V22SG=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_v22sg,MT7620a_V22SG)
> +br100_mtd_size=8126464
> +Image/Build/Profile/AIBR100=$(call BuildFirmware/CustomFlash/$(1),$(1),ai-br100,AIBR100,$(br100_mtd_size),Ai-BR)

Hmm, I remembered that I had to use an initramfs image for OEM
installation since boa HTTP server of the OEM firmware uses file size
of uploaded firmware instead of ih_size in the uimage header to do CRC
checksum.

>  Image/Build/Profile/RP-N53=$(call BuildFirmware/Default8M/$(1),$(1),rp_n53,RP-N53)
>  whr_300hp2_mtd_size=7012352
>  Image/Build/Profile/WHR300HP2=$(call BuildFirmware/CustomFlash/$(1),$(1),whr-300hp2,WHR-300HP2,$(whr_300hp2_mtd_size))
> @@ -799,6 +801,7 @@ define Image/Build/Profile/Default
>         $(call Image/Build/Profile/MT7620a_MT7610e,$(1))
>         $(call Image/Build/Profile/MT7620a_MT7530,$(1))
>         $(call Image/Build/Profile/MT7620a_V22SG,$(1))
> +       $(call Image/Build/Profile/AIBR100,$(1))
>         $(call Image/Build/Profile/RP-N53,$(1))
>         $(call Image/Build/Profile/DIR-810L,$(1))
>         $(call Image/Build/Profile/WHR300HP2,$(1))
> diff --git a/target/linux/ramips/mt7620/profiles/aigale.mk b/target/linux/ramips/mt7620/profiles/aigale.mk
> new file mode 100644
> index 0000000..e58ac43
> --- /dev/null
> +++ b/target/linux/ramips/mt7620/profiles/aigale.mk
> @@ -0,0 +1,20 @@
> +#
> +# Copyright (C) 2014 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +define Profile/AIBR100
> +       NAME:=Aigale Ai-BR100
> +       PACKAGES:=\
> +               kmod-usb-core \
> +               kmod-usb-ohci \
> +               kmod-ledtrig-usbdev \
> +               kmod-usb2
> +endef

kmod-ledtrig-usbdev should be optional.


               yousong
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list