This is also to add support for the OpenWrt to the small-level route
Write a new device to the Target/linux/ramips/image/makefile
image/build/profile/mt7620a_clz=$ (Call buildfirmware/default8m/$ (1), $ (1), MT7620A_CLZ, MT7620A_CLZ) $ (call image/build/profile/mt7620a_clz,$ (1))
Some of the available configurations in Base-files:
BASE-FILES/ETC/DIAG.SH controls whether the LEDs blink when the OpenWrt is started
Base-files/lib/upgrade/platform.sh allows Sysupgrade to work
Base-files/etc/uci-defaults/network to configure (install) default network interface (interface) settings, particularly MAC addresses
Base-files/etc/uci-defaults/leds If you have configurable (configurable) LEDs which should default to a behavior (behavior), like a WLAN a Ctivity LED
Base-files/etc/hotplug.d/firmware (firmware)/10-rt2x00-eeprom to extract (extract) the firmware image for the wireless (wireless) module
Base-files/lib/preinit/06_set_iface_mac to set the MAC addresses of any other interfaces (interface)
DTS files for small-size routes written
/dts-v1/;/include/"Mt7620a.dtsi"/{compatible="Ralink,mt7620a-eval-board","Ralink,mt7620a-soc"; Model="Ralink mt7620a Xiaodu Board"; [Email protected]10000000{[email protected]0{Ralink,gpiomux="I²c"; Ralink,uartmux="Gpio"; Ralink,wdtmux= <1>; }; Gpio0: [Email protected] -{Status="Okay"; }; [Email protected] {Status="Okay"; [Email protected]0{#address-cells = <1>; #size-cells = <1>; Compatible="W25Q64BV"; Reg= <0 0>; Linux,modalias="W25Q64BV"; SPI-max-frequency = <1000000>; [Email protected]0{Label="U-boot"; Reg= <0x0 0x30000>; Read-Only ; }; [Email protected]30000{Label="u-boot-env"; Reg= <0x30000 0x10000>; Read-Only ; }; Factory: [Email protected]40000{Label="Factory"; Reg= <0x40000 0x10000>; Read-Only ; }; [Email protected]50000{Label="firmware"; Reg= <0x50000 0x6b0000>; }; [Email protected]700000{Label="usercfg"; Reg= <0x700000 0x100000>; }; }; }; }; [Email protected]10100000{Status="Okay"; Pinctrl-names ="default"; Pinctrl-0= <&ephy_pins>; Ralink,port-map ="LLLLW"; }; [Email protected]10110000{ralink,port4="ephy"; }; [Email protected]10130000{Status="Okay"; }; [Email protected]10140000{Status="Okay"; }; Gpio-keys-polled {compatible="Gpio-keys"; #address-cells = <1>; #size-cells = <0>; Poll-interval = < ->; WPS {Label="WPS"; Gpios= <&gpio0 A 1>; Linux,code= <0x100>; }; Reset {Label="Reset"; Gpios= <&gpio0 - 1>; Linux,code= <0x101>; }; };};
After adding a device, it is best to delete the temporary files generated by the previous compilation, as follows
-RF tmp make Menuconfig
This article by http://www.wifidog.pro/2015/06/22/openwrt%E6%B7%BB%E5%8A%A0%E6%96%B0%E8%AE%BE%E5%A4%87.html compilation, reprint please indicate the source
Add new device Support in OpenWrt