{"id":19610477,"url":"https://github.com/valiot/valiot_system_rpi4","last_synced_at":"2025-02-26T17:20:06.048Z","repository":{"id":51158935,"uuid":"363212251","full_name":"valiot/valiot_system_rpi4","owner":"valiot","description":"This is the base Nerves System configuration for the Raspberry Pi 4 (CM) for Valiot. ","archived":false,"fork":false,"pushed_at":"2024-04-14T00:44:54.000Z","size":578,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-22T18:04:42.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valiot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-30T17:25:20.000Z","updated_at":"2023-09-18T01:31:11.000Z","dependencies_parsed_at":"2024-04-13T21:29:35.059Z","dependency_job_id":"ecfa1d22-9b65-44b9-9b92-7e6772bd3996","html_url":"https://github.com/valiot/valiot_system_rpi4","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiot%2Fvaliot_system_rpi4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiot%2Fvaliot_system_rpi4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiot%2Fvaliot_system_rpi4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiot%2Fvaliot_system_rpi4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valiot","download_url":"https://codeload.github.com/valiot/valiot_system_rpi4/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240898492,"owners_count":19875192,"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","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-11-11T10:29:31.989Z","updated_at":"2025-02-26T17:20:06.016Z","avatar_url":"https://github.com/valiot.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi 4 Model B (64-bit)\n\n[![CircleCI](https://circleci.com/gh/nerves-project/nerves_system_rpi4.svg?style=svg)](https://circleci.com/gh/nerves-project/nerves_system_rpi4)\n[![Hex version](https://img.shields.io/hexpm/v/nerves_system_rpi4.svg \"Hex version\")](https://hex.pm/packages/nerves_system_rpi4)\n\nThis is the base Nerves System configuration for the Raspberry Pi 4 Model B.\n\n![Raspberry Pi 4 image](assets/images/raspberry-pi-4-model-b.jpg)\n\u003cbr\u003e\u003csup\u003e[Michael Henzler / Wikimedia Commons / CC BY-SA\n4.0](https://en.wikipedia.org/wiki/File:Raspberry_Pi_4_Model_B_-_Top.jpg)\u003c/sup\u003e\n\n| Feature              | Description                      |\n| -------------------- | -------------------------------- |\n| CPU                  | 1.5 GHz quad-core Cortex-A72 (64-bit mode) |\n| Memory               | 1 GB, 2 GB, 4 GB DRAM            |\n| Storage              | MicroSD                          |\n| Linux kernel         | 6.1 w/ Raspberry Pi patches      |\n| IEx terminal         | HDMI and USB keyboard (can be changed to UART) |\n| GPIO, I2C, SPI       | Yes - [Elixir Circuits](https://github.com/elixir-circuits) |\n| ADC                  | No                               |\n| PWM                  | Yes, but no Elixir support       |\n| UART                 | 1 available - `ttyS0`            |\n| Display              | HDMI or 7\" RPi Touchscreen       |\n| Camera               | Official RPi Cameras (libcamera) |\n| Ethernet             | Yes                              |\n| WiFi                 | Yes - VintageNet                 |\n| Bluetooth            | Untested                         |\n| Audio                | HDMI/Stereo out                  |\n\n## Using\n\nThe most common way of using this Nerves System is create a project with `mix\nnerves.new` and to export `MIX_TARGET=rpi4`. See the [Getting started\nguide](https://hexdocs.pm/nerves/getting-started.html#creating-a-new-nerves-app)\nfor more information.\n\nIf you need custom modifications to this system for your device, clone this\nrepository and update as described in [Making custom\nsystems](https://hexdocs.pm/nerves/customizing-systems.html).\n\n## Supported WiFi devices\n\nThe base image includes drivers for the onboard Raspberry Pi 4 wifi module\n(`brcmfmac` driver).\n\n## Camera\n\nThis system supports the official Raspberry Pi camera modules via\n[`libcamera`](https://libcamera.org/). The `libcamera` applications are included so it's\npossible to replicate many of the examples in the official [Raspberry Pi Camera\nDocumentation](https://www.raspberrypi.com/documentation/computers/camera_software.html).\n\nHere's an example commandline to run:\n\n```elixir\ncmd(\"libcamera-jpeg -n -v -o /data/test.jpeg\")\n```\n\nOn success, you'll get an image in `/data` that you can copy off with `sftp`.\n\nSince `libcamera` is being used instead of MMAL, the Elixir\n[picam](https://hex.pm/packages/picam) library won't work.\n\n## Audio\n\nThe Raspberry Pi has many options for audio output. This system supports the\nHDMI and stereo audio jack output. The Linux ALSA drivers are used for audio\noutput.\n\nThe general Raspberry Pi audio documentation mostly applies to Nerves. For\nexample, to force audio out the HDMI port, run:\n\n```elixir\ncmd(\"amixer cset numid=3 2\")\n```\n\nChange the last argument to `amixer` to `1` to output to the stereo output jack.\n\n## Provisioning devices\n\nThis system supports storing provisioning information in a small key-value store\noutside of any filesystem. Provisioning is an optional step and reasonable\ndefaults are provided if this is missing.\n\nProvisioning information can be queried using the Nerves.Runtime KV store's\n[`Nerves.Runtime.KV.get/1`](https://hexdocs.pm/nerves_runtime/Nerves.Runtime.KV.html#get/1)\nfunction.\n\nKeys used by this system are:\n\nKey                    | Example Value     | Description\n:--------------------- | :---------------- | :----------\n`nerves_serial_number` | `\"12345678\"`      | By default, this string is used to create unique hostnames and Erlang node names. If unset, it defaults to part of the Raspberry Pi's device ID.\n\nThe normal procedure would be to set these keys once in manufacturing or before\ndeployment and then leave them alone.\n\nFor example, to provision a serial number on a running device, run the following\nand reboot:\n\n```elixir\niex\u003e cmd(\"fw_setenv nerves_serial_number 12345678\")\n```\n\nThis system supports setting the serial number offline. To do this, set the\n`NERVES_SERIAL_NUMBER` environment variable when burning the firmware. If you're\nprogramming MicroSD cards using `fwup`, the commandline is:\n\n```sh\nsudo NERVES_SERIAL_NUMBER=12345678 fwup path_to_firmware.fw\n```\n\nSerial numbers are stored on the MicroSD card so if the MicroSD card is\nreplaced, the serial number will need to be reprogrammed. The numbers are stored\nin a U-boot environment block. This is a special region that is separate from\nthe application partition so reformatting the application partition will not\nlose the serial number or any other data stored in this block.\n\nAdditional key value pairs can be provisioned by overriding the default\nprovisioning.conf file location by setting the environment variable\n`NERVES_PROVISIONING=/path/to/provisioning.conf`. The default provisioning.conf\nwill set the `nerves_serial_number`, if you override the location to this file,\nyou will be responsible for setting this yourself.\n\n## Linux kernel and RPi firmware/userland\n\nThere's a subtle coupling between the `nerves_system_br` version and the Linux\nkernel version used here. `nerves_system_br` provides the versions of\n`rpi-userland` and `rpi-firmware` that get installed. I prefer to match them to\nthe Linux kernel to avoid any issues. Unfortunately, none of these are tagged by\nthe Raspberry Pi Foundation so I either attempt to match what's in Raspbian or\ntake versions of the repositories that have similar commit times.\n\n## Linux kernel configuration\n\nThe Linux kernel compiled for Nerves is a stripped down version of the default\nRaspberry Pi Linux kernel. This is done to remove unnecessary features, select\nsome Nerves-specific features like F2FS and SquashFS support, and to save space.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliot%2Fvaliot_system_rpi4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaliot%2Fvaliot_system_rpi4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliot%2Fvaliot_system_rpi4/lists"}