{"id":19482340,"url":"https://github.com/cnfatal/sunxi-spl","last_synced_at":"2025-11-19T05:04:35.095Z","repository":{"id":113422083,"uuid":"376870402","full_name":"cnfatal/sunxi-spl","owner":"cnfatal","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-04T03:12:21.000Z","size":104,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T17:44:24.685Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cnfatal.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":"2021-06-14T15:25:17.000Z","updated_at":"2023-10-24T03:40:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"271da909-b981-4f48-8480-9dfb8c522875","html_url":"https://github.com/cnfatal/sunxi-spl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cnfatal/sunxi-spl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnfatal%2Fsunxi-spl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnfatal%2Fsunxi-spl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnfatal%2Fsunxi-spl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnfatal%2Fsunxi-spl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnfatal","download_url":"https://codeload.github.com/cnfatal/sunxi-spl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnfatal%2Fsunxi-spl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285187925,"owners_count":27129352,"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-11-19T02:00:05.673Z","response_time":65,"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-11-10T20:09:48.457Z","updated_at":"2025-11-19T05:04:35.081Z","avatar_url":"https://github.com/cnfatal.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sunxi-spl\n\n全志H3 MCU，从0开始，手动启动并使能uart0。非uboot，用于研究学习硬件初始化逻辑。\n\n[BROM](https://linux-sunxi.org/BROM)\n\n## 从 SD 卡启动\n\n为了被 BROM 识别，SPL 需要写入 SD 卡上的某个位置，并有一个带有正确校验和的特殊标头。可以使用 `mksunxiboot` 工具将此类特殊头文件添加到二进制文件中。\n\nSPL 的大小必须是 [NAND 中 8 KiB 的倍数和 SD 卡上 512 字节的倍数](https://source.denx.de/u-boot/u-boot/commit/1f6f61fe4c7c9637e2c8b2960a08f106fbe01134)\n\n对于 `Allwinner H3`,栈顶指针`sp=0x0F7DC`,SPL 加载地址为 `0x000000`,块大小最小应该为 MMC `512byte`或者 NAND`8kib`,为了兼容两者可以设置块大小为`0x2000`也就是`8192kib`,编译出来的 SPL,正好为 32kb 即可。如果超过了 32kb，则需要将 SPL 拆分为两部分，一部分为 32kb，一部分为其他，使用 32kb 部分初始化 DRAM 后，再重新加载 32kb 和其他部分，然后才可继续引导。BROM 拒绝大于 32 KiB 的大小。正好 32 KiB 就可以了，通过在 SPL 末尾写入特殊模式(pattern)并在 SRAM 中检查它来验证。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnfatal%2Fsunxi-spl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnfatal%2Fsunxi-spl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnfatal%2Fsunxi-spl/lists"}