Support for mANTbox 2 12s (#1083)

* Add routerboard-911g-2hpnd-12s

* Fix procd for devices without /dev/console

* Disable console reset in kernel
This commit is contained in:
Tim Wilkinson 2024-01-24 19:28:36 -08:00 committed by GitHub
parent f3d49eab64
commit 40dbe7e547
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 106 additions and 0 deletions

View File

@ -39,6 +39,7 @@ RB912UAG-2HPnD <br> BaseBox 2 | RB912UAG-2HPnD <br> RB912UAG-2HPnD-OUT | 2 | ath
RB912UAG-5HPnD <br> BaseBox 5 | RB912UAG-5HPnD <br> RB912UAG-5HPnD-OUT | 5 | ath79 | mikrotik | mikrotik-912uag-5hpnd | 64MB | stable | released (1)
mANTBox 15s | RB921GS-5HPacD-15S | 5 | ath79 | mikrotik | mikrotik-921gs-5hpacd-15s | 128MB | stable | released
mANTBox 19s | RB921GS-5HPacD-19S | 5 | ath79 | mikrotik | mikrotik-921gs-5hpacd-19s | 128MB | stable | released
mANTBox 2 12s | RB911G-2HPnD-12S | 2 | ath79 | mikrotik | mikrotik-911g-2hpnd-12s | 64MB | stable | nightly
## Ubiquiti
Model | SKUs | Band | Target | Subtarget | Image | RAM | Stability | Status

View File

@ -3,6 +3,7 @@ CONFIG_TARGET_ath79_mikrotik=y
CONFIG_TARGET_DEVICE_ath79_mikrotik_DEVICE_mikrotik_routerboard-911g-5hpnd-qrt=y
CONFIG_TARGET_DEVICE_ath79_mikrotik_DEVICE_mikrotik_routerboard-912uag-2hpnd=y
CONFIG_TARGET_DEVICE_ath79_mikrotik_DEVICE_mikrotik_routerboard-912uag-5hpnd=y
CONFIG_TARGET_DEVICE_ath79_mikrotik_DEVICE_mikrotik_routerboard-911g-2hpnd-12s=y
#
# Mikrotik use initramfs to install

View File

@ -308,6 +308,14 @@
"beamwidth": 10.1
}
},
"mikrotik routerboard 911g-2hpnd-12s": {
"maxpower": "30",
"antenna": {
"description": "12 dBi 120&deg; Sector",
"gain": 12,
"beamwidth": 120
}
},
"mikrotik routerboard 921gs-5hpacd-15s": {
"maxpower": "31",
"bandwidths": [ 10, 20 ],

19
patches/720-procd-fix-cwd.patch Executable file
View File

@ -0,0 +1,19 @@
--- /dev/null
+++ b/package/system/procd/patches/001-fix-cwd.patch
@@ -0,0 +1,16 @@
+--- a/state.c
++++ b/state.c
+@@ -48,11 +48,11 @@
+ if (chdir("/dev") ||
+ !freopen(tty, "r", stdin) ||
+ !freopen(tty, "w", stdout) ||
+- !freopen(tty, "w", stderr) ||
+- chdir("/"))
++ !freopen(tty, "w", stderr))
+ ERROR("failed to set stdio: %m\n");
+ else
+ fcntl(STDERR_FILENO, F_SETFL, fcntl(STDERR_FILENO, F_GETFL) | O_NONBLOCK);
++ chdir("/");
+ }
+
+ static void set_console(void)

View File

@ -0,0 +1,7 @@
--- a/target/linux/ath79/mikrotik/config-default
+++ b/target/linux/ath79/mikrotik/config-default
@@ -38,3 +38,4 @@
CONFIG_WATCHDOG_CORE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_ZLIB_INFLATE=y
+CONFIG_CMDLINE="rootfstype=squashfs,jffs1 8250.nr_uarts=0"

View File

@ -765,3 +765,71 @@
define Device/mikrotik_routerboard-921gs-5hpacd-15s
$(Device/mikrotik_nand)
SOC := qca9558
--- a/target/linux/ath79/image/mikrotik.mk
+++ b/target/linux/ath79/image/mikrotik.mk
@@ -28,6 +28,15 @@
endef
TARGET_DEVICES += mikrotik_routerboard-912uag-2hpnd
+define Device/mikrotik_routerboard-911g-2hpnd-12s
+ $(Device/mikrotik_nand)
+ SOC := ar9342
+ DEVICE_MODEL := RouterBOARD 911G-2HPnD-12s
+ DEVICE_PACKAGES += kmod-usb-ehci kmod-usb2
+ SUPPORTED_DEVICES += rb-912uag-2hpnd
+endef
+TARGET_DEVICES += mikrotik_routerboard-911g-2hpnd-12s
+
define Device/mikrotik_routerboard-912uag-5hpnd
$(Device/mikrotik_nand)
SOC := ar9342
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g-2hpnd-12s.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "ar9342_mikrotik_routerboard-912uag-2hpnd.dts"
+
+/ {
+ compatible = "mikrotik,routerboard-911g-2hpnd-12s", "qca,ar9342";
+ model = "MikroTik RouterBOARD 911G-2HPnD-12s";
+};
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -16,6 +16,7 @@
;;
mikrotik,routerboard-911g-5hpnd*|\
mikrotik,routerboard-911-lite|\
+ mikrotik,routerboard-911g-2hpnd*|\
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-912uag-5hpnd|\
mikrotik,routerboard-lhg-2nd|\
@@ -82,6 +83,7 @@
case "$board" in
mikrotik,routerboard-911g-5hpnd*|\
mikrotik,routerboard-911-lite|\
+ mikrotik,routerboard-911g-2hpnd*|\
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-912uag-5hpnd|\
mikrotik,routerboard-lhg-2nd|\
--- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -25,6 +25,7 @@
case $board in
mikrotik,routerboard-911g-5hpnd*|\
mikrotik,routerboard-911-lite|\
+ mikrotik,routerboard-911g-2hpnd*|\
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-912uag-5hpnd|\
mikrotik,routerboard-lhg-2nd|\
--- a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
@@ -33,6 +33,7 @@
case "$board" in
mikrotik,routerboard-493g|\
mikrotik,routerboard-911g-5hpnd*|\
+ mikrotik,routerboard-911g-2hpnd*|\
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-912uag-5hpnd|\
mikrotik,routerboard-921gs-5hpacd-15s|\

View File

@ -24,6 +24,8 @@
717-fix-olsrd-oparse-error.patch
718-temp-remove-olsrd-pud.patch
719-disable-ipv6.patch
720-procd-fix-cwd.patch
730-mikrotik-disable-console.patch
731-ag71xx-updates-and-fixes.patch
742-5-and-10mhz-ath10k-ct-support.patch
742-radio-extend-mediatek-support.patch