forked from nemomobile/ssu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the hardcoded device detection logic to configuration files
- Loading branch information
Bernd Wachter
committed
Nov 4, 2012
1 parent
d36316d
commit 4de5c26
Showing
5 changed files
with
154 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
### Don't edit this file manually. Update it in git, if there's a good reason to do so ### | ||
# | ||
# This file is used by SSU to find out which device (or device variant) it's | ||
# running on, and use this information to look for device family, and device | ||
# specific adaptation(s). The last two values are used when resolving URLs, | ||
# and therefore change depending on vendor setup. | ||
# | ||
# To avoid quoting in the search strings SSU will do each checks on the | ||
# _value_, and return the key, if successful. The device model returned | ||
# my either be the device model, or a variant. Before resolving the family | ||
# and adaptations variants will be resolved through entries under the | ||
# variants category. | ||
# | ||
# Valid categories for determining the model: | ||
# - file.exists -- checks for existince of a file in the filesystem | ||
# - systeminfo.equals -- compares the model returned by QSystemInfo | ||
# with the value provided | ||
# - cpuinfo.contains -- searches /proc/cpuinfo for a string | ||
# - arch.equals -- compares with zyppers arch (like i586) | ||
# | ||
# Resolve order is: | ||
# file.exists -> systeminfo.equals -> cpuinfo.contains -> arch.equals | ||
# | ||
# The found model (after resolving variants) will be used as category. The | ||
# following keys are valid there: | ||
# - family -- the device family, used for the family specific adaptation | ||
# - adaptations -- list of additional adaptations, shared between families | ||
# | ||
# The value of adaptations gets converted into a QStringList, which uses | ||
# commas as separator. If one of the adaptation names contains a comma it | ||
# needs to be quoted: | ||
# adaptation=foo | ||
# adaptation="foo, bar", baz | ||
# adaptation=foo, bar, baz | ||
# | ||
# The N9x mappings should be solved through sysinfo, but that's currently | ||
# broken on Mer/Nemo | ||
|
||
[file.exists] | ||
SDK=/mer-sdk-chroot | ||
|
||
[systeminfo.equals] | ||
|
||
[cpuinfo.contains] | ||
N900=Nokia RX-51 board | ||
N950=Nokia RM-680 board | ||
N9=Nokia RM-696 board | ||
|
||
[arch.equals] | ||
generic-x86=i586 | ||
|
||
[variants] | ||
N950=N9 | ||
|
||
[N9] | ||
family=n950-n9 | ||
adaptations=n9xx | ||
|
||
[N900] | ||
family=n900 | ||
adaptations=n9xx | ||
|
||
[SDK] | ||
|
||
[generic-x86] | ||
family=x86 | ||
adaptations=x86 | ||
|
||
[UNKNOWN] | ||
family=UNKNOWN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters