{"id":26490032,"url":"https://github.com/guysoft/custompios","last_synced_at":"2025-05-15T18:08:12.063Z","repository":{"id":38550025,"uuid":"94749337","full_name":"guysoft/CustomPiOS","owner":"guysoft","description":"A Raspberry Pi and other ARM devices distribution builder","archived":false,"fork":false,"pushed_at":"2024-10-22T12:32:51.000Z","size":1011,"stargazers_count":511,"open_issues_count":31,"forks_count":147,"subscribers_count":29,"default_branch":"devel","last_synced_at":"2024-10-23T11:06:44.180Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guysoft.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-19T07:35:35.000Z","updated_at":"2024-10-22T12:32:55.000Z","dependencies_parsed_at":"2023-02-12T16:00:32.533Z","dependency_job_id":"a2a62cd4-d5e9-4ecf-9a1e-1011d4d6b067","html_url":"https://github.com/guysoft/CustomPiOS","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guysoft%2FCustomPiOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guysoft%2FCustomPiOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guysoft%2FCustomPiOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guysoft%2FCustomPiOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guysoft","download_url":"https://codeload.github.com/guysoft/CustomPiOS/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248489231,"owners_count":21112533,"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":"2025-03-20T07:54:53.352Z","updated_at":"2025-04-11T22:29:22.104Z","avatar_url":"https://github.com/guysoft.png","language":"Shell","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=26VJ9MSBH3V3W\u0026source=url"],"categories":[],"sub_categories":[],"readme":"CustomPiOS\n==========\n\n.. image:: https://raw.githubusercontent.com/guysoft/CustomPiOS/devel/media/CustomPiOS.png\n.. :scale: 50 %\n.. :alt: CustomPiOS logo\n\n.. class:: center\n\nA `Raspberry Pi \u003chttp://www.raspberrypi.org/\u003e`_ and other ARM devices distribution builder. CustomPiOS opens an already existing image, modifies it and repackages the image ready to ship.\n\nThis repository contains the source script to generate a distribution out of an existing `Raspbian \u003chttp://www.raspbian.org/\u003e`_ distro image, or Armbian devices.\n\nDonate\n------\nCustomPiOS is 100% free and open source and maintained by Guy Sheffer. If its helping your life, your organisation or makes you happy, please consider making a donation. It means I can code more and worry less about my balance. Any amount counts.\nAlso many thanks to people contributing code.\n\n|paypal|\n\n.. |paypal| image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif\n   :target: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=26VJ9MSBH3V3W\u0026source=url\n\nWhere to get it?\n----------------\n\n`Clone this repo \u003chttps://github.com/guysoft/CustomPiOS\u003e`_. Then follow instructions either to build an existing distro or create your own.\n\n\n\nHow to use it?\n--------------\n\n#. Clone this image ``git clone https://github.com/guysoft/CustomPiOS.git``\n#. Run ``./src/make_custom_pi_os -g \u003cdistro folder\u003e`` in the repo, distro folder should not exist and contain no spaces. This will both create a folder to build a new distro from, and also download the latest raspbian lite image. The initial distro has a module that has the name of your distro, and you can find it under ``\u003cdistro folder\u003e/src/modules/\u003cdistro name\u003e`` (there should be only one module in the modules folder).\n#. cd to ``\u003cdistro folder\u003e/src``\n#. Edit your ``\u003cdistro folder\u003e/src/config``, you can also edit the starting module, which is named as your distro at ``modules/\u003cdstro name\u003e``. More on that in the Developing section.\n#. Run ``sudo ./\u003cdistro folder\u003e/src/build_dist`` to build an image. If this fails use the method described in the vagrant build section (which makes sure sfdisk and other things work right).\n\nFeatures\n--------\n\n* Modules - write one module and use it for multiple distros\n* Write only the code you need for your distro - no need to maintain complicated stuff like building kernels unless its actually want to do it\n* Standard modules give extra functionality out of the box\n* Supports over 40 embedded devices using `Armbian \u003chttp://armbian.com/\u003e`_ and Raspbian.\n* Supports Raspberry Pi OS arm64 bit using the ``raspios_lite_arm64`` variant.\n\nDeveloping\n----------\n\nRequirements\n~~~~~~~~~~~~\n\n#. `qemu-arm-static \u003chttp://packages.debian.org/sid/qemu-user-static\u003e`_ or gentoo qemu with static USE\n#. Downloaded `Raspbian \u003chttp://www.raspbian.org/\u003e`_ image.\n#. root privileges for chroot\n#. Bash\n#. jq\n#. git\n#. realpath\n#. file\n#. sudo (the script itself calls it, running as root without sudo won't work)\n#. p7zip-full\n#. Python 3.2+\n#. GitPython\n\nKnown to work building configurations\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n1. Using the `CustomPiOS docker image \u003chttps://hub.docker.com/r/guysoft/custompios\u003e`_\n2. Linux (Ubuntu / Debian / Gentoo etc)\n3. OS X -  `See this thread for information \u003chttps://github.com/guysoft/OctoPi/issues/388#issuecomment-316327106\u003e`_\n\n\nModules \n-------\n`See Modules entry in wiki \u003chttps://github.com/guysoft/CustomPiOS/wiki/Modules\u003e`_\n\n\nchroot_script\n~~~~~~~~~~~~~\nThis is where the stuff you want to execute inside the distro is written.\n\nIn ``start_chroot_script`` write the main code, you can use ``end_chroot_script`` to write cleanup functions, that are run at the end of the module namespace.\n\nUseful commands from common.sh\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCustomPiOS comes with a script ``common.sh`` that has useful functions you can use inside your chroot_script.\nTo use it you can add to your script ``source /common.sh``.\n\n``unpack [from_filesystem] [destination] [owner]`` - Lets you unpack files from the ``filesystem`` folder to a given destination. ``[owner]`` lets you set which user is going to be the owner. e.g. ``unpack /filesystem/home/pi /home/pi pi``\n\n``gitclone \u003cMODULE_NAME\u003e_\u003cREPO_NAME\u003e_REPO destination`` - Lets you clone a git repo, and have the settings preset in the ``config`` file. Example usage in OCTOPI module.\n\nIn chroot_script::\n\n    gitclone OCTOPI_OCTOPRINT_REPO OctoPrint\n\nIn ``config``::\n\n    [ -n \"$OCTOPI_OCTOPRINT_REPO_SHIP\" ] || OCTOPI_OCTOPRINT_REPO_SHIP=https://github.com/foosel/OctoPrint.git \n\nExport files from image\n~~~~~~~~~~~~~~~~~~~~~~~\n\nCustomPiOS has a feature to export files created in the chroot to archives you can ship as a tar.gz archive.\n\nTo export run inside of a chroot_script:\n``custompios_export [name of archive] [file path in chroot]``\n\nYou can also use:\n``copy_and_export [name of archive] [source] [destination]``\n\nand:\n``copy_and_export_folder [name of archive] [folder] [destination]``\n\nThe results would be saved in the workspace folder.\n\nfilesystem\n~~~~~~~~~~\n\nLets you add files to your distro, and save them to the repo. The files can be unpacked using the ``unpack`` command that is in ``common.sh``.\n\nconfig\n~~~~~~\n\nThis is where you can create module-specific settings. They can then be overwritten in a distro or variant.\nThe naming convention is the module name in \n\nBuild a Distro From within Raspbian / Debian / Ubuntu / CustomPiOS Distros\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n`See building entry in wiki \u003chttps://github.com/guysoft/CustomPiOS/wiki/Building\u003e`_\n    \nBuilding Distro Variants\n~~~~~~~~~~~~~~~~~~~~~~~~\n`See building entry in wiki \u003chttps://github.com/guysoft/CustomPiOS/wiki/Building\u003e`_\n\nBuilding Using Docker\n~~~~~~~~~~~~~~~~~~~~~~\n`See Building with docker entry in wiki \u003chttps://github.com/guysoft/CustomPiOS/wiki/Building-with-Docker\u003e`_\n    \nBuilding Using Vagrant\n~~~~~~~~~~~~~~~~~~~~~~\n`See Building with Vagrant entry in wiki \u003chttps://github.com/guysoft/CustomPiOS/wiki/Building-with-Vagrant\u003e`_\n\nBuild using CI/CD\n~~~~~~~~~~~~~~~~~\nYou can build CustomPiOS images from a continuous integration system in the cloud.\nFor an example on how to do this on github take a look at `this github actions yaml \u003chttps://github.com/guysoft/OctoPi/blob/devel/.github/workflows/build.yml/\u003e`_\n\nUsage\n~~~~~\n\n#. If needed, override existing config settings by creating a new file ``src/config.local``. You can override all settings found in ``src/config``. If you need to override the path to the Raspbian image to use for building your distro, override the path to be used in ``BASE_ZIP_IMG``, which is part of the base module. By default the most recent file matching ``*-raspbian.zip`` found in ``src/image`` will be used.\n#. Run ``src/build`` as root.\n#. The final image will be created at the ``src/workspace``\n\nTesting\n-------\n\nYou can run unit tests to test CustomPiOS if you have changed it by running::\n\n    make test\n\nYou can add more tests to the ``tests`` folder.\n\nCommunity\n--------\n|discord|\n\n.. |discord| image:: https://img.shields.io/discord/1119337877734699018?label=discord\u0026logo=discord\u0026logoColor=white\n   :target: https://discord.gg/rK72VZVt\n\nList of Distributions using CustomPiOS\n--------------------------------------\n\n* `OctoPi \u003chttps://octopi.octoprint.org/\u003e`_ - The ready-to-go Raspberry Pi image with OctoPrint\n* `FarmPi \u003chttps://farmpi.kevenaar.name/\u003e`_ - An Ubuntu ARM 64bit Raspberry Pi image running `OctoFarm \u003chttps://octofarm.net/\u003e`_\n* `FullPageOS \u003chttps://github.com/guysoft/FullPageOS\u003e`_ - A Raspberry Pi distro to display a full page browser on boot\n* `Zynthian \u003chttp://zynthian.org/\u003e`_ - Open Synth Platform\n* `ElectricSheepPi \u003chttps://github.com/guysoft/ElectricSheepPi\u003e`_ - A Raspberry Pi distribution to run Electric Sheep digital art\n* `AlarmPi \u003chttps://github.com/guysoft/AlarmPi\u003e`_ - A Raspberry Pi distribution that turns a Raspberry Pi to an IOT telegram-controlled alarm clock\n* `RealtimePi \u003chttps://github.com/guysoft/RealtimePi\u003e`_ - An out-of-the-box Raspebrry Pi/Raspbian distro with a realtime kernel\n* `RMS Pi \u003chttps://github.com/toddejohnson/rmspi\u003e`_ - Raspberry Pi Distro for Winlink RMS\n* `V1PI \u003chttps://github.com/jeffeb3/v1pi\u003e`_ - Use your Raspberry Pi to control your V1Engineering machine\n* `HotSpotOS \u003chttps://github.com/guysoft/HostSpotOS\u003e`_ - Makes a Raspberry Pi start a hotspot, if no wifi was found to connect to\n* `MtigOS \u003chttps://github.com/guysoft/MtigOS\u003e`_ - Distro that lets you receive, store and graph sensor information from ESP8266 chips. It uses and MTIG stack: Mosquitto, Telegraf, InfluxDB and Grafana which are all pre-configured to work together. They automatically update using Docker.\n* `Tilti-Pi \u003chttps://github.com/myoung34/tilty-pi\u003e`_ - Distro that lets you submit BLE data for the  `tilt hydrometer \u003chttps://tilthydrometer.com/\u003e`_ via the `tilty \u003chttps://github.com/myoung34/tilty\u003e`_ package and a built in `dashboard \u003chttps://github.com/myoung34/tilty-dashboard\u003e`_\n* `MainsailOS \u003chttps://github.com/mainsail-crew/mainsailos\u003e`_ - Distro that packages the `Mainsail \u003chttps://github.com/mainsail-crew/mainsail\u003e`_ web UI, the `Moonraker \u003chttps://github.com/Arksine/moonraker\u003e`_ API, and the `Klipper \u003chttps://github.com/klipper3d/klipper\u003e`_ 3D printer firmware in an easy to package.\n* `UbuntuDockerPi \u003chttps://github.com/guysoft/UbuntuDockerPi\u003e`_ - Distro ships with Ubuntu ARM 64bit Docker and docker-compose ready to build stuff for arm64v8/aarch64 or host whatever you like.\n* `FluiddPi \u003chttps://github.com/cadriel/fluiddpi\u003e`_ - Distro that packages `Fluidd \u003chttps://github.com/cadriel/fluidd\u003e`_, `Moonraker \u003chttps://github.com/Arksine/moonraker\u003e`_, and `Klipper \u003chttps://github.com/KevinOConnor/klipper\u003e`_ into the ultimate 3D printer firmware package.\n* `My Naturewatch Camera \u003chttps://github.com/interactionresearchstudio/NaturewatchCameraServer\u003e`_ - A Python / OpenCV camera server to stream Pi camera content to a remote client through a website.\n* `PiFireOS \u003chttps://github.com/calonmerc/PiFireOS\u003e`_ - Distro for pellet grill/smoker control, running `PiFire \u003chttps://nebhead.github.io/PiFire\u003e`_.\n* `MonsterPi \u003chttps://docs.fdm-monster.net/guides/monsterpi\u003e`_ - An Ubuntu ARM 64bit Raspberry Pi image running `FDM Monster \u003chttps://fdm-monster.net/\u003e`_. This 3D Print server will help you connect 200+ OctoPrints together while providing a strong, professional workflow.\n* `AllStarLink \u003chttps://allstarlink.org\u003e`_ - AllStarLink is a network of Amateur Radio repeaters, remote base stations and hot spots accessible to each other via Voice over Internet Protocol. The ASL3 Pi Appliance uses CustomPiOS\n* `LEDPotato \u003chttps://github.com/guysoft/LEDPotato\u003e`_ - A Le Potato AML-S905X-CC distrubtion that controls ws2812 LEDs over uart right on boot \n\nCode contribution would be appreciated!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguysoft%2Fcustompios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguysoft%2Fcustompios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguysoft%2Fcustompios/lists"}