{"id":15051070,"url":"https://github.com/inindev/rock-5b","last_synced_at":"2025-10-09T05:05:33.725Z","repository":{"id":173026819,"uuid":"650122233","full_name":"inindev/rock-5b","owner":"inindev","description":"debian arm64 linux for the rock 5b","archived":false,"fork":false,"pushed_at":"2025-02-17T21:43:16.000Z","size":1269,"stargazers_count":18,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-09T05:05:18.854Z","etag":null,"topics":["arm","arm64","debian","debian-linux","device-tree","kernel","linux","nvme","rock-5b","u-boot"],"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/inindev.png","metadata":{"files":{"readme":"README.md","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":"2023-06-06T11:40:35.000Z","updated_at":"2025-10-06T09:19:37.000Z","dependencies_parsed_at":"2023-10-01T17:34:06.739Z","dependency_job_id":"bc4ff0e9-e147-4e56-a35b-383a1fd2991b","html_url":"https://github.com/inindev/rock-5b","commit_stats":null,"previous_names":["inindev/rock-5b"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/inindev/rock-5b","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inindev%2Frock-5b","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inindev%2Frock-5b/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inindev%2Frock-5b/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inindev%2Frock-5b/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inindev","download_url":"https://codeload.github.com/inindev/rock-5b/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inindev%2Frock-5b/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000741,"owners_count":26082933,"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-10-09T02:00:07.460Z","response_time":59,"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":["arm","arm64","debian","debian-linux","device-tree","kernel","linux","nvme","rock-5b","u-boot"],"created_at":"2024-09-24T21:30:44.867Z","updated_at":"2025-10-09T05:05:33.704Z","avatar_url":"https://github.com/inindev.png","language":"Shell","readme":"# rock-5b\n#### *Debian ARM64 Linux for the Radxa Rock 5 Model B*\n\nThis Debian ARM64 Linux image is built directly from official packages using the Debian [Debootstrap](https://wiki.debian.org/Debootstrap) utility, see: https://github.com/inindev/rock-5b/blob/main/debian/make_debian_img.sh#L131\n\nMost patches are directly available from the Debian repos using the built-in ```apt``` package manager, see: https://github.com/inindev/rock-5b/blob/main/debian/make_debian_img.sh#L343-L350\n\n* Note: The kernel in this bundle is from kernel.org and will not get updates from debian.\n\n\u003cbr/\u003e\n\n---\n### debian bookworm setup\n\n\u003cbr/\u003e\n\n**1. download image**\n```\nwget https://github.com/inindev/rock-5b/releases/download/v12-6.7-rc7/rock-5b_bookworm-v12-6.7-rc7.img.xz\n```\n\n\u003cbr/\u003e\n\n**2. determine the location of the target micro sd card**\n\n * before plugging-in device\n```\nls -l /dev/sd*\nls: cannot access '/dev/sd*': No such file or directory\n```\n\n * after plugging-in device\n```\nls -l /dev/sd*\nbrw-rw---- 1 root disk 8, 0 Jul 15 10:33 /dev/sda\n```\n* note: for mac, the device is ```/dev/rdiskX```\n\n\u003cbr/\u003e\n\n**3. in the case above, substitute 'a' for 'X' in the command below (for /dev/sda)**\n```\nsudo su\nxzcat rock-5b_bookworm-v12-6.7-rc7.img.xz \u003e /dev/sdX\nsync\n```\n\n#### when the micro sd has finished imaging, eject it and boot the rock 5b to finish setup\n\n\u003cbr/\u003e\n\n**4. login account**\n```\nuser: debian\npass: debian\n```\n\n\u003cbr/\u003e\n\n**5. take updates**\n```\nsudo apt update\nsudo apt upgrade\n```\n\n\u003cbr/\u003e\n\n**6. create account \u0026 login as new user**\n```\nsudo adduser youruserid\necho '\u003cyouruserid\u003e ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/\u003cyouruserid\u003e\nsudo chmod 440 /etc/sudoers.d/\u003cyouruserid\u003e\n```\n\n\u003cbr/\u003e\n\n**7. lockout and/or delete debian account**\n```\nsudo passwd -l debian\nsudo chsh -s /usr/sbin/nologin debian\n```\n\n```\nsudo deluser --remove-home debian\nsudo rm /etc/sudoers.d/debian\n```\n\n\u003cbr/\u003e\n\n**8. change hostname (optional)**\n```\nsudo nano /etc/hostname\nsudo nano /etc/hosts\n```\n\n\u003cbr/\u003e\n\n---\n### installing on m.2 ssd /dev/nvme0n1 media\n\n\u003cbr/\u003e\n\n**1. while booted from mmc, download and copy the image file on to the ssd media**\n```\nwget https://github.com/inindev/rock-5b/releases/download/v12-6.7-rc7/rock-5b_bookworm-v12-6.7-rc7.img.xz\nsudo su\nxzcat rock-5b_bookworm-v12-6.7-rc7.img.xz \u003e /dev/nvme0n1\nsync\n```\n\n\u003cbr/\u003e\n\n**2. remove mmc media and reboot**\n\n\u003cbr/\u003e\n\n---\n### booting from spi nor flash\n\n**1. boot from removable mmc**\n\n[Follow the instructions](https://github.com/inindev/rock-5b#debian-bookworm-setup) for creating bootable mmc media.\nInsert the mmc media and boot the device.\n\nNote: The mmc media has a one-time reboot during first setup as it expands to the size of the mmc media.\n\n\u003cbr/\u003e\n\n**2. install mtd-utils**\n\nonce linux is booted from the removable mmc, install mtd-utils\n```\nsudo apt update\nsudo apt -y install mtd-utils\n```\n\n\u003cbr/\u003e\n\n**3. erase spi flash**\n```\nsudo flash_erase /dev/mtd0 0 0\nsudo flash_erase /dev/mtd1 0 0\nsudo flash_erase /dev/mtd2 0 0\nsudo flash_erase /dev/mtd3 0 0\n```\n\n\u003cbr/\u003e\n\n**4. write u-boot to spi flash**\n```\nwget https://github.com/inindev/rock-5b/releases/download/v12-6.7-rc7/idbloader.img\nwget https://github.com/inindev/rock-5b/releases/download/v12-6.7-rc7/u-boot.itb\nsudo flashcp -vA idbloader.img /dev/mtd0\nsudo flashcp -vA u-boot.itb /dev/mtd2\n```\n\n\u003cbr/\u003e\n\nOnce the spi flash has been written, the boot sequence should prefer removable mmc media if present, otherwise boot m.2 nvme ssd.\n\n\u003cbr/\u003e\n\n---\n### building debian bookworm arm64 for the rock-5b from scratch\n\n\u003cbr/\u003e\n\nThe build script builds native arm64 binaries and thus needs to be run from an arm64 device such as an odroid m1 running \na 64 bit arm linux. The initial build of this project used a debian arm64 raspberry pi4, but now uses a rock 5b running \ndebian trixie arm64.\n\n\u003cbr/\u003e\n\n**1. clone the repo**\n```\ngit clone https://github.com/inindev/rock-5b.git\ncd rock-5b\n```\n\n\u003cbr/\u003e\n\n**2. run the debian build script**\n```\ncd debian\nsudo sh make_debian_img.sh nocomp\n```\n* note: edit the build script to change various options: ```nano make_debian_img.sh```\n\n\u003cbr/\u003e\n\n**3. the output if the build completes successfully**\n```\nmmc_2g.img\n```\n\n**4. install the kernel**\n```\ncd debian\nsudo sh install_kernel.sh\n```\n* note: kernel needs to be built and available in the ```../kernel``` directory\n\n\u003cbr/\u003e\n\n\u003cbr/\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finindev%2Frock-5b","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finindev%2Frock-5b","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finindev%2Frock-5b/lists"}