{"id":22685821,"url":"https://github.com/hellodword/openwrt-declarative","last_synced_at":"2025-07-26T09:35:03.333Z","repository":{"id":265801521,"uuid":"664453549","full_name":"hellodword/openwrt-declarative","owner":"hellodword","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-14T03:41:51.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-26T01:49:44.792Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"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/hellodword.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,"publiccode":null,"codemeta":null}},"created_at":"2023-07-10T02:34:42.000Z","updated_at":"2024-08-14T03:41:54.000Z","dependencies_parsed_at":"2024-12-03T09:15:08.602Z","dependency_job_id":null,"html_url":"https://github.com/hellodword/openwrt-declarative","commit_stats":null,"previous_names":["hellodword/openwrt-declarative"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hellodword/openwrt-declarative","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellodword%2Fopenwrt-declarative","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellodword%2Fopenwrt-declarative/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellodword%2Fopenwrt-declarative/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellodword%2Fopenwrt-declarative/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellodword","download_url":"https://codeload.github.com/hellodword/openwrt-declarative/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellodword%2Fopenwrt-declarative/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267145734,"owners_count":24042651,"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-07-26T02:00:08.937Z","response_time":62,"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-12-09T22:17:45.204Z","updated_at":"2025-07-26T09:35:03.305Z","avatar_url":"https://github.com/hellodword.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openwrt-declarative\n\n```sh\n. ap/.env\n\ndocker pull \"openwrt/imagebuilder:$OP_BUILD_TAG\"\n\nmkdir \"$OP_BUILD_TYPE/bin\"\n\ndocker run --rm \\\n    -v \"$(pwd)/$OP_BUILD_TYPE/bin\":\"/builder/bin\" \\\n    -v \"$(pwd)/$OP_BUILD_TYPE/files\":\"/builder/custom-files\" \\\n    -v \"$(pwd)/common/files\":\"/builder/common-files\" \\\n    -v \"$(pwd)/$OP_BUILD_TYPE/.env.${OP_HOSTNAME}\":\"/builder/.env\":ro \\\n    -v \"$(pwd)/build.sh\":\"/builder/build.sh\":ro \\\n    \"openwrt/imagebuilder:$OP_BUILD_TAG\" \\\n        bash /builder/build.sh\n\ndocker run --rm \\\n    -it \\\n    -v \"$(pwd)/$OP_BUILD_TYPE/bin\":\"/builder/bin\" \\\n    -v \"$(pwd)/$OP_BUILD_TYPE/files\":\"/builder/custom-files\" \\\n    -v \"$(pwd)/common/files\":\"/builder/common-files\" \\\n    -v \"$(pwd)/$OP_BUILD_TYPE/.env.${OP_HOSTNAME}\":\"/builder/.env\":ro \\\n    -v \"$(pwd)/build.sh\":\"/builder/build.sh\":ro \\\n    \"openwrt/imagebuilder:$OP_BUILD_TAG\" \\\n        bash\n\n\n# scp -O /path/to/sysupgrade.bin root@\u003c...\u003e:/tmp/sysupgrade.bin\n# ssh root@\u003c...\u003e\n# sysupgrade -u -n -p -v /tmp/sysupgrade.bin\n```\n\n- [ap](./ap): 双频，单网口，OpenWrt 默认没有 wan 口、没有 switch\n- [router](./router): 双频，主路由，五网口\n- [travel](./travel): 双频，三网口\n- [onu](./onu): 光猫\n\n## debug\n\n- 修改前备份 `/etc/config`，设置 cron job，减少搞挂刷机的次数\n\n```\n# crontab -e\n*/3 * * * * (wget -q -O- --timeout=3 \"https://223.5.5.5/resolve?name=example.com\u0026type=AAAA\" || wget -q -O- --timeout=3 \"https://223.5.5.5/resolve?name=example.com\u0026type=AAAA\") || (cp /root/network /etc/config/network; reboot)\n```\n\n- tftp\n\n```\ntftp 192.168.1.1\n\u003e binary\n\u003e put factory.img\n\u003e quit\n```\n\n---\n\n- https://github.com/mwarning/openwrt-examples/blob/51af905de23df41f6024e81aef14a892e5ef8ef6/README.md#automatic-and-generic-wifi-setup\n- https://github.com/astro/nix-openwrt-imagebuilder/\n- https://imciel.com/2021/03/20/create-configless-openwrt-firmware/\n- https://github.com/ekkog/OpenWrt\n- https://vxchin.gitbooks.io/openwrt-fanqiang/content/ebook/04.3.html\n- https://hub.docker.com/r/openwrt/imagebuilder/tags\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellodword%2Fopenwrt-declarative","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellodword%2Fopenwrt-declarative","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellodword%2Fopenwrt-declarative/lists"}