From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6874889650574458880 X-Received: by 2002:aa7:da16:: with SMTP id r22mr825972eds.132.1601033299860; Fri, 25 Sep 2020 04:28:19 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:8a96:: with SMTP id j22ls2528338edj.0.gmail; Fri, 25 Sep 2020 04:28:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCZUXHhDGE07qAXuzvgkTPISTjRrJZkizVVXZ3ncy/jg8fvQlFrkI+d5H8edntK75NnDHl X-Received: by 2002:a05:6402:21c5:: with SMTP id bi5mr805673edb.380.1601033298888; Fri, 25 Sep 2020 04:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601033298; cv=none; d=google.com; s=arc-20160816; b=BYc/0WSAsnMILl2AVB13irjQ7yL6juyRv6QgClToGEz1NiwlvVdZHfNSWxN8oMdfY7 Em3CyCQstDy9z2Ml8zG6nJXxWZmd3Qb8WeWyp6um8zW2tGVGfzeDw50NJlT9e7YYj5zx iUg93MM1/WgqiMxIz+gtiesQU8raG/v7CJg39U1IsE+WgeTpRhkOTMtiMXEucvjr2Ol9 1VvJdWHnzktZ0bQvuybZ0gxWfZqz8YoYF6ymynY5kQtiePqi9a+tnSRcHauMOUnjixTJ Dqu8JthEntltpTsSasvygTSz02nduBJXSqXUEa7D1tD68qLSRXj91hMeBFX5mMu0f7UC FX2g== 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=8YaqfguMZQjz/IB2xAu078NLZAAiKw4QfHSS3Dto7+w=; b=0nM6nUq1h68ahbVjr+zZ/gSRB7h/K2vk0Mm2AS9/MKdrDFEYZCz6EzV9W7WfHszvCU hCldxmFscnPL0jglwSgF0rMu4WIEQUJ7bS/2ovOFf01tT/exojCUcott6qvplWuAUubI KwlGpJJMGCnw2X5kFKKRWfSNxt8pxK4d3ge+hWNIQ8QrNAiUYAaer8LbUdvsF3/xkxCT QRvwzuubllpVMDF+Y2Xdg9t3eQyrS+2WAeNIPh/af1qJPhl756VvfX52SoJOESBCqKal DZO3GtlQwb8wI10X7UZhEpi7nBeQFqS1lFELfjzJpdXyLLVe4UNF9ItOJyqJS36mFvNr wLzA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id dk15si83622edb.2.2020.09.25.04.28.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Sep 2020 04:28:18 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=212.18.0.9; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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 4ByV5t48xLz1qsZw; Fri, 25 Sep 2020 13:28:18 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4ByV5t3yLlz1qv2c; Fri, 25 Sep 2020 13:28:18 +0200 (CEST) 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 jXuYgJLRFVo1; Fri, 25 Sep 2020 13:28:17 +0200 (CEST) X-Auth-Info: likhq/VXXmkfPglvKROKJrNHv3jfCq4vRPref//O/TQ= Received: from maia (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; Fri, 25 Sep 2020 13:28:17 +0200 (CEST) Message-ID: Subject: Re: [PATCH v2 3/3] Add custom isar-initramfs example From: Harald Seiler To: Jan Kiszka , isar-users@googlegroups.com Date: Fri, 25 Sep 2020 13:28:17 +0200 In-Reply-To: References: <20200921104212.1387227-1-hws@denx.de> <20200923162046.206888-3-hws@denx.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUID: mD1oF2YCdRRh On Fri, 2020-09-25 at 11:13 +0200, Jan Kiszka wrote: > On 23.09.20 18:20, Harald Seiler wrote: > > isar-initramfs is a custom initramfs which additionally has the > > initramfs-example module installed. > > > > Signed-off-by: Harald Seiler > > --- > > > > Notes: > > Maybe this initramfs should be tested in CI somewhere? I'm unsure what > > makes sense, and how to "force" this custom initramfs into a CI target. > > > > .../recipes-initramfs/images/isar-initramfs.bb | 18 ++++++++++++++++++ > > 1 file changed, 18 insertions(+) > > create mode 100644 meta-isar/recipes-initramfs/images/isar-initramfs.bb > > > > diff --git a/meta-isar/recipes-initramfs/images/isar-initramfs.bb b/meta-isar/recipes-initramfs/images/isar-initramfs.bb > > new file mode 100644 > > index 000000000000..aaa0350aab20 > > --- /dev/null > > +++ b/meta-isar/recipes-initramfs/images/isar-initramfs.bb > > @@ -0,0 +1,18 @@ > > +# Example of a custom initramfs image recipe. The image will be deployed to > > +# > > +# build/tmp/deploy/images/${MACHINE}/isar-initramfs-${DISTRO}-${MACHINE}.initrd.img > > +# > > +# This software is a part of ISAR. > > + > > +inherit initramfs > > + > > +# Debian packages that should be installed into the system for building the > > +# initramfs. E.g. the cryptsetup package which contains initramfs scripts for > > +# decrypting a root filesystem. > > +INITRAMFS_PREINSTALL += " \ > > + " > > + > > +# Recipes that should be installed into the initramfs build rootfs. > > +INITRAMFS_INSTALL += " \ > > + initramfs-example \ > > + " > > > > If this recipe is not pulled somewhere, it's dead. Right, that's why I was asking where to put it. > Some test-only dependencies we had to local.conf in scripts/ci_build.sh. > Or you add it to meta-isar/conf/local.conf.sample. > > If added, will it simply replace the default initramfs? Or is more needed? Well, there really isn't such a thing as the default initramfs right now. `image.bbclass` deploys its own initramfs (the one debian installed to /boot) to `${IMAGE_FULLNAME}-initrd.img` which further tasks could then reference when building e.g. a fitImage or it could be added to IMAGE_BOOT_FILES for WIC. Similarly, the new `initramfs.bbclass` deploys the final artifact to `${INITRAMFS_FULLNAME}.initrd.img`. What happens after that is entirely up to the integrator. After all, this image-class is meant for cases where customization beyond the abilities of the current in-rootfs initramfs are needed. As an example, a fitImage recipe could use this like INITRAMFS_RECIPE = "isar-initramfs" INITRD_IMG = "${PP_DEPLOY}/${INITRAMFS_RECIPE}-${DISTRO}-${MACHINE}.initrd.img" do_fit_image[depends] += "${INITRAMFS_RECIPE}:do_build" --- Now, for CI if we want to include this custom initramfs, we'd need to either modify some image recipe to pull it in as shown above or build it separately and then start qemu with -initrd build/tmp/deploy/images/qemuamd64/isar-initramfs-debian-buster-qemuamd64.initrd.img somewhere. But I'm not sure if that's easily integrated into the current setup? IMO the next best thing would be to just build test it. Would adding mc:qemuamd64-buster:isar-initramfs to TARGETS_SET in ci_build.sh work? -- Harald 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