{"id":18635546,"url":"https://github.com/jonlamb-gh/pine-a64-rust-workspace","last_synced_at":"2025-10-24T04:03:31.018Z","repository":{"id":105863904,"uuid":"280718890","full_name":"jonlamb-gh/pine-a64-rust-workspace","owner":"jonlamb-gh","description":"Bare metal Pine A64 / PinePhone Rust crates","archived":false,"fork":false,"pushed_at":"2020-08-29T12:44:00.000Z","size":166,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-11T15:32:06.211Z","etag":null,"topics":["bare-metal","bounded-registers","cortex-a","embedded-hal","no-std","pinephone","rust","rust-bare-metal"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jonlamb-gh.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":"2020-07-18T18:49:56.000Z","updated_at":"2024-06-02T12:49:34.000Z","dependencies_parsed_at":"2023-04-04T15:48:43.828Z","dependency_job_id":null,"html_url":"https://github.com/jonlamb-gh/pine-a64-rust-workspace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonlamb-gh/pine-a64-rust-workspace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlamb-gh%2Fpine-a64-rust-workspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlamb-gh%2Fpine-a64-rust-workspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlamb-gh%2Fpine-a64-rust-workspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlamb-gh%2Fpine-a64-rust-workspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonlamb-gh","download_url":"https://codeload.github.com/jonlamb-gh/pine-a64-rust-workspace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonlamb-gh%2Fpine-a64-rust-workspace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271664898,"owners_count":24799298,"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-08-22T02:00:08.480Z","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":["bare-metal","bounded-registers","cortex-a","embedded-hal","no-std","pinephone","rust","rust-bare-metal"],"created_at":"2024-11-07T05:25:29.822Z","updated_at":"2025-10-24T04:03:30.953Z","avatar_url":"https://github.com/jonlamb-gh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pine A64 Rust Workspace\n\n## Crates\n\n* [pine64](pine64/) : pine-a64 device crate, registers defined via [bounded-registers](https://github.com/auxoncorp/bounded-registers)\n* [pine64-hal](pine64-hal/) : [embedded-hal](https://github.com/rust-embedded/embedded-hal) trait impls\n* [pine64-lts-bsp](pine64-lts-bsp/) : pine64-lts board support crate\n\n## Building\n\n`rustc 1.46.0-nightly (346aec9b0 2020-07-11)`\n\n```rust\nrustup target add aarch64-unknown-none\n\ncargo build --release\n```\n\nCopy elf to binary:\n\n```bash\ncargo objcopy -- -O binary target/aarch64-unknown-none/release/\u003cimg\u003e /dest/\u003cimg\u003e.bin\n```\n\n```bash\ncargo objcopy --release -- -O binary /dest/\u003cimg\u003e.bin\n```\n\n## U-boot\n\nTODO - track u-boot.cfg here\n\n```bash\nCONFIG_CMD_CACHE=y\nCONFIG_ENV_FAT_DEVICE_AND_PART=\"0:auto\"\n\nARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make pine64-lts_defconfig\nARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make\ndd if=u-boot-sunxi-with-spl.bin of=/dev/sda bs=1k seek=8\n```\n\n```text\nU-Boot SPL 2020.10-rc1-00148-g719f42190d-dirty (Aug 01 2020 - 07:59:39 -0700)\n...\n\nU-Boot 2020.10-rc1-00148-g719f42190d-dirty (Aug 01 2020 - 08:04:33 -0700) Allwinner Technology\n...\n```\n\nEnvironment:\n\n```bash\nsetenv imgname img.bin\n\nsetenv loadaddr 0x42000000\n\n# Make sure the caches are off for now\nsetenv bootimg 'tftp ${loadaddr} ${serverip}:${imgname}; dcache flush; dcache off; go ${loadaddr}'\n```\n\n## Links\n\n- [Pine A64 Specs](https://wiki.pine64.org/index.php?title=PINE_A64-LTS/SOPine#SoC_and_Memory_Specification)\n- [PinePhone Specs](https://wiki.pine64.org/index.php?title=PinePhone#Specifications)\n- [linux-sunxi A64](https://linux-sunxi.org/A64)\n- [sun50i-a64-sopine-baseboard.dts](https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts)\n- [sun50i-a64-sopine.dtsi](https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi)\n- [sun50i-a64.dtsi](https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi)\n\n## ...\n\n- check svd2rust for the latest peripheral materialization patterns\n  * https://github.com/rust-embedded/cortex-m/commit/64dc07d286163bc0c666b7d7058107c3f688bb32\n- interrupts and consts in the device crate\n  * https://github.com/rust-embedded/cortex-m/pull/241\n  * https://github.com/rust-embedded/cortex-m/pull/235\n- update the boot crate to use `llvm_asm!`\n- add all the PIO registers/pins/etc\n- gpio ExtiPin patterns\n- generate UART1-4 device/reg impls with a macro\n- switch UART device to have aliased registers instead of multiple register blocks and type state\n- CCU device for peripheral resets/etc\n- use Infallible instead of Void\n- BSP crates: pine-a64-lts and pinephone\n- PR on bounded-regs for having a field named `Width` breaking things\n\nStuff for the PinePhone BSP crate\n- PinePhone debug UART is UART0, PB8/PB9\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonlamb-gh%2Fpine-a64-rust-workspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonlamb-gh%2Fpine-a64-rust-workspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonlamb-gh%2Fpine-a64-rust-workspace/lists"}