Skip to content

Conversation

me-cafebabe
Copy link
Contributor

For example, in dev_tree_appended() path, platform_dt_absolute_match() filters the dtbs with matching ids, and this compatible matching logic will prefer the first of these filtered dtbs with matching compatible

The compatible matching logic is useful when the user wants to boot from boot.img containing mainline kernel and multiple devices' dtb (which shares qcom,board-id)

SebaUbuntu and others added 2 commits August 18, 2025 04:06
Fixes linking errors when building an image with a more serious
toolchain that complains about missing symbols

Change-Id: Icbd6243f428b3fe0b4a0576ca3c143487dfada2a
Change-Id: I858e29b8e74648a13289966b96de1360fa0e554a
…nd dtb

Makes sure we load the correct dtb node based on lk2nd's device
selection logic when boot.img contains multiple dtbs with same ids.

For example, on msm8953-xiaomi-common.dts, we see 3 devices sharing
the same msm-id and board-id. If a given boot.img contains dtbs for
all these devices, without this logic lk2nd will always load the
first of these dtbs, regardless of the device it's being run on.

Try using compatible string from `dtb_compatible` property first,
because there's some devices supposed to use some other devices' dtb
in mainline kernel (e.g. xiaomi-sakura uses xiaomi-daisy dtb).

This shouldn't affect booting downstream kernels, since they normally
don't define `<vendor>,<device>` on their dts compatible.

Change-Id: Ib7ed0908038f178d34eaa6b4952691c17055c22b
… for kernel

The two devices are identical, only except a different partition scheme.

Even though we already have defined `lk2nd,dtb-files`,
we still want this because this is for matching dtb in boot.img
rather than matching filename.

Change-Id: I2ed59a3ec21c3276a4fa901dc3b06935c2aca40b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants