{"id":42839571,"url":"https://github.com/ubuntu/stubble","last_synced_at":"2026-01-30T11:48:56.224Z","repository":{"id":307684739,"uuid":"1021549487","full_name":"ubuntu/stubble","owner":"ubuntu","description":"A DTB loading kernel stub","archived":false,"fork":false,"pushed_at":"2026-01-23T20:44:06.000Z","size":3134,"stargazers_count":33,"open_issues_count":8,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-24T09:42:55.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubuntu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.LGPL2.1","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-17T15:07:17.000Z","updated_at":"2026-01-21T12:36:03.000Z","dependencies_parsed_at":"2025-08-01T16:29:14.287Z","dependency_job_id":"1efbbe56-ce29-44b4-91af-a20dbffd59dc","html_url":"https://github.com/ubuntu/stubble","commit_stats":null,"previous_names":["canonical/ubustub","canonical/stubble","ubuntu/stubble"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/ubuntu/stubble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fstubble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fstubble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fstubble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fstubble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubuntu","download_url":"https://codeload.github.com/ubuntu/stubble/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fstubble/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28912013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T08:15:08.179Z","status":"ssl_error","status_checked_at":"2026-01-30T08:14:31.507Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-30T11:48:56.167Z","updated_at":"2026-01-30T11:48:56.218Z","avatar_url":"https://github.com/ubuntu.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stubble\n\nA minimal UEFI kernel boot stub that serves a single purpose:\n\n**Loading machine specific device trees embedded within a\nkernel image.**\n\nstubble is compatible with [systemd-stub(7)](https://manpages.ubuntu.com/manpages/plucky/man7/systemd-stub.7.html)\nand [ukify(1)](https://manpages.ubuntu.com/manpages/plucky/man1/ukify.1.html).\nIt is designed to seamlessly integrate with Ubuntu's current bootloader and\nboot security model. The resulting kernel image can be signed and verified\nand loaded by grub like any other kernel.\n\nBefore loading the kernel, the stub generates\n[hwids](https://github.com/fwupd/fwupd/blob/main/docs/hwids.md) of the\nrunning machine derived from smbios and compares them to an embedded\nlookup table in the .hwids section of the kernel image.\nIf a match is found it loads the corresponding device tree from the\n.dtbauto section before jumping tothe bundled kernel.\n\n## Command-line parameters\n\n- `debug`: Enable debug logging\n- `stubble.dtb_override=true/false`: Enable or disable device-tree compat based dtb lookup. The default is `true`.\n\n## Dependencies\n\n```\n# apt install python3-pyelftools systemd-ukify\n```\n\n## Building\n\nBuild the stub:\n\n```\n$ make\n```\n\n## Device-tree selection\n\nStubble supports two mechanisms for selecting a device-tree:\n\n* Properties values (HWIDs) in the SMBIOS table are used to select one of the\n  appended device-trees. This mechanism is used for boards that only come with\n  ACPI tables but were the kernel does not support booting via ACPI.\n* The compatible property of the device-tree pre-installed by the firmware\n  is used to match one of the appended device-trees.\n\nHWID based selection takes precedence. The selected device-tree is installed as\nan EFI configuration table. If none of the rules matches, a pre-installed\ndevice-tree is kept.\n\nThe HWID based rules must be supplied as a directory with JSON files.\n\nThe `.txt` files in hwids/txt are generated with `hwids.py` and\nconverted to `.json` files by running `hwid2json.py` from the\n`hwids` directory.\nThe `compatible` field of the resulting JSON files has to be\nfilled in manually.\n\n## Bundling with kernel\n\nSystemd's ukify tool can be used to append a kernel, device-trees in flattened\ndevice tree format (DTB), and hardware ID JSON files to the Stubble stub.\n\nFor a simple combined kernel+stubble image bundling a single DTB you can run:\n\n```\n$ ukify build --linux=/boot/vmlinuz --stub=stubble.efi --hwids=hwids/json \\\n--devicetree-auto=/boot/dtb --output=vmlinuz.efi\n```\n\nAdd more `--device-tree-auto= parameters` for further device-trees.\n\n## Adding new devices\n\nIf you would like to add support for a device that please open a pull request\nadding the output of `sudo fwupdtool hwids` as a new file in `hwids/txt`.\n\n# Acknowledgements\n\nThis project is originally based on\n[systemd-stub](https://manpages.ubuntu.com/manpages/plucky/man7/systemd-stub.7.html)\nfrom the systemd project.\nThe `.dtbauto` feature in systemd was contributed by\n[anonymix007](https://github.com/anonymix007/).\nIt is inspired by the [dtbloader](https://github.com/TravMurav/dtbloader)\nproject by Nikita Travkin and\n[DtbLoader.efi](https://github.com/aarch64-laptops/edk2/tree/dtbloader-app)\nfrom the aarch64-laptops project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubuntu%2Fstubble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubuntu%2Fstubble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubuntu%2Fstubble/lists"}