{"id":19464062,"url":"https://github.com/mkoshtenko/openwrt-builder","last_synced_at":"2025-04-15T03:13:09.039Z","repository":{"id":80950302,"uuid":"287928883","full_name":"mkoshtenko/openwrt-builder","owner":"mkoshtenko","description":"Build a custom OpenWRT image for Raspberry Pi 4 in a virtual environment","archived":false,"fork":false,"pushed_at":"2024-02-17T17:37:37.000Z","size":22732,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T03:12:52.515Z","etag":null,"topics":["ansible","cm4","openwrt","raspberry-pi-4","vagrant"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkoshtenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-08-16T11:18:13.000Z","updated_at":"2024-08-20T11:43:38.000Z","dependencies_parsed_at":"2024-02-17T14:30:08.668Z","dependency_job_id":null,"html_url":"https://github.com/mkoshtenko/openwrt-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkoshtenko%2Fopenwrt-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkoshtenko%2Fopenwrt-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkoshtenko%2Fopenwrt-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkoshtenko%2Fopenwrt-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkoshtenko","download_url":"https://codeload.github.com/mkoshtenko/openwrt-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997079,"owners_count":21195799,"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":["ansible","cm4","openwrt","raspberry-pi-4","vagrant"],"created_at":"2024-11-10T18:13:14.161Z","updated_at":"2025-04-15T03:13:08.997Z","avatar_url":"https://github.com/mkoshtenko.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openwrt-builder\n\nThis project contains all necessary files to build a custom OpenWRT image for Raspberry Pi model 4 or CM4 with the following additions to the oficial image:\n- has all dependencies for Ansible support;\n- supports [RPi CM4 DFRobot Carrier Board Mini](https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR0767).\n\nThe latest Raspberry Pi 4 compatible image can be downloaded from the official OpenWRT website from the target [bcm2711](https://downloads.openwrt.org/snapshots/targets/bcm27xx/bcm2711/)\n\n## How it works\nCustom OpenWRT images can be created with the official bcm2711 image builder. This image builder is stored in the same folder with the original build `openwrt-imagebuilder-bcm27xx-bcm2711.Linux-x86_64.tar.xz`. \nThe builder requires Linux-based operating system running on x86_64 CPU.\n\nVagrant prepares a virtual Debian host using Ansible playbook for building a new image. It uses VirtualBox as a provider for virtual hosts.\nThe `build.sh` script downloads all necessary files on the virtual host, runs all build steps and returns the final build to the workstation.\n\nIf your workstation is a linux host, you don't need a virtual machine and can execute `scripts/build.sh` directly from the repo's root folder.\n\n## Hardware RPi-4 setup\n```\n                                        |\n                                  ______| lan = 1Gb/s\n                                 /      |___________________\n                   --eth0 ------/         PoE IEEE 802.3af/at SWITCH\nRPi4(w/ PoE hat)--|                     ____________________\n                   --eth1-usb3 -\\       |\n                                 \\_____ | wan = 1Gb/s       [------ CABLE/FIBRE\n                                        |___________________\n                                          ISP MODEM\n```\n\n\n## OSX Steps\nInstall all dependencies before moving forward\n  - Vagrant `brew install vagrant`\n  - Ansible `brew install ansible`\n  - VirtualBox can be downloaded from https://www.virtualbox.org\n    - Note: ARM64(aka Apple CPU) hosts are not supported at the moment   \n\nClone the builder repo:\n```\ngit clone https://github.com/mkoshtenko/openwrt-builder.git\ncd openwrt-builder\n```\n\nSetup the infrastructure:\n```\nvagrant up\n```\n\nCreate build:\n```\nvagrant ssh -c './scripts/build.sh'\n```\n\nClean up:\n```\nvagrant destroy\n```\n\nThe image file should be in `./builds` directory, e.g. `./builds/openwrt-rpi-4.img.gz`\n\n## Troubleshooting\nRun Ansible playbook w/o destroying the deployment:\n```\nvagrant provision\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkoshtenko%2Fopenwrt-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkoshtenko%2Fopenwrt-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkoshtenko%2Fopenwrt-builder/lists"}