diff --git a/config/glb1300-exit b/config/glb1300-exit new file mode 100644 index 00000000..4e0abaf7 --- /dev/null +++ b/config/glb1300-exit @@ -0,0 +1,8 @@ +CONFIG_TARGET_ipq40xx=y +CONFIG_TARGET_ipq40xx_generic=y +CONFIG_TARGET_ipq40xx_generic_DEVICE_glinet_gl-b1300=y +CONFIG_PACKAGE_althea-babeld=y +CONFIG_PACKAGE_althea-cron-jobs=y +CONFIG_PACKAGE_rita-exit=y +CONFIG_PACKAGE_rita-exit-dash=y +CONFIG_PACKAGE_althea-tools=y diff --git a/profiles/exit/glb1300.yml b/profiles/exit/glb1300.yml new file mode 100644 index 00000000..f8e9fff8 --- /dev/null +++ b/profiles/exit/glb1300.yml @@ -0,0 +1,20 @@ +rita_type: "exit" +conf_to_build: "glb1300-exit" +device: "gl-b1300" +package_id: arm_cortex-a7_neon-vfpv4 +image_paths: + - "ipq40xx/generic/openwrt-ipq40xx-glinet_gl-b1300-squashfs-sysupgrade.bin" +supported: true + +channel: 11 +# 5ghz note only 20mhz channel widths +five_ghz_channel: 36 + +wan_interface: "wan" + +listen_interfaces: + - wan + +lan_interfaces: "lan1 lan2" + +rust_target: armv7-unknown-linux-musleabihf diff --git a/roles/build-config/templates/glb1300-exit-network.j2 b/roles/build-config/templates/glb1300-exit-network.j2 new file mode 100644 index 00000000..84c5e0f3 --- /dev/null +++ b/roles/build-config/templates/glb1300-exit-network.j2 @@ -0,0 +1,42 @@ +config globals 'globals' + option ula_prefix 'auto' + +{% if wan_interface is defined %} +config interface 'backhaul' + option ifname '{{wan_interface}}' + option proto {{ 'dhcp' if not wan_proto is defined else wan_proto }} +{% if wan_ipaddr is defined %} + option ipaddr '{{wan_ipaddr}}' +{% endif %} +{% if wan_gateway is defined %} + option gateway '{{wan_gateway}}' +{% endif %} +{% if wan_dns is defined %} +{% for dns in wan_dns %} + list dns '{{dns}}' +{% endfor %} +{% endif %} +{% endif %} + +{% if wan_interface is defined %} +config interface 'backhaul' + option ifname '{{wan_interface}}' + option proto {{ 'dhcp' if not wan_proto is defined else wan_proto }} +{% if wan_ipaddr is defined %} + option ipaddr '{{wan_ipaddr}}' +{% endif %} +{% if wan_gateway is defined %} + option gateway '{{wan_gateway}}' +{% endif %} +{% if wan_dns is defined %} +{% for dns in wan_dns %} + list dns '{{dns}}' +{% endfor %} +{% endif %} +{% endif %} + +{% for interface in listen_interfaces %} +config interface 'rita_{{interface | replace(".","")}}' + option ifname {{interface}} + option proto static +{% endfor %} diff --git a/roles/build-config/templates/glb1300-exit-wireless.j2 b/roles/build-config/templates/glb1300-exit-wireless.j2 new file mode 100644 index 00000000..0af4c74e --- /dev/null +++ b/roles/build-config/templates/glb1300-exit-wireless.j2 @@ -0,0 +1,33 @@ +config wifi-device 'radio0' + option type 'mac80211' + option channel '{{channel}}' + option hwmode '11g' + option path 'platform/soc/a000000.wifi' + option htmode 'HT20' + option disabled '{{wifi_disabled}}' + +config wifi-iface 'default_radio0' + option device 'radio0' + option network 'lan' + option mode 'ap' + option ssid '{{exit_wifi_ssid_two_ghz}}' + option encryption '{{wifi_encryption}}' + option key 'ChangeMe' + option ifname 'wlan0' + +config wifi-device 'radio1' + option type 'mac80211' + option channel '{{five_ghz_channel}}' + option hwmode '11a' + option path 'platform/soc/a800000.wifi' + option htmode 'VHT80' + option disabled '{{wifi_disabled}}' + +config wifi-iface 'default_radio1' + option device 'radio1' + option network 'lan' + option mode 'ap' + option ssid '{{exit_wifi_ssid_five_ghz}}' + option encryption '{{wifi_encryption}}' + option key '{{wifi_key}}' + option ifname 'wlan1' \ No newline at end of file diff --git a/scripts/build-exit-managed.sh b/scripts/build-exit-managed.sh index 77368baa..17eff6c7 100644 --- a/scripts/build-exit-managed.sh +++ b/scripts/build-exit-managed.sh @@ -6,3 +6,4 @@ cd $(dirname $0)/.. ansible-playbook -e @profiles/exit/x86_64.yml -e @profiles/management/hawk-managed.yml firmware-build.yml ansible-playbook -e @profiles/exit/mikrotik_hap-ac3.yml -e @profiles/management/hawk-managed.yml firmware-build.yml +ansible-playbook -e @profiles/exit/glb1300.yml -e @profiles/management/hawk-managed.yml firmware-build.yml