From patchwork Sun Nov 29 22:37:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Salveti X-Patchwork-Id: 106320 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.21115.1795991834580250014 for ; Sun, 29 Nov 2026 14:37:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=IASdkwnI; dkim=pass header.i=@oss.qualcomm.com header.s=google header.b=Y6MZbe2x; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.180.131, mailfrom: ricardo.salveti@oss.qualcomm.com) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6ATKLcfl2888732 for ; Sun, 29 Nov 2026 22:37:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=f4VO6VYTLyvtHDo4ffL8CnZxXwNnSyw9Mm5 bl5/P7Ns=; b=IASdkwnI3hkmU64C3y3hSKxqGhUNF2av5lBaLv/avA6F+wiTZOa NWABtTv44lMNJ/GwF3IeEXJmVYW3VP0DGHHc+0x1gPn1d7qupaHdddonEoSIkk0H RvBG6n0ijZ8S3rRbXl0Fhasv5W4rIWXsiRFFZcwlKX5WPBnssQxEYnQsH3a9dS9v jbIWr0lbAmJaTLFP4BLsaT+xlTZ4Qkql8btCmUa07y84m+cfRrIanr2MmJLUfzS2 3dzDuWpagS+4PwgYuFwDBd3tOjdIW7qDS68/bdI2CXb6vANAq6Z8EOS60I/XnMug 7iOPHgTXoYJUlOe9/YATJI5hGYzCJTulIpA== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j7manv7gx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 29 Nov 2026 22:37:13 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-3aed37745bcso7967425a91.1 for ; Sun, 29 Nov 2026 14:37:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1795991832; x=1796596632; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=f4VO6VYTLyvtHDo4ffL8CnZxXwNnSyw9Mm5bl5/P7Ns=; b=Y6MZbe2x8jt/8xS7i8gWotbq9n0C7WVVEcBuc/j2bacgE1pShtZ3ZhrL/Psfkhqlrc Wi8QIiWlo0gb5FUqSVIvqVzZT0C6izTIZNuXxkqIKJMncjz5iTFzwak9VU4jCZg88c12 8Os5WjT5WtjyYsI33CQhLzpV5fzYB901xR6PXJuMV/b62Ym8okiZcTvnKybaeguE5P5G 9Jx/mOY1AGutyCmHZ/kfAMX+OhTpTSx7j4i89ca1X7tFWAfuhjUnPw81sXAO94Dl64fl m8JYsH4YPPAxG2IPkoetsEy+AGHsvuBJDuxgylLcLzWPbl1ejv6R09erXZMf6w3sTQua BnDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795991832; x=1796596632; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=f4VO6VYTLyvtHDo4ffL8CnZxXwNnSyw9Mm5bl5/P7Ns=; b=gTR0hS6H+FZTm5HOGb470bWX7H8N2vFQRBlNrftECTl+Ea5n0rWeoCDOJJxcIVxmEc JPE/KeWhTlCHuoY74gLWrXRZb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67ed59e1d1-3b41c93cdc8mr21831873a91.32.1795991832116; Sun, 29 Nov 2026 14:37:12 -0800 (PST) X-Received: by 2002:a17:90b:3cc7:b0:3b3:c6b1:2277 with SMTP id 98e67ed59e1d1-3b41c93cdc8mr21831853a91.32.1795991831503; Sun, 29 Nov 2026 14:37:11 -0800 (PST) Received: from ip-172-31-25-255.us-west-2.compute.internal (ec2-35-83-207-173.us-west-2.compute.amazonaws.com. [35.83.207.173]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b53479b149sm15458700a91.6.2026.11.29.14.37.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 14:37:11 -0800 (PST) From: Ricardo Salveti To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli , Viswanath Kraleti Subject: [OE-core][PATCH 1/3] uki.bbclass: skip overlays and select between several devicetrees Date: Sun, 29 Nov 2026 22:37:02 +0000 Message-ID: <20261129223704.2168814-1-ricardo.salveti@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: CruR-F1Gs04hwHIRbK07f544hdQLvNRO X-Proofpoint-GUID: CruR-F1Gs04hwHIRbK07f544hdQLvNRO X-Authority-Analysis: v=2.4 cv=Qc/zLcbv c=1 sm=1 tr=0 ts=6b0ca919 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=P2/bgbqRawb6I1+7fxbs5g==:17 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=ACKpWwXhrvcF-GG0W3YA:9 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTI5MDA5MCBTYWx0ZWRfXw9OqjOuoc1Zs qAxwSec8njeBch0C7C+iS3Rd+WSXxXoQHjTcwD7ZgfXiMUVxDDgvhOXsEKNfKRH6Dv+FpqvHqzv cXs6yskLnnMIN02zuTcjJblrDEU/wevqxKm5PZdWoat0zsVuLwwCcLhi0HinRibnXbEbDVkyqmL hL6QgpdakbhE0vt6uJ3ZG9JUkK9eaRECjNatchIuQ/EtYe4K3gAExQ1khuZYgmH09ilx/uy1FNp /UfHcerwnewZpzjFXmMY+hwtnzfLWImHXJuCuKBXKLxXlvYG2nzwzDcfnxPz54sVTlF/yeV2L6S O0eMeTUY+GzvLUoScYQTw9jtS3dQVO33ig7Eh+AWzo5a7vSIwYp3TXWAi5p0kWOKBxCLbLItwH0 b/oVYMBRQlCiReg+PMBEVn6hNzDKz5770vM/ElVSqfWYwY1AnxcdohqFsK04KbMdIML+BlKFCvU 7tKnwbWq/ph53r5fcEw== X-Proofpoint-Spam-Info: AW1haW4tMjYxMTI5MDA5MCBTYWx0ZWRfX38Kscbi71loG K3D56jSOBpbxm2QMKnOBzExsbGm3RjS0p6h6JnQRITgE26u936mucYAdsteX15SL7XIL4FGCWZo MyW4bO4CiYxHU3oAVv7iEl4TknF08yU= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-29_04,2026-11-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611290090 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sun, 29 Nov 2026 22:37:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251556 Every UKI_DEVICETREE entry is passed to ukify as its own --devicetree, but that option takes a single file, so only the last entry ends up in the UKI. With the KERNEL_DEVICETREE default that is often a .dtbo, which systemd-stub then installs in place of the firmware devicetree. Skip .dtbo entries and pass several devicetrees with --devicetree-auto, so that systemd-stub (257 or later) installs the one whose first "compatible" matches the firmware devicetree, or the device found through .hwids when the firmware has none. When nothing matches, it installs the DeviceTree= of UKI_CONFIG_FILE if set, which now applies, and otherwise keeps the firmware devicetree, or none if the firmware has none. A single devicetree is still always installed, so list one to force it. AI-Generated: Uses Claude Code (Claude Opus 5.5) Signed-off-by: Ricardo Salveti --- meta/classes-recipe/uki.bbclass | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/meta/classes-recipe/uki.bbclass b/meta/classes-recipe/uki.bbclass index bcccf824c7..ea8aaa5e6b 100644 --- a/meta/classes-recipe/uki.bbclass +++ b/meta/classes-recipe/uki.bbclass @@ -151,16 +151,18 @@ python do_uki() { if cmdline: ukify_cmd += " --cmdline='%s'" % (cmdline) - # dtb - uki_devicetree = d.getVar('UKI_DEVICETREE') - if uki_devicetree: - for dtb in uki_devicetree.split(): - # DTBs are without sub-directories in deploy_dir - dtb_name = os.path.basename(dtb) - dtb_path = "%s/%s" % (deploy_dir_image, dtb_name) - if not os.path.exists(dtb_path): - bb.fatal(f"ERROR: cannot find {dtb_path}.") - ukify_cmd += " --devicetree %s" % (dtb_path) + # dtb, overlays cannot be used as the base devicetree. With several dtbs, + # systemd-stub picks the first one matching the firmware's "compatible". + uki_devicetree = [dtb for dtb in (d.getVar('UKI_DEVICETREE') or "").split() + if not dtb.endswith('.dtbo')] + dtb_option = "--devicetree" if len(uki_devicetree) == 1 else "--devicetree-auto" + for dtb in uki_devicetree: + # DTBs are without sub-directories in deploy_dir + dtb_name = os.path.basename(dtb) + dtb_path = "%s/%s" % (deploy_dir_image, dtb_name) + if not os.path.exists(dtb_path): + bb.fatal(f"ERROR: cannot find {dtb_path}.") + ukify_cmd += " %s %s" % (dtb_option, dtb_path) # custom config for ukify if os.path.exists(d.getVar('UKI_CONFIG_FILE')):