Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
a07419bb
Commit
a07419bb
authored
9 years ago
by
Neal Oakey
Browse files
Options
Downloads
Patches
Plain Diff
fix UBNT XM model detection
parent
2223ccd9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/openwrt/0048-fix-UBNT-XM-model-detection.patch
+74
-0
74 additions, 0 deletions
patches/openwrt/0048-fix-UBNT-XM-model-detection.patch
with
74 additions
and
0 deletions
patches/openwrt/0048-fix-UBNT-XM-model-detection.patch
0 → 100644
+
74
−
0
View file @
a07419bb
From: Neal Oakey <neal.oakey@bingo-ev.de>
Date: Sun, 14 Feb 2016 20:58:20 +0100
Subject: fix UBNT XM model detection
Signed-off-by: Neal Oakey <neal.oakey@bingo-ev.de>
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index d0abf42..f345fae 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -64,6 +64,40 @@
wndr3700_board_detect() {
AR71XX_MODEL="$machine"
}
+ubnt_get_mtd_part_magic() {
+ ar71xx_get_mtd_offset_size_format EEPROM 4118 2 %02x
+}
+
+ubnt_xm_board_detect() {
+ local model
+ local magic
+
+ magic="$(ubnt_get_mtd_part_magic)"
+ case ${magic:0:3} in
+ "e00"|\
+ "e01"|\
+ "e80") # It seams that there are different Versions of the Nanostation
+ model="Ubiquiti NanoStation M"
+ ;;
+ "e0a")
+ model="Ubiquiti NanoStation loco M"
+ ;;
+ "e1b") # Note: the M5 has not been tested!
+ # and the Ti Versions are still missing
+ model="Ubiquiti Rocket M"
+ ;;
+ "e20"|\
+ "e2d") # Bullet Ti M
+ model="Ubiquiti Bullet M"
+ ;;
+ "e30")
+ model="Ubiquiti PicoStation M"
+ ;;
+ esac
+
+ [ ! -z "$model" ] && AR71XX_MODEL="${model}${magic:3:1}"
+}
+
cybertan_get_hw_magic() {
local part
@@ -472,12 +506,14 @@
ar71xx_board_detect() {
;;
*"Bullet M")
name="bullet-m"
+ ubnt_xm_board_detect
;;
*"Loco M XW")
name="loco-m-xw"
;;
*"Nanostation M")
name="nanostation-m"
+ ubnt_xm_board_detect
;;
*"Nanostation M XW")
name="nanostation-m-xw"
@@ -664,6 +700,7 @@
ar71xx_board_detect() {
;;
*"Rocket M")
name="rocket-m"
+ ubnt_xm_board_detect
;;
*"Rocket M XW")
name="rocket-m-xw"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment