Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ jobs:
sudo apt-get install -y --no-install-recommends shellcheck jq ripgrep device-tree-compiler g++ libext2fs-dev libselinux1-dev
- name: Validate scripts and admission contracts
run: |
shellcheck src/image/*.sh src/boot/*.sh src/audit/*.sh tests/*.sh
# SC2015 in older ShellCheck flags the intentional UUID-and-type
# condition followed by explicit rejection if either check fails.
# The pinned host validation also checks all default diagnostics.
shellcheck --exclude=SC2015 src/image/*.sh src/boot/*.sh src/boot-pair/*.sh src/boot-pair/dracut/*.sh src/audit/*.sh tests/*.sh
bash tests/image-contract.sh
bash tests/boot-contract.sh
bash tests/boot-pair-contract.sh
bash tests/boot-pair-serial-contract.sh
bash tests/kernel-dt-admission.sh
g++ -std=c++20 -O2 -Wall -Wextra -Werror src/image/ext4-labels.cpp -o /tmp/ext4-labels -lext2fs -lcom_err -lselinux
g++ -std=c++20 -O2 -Wall -Wextra -Werror src/boot/boot-image.cpp -o /tmp/boot-image
bash tests/boot-image-contract.sh /tmp/boot-image
g++ -std=c++20 -O2 -Wall -Wextra -Werror src/boot-pair/android-sparse.cpp -o /tmp/android-sparse
bash tests/android-sparse-contract.sh /tmp/android-sparse /tmp/android-sparse-fixtures
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,37 @@ keep writable output separate from read-only source and payload mounts.

## Stock ABL boot_b development route

`./ukelinux.sh --build boot-pair --distro=fedora --help` describes the new
two-image development recipe for `boot_b` and a separate GPT partition named
`linux`. It prepares a root-capable built-in initramfs, source-pinned adaptation
of the bootloader-selected DT and a local tablet-screen TTY candidate. The
host builder never changes GPT, Android userdata, slots, init_boot, vendor_boot
or dtbo. Actual Image/modules/DTB compilation, all 1,146 module byte comparisons
against signed COPR release 1.5 and the linked initramfs check have passed.
The [October 9 paired-image result](reports/FEDORA-BOOT-PAIR-2026-10-09.json)
records completed EXT4 labeling/readback, independent Android sparse decoding
and verified cache reuse. The exact Image reached the real enforcing Fedora
root in generic ARM64 QEMU and executed a local TTY keyboard command. Separate
wrong-partition-name and wrong-UUID cases were rejected. The local owner-test
delivery contains a 96 MiB boot image and a 556.23 MiB sparse system image
representing a 3 GiB filesystem. Physical ABL, UFS, screen and input acceptance
remain separate owner-test gates; no public binary release is claimed.
See the [paired-image operator guide](https://github.com/MCC45TR/uke-linux-docs/blob/main/docs/testing/FEDORA-BOOT-PAIR.md)
for coordinated UUIDs, the separate GPT `linux` prerequisite and rollback.
Do not substitute the older initramfs-only image for this root-capable pair.

Before the owner's manual trial, run
`./ukelinux.sh --check-device --pair DELIVERY_DIRECTORY` from the workspace.
This verifies all nine delivery checksums, manifest/VM agreement, coordinated
root UUID and 3 GiB sparse header, then performs bounded read-only inventory
on one ADB or fastboot transport. Bootloader inventory checks Uke identity,
slot A, unlock state, `boot_b`/`linux` capacity and a non-logical `linux` target.
ADB can inspect physical-partition sysfs but still requires the bootloader
check. `--offline` only verifies local files; `--report NEW_FILE` saves a private
JSON result without unit identifiers or raw output. Exit 2 means device
prerequisites are unavailable. The check performs no device writes and cannot
establish backups, working Android return, physical boot or screen output.

`./ukelinux.sh --build boot --distro=fedora --help` describes the additional
host-only `fedora_boot.img` route. It builds a raw ARM64 kernel with a built-in
Fedora debug initramfs and wraps it in Android boot v4. Aloha and ESP are not
Expand Down
6 changes: 6 additions & 0 deletions configs/boot/uke-boot-pair-host-rpms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{"file":"dracut-111-4.fc46.aarch64.rpm","sha256":"238700de19f7a415d0be309248258940e0b79727f0bde4a0cd371646c5188830"},
{"file":"kbd-2.10.0-3.fc46.aarch64.rpm","sha256":"61d67855568dd833b60bafa05b780c772fd1996511d061b2da058a40a6fd9832"},
{"file":"xkeyboard-config-2.48-4.fc45.noarch.rpm","sha256":"1e2933eca6a7c8bf7e39e071299cb4a4cd712f43e8228474c91515c6dbc72ae7"},
{"file":"libxkbcommon-1.13.1-4.fc46.aarch64.rpm","sha256":"9ffa7a09728604ff701d48a72541682889d2e6c4f7dbc0a0833af0011081c1df"}
]
22 changes: 22 additions & 0 deletions configs/boot/uke-boot-pair-rpms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"file": "senemos-uke-linux-kernel-mainline-7.2.9-1.5.fc46.aarch64.rpm",
"sha256": "d71f9cfb93bc635b6fe9857e0c5ac7d941899f46413bd35094c8dc6320a057f3",
"nevra": "senemos-uke-linux-kernel-mainline-0:7.2.9-1.5.fc46.aarch64"
},
{
"file": "senemos-uke-linux-kernel-mainline-core-7.2.9-1.5.fc46.aarch64.rpm",
"sha256": "f0a87256666f501fea8d324e6cd4b4205e3e42cc7a7b5581440534b29a2908cd",
"nevra": "senemos-uke-linux-kernel-mainline-core-0:7.2.9-1.5.fc46.aarch64"
},
{
"file": "senemos-uke-linux-kernel-mainline-dtbs-7.2.9-1.5.fc46.aarch64.rpm",
"sha256": "9b4ca266bee7772f8d5e700a7a5053cc63114955aa6caf1adf52d8f6e462a565",
"nevra": "senemos-uke-linux-kernel-mainline-dtbs-0:7.2.9-1.5.fc46.aarch64"
},
{
"file": "senemos-uke-linux-kernel-mainline-modules-7.2.9-1.5.fc46.aarch64.rpm",
"sha256": "38bb5e7732dd3a66215720de46cccb2c2ac685fdb44b1ab9e97704798f65fb63",
"nevra": "senemos-uke-linux-kernel-mainline-modules-0:7.2.9-1.5.fc46.aarch64"
}
]
56 changes: 56 additions & 0 deletions configs/boot/uke-boot-pair.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"schema_version": 1,
"device": "uke",
"distribution": "fedora",
"release": "rawhide",
"mode": "stock-abl-ext4-root",
"default_boot_template": "android17-evolutionx-12.1",
"boot_templates": [
{
"id": "global-os3.0.303.0",
"source_class": "OEM-global",
"sha256": "efdee1d4e1acd7f6e77615330dbcb045caeeccad8568d89fa6abd627f606e77f",
"bytes": 100663296
},
{
"id": "global-os3.0.304.0",
"source_class": "OEM-global",
"sha256": "1eaf4858a7c70bee9b663b485f3192b164738bbdae3edbb986a5419621c8ef30",
"bytes": 100663296
},
{
"id": "android17-evolutionx-12.1",
"source_class": "community-ROM",
"sha256": "b8da3f7d9c54bba2a0cf6fc72af0df14e7f2993b251ffd2390bfa693d46d2b45",
"bytes": 100663296
}
],
"boot_partition_bytes": 100663296,
"header_version": 4,
"kernel_release": "7.2.9-senemos-uke",
"patch_count": 13,
"kernel_manifest_sha256": "a545fe2f6029346bbf1cb34b115b07a29f0933064151116328e1f8364f9fae54",
"kernel_config_sha256": "e2995d52f963778ba13e48329dad9fb8fbcd784b6c7a43e97ec1a2940ab020ac",
"base_kernel_image_sha256": "5eacec7505f85df39df868c5a9e81274cf55bbaf6ee8d91e71fd827eba80c56c",
"kernel_rpm_spec_sha256": "c1db3c429f3f9856493bd05b08e886a9c46346052de22d43144ef9e0c9154ad8",
"base_module_symvers_sha256": "fa28dccf8b45ea718d318cb772f002004a0125abb18e8cea390977fd654f754e",
"host_tool_image": "40c9868d08bbad2cb58312fd4c8295ec2a3f132f95bd0eb150a45e05160c2866",
"kernel_tool_image": "a6fb262f41c060702100f704f5c63ac48957682e84befb0812f08e248f2bec7e",
"qemu_tool_image": "9a044f1e709a13ab768bfad155ce969e5ae637ea2378b7277fbc2fad358daaf6",
"external_initramfs": "ignored-by-CONFIG_INITRAMFS_FORCE",
"dt_source": "bootloader-selected-stock-FDT-with-built-in-reviewed-provider-adaptation",
"dt_handoff_verified": false,
"avb_state": "unsigned-no-footer",
"boot_tested": false,
"hardware_tested": false,
"root_size_mib": 3072,
"core_prepared_root_sha256": "33a2343d17d1f4e588737aab704b93277e4bef4f4e6b3efe01341cc4a844ecd2",
"root_tool_image": "9e787753723cc715b6d46fabb9f7b17ceb5195d269224a3f8262fd47a05833ad",
"root_selector": "UUID-and-PARTNAME-linux",
"system_format": "android-sparse-raw-and-fill-only",
"partition_changes": [
"boot_b",
"linux"
],
"display": "simplefb-O82-3200x2136-from-runtime-splash-reservation"
}
222 changes: 222 additions & 0 deletions reports/FEDORA-BOOT-PAIR-2026-10-09.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
{
"schema_version": 1,
"date": "2026-10-09",
"device": "uke",
"distribution": "fedora-rawhide",
"architecture": "aarch64",
"status": "host-and-generic-VM-validated-owner-test-candidate",
"candidate": "pair-03ea9569c96dcb08",
"recipe_sha256": "6bf3a30bb53fefeaeb2b1589c257d58ec1502caa4834ff99a3c0d31f6fd9caae",
"root_uuid": "03ea9569-c96d-cb08-0a64-53c6f816aa32",
"source": {
"builder_commit": "1f5adb9b34db1b19ec6e970f809c0d13c323184e",
"kernel_recipe_commit": "921d4984f6a558a11bdb41616d6bc7ee618b91f7",
"base": {
"configs": [
{
"path": "configs/arm64-qcom.config",
"sha256": "ea08a26d2afe7d27411ca603c5e7690116f796a1c7956408156f24a09f8fdf06"
},
{
"path": "configs/uke.config",
"sha256": "f84cf917915682a1214cbb06c0caee1956b1d27711ee196212fea6ec67d563fa"
},
{
"path": "configs/fedora.config",
"sha256": "3d7ad09fbd77ecd803eb5d09be59114093d469260e0f6dc2b15fc0a849479744"
}
],
"donor_commit": "32cad9ccd383ff4b37d8a5e7f88a8bfdcc07307e",
"dtb": "qcom/sm7675-xiaomi-uke.dtb",
"hardware_tested": false,
"patches": [
{
"path": "patches/7.2.9/0001-cliffs-clock-handoff.patch",
"sha256": "a5946597c24f89d9750ecc807d48a28215877d8f59100cbcde63f4717c3a51f9"
},
{
"path": "patches/7.2.9/0002-uke-rpmh-regulators.patch",
"sha256": "bc5b9634c6be79345545f86cdcb17bc6ce252f163034a66dbfd7dbd9fd1d0b47"
},
{
"path": "patches/7.2.9/0003-cliffs-tlmm.patch",
"sha256": "8040aecc97ad055d8dad9a6b0dc76a9087e4742f2d5003b846f2af97906b53e4"
},
{
"path": "patches/7.2.9/0004-cliffs-interconnect.patch",
"sha256": "ced8b8823875f77076638ecec583b1e2aac09d1a89d738a686b2e938f1a89dcd"
},
{
"path": "patches/7.2.9/0005-uke-smmu-handoff.patch",
"sha256": "4e2e00cbfe6bf28819553f110de4e1b11004516934b8e3b6a15b11a413a7729b"
},
{
"path": "patches/7.2.9/0006-uke-usb-v7-api.patch",
"sha256": "d744bd253d46ce6c96fdd3d0ed26f56ec5aa7f2dd7aabb6774dd08d2f6a0ecef"
},
{
"path": "patches/7.2.9/0007-uke-independent-dts.patch",
"sha256": "119a715ca253a32f1ef5d4e20eb88aa619c1f7443458d35cc708014ff3575690"
},
{
"path": "patches/7.2.9/0008-sm7675-ufs-phy.patch",
"sha256": "80aefafd680136bf187dc20c632e7d71b19644528055fe41c262b97e0826a968"
},
{
"path": "patches/7.2.9/0009-cliffs-ufs-interconnect.patch",
"sha256": "fa1d9a1743fba4de7d163f48c8127b752f560d94bfecfde9590659c48b37debe"
},
{
"path": "patches/7.2.9/0010-uke-ufs-dma-power-admission.patch",
"sha256": "e20d25186ab0fa1d1b62eae0d61b972ef2c8f812a5212c1e03acfbff09cd8e5e"
},
{
"path": "patches/7.2.9/0011-cliffs-rpmh-snapshot-size.patch",
"sha256": "a65984bf0b3a5a021446508d58befc26d471ac62fbb5a7a5f784730643b50727"
},
{
"path": "patches/7.2.9/0012-uke-gdsc-shared-gcc-regmap.patch",
"sha256": "04a04966bde864af9fd744af76af4faf0168fe579b81059aa451de82ab61c9c7"
},
{
"path": "patches/7.2.9/0013-uke-usb-role-and-phy-error-gates.patch",
"sha256": "2610daab7f7b4ed8fcf53ecee8077df1c49abd4c58ebd40ffc2117b013672dbc"
}
],
"schema_version": 1,
"signature_url": "https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-7.2.9.tar.sign",
"signer": "647F28654894E3BD457199BE38DBBDC86092693E",
"source_date_epoch": 1791024250,
"source_sha256": "b4c5dfbe51a364a6c7f03869200f88c8e1f77403539005f14b7fc6bc91b8d8ba",
"source_url": "https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-7.2.9.tar.xz",
"upstream_commit": "5fce161649b4d779d1b76d9fcd52dc77779774b8",
"version": "7.2.9"
},
"boot_adaptation": "patches/boot/0001-arm64-uke-abl-dt-hook.patch",
"kernel_release": "7.2.9-senemos-uke",
"final_boot_config_sha256": "3df7001a2d42abd48c33d5a2bae8582f5c98867a7bae34e5f4fe87631735e02f",
"base_kernel_manifest_sha256": "a545fe2f6029346bbf1cb34b115b07a29f0933064151116328e1f8364f9fae54",
"boot_manifest_sha256": "c2b888e783fb98afa196cd71462d96f17bb4757eb3dd008b0cf3681fd36d9c77"
},
"tool_images": {
"host": "40c9868d08bbad2cb58312fd4c8295ec2a3f132f95bd0eb150a45e05160c2866",
"kernel": "a6fb262f41c060702100f704f5c63ac48957682e84befb0812f08e248f2bec7e",
"root": "9e787753723cc715b6d46fabb9f7b17ceb5195d269224a3f8262fd47a05833ad",
"qemu": "9a044f1e709a13ab768bfad155ce969e5ae637ea2378b7277fbc2fad358daaf6"
},
"compiler": "Clang 23.1.2 (Fedora 23.1.2-1.fc46)",
"kernel_packages": {
"copr_build": 11090323,
"version": "7.2.9-1.5.fc46.aarch64",
"signed": true,
"copr_signer": "DAFC3C5A881FB49C7167EE2D6F772E3D487BD13E",
"final_inventory_sha256": "cf010b7dfe82458f09bfd43d3f2e5a9110d120c5ca30cc92f7d3d2f548e2650d"
},
"outputs": [
{
"name": "fedora_boot.img",
"bytes": 100663296,
"sha256": "0850340c1bcc180b617c921cbd175330cd34d8c4f9274fbd680adef6df22e8e5",
"target": "boot_b",
"format": "Android boot v4; built-in initramfs; unsigned"
},
{
"name": "system.img",
"bytes": 583253380,
"logical_bytes": 3221225472,
"sha256": "ecbf476699e33de7c1594b407a03e5db053801fe81557b914cc0eb64cac9b93a",
"decoded_sha256": "968c4a4c4c50a636a62a2b608dee5f18835416059c9a3919434fb3b6d893cb6d",
"target": "linux",
"format": "Android sparse RAW/FILL with complete EXT4 coverage"
}
],
"boot_header": {
"header_version": 4,
"page_size": 4096,
"kernel_bytes": 63506944,
"ramdisk_bytes": 0,
"signature_bytes": 0,
"os_version_encoded": 570425768,
"payload_end": 63512576,
"image_bytes": 100663296,
"avb_footer_present": false
},
"checks": {
"source_preparation": true,
"base_patches": 13,
"abl_adaptation_patch": 1,
"embedded_initramfs_byte_match": true,
"module_byte_match": 1146,
"android_v4_roundtrip": true,
"full_sparse_logical_coverage": true,
"sparse_roundtrip": true,
"all_inode_selinux_labels": true,
"ext4_readback": true,
"no_python": true,
"privacy": true,
"dt_transform_private_live_fixture": true,
"ram_and_reservations_preserved_in_host_fixture": true,
"malformed_dt_rejections": true,
"foreign_dt_unchanged": true,
"selinux_inode_contexts": 15335,
"sparse_chunks": 616,
"sparse_dont_care_chunks": 0,
"ext4_e2fsck": true,
"completed_entry_cache_verified": true,
"interrupted_result_sealing_verified": true
},
"independent_sparse_decoder": {
"package": "android-tools-37.0.0-5.fc46",
"binary_sha256": "15794b07830edf961bd4964af7e29e6b783043365d2414afc71dee38ddb4f461",
"complete_3_GiB_byte_comparison": true,
"decoded_sha256": "968c4a4c4c50a636a62a2b608dee5f18835416059c9a3919434fb3b6d893cb6d"
},
"qemu": {
"version": "11.1.2",
"machine": "virt",
"synthetic_device_identity": true,
"result": {
"schema_version": 1,
"evidence_class": "generic-arm64-qemu-root-fixture",
"kernel_sha256": "450200e882e74002211749ae9317ed2c6eaaff63ca87e6f62c0ebe548be1a657",
"test_script_sha256": "30c6b776f9491148f2235b2f646e9b90ee5374286aa80e9bcaf8dc89431cebcb",
"real_ext4_root_transition": true,
"root_pid1_systemd": true,
"selinux_enforcing": true,
"local_tty_keyboard_command": true,
"wrong_partition_name_rejected": true,
"wrong_filesystem_uuid_rejected": true,
"boot_tested": false,
"hardware_tested": false
},
"result_sha256": "38d152814624e9d0f9da2a1d36ef0732d854c6b8eab7a9021fa7e730521000e9",
"limitations": [
"No Qualcomm ABL, UFS, panel or USB-power emulation",
"TTY keyboard execution proves the generic guest service path only"
]
},
"device_prerequisites": [
"Existing independent GPT partition named linux, at least 3221225472 bytes",
"Actual boot_b capacity and bootloader flash permission checked",
"Actual pre-test B images and working Android A/recovery return retained",
"Use both images from this exact coordinated pair"
],
"remaining_device_gates": [
"Unsigned Android boot v4 admission by stock ABL",
"Current-slot DT and RAM handoff",
"UFS controller and PHY at real boot",
"Visible 3200x2136 simplefb TTY and input",
"Physical fastboot sparse write and Android return",
"USB CDC ACM and separate ESP32 host/power qualification"
],
"delivery": {
"local_owner_trial": true,
"published_binary_assets": false,
"automatic_flashing": false,
"gpt_creation": false,
"esp_required": false
},
"boot_tested": false,
"hardware_tested": false,
"flash_executed": false
}
Loading
Loading