author | mickeyl <mickeyl> | 2004-06-12 16:54:50 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-06-12 16:54:50 (UTC) |
commit | b1235df3628d178891eeefed630a22da46b25952 (patch) (unidiff) | |
tree | c88a3cb04adcc9fe214ff08e3c0b96b21e3c4f0a /libopie2/opiecore/device/odevice_ramses.cpp | |
parent | 7a62e8e3601ee98f5f06261c361fe8132334cd56 (diff) | |
download | opie-b1235df3628d178891eeefed630a22da46b25952.zip opie-b1235df3628d178891eeefed630a22da46b25952.tar.gz opie-b1235df3628d178891eeefed630a22da46b25952.tar.bz2 |
- refactor the distribution detection code
- add detection of OpenEmbedded and generic linux distributions
- simplify the zaurus model detection code
Diffstat (limited to 'libopie2/opiecore/device/odevice_ramses.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_ramses.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/libopie2/opiecore/device/odevice_ramses.cpp b/libopie2/opiecore/device/odevice_ramses.cpp index 32467f1..7db2af1 100644 --- a/libopie2/opiecore/device/odevice_ramses.cpp +++ b/libopie2/opiecore/device/odevice_ramses.cpp | |||
@@ -61,59 +61,49 @@ struct r_button ramses_buttons [] = { | |||
61 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 61 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
62 | "devicebuttons/z_menu", | 62 | "devicebuttons/z_menu", |
63 | "QPE/TaskBar", "toggleMenu()", | 63 | "QPE/TaskBar", "toggleMenu()", |
64 | "QPE/TaskBar", "toggleStartMenu()" }, | 64 | "QPE/TaskBar", "toggleStartMenu()" }, |
65 | { Model_Ramses_MNCI, | 65 | { Model_Ramses_MNCI, |
66 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 66 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
67 | "devicebuttons/ipaq_home", | 67 | "devicebuttons/ipaq_home", |
68 | "QPE/Launcher", "home()", | 68 | "QPE/Launcher", "home()", |
69 | "buttonsettings", "raise()" }, | 69 | "buttonsettings", "raise()" }, |
70 | }; | 70 | }; |
71 | 71 | ||
72 | void Ramses::init(const QString&) | 72 | void Ramses::init(const QString&) |
73 | { | 73 | { |
74 | d->m_vendorstr = "M und N"; | 74 | d->m_vendorstr = "M und N"; |
75 | d->m_vendor = Vendor_MundN; | 75 | d->m_vendor = Vendor_MundN; |
76 | 76 | ||
77 | QFile f("/proc/sys/board/ramses"); | 77 | QFile f("/proc/sys/board/ramses"); |
78 | 78 | ||
79 | d->m_modelstr = "Ramses"; | 79 | d->m_modelstr = "Ramses"; |
80 | d->m_model = Model_Ramses_MNCI; | 80 | d->m_model = Model_Ramses_MNCI; |
81 | 81 | ||
82 | d->m_rotation = Rot0; | 82 | d->m_rotation = Rot0; |
83 | d->m_holdtime = 1000; | 83 | d->m_holdtime = 1000; |
84 | 84 | ||
85 | f.setName("/etc/oz_version"); | 85 | // Distribution detection code now in the base class |
86 | |||
87 | if (f.open(IO_ReadOnly)) { | ||
88 | d->m_systemstr = "OpenEmbedded/Ramses"; | ||
89 | d->m_system = System_OpenZaurus; | ||
90 | |||
91 | QTextStream ts(&f); | ||
92 | ts.setDevice(&f); | ||
93 | d->m_sysverstr = ts.readLine(); | ||
94 | f.close(); | ||
95 | } | ||
96 | 86 | ||
97 | m_power_timer = 0; | 87 | m_power_timer = 0; |
98 | 88 | ||
99 | #ifdef QT_QWS_ALLOW_OVERCLOCK | 89 | #ifdef QT_QWS_ALLOW_OVERCLOCK |
100 | #warning *** Overclocking enabled - this may fry your hardware - you have been warned *** | 90 | #warning *** Overclocking enabled - this may fry your hardware - you have been warned *** |
101 | #define OC(x...) x | 91 | #define OC(x...) x |
102 | #else | 92 | #else |
103 | #define OC(x...) | 93 | #define OC(x...) |
104 | #endif | 94 | #endif |
105 | 95 | ||
106 | // This table is true for a Intel XScale PXA 255 | 96 | // This table is true for a Intel XScale PXA 255 |
107 | 97 | ||
108 | d->m_cpu_frequencies->append("99000"); // mem= 99, run= 99, turbo= 99, PXbus= 50 | 98 | d->m_cpu_frequencies->append("99000"); // mem= 99, run= 99, turbo= 99, PXbus= 50 |
109 | OC(d->m_cpu_frequencies->append("118000"); ) // mem=118, run=118, turbo=118, PXbus= 59 OC'd mem | 99 | OC(d->m_cpu_frequencies->append("118000"); ) // mem=118, run=118, turbo=118, PXbus= 59 OC'd mem |
110 | d->m_cpu_frequencies->append("199100"); // mem= 99, run=199, turbo=199, PXbus= 99 | 100 | d->m_cpu_frequencies->append("199100"); // mem= 99, run=199, turbo=199, PXbus= 99 |
111 | OC(d->m_cpu_frequencies->append("236000"); ) // mem=118, run=236, turbo=236, PXbus=118 OC'd mem | 101 | OC(d->m_cpu_frequencies->append("236000"); ) // mem=118, run=236, turbo=236, PXbus=118 OC'd mem |
112 | d->m_cpu_frequencies->append("298600"); // mem= 99, run=199, turbo=298, PXbus= 99 | 102 | d->m_cpu_frequencies->append("298600"); // mem= 99, run=199, turbo=298, PXbus= 99 |
113 | OC(d->m_cpu_frequencies->append("354000"); ) // mem=118, run=236, turbo=354, PXbus=118 OC'd mem | 103 | OC(d->m_cpu_frequencies->append("354000"); ) // mem=118, run=236, turbo=354, PXbus=118 OC'd mem |
114 | d->m_cpu_frequencies->append("398099"); // mem= 99, run=199, turbo=398, PXbus= 99 | 104 | d->m_cpu_frequencies->append("398099"); // mem= 99, run=199, turbo=398, PXbus= 99 |
115 | d->m_cpu_frequencies->append("398100"); // mem= 99, run=398, turbo=398, PXbus=196 | 105 | d->m_cpu_frequencies->append("398100"); // mem= 99, run=398, turbo=398, PXbus=196 |
116 | OC(d->m_cpu_frequencies->append("471000"); ) // mem=118, run=471, turbo=471, PXbus=236 OC'd mem/core/bus | 106 | OC(d->m_cpu_frequencies->append("471000"); ) // mem=118, run=471, turbo=471, PXbus=236 OC'd mem/core/bus |
117 | 107 | ||
118 | } | 108 | } |
119 | 109 | ||