Age | Commit message (Collapse) | Author |
|
It's always a good idea to explain why some code was written so let's
add a README.
Relates-to: EHSW-1799
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
The whole git repository is under MIT license for now, but let's make it
more obvious by adding the SPDX license identifier as the first line of
the file.
Relates-to: EHSW-1799
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
There's not benefit in versioning the user-compiled binary, so let's add
it to a gitignore.
Relates-to: EHSW-1799
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
This is an import from
https://gitlab.lan/som/mule-attiny/-/tree/4d0bd1eb6e739c82b82443776cd2a612d2bf2d1a/bootloader/utils/updi_emu
with a directory rename to `bitbang_updi_reset` and a small string
change in the Makefile in a comment.
Relates-to: EHSW-1799
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
POSIX mule.sh
See merge request som/som-tools!2
|
|
Hinted by Shellcheck:
SC3037: In POSIX sh, echo flags are undefined.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Hinted by Shellcheck:
SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Shellcheck returns the following warning:
SC2086: Double quote to prevent globbing and word splitting.
Let's fix this by double quoting variables where needed.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Outside of this read line, the rest is POSIX compliant, so better not
depend on bash if possible which makes it easier on systems built with
Buildroot or Yocto where bash might not be available by default.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
usb-control: switch to python3
See merge request som/som-tools!1
|
|
Long overdue migration to python3. This was done with 2to3 and barely
tested.
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
After we bring the board in to maskrom mode, we need to release
the BIOS disable signal again. Otherwise we won't be able to write
to the on-board eMMC.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This patch factors out the low-level routines to control a CP2102
to cp210x_controller.py.
command_processor.py provides a framework for defining
commands and to specify options. It represents the board
independet boilerplate code.
cp2102_haikou.py contains the commands to control a Haikou-like
circuit.
cp2102_simple.py contains the commands to control a simple control
circuit.
The board files cp2102-mini-evk.py, haikou.py, and telaviv.py
are the front-ends to control the specified boards.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
In order to bring back the functionality of the
telaviv.py script, which has been remove in a previous
commit, this commit factors out the common code into
cp210x_controller.py.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
* parser: make -i/-s available for all commands
* parser: add toggle command
* parser: remove 'power' before on|off|cycle|status
* status: add BIOS disable state (read out GPIO output value)
* USB: make calls to ctrl_transfer more expressive with kwargs
* get_powerstate: Add comments to describe what's happening
* main: Move main code into function main(), called by toplevel
* find_board_list: New function containing the usb.core.find() call
* Define constants to make code more expressive
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
On some base boards we don't have a matching product string,
therefore the product string matching code fails and the
tool does not find the base board.
This patch adds the flag '-i' to ignore the product string.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
Intead of duplicating code, we aim for a solution, which allows
to have a non-matching product string and/or a configurable
product string.
Therefore this reverts commit 9cd6a84d771c1a706c2c77e1376926d7c2c8bda3.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
|
|
|
|
To avoid confusion between various on-board cortex-m0
cores, the companion-controller is now identified by the code name
"mule.
renamed: companion-controller/README.md -> mule/README.md
renamed: companion-controller/cortex-m0.sh -> mule/mule.sh
renamed: companion-controller/openocd.cfg -> mule/openocd.cfg
|
|
And also the haikou.py runtime dependency on python-usb
|
|
update the readme to reflect the argument parsing
|
|
Since v1.4 (and previous revisions with a simple rework) Haikou boards
can determine the power state. This enables us to have a reset command.
Argparsing had to be rewritten to support the new status and reset
feature in a sane way. We now have subcommands with parameters.
For example:
haikou.py power on # turns the board on
haikou.py power reset # resets the board, if it was off it will be
# turned on
haikou.py power reset -b # resets the board with bios disable active
haikou.py list # lists the connected boards
|
|
as u-boot now supports usb add the necessary parts to enable distroboots
usb target
|
|
Adds support for the RK3368 uQ7 Board "Lion"
https://www.theobroma-systems.com/rk3368-uq7/
|
|
android needs different bootargs then linux
|
|
initrd files should be loaded to ramdisk_addr_r instead of load_addr
|
|
listing boards can run into a permission problem.
Traceback (most recent call last):
File "./haikou.py", line 49, in <module>
product=PRODUCT_STRING, find_all=True))
File "/usr/lib/python2.7/dist-packages/usb/core.py", line 1249, in device_iter
if _interop._all(tests) and (custom_match is None or custom_match(d)):
File "/usr/lib/python2.7/dist-packages/usb/core.py", line 1248, in <genexpr>
tests = (val == getattr(d, key) for key, val in kwargs.items())
File "/usr/lib/python2.7/dist-packages/usb/core.py", line 841, in product
self._product = util.get_string(self, self.iProduct)
File "/usr/lib/python2.7/dist-packages/usb/util.py", line 314, in get_string
raise ValueError("The device has no langid")
ValueError: The device has no langid
catch the langid error and print a message that this could be a permission
problem. also link to the pyusb ticket https://github.com/walac/pyusb/issues/139
|
|
there should be nothing before the shebang, so removed the missplaced
copyright header and use PEP 8 style module variables.
also add a short description as common in python
|
|
|
|
like the devicetree the kernel and optional initrd should
be configureable via defaultenv and userenv
|
|
Haikou uses a FET to control the BIOS Disable pin. So we have to
invert the signal.
|
|
The Q7 baseboard Haikou features a USB to UART Bridge.
This Bridge allows to control the boot behaviour and
the power button via USB. This script is a python based
libusb interface to enable this feature cross-platform.
|
|
Most Theobroma Systems SoMs feature a Cortex-M0 companion controller.
This commit includes:
* a shell script for resetting and flashing the MCU
* a OpenOCD config file for onboard debugging
|
|
boot.scr is a u-boot script used by distroboot to execute arbitrary
commands and load the correct kernel and devicetree
|
|
add some permissive license so no code is a left in a dubious state
|
|
This repository will hold a collection of tools for the various SoMs
from Theobroma System
|