summaryrefslogtreecommitdiff
path: root/modules/devices/devicetree.c
AgeCommit message (Collapse)Author
2024-05-24FIX GCC Warnings, added more checking to gcc flagshwspeedy
2024-02-08FIX DeviceTree Crash Odroid C2 Armbianbigbear
2024-02-08LICENSE Changed to GPL2+ for project and source code According to approval ↵bigbear
from copyright holders - see: https://github.com/lpereira/hardinfo/issues/530 https://github.com/lpereira/hardinfo/issues/707
2021-11-07Update copyright informationL Pereira
2019-08-10name cleanup for x86 model strings and intel pci device stringsBurt P
x86 CPU: * Remove (R), (TM), etc * AMD: remove redundant "X2 Dual Core", "X4 Quad Core", etc * Move vendor to front if not already * Remove speed, as the actual speed is usually right next to it * Remove "CPU", "APU", "Processor" to shorten * Compress space Intel GPU: * Remove (R) * Abbreviate "Generation": "Gen" * Remove "Processor", "Controller", and "Device" to shorten * Compress space Some examples: x86 CPU: 'AMD Turion(tm) 64 Mobile Technology ML-32' ---> 'AMD Turion 64 Mobile ML-32' 'Cyrix MediaGXtm MMXtm Enhanced' ---> 'Cyrix MediaGX MMX Enhanced' 'Transmeta(tm) Crusoe(tm) Processor TM5800' ---> 'Transmeta Crusoe TM5800' 'VIA Nano X2 L4350 @ 1.6+ GHz' ---> 'VIA Nano X2 L4350' 'AMD Athlon(tm) 64 X2 Dual-Core Processor TK-53' ---> 'AMD Athlon 64 X2 TK-53' 'Embedded AMD Opteron(tm) Processor 23KS EE' ---> 'AMD Embedded Opteron 23KS EE' 'Intel(R) Atom(TM) x5-Z8300 CPU @ 1.44GHz' ---> 'Intel Atom x5-Z8300' 'Intel(R) Pentium(R) III CPU - S 1400MHz' ---> 'Intel Pentium III - S' 'Dual Core AMD Opteron(tm) Processor 165' ---> 'AMD Dual Core Opteron 165' 'Genuine Intel(R) CPU T1350 @ 1.86GHz' ---> 'Intel T1350' 'AMD Phenom(tm) 9350e Quad-Core Processor' ---> 'AMD Phenom 9350e Quad-Core' Intel GPU: 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller' ---> 'Atom/Celeron/Pentium x5-E8000/J3xxx/N3xxx Integrated Graphics' '4th Generation Core Processor Family Integrated Graphics Controller' ---> '4th Gen Core Family Integrated Graphics' 'Mobile GM965/GL960 Integrated Graphics Controller (secondary)' ---> 'Mobile GM965/GL960 Integrated Graphics (secondary)' 'Mobile 915GM/GMS/910GML Express Graphics Controller' ---> 'Mobile 915GM/GMS/910GML Express Graphics' Also: Fix/replace the appf() and SEQ() that were peppered about. Signed-off-by: Burt P <pburt0@gmail.com>
2019-07-29raspberry pi memory typesBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-11-04devicetree: include details for "Summary" in reportsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2018-09-26devicetree: fix to remove gtk runtime warningBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-09-04Build fix after 8913af3eLeandro Pereira
Fixes #188.
2017-09-03Conditionally compile PowerPC and ARM code while summarizing DTLeandro Pereira
Also, use properly-named variables and plug a memory leak.
2017-09-03Clean up device tree codeLeandro Pereira
- No need for a global dtr variable: just pass it around as parameters - Internal functions marked static
2017-08-14Move hardinfo_clean_label() and hardinfo_clean_value() to util.cBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-14device tree: memory leakBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-08-09arm: Try to lookup the SOC name from dt/compatibleBurt P
Just ARM for now, but maybe this will become more generic and it will be possible to have the processor package name and description seperate, even for x86 and whatnot. Also perhaps work in Sockets/Threads/Cores information. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-25device tree: fix crash when device tree is not foundBurt P
* check if device tree was found before add_keys() * UNKIFNULL(model) before strcmp * make UNKIFNULL() STRIFNULL() EMPIFNULL() macros more generic Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-24device tree: printf without format stringBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-24device tree: remove testing bitBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-24device tree: add power mac dataBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-22device tree: group interrupt specifiers' values using #interrupt-cellsBurt P
Also, add a message log to the dtr object. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-21device tree: rpi: improve rpi detection on non-RaspbianBurt P
When running Arch's AArch64 kernel on Raspberry Pi 3, for example. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: display phandle, symbol, and alias mappingsBurt P
* Of course, symbols and aliases are are the same as in /__symbols__ and /aliases. It still helps a bit. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: add lookup for /__symbols__ valuesBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: code comments and tweak dtr_str()Burt P
* dtr_str() requires obj, which knows its dtr. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: reworked and cleaned upBurt P
* Moved device tree functions to modules/devices/devicetree/dt_util.c * The dtr_* functions usable from outside devicetree.c, for example in get_motherboard(). Must #include "dt_util.h" * Now possible to use an alternate device tree root for testing -DOVRDTRROOT=\"/some/path\" * Alternately, pass dtr_new() an alternate base path. * Abandoned the tuple grouping and inherited properties stuff for now. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: phandle and alias mappingBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: display arbitrary-length byte sequencesBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: attempt to group tuples when shown as hex valuesBurt P
Based on information from http://elinux.org/Device_Tree_Mysteries#.23xxx-cells_property_name which is incomplete, try and group tuples using the relevant inherited #(.*)-cells properies. Just reg, clocks, and gpios so far. More possible. See dt_tup_len(). Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: tweaksBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: complete hardinfo_clean_value() html escapingBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: code comment with info source linkBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: display 32-bit value lists and #(.*)-cells fieldsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: escape string valuesBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: attempt to clean the labels for hardinfo shellBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: more small fixesBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: small fixesBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: Add 'compatible' to default summary, fix rpi bugBurt P
Fixes a bug where a Raspberry Pi with a generic arm kernel will be detected but not have a revision code in cpuinfo to lookup information with. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19device tree: display intsBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19Expand device tree supportBurt P
The complete tree is now available to view. There are some bugs, mostly to do with hardinfo protocol quirks. Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19Move Raspberry Pi detection stuff into Device Tree sectionBurt P
Signed-off-by: Burt P <pburt0@gmail.com>
2017-07-19Begin support for device treeBurt P
Signed-off-by: Burt P <pburt0@gmail.com>