From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6874889650574458880 X-Received: by 2002:a19:7e01:: with SMTP id z1mr11113875lfc.450.1610964042825; Mon, 18 Jan 2021 02:00:42 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:6145:: with SMTP id m5ls2415425lfk.2.gmail; Mon, 18 Jan 2021 02:00:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxntepsU4xrXiDSSLmXqjEXUFRILhDo6FSmOElFIwUkBJWe0oeswIwO1/kuPpFSsOxYd2WQ X-Received: by 2002:ac2:5201:: with SMTP id a1mr9168756lfl.515.1610964041699; Mon, 18 Jan 2021 02:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610964041; cv=none; d=google.com; s=arc-20160816; b=UY0x5rAU8Ob0aH2T+hs03hh5hRPwR8D+0j5dGzxH0newXSLBGTuimvat22pzmLULCS FwjsHLJ8hlk4EFeopxB2V3xb8tmBtC95WhF92Cr2poQmQ1aM4AaL1PlGdIr0VuK4zlkX +Zeqx2BXl9komD4/nZ2ZjFwusZqiRWeijK6LSdSAXMIRKpBYMwcLQqbHdFvbCogF9P/b GcEcBxYS0Wn3JYdrbohpFo4F9Vxjt03VC8VX90qEnYnd7D32BtXs5jtRyWWZQ/BXwpts hn6XMdGtIolii1wVXrFYw5B5eHD9oxtAEIkp9jzlhzV/kRgq/uN3YeNXWcA98QA1Mk8J jo6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id; bh=+1CQfANLLvnx98ZOwGgKuBX7K3kvrpD40/rQ156TRas=; b=dg2j5i6s2uAXNRwMAArABRuWlrOexEwtsGpWRsfnozy+7VARnTJ+fgMPYGlX9h0G0q lKQVjOCbPTfGuvDEQ5EsWLNHOn4ONRjBuwiWvjdg1WCx5WvBUcp+PqdkDep+/4h/tDAB ugI01mHI43SSO+quspKGDsIV+t3i7pFmsUTgpRXQ3ZbzwcSmKlOYDT5QZla6QjfvTaWi JJDeMp9iXOidZwRtbBISsi5jW+GfzT5SS1BrjtlsVsWY2IM83zBhMTyg1yXpOlEmGBvj KlZsGoQhQT+recohTLghPa4khBQzSjvZTU7yU6rSjflPiDZ0/da0InpxZevA3xeSJIAe 0log== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id d3si880185ljj.4.2021.01.18.02.00.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2021 02:00:41 -0800 (PST) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4DK6jj0lTnz1rwbX; Mon, 18 Jan 2021 11:00:41 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DK6jj0TC3z1tSQn; Mon, 18 Jan 2021 11:00:41 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 3BUhBNFK7wmA; Mon, 18 Jan 2021 11:00:40 +0100 (CET) X-Auth-Info: xSvJTtKwd1SyxQanhFdRCuyZN9Emzb3loOUQHsSHXpc= Received: from [10.0.40.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 18 Jan 2021 11:00:40 +0100 (CET) Message-ID: <401e120add10ab6b66497dae680c46d559a32434.camel@denx.de> Subject: Re: [PATCH v3 1/3] classes: Add initramfs class From: Harald Seiler To: "florian.bezdeka@siemens.com" , "isar-users@googlegroups.com" Date: Mon, 18 Jan 2021 11:00:39 +0100 In-Reply-To: <0948f3a316449c2e82e3635202883f8acd625e58.camel@siemens.com> References: <20210114101156.243184-1-hws@denx.de> <0948f3a316449c2e82e3635202883f8acd625e58.camel@siemens.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3 (3.38.3-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: 2xNwSlrne8ah Hi Florian, On Mon, 2021-01-18 at 09:11 +0000, florian.bezdeka@siemens.com wrote: > On Thu, 2021-01-14 at 11:11 +0100, Harald Seiler wrote: > > Add a new "image" class for generating a custom initramfs. It works > > like this: A new minimal debian rootfs is bootstrapped and all > > dependency packages for the new initramfs are installed. Then, an > > initramfs is generated from this rootfs and deployed like usual. > > > > This new initramfs.bbclass "image" class should be pulled in by an > > "initramfs image" recipe. Said recipe then specifies all dependencies > > of the initramfs via INITRAMFS_INSTALL and INITRAMFS_PREINSTALL (which > > are analogous to the respective IMAGE_* variables). > > > > initramfs.bbclass intentionally does _not_ expose a mechanism to change > > /etc/initramfs-tools/initramfs.conf and /etc/initramfs-tools/modules. > > Changes to their settings are better done via packages that deploy > > conf-hooks to /usr/share/initramfs-tools/conf-hooks.d/ and module > > fragment files to /usr/share/initramfs-tools/modules.d/. > > > > Signed-off-by: Harald Seiler > > --- > > [...] > > + > > +do_generate_initramfs() { > > + rootfs_do_mounts > > + rootfs_do_qemu > > + > > + sudo -E chroot "${INITRAMFS_ROOTFS}" \ > > + update-initramfs -u -v > > + > > + if [ ! -e "${INITRAMFS_ROOTFS}/initrd.img" ]; then > > + die "No initramfs was found after generation!" > > + fi > > + > > + rm -rf "${INITRAMFS_IMAGE_FILE}" > > + cp "${INITRAMFS_ROOTFS}/initrd.img" "${INITRAMFS_IMAGE_FILE}" > > ${INITRAMFS_IMAGE_FILE} references ${DEPLOY_DIR_IMAGE}, which may not > exist yet. So I guess we should add something like > > do_generate_initramfs[dirs] = "${DEPLOY_DIR_IMAGE}" > > otherwise you have fix the dependency with some kind of "intermediate > task" in the recipe using this class. Yeah, I actually did this exact change in a downstream version of the recipe but somehow forgot to add it here ... Will fix! Harald > > +} > > +addtask generate_initramfs after do_rootfs before do_build > > -- > > 2.29.2 > > > -- DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-62  Fax: +49-8142-66989-80   Email: hws@denx.de