]>
| description | Muen hardware config generator |
| owner | Reto Buerki |
| last change | Thu, 7 Dec 2023 13:58:51 +0000 (14:58 +0100) |
| URL | https://git.codelabs.ch/muen/mugenhwcfg.git |
| git@git.codelabs.ch:/muen/mugenhwcfg.git |
mugenhwcfg is a Python tool developed to support the Muen Project.
It retrieves hardware information from a running Linux system and produces a
Muen hardware configuration file in XML format.
mugenhwcfg requires Python 3. It also requires iasl (part of the
acpica-tools package) and cpuid to be installed:
$ sudo apt-get install acpica-tools cpuid
Optionally, mugenhwcfg also uses the Python Package lxml to format the
generated XML file. You can get it (if not yet installed) with either:
$ sudo apt-get install python3-lxml
or
$ sudo pip install lxml
mugenhwcfg can be obtained from the repository with the command:
$ git clone --recursive https://git.codelabs.ch/git/muen/mugenhwcfg.git
This clones all submodules required by the tool as well as the source files.
After installation, mugenhwcfg can be run with the following commands:
$ sudo modprobe msr
$ cd mugenhwcfg
$ sudo ./mugenhwcfg.py
Root user permissions are necessary to allow mugenhwcfg to examine system
data.
After running the tool, the output XML file will be produced in the tool directory and will be named output.xml.
Any errors encountered by the tool will (by default) prevent the output file
from being generated. The tool can attempt to generate an output file anyway
(for manual editing) using the -f / --force argument.
As the tool relies on external files (such as the pci.ids repository), some
of these files might need to be updated to retrieve accurate information.
You can utilise the -u / --update argument to download and update these files
automatically.
-u / --update Update files used by the tool-f / --force Attempt to generate the output file despite errorsmugenhwcfg scans Linux system files (/sys, /proc, /dev) for processor,
memory and device information needed by the Muen kernel. It then fills up
PyXB Python objects with the information and creates an XML file.
mugenhwcfg utilises the PyXB package to generate
a Python binding file from a hardware configuration schema file which should be
included with the tool distribution at /schema/hardware_config.xsd.
This generation happens the first time the tool is run, at the location
/generated/hardware_config.py. This binding file is then used to create and
fill objects that are later converted to XML in the output.
The PyXB package is included as a submodule in the mugenhwcfg repository
at: /contrib/pyxb
To decode device names, mugenhwcfg parses the pci.ids file in
/data/pci.ids. pci.ids is a repository of PCI identification numbers
maintained by the good people here.
The mugenhwcfg tests require the Python package pytest:
$ sudo apt-get install python3-pytest
or
$ sudo pip install pytest
After installing the required dependencies, the tests can be run with:
$ py.test-3
To produce a coverage report, execute the following commands:
$ sudo apt-get install python3-pytest-cov
$ py.test-3 --cov=src
Append the --cov-report html option if a html report instead of terminal
output is desired.
mugenhwcfg alters the following in the XML output hardware file to match the
requirements of the Muen Kernel:
You can drop an email to the Muen development team's mailing list at
muen-dev@googlegroups.com
or contact the author (Chen Chin Jieh) directly at
chinjieh@gmail.com
Big thanks to Adrian and Reto for their unending guidance and advice!
| 2 years ago | v0.7.2 | Mugenhwcfg version 0.7.2 | tag | | commit | shortlog | log |
| 2 years ago | v0.7.1 | Mugenhwcfg version 0.7.1 | tag | | commit | shortlog | log |
| 3 years ago | v0.7 | Mugenhwcfg version 0.7 | tag | | commit | shortlog | log |
| 4 years ago | v0.6 | Mugenhwcfg version 0.6 | tag | | commit | shortlog | log |
| 8 years ago | PyXB-1.2.6 | PyXB release 1.2.6 | tag | | commit | shortlog | log |
| 9 years ago | PyXB-1.2.5 | PyXB release 1.2.5 | tag | | commit | shortlog | log |
| 9 years ago | v0.5 | Mugenhwcfg version 0.5 | tag | | commit | shortlog | log |
| 11 years ago | PyXB-1.2.4 | | commit | shortlog | log | ||
| 12 years ago | PyXB-1.2.3 | | commit | shortlog | log | ||
| 12 years ago | PyXB-1.2.2 | | commit | shortlog | log | ||
| 13 years ago | PyXB-1.2.1 | | commit | shortlog | log | ||
| 13 years ago | PyXB-1.2.0 | | commit | shortlog | log | ||
| 13 years ago | PyXB-1.1.5 | | commit | shortlog | log | ||
| 13 years ago | PyXB-1.1.4 | | commit | shortlog | log | ||
| 14 years ago | PyXB-1.1.3 | | commit | shortlog | log | ||
| 15 years ago | PyXB-1.1.2 | | commit | shortlog | log | ||
| ... | ||||
| 5 weeks ago | devel-misc-minor | shortlog | log | tree |
| 6 weeks ago | devel | shortlog | log | tree |
| 2 years ago | master | shortlog | log | tree |
| 3 years ago | devel-irq-collection | shortlog | log | tree |