{"id":13720540,"url":"https://github.com/cfriedt/greybus-for-zephyr","last_synced_at":"2025-08-19T11:06:36.718Z","repository":{"id":46203851,"uuid":"292881776","full_name":"cfriedt/greybus-for-zephyr","owner":"cfriedt","description":"Greybus Module for the Zephyr Real-Time Operating System","archived":false,"fork":false,"pushed_at":"2022-07-01T16:30:39.000Z","size":1966,"stargazers_count":7,"open_issues_count":31,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T11:20:47.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfriedt.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-04T15:22:50.000Z","updated_at":"2024-12-11T06:36:53.000Z","dependencies_parsed_at":"2022-09-09T16:02:03.673Z","dependency_job_id":null,"html_url":"https://github.com/cfriedt/greybus-for-zephyr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cfriedt/greybus-for-zephyr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfriedt%2Fgreybus-for-zephyr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfriedt%2Fgreybus-for-zephyr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfriedt%2Fgreybus-for-zephyr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfriedt%2Fgreybus-for-zephyr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfriedt","download_url":"https://codeload.github.com/cfriedt/greybus-for-zephyr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfriedt%2Fgreybus-for-zephyr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271143334,"owners_count":24706344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:01:05.002Z","updated_at":"2025-08-19T11:06:36.681Z","avatar_url":"https://github.com/cfriedt.png","language":"C","funding_links":[],"categories":["Libraries"],"sub_categories":["Networking \u0026 Protocols"],"readme":".. _greybus_for_zephyr:\n\n******************\nGreybus for Zephyr\n******************\n\n\nBuild Status\n############\n.. image:: https://github.com/cfriedt/greybus-for-zephyr/workflows/CI/badge.svg\n\nOverview\n########\nThis repository contains a `Greybus \u003chttps://lwn.net/Articles/715955/\u003e`_\n`module \u003chttps://docs.zephyrproject.org/latest/guides/modules.html\u003e`_ for the\n`Zephyr Real-Time Operating System \u003chttps://zephyrproject.org/\u003e`_.\n\nBuilding and Running\n####################\n\nFirst, ensure that all required tools are installed by following Zephyr's\n`Getting Started Guide \u003chttps://docs.zephyrproject.org/latest/getting_started/index.html\u003e`_.\n\nNext, clone and synchronize repositories.\n\n.. code-block:: bash\n\n    west init -m https://github.com/cfriedt/greybus-for-zephyr.git zephyrproject\n    cd zephyrproject\n    west update\n\nWhile that is updating, choose a board from Zephyr's list of \n`Supported Boards \u003chttps://docs.zephyrproject.org/latest/boards/index.html\u003e`_.\n\nNext, update git submodules. Currently, there is a git submodule for the\n``manifesto`` utility.\n\n.. code-block:: bash\n\n    cd greybus\n    git submodule init\n    git submodule update\n    cd ..\n\nLastly, flash firmware for the chosen ``$BOARD`` using the commands below.\n\n.. code-block:: bash\n\n    cd zephyr\n    source zephyr-env.sh\n    git apply ../greybus/zephyr-gpio-get-direction.patch\n    git apply ../greybus/zephyr-sys-byteorder-posix.patch\n    git apply ../greybus/zephyr-dynamic-pthread-stacks.patch\n    west build -b $BOARD -t flash ../greybus/samples/subsys/greybus/net\n\nA number of patches are required until respective functionality is added upstream in\nthe Zephyr Project.\n\nNote, there may be an overlay required for the connectivity options that a particular\nboard supports.\n\nIEEE 802.15.4 Overlay\n*********************\n\nIn that case, say for IEEE 802.15.4 support, the ``west build`` command\nabove should be modified as shown below.\n\n.. code-block:: bash\n\n    west build -b $BOARD -t flash ../greybus/samples/subsys/greybus/net \\\n        -- -DOVERLAY_CONFIG=\"overlay-802154.conf\"\n\nBluetooth Low Energy Overlay\n****************************\n\nIn that case, say for BLE support, the ``west build`` command\nabove should be modified as shown below.\n\n.. code-block:: bash\n\n    west build -b $BOARD -t flash ../greybus/samples/subsys/greybus/net \\\n        -- -DOVERLAY_CONFIG=\"overlay-ble.conf\"\n\nNetwork Configuration\n#####################\n\nWhile Greybus is capable of operating over any reliable transport, the focus\nof this project is TCP/IP (although quite an assortment of physical and\ndata-link layers are `supported in Zephyr \u003chttps://docs.zephyrproject.org/latest/samples/net/sockets/echo_server/README.html\u003e`_).\n\nDepending on the board that was chosen and the available connectivity\noptions, some additional steps may be required for network connectivity.\n\n* `Network Setup for Bluetooth Low Energy \u003cdoc/ble-setup.rst\u003e`_\n* `Network Setup for IEEE 802.15.4 \u003cdoc/802154-setup.rst\u003e`_\n\nOnce network connectivity is established, it should be possible to use an\n`mDNS \u003chttps://en.wikipedia.org/wiki/Multicast_DNS\u003e`_ browser such as\n`Avahi \u003chttps://www.avahi.org/\u003e`_ to scan for `service discovery \u003chttps://en.wikipedia.org/wiki/Zero-configuration_networking\u003e`_.  \n\n.. code-block:: bash\n\n    avahi-browse -t -r _greybus._tcp\n    + lowpan0 IPv6 zephyr              _greybus._tcp        local\n    = lowpan0 IPv6 zephyr              _greybus._tcp        local\n       hostname = [zephyr.local]\n       address = [2001:db8::1]\n       port = [4242]\n       txt = []\n\nClient-Side Software Requirements\n#################################\n\nA Linux machine is required in order to connect to and control our Zephyr\ndevice via Greybus so be sure to follow\n`Linux Software Requirements \u003cdoc/linux-setup.rst\u003e`_.\n\nUsing Greybus for I/O\n#####################\n\nAt this point, we should be ready to perform some I/O on our remote devices\nusing Greybus. Currently, this module supports the protocols below. \n\n* `GPIO \u003cdoc/gpio.rst\u003e`_\n* `I2C \u003cdoc/i2c.rst\u003e`_\n* `SPI \u003cdoc/spi.rst\u003e`_\n\nContribute Back\n***************\n\nIn case a board was chosen that does not yet support Greybus, consider\nsubmitting a `DeviceTree \u003chttps://www.devicetree.org/\u003e`_ overlay file similar\nto `cc1352r_sensortag.overlay \u003csamples/subsys/greybus/net/boards/cc1352r_sensortag.overlay\u003e`_\nand a board-specific configuration file similar to\n`cc1352r_sensortag.conf \u003csamples/subsys/greybus/net/boards/cc1352r_sensortag.conf\u003e`_.\n\nThe contribution guidelines for this module follow the\n`Zephyr Contribution Guidelines \u003chttps://docs.zephyrproject.org/latest/contribute/index.html\u003e`_.\n\nTo summarize,\n\n#. Create an `Issue \u003chttps://github.com/cfriedt/greybus-for-zephyr/issues\u003e`_\n#. Code up your contribution\n#. Code up any `tests \u003ctests\u003e`_ and `samples \u003csamples\u003e`_ as required\n#. Ensure that tests pass and samples run as expected\n#. Make a `Pull Request \u003chttps://github.com/cfriedt/greybus-for-zephyr/pulls\u003e`_\n\nAdditional Information\n**********************\n\nAdditional Information about Greybus including videos, slide presentations,\nand deprecated demo instructions can be found `here \u003cdoc/old.md\u003e`_.\n\nA compiled version of the `Greybus Specification \u003chttps://github.com/projectara/greybus-spec\u003e`_\nis available `here \u003cdoc/GreybusSpecification.pdf\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfriedt%2Fgreybus-for-zephyr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfriedt%2Fgreybus-for-zephyr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfriedt%2Fgreybus-for-zephyr/lists"}