{ "info": { "author": "Martin Olejar", "author_email": "martin.olejar@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Embedded Systems", "Topic :: System :: Hardware", "Topic :: Utilities" ], "description": "pyIMX\n=====\n\n|Build Status| |Coverage Status| |PyPI Status| |Python Version|\n\nThis repository collects a useful tools and python module targeted for\n`i.MX Applications\nProcessors `__.\n\n**What is implemented:**\n\n- DCD (Device Configuration Data) API\n- Boot Image v2 (i.MX6 and i.MX7) API\n- Boot Image v3 (i.MX8QM-A0 and i.MX8QXP-A0) API\n- SDP (Serial Download Protocol) API - only USB interface\n- HAB-Log parser (only i.MX6 and i.MX7 yet)\n- SRK Table API\n\n**Embedded tools:**\n\n- `imxim `__\n - a tool for manipulation with ``*.imx`` boot image\n- `imxsd `__\n - a tool to download and execute code on i.MX SoCs through the Serial\n Download Protocol (SDP)\n\n This project is still in developing phase. Please, test it and\n report founded issues.\n\nDependencies\n------------\n\n- `Python `__ - Python 3.x interpreter\n- `Click `__ - Python package for creating\n beautiful command line interface.\n- `pyYAML `__ - YAML parser and emitter\n for the Python programming language.\n- `bincopy `__ - Python package for\n parsing S-Record, Intel HEX and TI-TXT files.\n- `easy\\_enum `__ - User friendly\n implementation of documented Enum type for Python language.\n- `cryptography `__ - Provides\n cryptographic recipes and primitives to Python developers\n- `PyUSB `__ - Python package to access\n USB devices in Linux OS.\n- `PyWinUSB `__ - Python\n package that simplifies USB-HID communications on Windows OS.\n\nInstallation\n------------\n\n.. code:: bash\n\n $ pip install imx\n\nTo install the latest version from master branch execute in shell\nfollowing commands:\n\n.. code:: bash\n\n $ pip install -r https://raw.githubusercontent.com/molejar/pyIMX/master/requirements.txt\n $ pip install -U https://github.com/molejar/pyIMX/archive/master.zip\n\nIn case of development, install pyIMX from sources:\n\n.. code:: bash\n\n $ git clone https://github.com/molejar/pyIMX.git\n $ cd pyIMX\n $ pip install -r requirements.txt\n $ pip install -U -e .\n\nYou may run into a permissions issues running these commands. Here are a\nfew options how to fix it:\n\n1. Run with ``sudo`` to install pyIMX and dependencies globally\n2. Specify the ``--user`` option to install locally into your home\n directory (export \"~/.local/bin\" into PATH variable if haven't).\n3. Run the command in a\n `virtualenv `__ local to a\n specific project working set.\n\nUsage\n-----\n\nIn following example is demonstrated the simplicity of usage i.MX boot\nimage API covered by ``imx.img`` module:\n\n.. code:: python\n\n from imx import img\n\n # --------------------------------------------------------------------------------\n # Create new U-Boot i.MX6/7 image\n # --------------------------------------------------------------------------------\n\n # Create DCD segment instance\n dcd = img.SegDCD()\n\n # Create Write Data command and append values with addresses\n cmd = img.CmdWriteData(4, img.EnumWriteOps.WRITE_VALUE)\n cmd.append(0x30340004, 0x4F400005)\n cmd.append(0x30391000, 0x00000002)\n cmd.append(0x307A0000, 0x01040001)\n\n # Append commands into DCD segment\n dcd.append(cmd)\n dcd.append(img.CmdCheckData(4, img.EnumCheckOps.ANY_CLEAR, 0x307900C4, 0x00000001))\n\n # Open U-Boot raw image\n with open('u-boot.img', 'rb') as f:\n app = f.read()\n\n # Create IMX U-Boot image with DCD segment\n image = img.BootImg2(0x877FF000, app, dcd)\n\n # Print image info\n print(image)\n\n # Save IMX U-Boot image\n with open('u-boot.imx', 'wb') as f:\n f.write(image.export())\n\n # --------------------------------------------------------------------------------\n # Extract DCD from existing U-Boot i.MX6/7 image\n # --------------------------------------------------------------------------------\n\n # Open U-Boot IMX image\n with open('u-boot.imx', 'rb') as f:\n data = f.read()\n\n # Parse U-Boot IMX image\n image = img.BootImg2.parse(data)\n\n # Extract DCD from U-Boot IMX image\n dcd = image.dcd\n\n # Print extracted DCD info\n print(dcd)\n\n # Save extracted DCD content as raw image\n with open('dcd.img', 'wb') as f:\n f.write(dcd.export())\n\n # Save extracted DCD content as readable text file\n with open('dcd.txt', 'w') as f:\n f.write(dcd.store())\n\nSecond example demonstrate usage of i.MX serial downloader protocol API\ncovered by ``imx.sdp`` module:\n\n.. code:: python\n\n from imx import sdp\n\n # scan for connected USB devs\n devs = sdp.scan_usb()\n\n if devs:\n # Print list of connected devices\n for i, dev in enumerate(devs):\n print(\"{}) {}\".format(i, dev.usbd.info()))\n\n # Connect to first i.MX device\n flasher = devs[0]\n flasher.open()\n\n # Read data from i.MX Device (i.MX7D OCRAM)\n data = flasher.read(0x910000, 100, 8)\n\n # Write boot image data into i.MX Device (i.MX7D OCRAM)\n flasher.write_file(0x910000, data)\n\n # Other commands\n # ...\n\n # Disconnect IMX Device\n flasher.close()\n\n For running ``imx.sdp`` module without root privileges in Linux OS\n copy attached udev rules\n `90-imx-sdp.rules `__\n into ``/etc/udev/rules.d`` directory and reload it with command:\n ``sudo udevadm control --reload-rules``.\n\nTODO\n----\n\n- Add serial interface support for ``imx.sdp`` module\n- Add image security features (sign and encryption)\n- Add eFuses read, write and validation functionality\n- Add HAB-log parser for i.MX-RT and i.MX8 devices\n- Add support for QSPI Flash image\n\n.. |Build Status| image:: https://travis-ci.org/molejar/pyIMX.svg?branch=master\n :target: https://travis-ci.org/molejar/pyIMX\n.. |Coverage Status| image:: https://coveralls.io/repos/github/molejar/pyIMX/badge.svg?branch=master\n :target: https://coveralls.io/github/molejar/pyIMX?branch=master\n.. |PyPI Status| image:: https://img.shields.io/pypi/v/imx.svg\n :target: https://pypi.python.org/pypi/imx\n.. |Python Version| image:: https://img.shields.io/pypi/pyversions/imx.svg\n :target: https://www.python.org\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/molejar/pyIMX", "keywords": "", "license": "BSD3", "maintainer": "", "maintainer_email": "", "name": "imx", "package_url": "https://pypi.org/project/imx/", "platform": "Windows", "project_url": "https://pypi.org/project/imx/", "project_urls": { "Homepage": "https://github.com/molejar/pyIMX" }, "release_url": "https://pypi.org/project/imx/0.1.3/", "requires_dist": [ "click (==7.0)", "PyYAML (==5.1.1)", "bincopy (==16.0.0)", "easy-enum (==0.2.0)", "cryptography (==2.6.1)", "pyusb (==1.0.0) ; platform_system != \"Windows\"", "pywinusb (==0.4.2) ; platform_system == \"Windows\"" ], "requires_python": ">=3.5", "summary": "Open Source library for easy development with i.MX platform", "version": "0.1.3" }, "last_serial": 5556467, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "fe6415d3b442cc6ea449dbc5b05f0161", "sha256": "75403ec6d29c4f71dea2b8f1ad342207a9da961623f645737e80d367edf57981" }, "downloads": -1, "filename": "imx-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fe6415d3b442cc6ea449dbc5b05f0161", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 47069, "upload_time": "2019-01-03T22:35:32", "url": "https://files.pythonhosted.org/packages/35/78/dd0556c2e4e61fe44163a116501a185eaadd411cfdf723ffe30ef9ad2648/imx-0.1.0-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "bce2f1367e2bfadeaeb103c80b286b8c", "sha256": "0ec390fef9ee4ce187c858fabb3125ee840062538baa687e20cca3b3c088befd" }, "downloads": -1, "filename": "imx-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bce2f1367e2bfadeaeb103c80b286b8c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 50032, "upload_time": "2019-04-05T11:37:46", "url": "https://files.pythonhosted.org/packages/b1/4d/4e6bf793be6c3b4f9d3d64b29c7dcdc7ad2347d28e6a0fec2fbdac72e058/imx-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e85bb2a7d4ba522dbba7d07714f3577a", "sha256": "8546f3331a263260376444455939b86f0e37339fc5d3477cb2f405077bec3658" }, "downloads": -1, "filename": "imx-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e85bb2a7d4ba522dbba7d07714f3577a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 44639, "upload_time": "2019-04-05T11:37:47", "url": "https://files.pythonhosted.org/packages/6e/c7/424b4744ffda6369f5778bc53a111af66abf05d90e6d3c3bfcb36578efe6/imx-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "774c3f1667ef880a14c33ae32e2722d4", "sha256": "ba1250d94027decb8288dd646cbfa2091c654003e1903ff03235af142ea02305" }, "downloads": -1, "filename": "imx-0.1.2.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "774c3f1667ef880a14c33ae32e2722d4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 108166, "upload_time": "2019-06-03T21:49:26", "url": "https://files.pythonhosted.org/packages/07/35/ac833cc6b4db097ed2384d92a049cfcbb4a4ea28caf62977a4904cb32492/imx-0.1.2.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "9e1a41224e6d16818140c5783cc4c9ef", "sha256": "d19a88b23a8232bc980e30293df52a5b3f3a1c852af4c1a4f0cdc3c8b28a0765" }, "downloads": -1, "filename": "imx-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9e1a41224e6d16818140c5783cc4c9ef", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 53521, "upload_time": "2019-06-03T21:49:24", "url": "https://files.pythonhosted.org/packages/75/d6/514dc88e138b160823eacfe0ed91615b2107d8e0d549c3f32ac40e2b586c/imx-0.1.2-py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "06c6e9d815eb67fc46b352e233ae3870", "sha256": "0c48f9dce46b010be24cd3bf1bd33b8ffbdca19afbfc365064f8fa84a7b199aa" }, "downloads": -1, "filename": "imx-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "06c6e9d815eb67fc46b352e233ae3870", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 53461, "upload_time": "2019-07-19T13:28:16", "url": "https://files.pythonhosted.org/packages/0c/9c/1436e57efa16e23fc70d8a102195d440505b6dd5fa9a2c4e324ce4374315/imx-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46cb20da527ca29c9b1fc79ed3ee0159", "sha256": "02053bf98fb150015462a7b5e8bbea00705a7599b8c247c811e52310100651fb" }, "downloads": -1, "filename": "imx-0.1.3.tar.gz", "has_sig": false, "md5_digest": "46cb20da527ca29c9b1fc79ed3ee0159", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 47455, "upload_time": "2019-07-19T13:28:18", "url": "https://files.pythonhosted.org/packages/88/75/85e49cfa689262b647a3ab09cdf22f9c32cc0261fcba79bfaa357c5c9eb6/imx-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "06c6e9d815eb67fc46b352e233ae3870", "sha256": "0c48f9dce46b010be24cd3bf1bd33b8ffbdca19afbfc365064f8fa84a7b199aa" }, "downloads": -1, "filename": "imx-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "06c6e9d815eb67fc46b352e233ae3870", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 53461, "upload_time": "2019-07-19T13:28:16", "url": "https://files.pythonhosted.org/packages/0c/9c/1436e57efa16e23fc70d8a102195d440505b6dd5fa9a2c4e324ce4374315/imx-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46cb20da527ca29c9b1fc79ed3ee0159", "sha256": "02053bf98fb150015462a7b5e8bbea00705a7599b8c247c811e52310100651fb" }, "downloads": -1, "filename": "imx-0.1.3.tar.gz", "has_sig": false, "md5_digest": "46cb20da527ca29c9b1fc79ed3ee0159", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 47455, "upload_time": "2019-07-19T13:28:18", "url": "https://files.pythonhosted.org/packages/88/75/85e49cfa689262b647a3ab09cdf22f9c32cc0261fcba79bfaa357c5c9eb6/imx-0.1.3.tar.gz" } ] }