From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 17 Jul 2026 16:42:46 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f62.google.com (mail-wm1-f62.google.com [209.85.128.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 66HEgjLX005438 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 17 Jul 2026 16:42:45 +0200 Received: by mail-wm1-f62.google.com with SMTP id 5b1f17b1804b1-493ce08a6b4sf71890405e9.1 for ; Fri, 17 Jul 2026 07:42:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1784299360; cv=pass; d=google.com; s=arc-20260327; b=QijcWHyxSKQtrnM3ZacJyQkNeqTg8ytsHr6LkZ+16jpxkBENZfCKKPm5vnTZe+dk+F DqUTFJjic7i6BCRVcdFS1n1OKBm5o7bV4ptWmniBUnPBN5Qa8UBhm8g41E1vNCBoSbhj IsAn5eQpjMaYxD2KqZos0xsn+M4v1/fCp7njY6HIt0TzppIik6w7QnwqarcCO6/Ni8W9 PBOtvIBo5JlskClZ1qMDOzbDfw9yTp6idEY7hTu7YIjGp3B4tRExX04g2emElIec2XWH S1jm9NoF4jwLWtqRThj6tdmCr5EHbxxtp7Rt6MfTFwekrubzLfKlVfIrcNuFboFmdlv0 KZDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=9RPjil32JTcXVAxSImc7s56/cqo2ZAgNR3nursmcrpQ=; fh=xRRyQDYoZLPWBYZ09nJLERABdlfU2N2QE7UsacLJzzQ=; b=RcBSBlU0oJ0fLW8KOFZOXW+13sujAUYbx6H++eYpLpvrDUl8jR18OYUYAGAJTJ8TNl Kxt0Tlbt7CdToZmQYzVlumh/OUQEsfpM98vMZTyQw3O6B/h+rhXhOwxuSVEQ4fnnIHXf x+Wa1AneRawHPZohHrEWnZClPu8ZPIMDrePOZjG3Dr7rK7UFn+0nf17MTmVVZbaRbqHS nWWrsFeBz52B/zfMpb+hqroLvUVSdo8HwtQDxHeq1p8WvtnS+xv0y3p6FyNl4dtehwLb YxTGS1CVsUp6bAx561m51vyxxGVnSR1aBXnKnBtYGQ2HH/Sqzl/BcQudxBz+NGXv4+0p GUyA==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1784299360; x=1784904160; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to:content-type; bh=9RPjil32JTcXVAxSImc7s56/cqo2ZAgNR3nursmcrpQ=; b=tvXaswsHVE0AtkUedE9u7KXUBqTt+70j3eLSdeqM8XGJHFX0J4ihigF4VL3g5ZlkJn BNo6ZKug4zFTISHmqZD/RapCgp+OaUvMOJAiT00fVq0eDJf9gPOPZOcQ3vFvtv4B3QFs ATYE53H4gCb//BplO8YD+PKCCrbWq7tRhWim8wuPbRlMIgPxNe/SjABtcrf8hQ2JkQAY smUvZBaqRjqirDMO5pYf7E4R0c2oe4zDNmgTll6BQbkGBFtRNR+UF3/ZQKLgYFI/bU9m mNM4HLj2sYgl2Hrp8T2VPZ+JE9lAWC3jhAriQ7JJOtYS0GkmXu7rmz5GaCjdfno7FpzV d9/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784299360; x=1784904160; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:content-type :in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to:content-type; bh=9RPjil32JTcXVAxSImc7s56/cqo2ZAgNR3nursmcrpQ=; b=R1yPJG2Ue6gjYAdbfb7xbKLF8ORL+12gNbTFudEmdZe4dCScyvR1sUcADe1Kz7Mqs7 qRJKRd3dFszBYyzvPuWVGAw83ZRJBor1OODAXJgzYEtgI8A22E6Omcdy3ZTfGccuCe/r tZ5bpr3V0zkBbKzm/LMlUI0O6NOVn45q3j0xM4h2bcGcsoGxifo3gXvmGP10WB5gJehf 96fCrSEghrU003eliR0j0KaQHkk6QQfaFsFwO/eeICa5cWv6sTEGf+s2/LH4Onds34Qh QF+jxtnJwDLRI0qYDi+/jSay/4EK1VkmcoMwCM2vveRkCXaxmIei665AGOrC3SYoLkzX +PiA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AHgh+RpmfJoherrGWyB82T4j4CQsRbw9nw4/rYd0ohuBjdIstTrXMuHw10eXMT074Szio/xlmDQg@ilbers.de X-Gm-Message-State: AOJu0Yyb4p4QkrAvt8epZx2f7VO3xgNC8Ebb7Yf78RUDTD+6YR7hdEzQ DkERubOIptH94dfAuBqXsD7ipUW57tKd3TP1SIetwumAZZulXNPMQpxV X-Received: by 2002:a05:600c:19c7:b0:493:9cb3:53fc with SMTP id 5b1f17b1804b1-4954a3e493fmr35302125e9.11.1784299359872; Fri, 17 Jul 2026 07:42:39 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="Aa7YSPRK+D04EC3xHLq/4Lb/ga5Xm6TVhiKQ8tawXzULQ4eBcg==" Received: by 2002:a05:600c:c297:b0:495:453c:2ad3 with SMTP id 5b1f17b1804b1-495453c2beals11402925e9.1.-pod-prod-02-eu; Fri, 17 Jul 2026 07:42:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AHgh+RrTsMVwb52+lXPrVnaIRvPfXAnd/HIjBnxq8xwbP5W7l9MM5u5JsmpRsVbnw28zy0UIWMWZLSB/i2bF@googlegroups.com X-Received: by 2002:a05:600c:3148:b0:495:69c:a262 with SMTP id 5b1f17b1804b1-4954a3e47f1mr36253195e9.13.1784299357758; Fri, 17 Jul 2026 07:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1784299357; cv=none; d=google.com; s=arc-20260327; b=By49INw9kRAshgz2JRVf4bbPydtq6Xh6/Bi7Vde750oef/6QbRhLSLF5VGCQtInZ+t VBCPWw/3F7xxzKTEKO3w+esgPhJ2QTGJ3DAAcppBcDl0N6Db4YzO3L+8Vvd2wWfSuAGs HXJdLaSVl4p46M3aqDRokdNY/zReiB2pJpYTKVv6gZ8ie9uZTbAi1Mbhsn5w5SOLGREv UpEhzcg7buIFl+brYFScML2hXGftO51CN2liN/TSi+rRzlXh6kIGvwShwtexEmNed70n OQUGvIR+vEarIA29GEdTE1tKYkLlNPZ4MXKU2IdfW7RoAlPw4a83X5BJ2yjdzrGmJ3a7 mFLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=n80q9wX4vdogIZH4bG9fA7uOS5TfXRHN0lNNXTiYQfI=; fh=tCjmpeWxOcO5tfL40TLJxXIxzKvUGUr1F4RfClM8S2U=; b=Eg/i9djq8d9f4/W3TrSuUwFB7jRVjyxjv8JpMTYBntOLIXXEJL1xyFjwj9hq2fihp6 +Ikwf9JAj6GrfiCsNVtLE5pO24cVLumFT4s5YtkoWxL/Tnrja7AaIrAHiUNBQIf0KpOf 5ew/BB+MJHWVy0fkKNSqALXBT8d8nak4Nye2FQgiCb+GPUZwjBSvPjiCV1T9HI2pZtAA z3KKeQVN5UxxWnyUZH32S3MsbOTMNCQHONP92p7EvHE6aSIF2mm+PPRsgOiGWqbluanH /Dj/z4Z+ykFwiNhG/MDmkkezICpq5fofbP0IRcsNObh2rfETUF5lod6GDQYmIJpqh8b/ /LRQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-49548e2bb07si503465e9.2.2026.07.17.07.42.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Jul 2026 07:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.148] ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 66HEgaAD005425 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2026 16:42:37 +0200 Message-ID: <5c7f5bef-a775-489f-af97-d65dd34dd68e@ilbers.de> Date: Fri, 17 Jul 2026 16:42:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] fix(rootfs): generate in-tree initrd as part of image install To: "MOESSBAUER, Felix" , "isar-users@googlegroups.com" Cc: "Gylstorff, Quirin" References: <20260714133422.1792603-1-felix.moessbauer@siemens.com> <20260714133422.1792603-3-felix.moessbauer@siemens.com> <2dada87c8a25242a893de6668cb4048c3461c6eb.camel@siemens.com> Content-Language: en-US From: Zhihang Wei In-Reply-To: <2dada87c8a25242a893de6668cb4048c3461c6eb.camel@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: J8Y7+WBGGYgH On 7/17/26 16:40, MOESSBAUER, Felix wrote: > On Tue, 2026-07-14 at 15:34 +0200, Felix Moessbauer wrote: >> When working with a in-tree initrd, the generation of the initrd has the >> side effect of placing the initrd in /boot as well (in addition to the >> deployment to the deploy dir). This part is currently skipped in case >> the initrd is taken from the sstate cache, leading to reproducibility >> issues of non-wic images (e.g. a rootfs tarball). >> >> This issue remained unnoticed, as all image types that go through wic >> anyways replace the /boot part with the artifacts from the deploy dir. >> >> We now run the initrd generator as part of the rootfs_install in case an >> in-tree initrd is used. If an out-of-tree initrd is used, the current >> logic is kept, as the rootfs from the initrd generation is not used. >> >> Fixes: b0913306 ("Delay creation of initrd until end of rootfs ...") >> Signed-off-by: Felix Moessbauer >> --- >> meta/classes-recipe/image.bbclass | 2 +- >> meta/classes-recipe/initramfs.bbclass | 38 +++++++++++++++++++++++++++ >> meta/classes-recipe/rootfs.bbclass | 33 ++++------------------- >> 3 files changed, 44 insertions(+), 29 deletions(-) >> >> diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass >> index 4194dda4..03127ded 100644 >> --- a/meta/classes-recipe/image.bbclass >> +++ b/meta/classes-recipe/image.bbclass >> @@ -488,7 +488,7 @@ EOSUDO >> -exec touch '{}' -h -d@${SOURCE_DATE_EPOCH} ';' >> } >> do_rootfs_finalize[network] = "${TASK_USE_SUDO}" >> -addtask rootfs_finalize before do_rootfs after do_rootfs_postprocess do_generate_initramfs >> +addtask rootfs_finalize before do_rootfs after do_rootfs_postprocess >> >> ROOTFS_QA_FIND_ARGS ?= "" >> >> diff --git a/meta/classes-recipe/initramfs.bbclass b/meta/classes-recipe/initramfs.bbclass >> index e0a5f5ab..bfe530c4 100644 >> --- a/meta/classes-recipe/initramfs.bbclass >> +++ b/meta/classes-recipe/initramfs.bbclass >> @@ -44,4 +44,42 @@ python do_validate_rootfs_packages () { >> bb.error(f"{pkg} is incompatible with the selected generator '{initrd_generator}'") >> } >> addtask do_validate_rootfs_packages before do_rootfs_install >> + >> +SSTATETASKS += "do_generate_initramfs" >> +do_generate_initramfs[cleandirs] += "${DEPLOYDIR}" >> +do_generate_initramfs[network] = "${TASK_USE_SUDO}" >> +do_generate_initramfs[sstate-inputdirs] = "${DEPLOYDIR}" >> +do_generate_initramfs[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" >> +python do_generate_initramfs() { >> + bb.build.exec_func('rootfs_do_mounts', d) >> + bb.build.exec_func('rootfs_do_qemu', d) >> + >> + progress_reporter = bb.progress.ProgressHandler(d) >> + d.rootfs_progress = progress_reporter >> + >> + try: >> + bb.build.exec_func('rootfs_generate_initramfs', d) >> + bb.build.exec_func('rootfs_purge_initramfs', d) >> + finally: >> + bb.build.exec_func('rootfs_do_umounts', d) >> +} >> + >> +python do_generate_initramfs_setscene () { >> + sstate_setscene(d) >> +} >> + >> +# When generating an external initrd, remove it from the rootfs to ensure >> +# identical artifacts when using the sstate cache. The remaining rootfs >> +# is not used for booting. >> +rootfs_purge_initramfs[weight] = "1" >> +rootfs_purge_initramfs() { >> + sudo find ${ROOTFSDIR}/boot -name "initrd.img-*" -delete > As rootless was merged first, the sudo needs to be replaced by a > "run_privileged". Feel free to just update the commit or let me know if > I should send a patch. > > Felix Please send a patch, since it's been merged already. Zhihang -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/5c7f5bef-a775-489f-af97-d65dd34dd68e%40ilbers.de.