aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-06-29mule-attiny: add a READMEQuentin Schulz
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>
2023-06-28mule-attiny: add SPDX license identifierQuentin Schulz
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>
2023-06-28mule-attiny: make git ignore binaryQuentin Schulz
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>
2023-06-28import updi_reset GPIO bit banging emulationQuentin Schulz
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>
2021-11-24Merge branch 'POSIX-mule.sh' into 'master'Jakob Unterwurzacher
POSIX mule.sh See merge request som/som-tools!2
2021-11-24mule: mule.sh: use printf instead of echo with flagsQuentin Schulz
Hinted by Shellcheck: SC3037: In POSIX sh, echo flags are undefined. Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2021-11-24mule: mule.sh: use file redirect instead of catQuentin Schulz
Hinted by Shellcheck: SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2021-11-24mule: mule.sh: prevent paths with spaces and/or globbing to mess up the scriptQuentin Schulz
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>
2021-11-24mule: mule.sh: remove bashismQuentin Schulz
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>
2021-11-24Merge branch 'python3' into 'master'Jakob Unterwurzacher
usb-control: switch to python3 See merge request som/som-tools!1
2021-11-23usb-control: switch to python3Quentin Schulz
Long overdue migration to python3. This was done with 2to3 and barely tested. Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2020-01-20cp2102-cpdebug.py: Adding new controller type.Christoph Muellner
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2019-10-08usb-control: cp2102_haikou: Disable BIOS-disable again in do_cycle_to_maskrom.Christoph Muellner
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>
2019-10-07Add support for cp2102 simple control cicuits.Christoph Muellner
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>
2019-10-05usb-control: Adding gitignore file.Christoph Muellner
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2019-10-05cp2102-mini-evk.py: Adding new controller type.Christoph Muellner
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2019-10-05cp210x_controller.py: Adding some more commands.Christoph Muellner
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2019-05-29usb-control: Factor out product string.Christoph Muellner
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>
2019-05-28haikou.py: Cleanups and refactoring.Christoph Muellner
* 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>
2019-05-28haikou.py: Add option to disable product string matcher.Christoph Muellner
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>
2019-05-28Revert "Add usb-control/telaviv.py"Christoph Muellner
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>
2018-10-11Add usb-control/telaviv.pyMartin Elshuber
2018-03-27lion: dtb is not called rk3368-lion-haikou.dtbJakob Unterwurzacher
2018-01-23Rename companion-controller -> muleJakob Unterwurzacher
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
2018-01-23README: document openocd build dependenciesJakob Unterwurzacher
And also the haikou.py runtime dependency on python-usb
2017-12-07usb-control: update READMEKlaus Goger
update the readme to reflect the argument parsing
2017-12-07usb-control: get power state and implement resetKlaus Goger
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
2017-11-24boot: add usb target for puma_rk3399Klaus Goger
as u-boot now supports usb add the necessary parts to enable distroboots usb target
2017-11-24boot: support for lion_rk3368Johann Stocker
Adds support for the RK3368 uQ7 Board "Lion" https://www.theobroma-systems.com/rk3368-uq7/
2017-11-24boot: add support for android on puma_rk3399Martin Elshuber
android needs different bootargs then linux
2017-11-24boot: use correct ramdisk load addressMartin Elshuber
initrd files should be loaded to ramdisk_addr_r instead of load_addr
2017-08-14usb-control: print notice if run into langid errorKlaus Goger
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
2017-08-14usb-control: replace broken copyright headerKlaus Goger
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
2017-07-10boot-script: add MakefileJakob Unterwurzacher
2017-06-27boot: make kernel and initrd filename configurableKlaus Goger
like the devicetree the kernel and optional initrd should be configureable via defaultenv and userenv
2017-06-13usb-control: fix bios disable logicKlaus Goger
Haikou uses a FET to control the BIOS Disable pin. So we have to invert the signal.
2017-06-13import haikou base board control scriptKlaus Goger
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.
2017-06-01import companion controller toolsKlaus Goger
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
2017-06-01import boot.scr for u-bootKlaus Goger
boot.scr is a u-boot script used by distroboot to execute arbitrary commands and load the correct kernel and devicetree
2017-06-01include LICENSE fileKlaus Goger
add some permissive license so no code is a left in a dubious state
2017-06-01Initial commitKlaus Goger
This repository will hold a collection of tools for the various SoMs from Theobroma System