From patchwork Thu Jan 14 00:11:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 268 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:b386:0:0:0:0:0 with SMTP id p6csp1103037ooo; Thu, 14 Jan 2021 02:12:19 -0800 (PST) X-Received: by 2002:ac2:599e:: with SMTP id w30mr3094571lfn.552.1610619139564; Thu, 14 Jan 2021 02:12:19 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1610619139; cv=pass; d=google.com; s=arc-20160816; b=dmQ1FQAwm5OOy9JGgI50Q8c3G/HyOefMG2va8QLvRxLCOOO5okMN1OhrZbfG77jKtm 2QKHPumfe/fm1ohSXXTaz2KC49d6unZsPjTd9JMFZDXe+P/3F4z6QRaxSQSZdbnzKD6O NHYK8diS4xTy4lYo1uHkiR/UNpdBO9Ve0EpX69ZXG0SHJ9ieUmI7srAwduWc49lxz7+D H1ALz4EgQMV4bDBRjXTXVxM1NChJQYSTnaM62dTBfxkP4Jiq6tz0hSjw7C7c+GzAyJS2 RK7sMMXjT2Z5DddqdjWg/J5A5/ukwrRkjXAhGrXp9AsREFxkE9V/Ed3QewgPqJw/JiO/ T0jw== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=WxBwa1Vj5GuZoLkQuMvJVuLytphARz1w8XbOyiS0+q8=; b=z6zFPtFgiy1SoEENh5jg77XdNexXc11/hN6+TtaoH6hXaL2dQpKSjNFGPsCcCsZjsu 0gCCGcpi0RHrgqePx8Hp87vBR9WoxdXdZsCDcVwMxGwBqCqeK22DPGcG+6HH3lwB1pzX gAvLIA/lDkVM7J3HsfMZjgslqDCSj2pih31Es5t+kCohYjXyrZ2TkoeDyOMtwpkxD3np p8ABJf63lo8Vn+JHmf4SzNG88FHn46u2xZK6EFIkVLixI62uKTh1g2d8WDsJcoaLaePQ KIY1dmWNE/irarbt+cDxgG4Z/Nd8L6dG2sxpDIJxer7tilgsCK8DfsW0tZxozupI6PzI 7GBA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=GqXAdydM; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbavsqcaamgqer3g62wi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBAVSQCAAMGQER3G62WI@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id z16sor2155817ljj.36.2021.01.14.02.12.19 (Google Transport Security); Thu, 14 Jan 2021 02:12:19 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrbavsqcaamgqer3g62wi@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=GqXAdydM; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbavsqcaamgqer3g62wi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBAVSQCAAMGQER3G62WI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1610619139; cv=pass; d=google.com; s=arc-20160816; b=d062aljYN9nLklAk2sUK+LCzhkmz+imsggfHMuireypevCLXZAjLNnRCR91nWKQkc6 dFKG0v7BdULolIMh3NHWzAaE5hyaa9od4ls4gnd1UyE3oKUPYR2mnKY+DL6l6X6MuBTV zSKmra6NSN8xyR6I9QamvMP4ykX4mIC1oWvr9bYAkRZ/oIr/1nsbIB4jkh7l2nHENdSB F/LnLFSZxmdgpRjzTYKYFBt/1/0SkTUtyqrpZtXECwwCEoBueL8Nile+rE9f2RCzdpMh 7GAd4o1sEMg/mCPSwl0rrwgQz7U5ncusYns0M0W5nlPTitlgpx4oIHyVJRSlD6mhnRzN CL+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=WxBwa1Vj5GuZoLkQuMvJVuLytphARz1w8XbOyiS0+q8=; b=QLEBXzyHwJ2TXQoHtCocOofdmvsdaX2yT28a08v/MpZ6jqffHVPw+VswQwPBtH0o6j No7Cayqt9g0W8A52J3x5qZvg/nleallm7Dqz9qsvQOPFHZMEYF1680G0g2WfM2jizO3w 2RZBqK7de0DCJjHLUEva6ic/SqshbdNz6Bmql5G234Zye4ieZdX3eiGjsAHXXCoXb20I 4GQk+Uitdxtcqo7M2nis4Vf47dX0YnN9Tg0iF8v7L29ER+ob74IdHD9fVyBUL5c3aLRe Ahwyiv9vlFLDqRAOOqNgpL9XZmMft0bKwq/Dh1/XN+NvHwVBCMRQysV9gdWGSzulF88X AGeg== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=WxBwa1Vj5GuZoLkQuMvJVuLytphARz1w8XbOyiS0+q8=; b=GqXAdydMmj5Oi3lTkQ7ueV1bpYx2Z3GMxIcj7eUddqDcQxAT10d8wsWvaDmc7lWhZG a4TFCBGtw8wJCaYMpx+aw7Z8nTHof41ZDZ0BDyDEB7sYuL47nwU4bG5DNs35C5osYagT VKvi1YSocAzQq/h2qPbHc2wvDC53QO3jTvz0lm4gO7yACM94JIHHE8Zybe2nzZbf1g3H wafyk4VhzwlWyKoazGhatcGMWCl4S1VcgcbseZYvEi2nTl+bnFFolH1Ju0jJhJUe5U9S WJiOLsN9f5sr/Yd1TIK66L5yXoqfpxH9U7h/jqNb55pJ3abA9WV9pgCPGODDZx2qoSyj t/Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=WxBwa1Vj5GuZoLkQuMvJVuLytphARz1w8XbOyiS0+q8=; b=DUJsvBTiSba1YnlYmedLKgUVYmDWv/Hgpdr1NDG7wPjuM4IAOFhW2cl5jpfWuwpuKF 5zTRJocBkHrq2VJGmajeoCJsKXaXc7etN7TAG7UJ+vYcobVFxr7CFBOoDhHS+a6mJPWE ahi79K2nRm86UsrDNVy2wHLbVaWzxQ2W406Kx+B2R6YH4TvAT8EngnxMKSDo1x2ahjUj E38dkWuBNIlbmuQIzWaNq7RYaf5eOJMRxpcb+vQ/30HpYvRZG33MeCZxhbrwYyv3hMQv 2XmIv3bfFSCWiYAS8/LtwWmoDDcPGYuvx0h8dikuNORpG0JAL514Aur37KcUGZu39vz3 vlnQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531qpBmy9w4qhnT7Gtcv8nBZX3t+7YPsAD1TOJntLPkdjDumI0l0 u+Hc5Zd3QbYatpdhUSUsGBs= X-Google-Smtp-Source: ABdhPJylMPYGQTSVl1Ml4DhW49PJ/JUl741yu/bvlo67gGTi+zHEfwNWm6wTBoQ/krn4sx1WwoivAQ== X-Received: by 2002:a2e:a58c:: with SMTP id m12mr2915873ljp.444.1610619139059; Thu, 14 Jan 2021 02:12:19 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:810b:: with SMTP id d11ls844759ljg.11.gmail; Thu, 14 Jan 2021 02:12:18 -0800 (PST) X-Received: by 2002:a2e:99cc:: with SMTP id l12mr2918975ljj.448.1610619137997; Thu, 14 Jan 2021 02:12:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610619137; cv=none; d=google.com; s=arc-20160816; b=hgFsSua9xMxD6MtqXF2NVjjNCkWZpuvaIcgA0lGIT7sl0iq+mkCxaDeBTuN3mqs09r BdYmG3FXU2cGyFBOeg1A2PFyACHPDPE3VZt/Z6/dgpWnnTDyd9QdF9D9GHySWua8WN4E j1fvV9jtlfPL1UMv4x81zIpGRto7kTpjTv2Hk+9+T63YThLAxuQm8CLT4Xy7cojLJRNW tqiy2blZCd+WCmuj+uuaVJVlwoVEq0DaT/OrRLhpSc4qPTDGWfDXrfC0zpXAfT+vv0QW m8vQoFlBTcbx6gtWwoQ0SgsU3zK6hqHD3UjM7ynq1BNhknjj+HOUcSH/fZ/xFAOrnZsx JgXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=23ngHHofv0w3uTg24LXszM9Ggvmd60DtwAyDfrGDfHA=; b=sR+BYXAY3QsvX0RcqDnezCzFnHNcO2Vg7vAkVj+/eaSZFMwD1XoBGZfx+aIYX5sQ6U zLdKANPXvMkzLY2Sg22xkNH0hvkhWRHSMJzdzsFClRfA1ar1ltG5zwv2UVB3d7+xraw1 2zoj/yBXo/BzqAwG3o1MC7ZAeD4FUeYqP+YHuoEQwub+W7jVZTmxzmOCvgMO6RZmp+sW 1/2ITP5Hbadfp2HbQmlqiAbVMF0Hw+A81QpN4r5Fn7wKUVnKcAIGZQMZFzC/XQrCDuUA fLwBQKQ18FZQBnwCO+kRt46nuKXJJiKBhqhRZOzn0ye+I1XrClL59RZBlvMHN7kBN1f4 eFpQ== 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 Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id l8si178184ljc.2.2021.01.14.02.12.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2021 02:12:17 -0800 (PST) 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; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4DGg8x2h45z1qs3X; Thu, 14 Jan 2021 11:12:17 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DGg8x2TdWz1tSQS; Thu, 14 Jan 2021 11:12:17 +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 AB4OX24aSoOd; Thu, 14 Jan 2021 11:12:16 +0100 (CET) X-Auth-Info: mK4//C+ufCNGTUlsCLoHAfqvqVOJtt++a3Oq0KckhNQ= Received: from maia.denx.de (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; Thu, 14 Jan 2021 11:12:16 +0100 (CET) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler , Jan Kiszka Subject: [PATCH v3 1/3] classes: Add initramfs class Date: Thu, 14 Jan 2021 11:11:54 +0100 Message-Id: <20210114101156.243184-1-hws@denx.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-Original-Sender: hws@denx.de X-Original-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 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1688856574816061426?= X-GMAIL-MSGID: =?utf-8?q?1688856574816061426?= 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 --- Notes: I had this idea while searching for a way to build an initramfs that uses dm-verity to assert integrity of the rootfs. To me, this feels like a much cleaner solution than anything else I tried and I'm happy to report that, using this approach, I got everything working nicely in the original project. In my opinion, this design has a number of advantages over the previous solutions we have seen so far: - It does not suffer any kind of initramfs pollution, caused by packages installed into a rootfs. This is a big problem when trying to generated an initramfs from e.g. `buildchroot-target` as many unrelated packaged could be installed there which would all get pulled into the initrd (if they install hooks/scripts). This also means, with this new approach, the integrator has maximum control over the contents of the initramfs. - There are no needs to change the initramfs generation process in any way, the debian tooling can be used exactly like its meant to. - As most isar-generated images will never regenerate the initramfs from the running system, all initramfs related packages are dead-weight to the image. This is a problem when trying to generate the initramfs from the actual image rootfs. When it is necessary to rebuild the initramfs in a running system, the packages designed for this new class could just be installed into the rootfs, without any changes necessary. This means, any generic initramfs module packages can be used both with the in-rootfs mechanism and initramfs.bbclass. - Because of this complete isolation and independence, implementation of complex logic is much easier: For example dm-verity needs a root-hash that is only available after the rootfs has been cast into a filesystem image. With this new approach, this can be modelled with a simple task dependency. Changes in v2: - None (just added examples in new patches) Changes in v3: - None meta/classes/initramfs.bbclass | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 meta/classes/initramfs.bbclass diff --git a/meta/classes/initramfs.bbclass b/meta/classes/initramfs.bbclass new file mode 100644 index 000000000000..8af9b4b379a5 --- /dev/null +++ b/meta/classes/initramfs.bbclass @@ -0,0 +1,41 @@ +# This software is a part of ISAR. + +# Make workdir and stamps machine-specific without changing common PN target +WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/${PV}-${PR}" +STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/${PV}-${PR}" +STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/*-*" + +INITRAMFS_INSTALL ?= "" +INITRAMFS_PREINSTALL ?= "" +INITRAMFS_ROOTFS ?= "${WORKDIR}/rootfs" +INITRAMFS_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${INITRAMFS_FULLNAME}.initrd.img" + +# Install proper kernel +INITRAMFS_INSTALL += "${@ ("linux-image-" + d.getVar("KERNEL_NAME", True)) if d.getVar("KERNEL_NAME", True) else ""}" + +# Name of the initramfs including distro&machine names +INITRAMFS_FULLNAME = "${PN}-${DISTRO}-${MACHINE}" + +DEPENDS += "${INITRAMFS_INSTALL}" + +ROOTFSDIR = "${INITRAMFS_ROOTFS}" +ROOTFS_FEATURES = "" +ROOTFS_PACKAGES = "initramfs-tools ${INITRAMFS_PREINSTALL} ${INITRAMFS_INSTALL}" + +inherit rootfs + +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}" +} +addtask generate_initramfs after do_rootfs before do_build From patchwork Thu Jan 14 00:11:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 269 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:b386:0:0:0:0:0 with SMTP id p6csp1103045ooo; Thu, 14 Jan 2021 02:12:21 -0800 (PST) X-Received: by 2002:a19:4196:: with SMTP id o144mr3220474lfa.342.1610619140858; Thu, 14 Jan 2021 02:12:20 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1610619140; cv=pass; d=google.com; s=arc-20160816; b=xwJqXndfYVAUdlyx60oou4pAI5ddDhcIgWWbqjORvT9D3L2UnwUI16eQ9rpLQNgXXe 1YdwUq53jPFqW+7vh2zCF8pDbWpnC+s2FQnLMmavO54pprVlQ71hyNKg7nN6AV3AEeZW oopuz46Dp+Mvr9tOLZsL+e45zX47kuoEyLLhVbG0no5MCUwggyD/iZWgBKGiTH+8wqxB GW3j56Ytt7l2N14DYdD01uOsgVSEps11quEg1HnpG+wwHT9tq+8jHhUekJ4LtJf/Lo0H F4MplVHRk9QSrXkOv8u7grVOCqj0vDsdp6rqg+cx6GcqoV+46a3boyrW1hWjc3g9uDgw f6NA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=Ki2N978PTpXxbQCJevVCRSav8FegxVpick+o/fZZ3OA=; b=OqFMHquYKr4SWT/edKReLo1NTHAqe0J2mtQ7PvS0ParpKyXoXRi1eXZJ6ymg3S75lA 4onVPkKaSkVilDlN6FkOSCcxjmc1YHlZtQShQvJ1xuLkbD/VRf2/0c5fH8FamIFmbdTr T2QTnfPS82o8xUddwAYhOwW7p1h+5DJpkH0y1dZoclArRDfL4zdxonwsgUxChBa3QaMs AonnSs/jnostAEtoduZB4cMlIMsi9y3l4GRcHVx31BFTctg9ADUSPbnHyR9y324qeG+5 No9qwkzLUNm++ZKGwX3irE4eRpcOluJDJnEdsK+5flPf+6vo1TSxQxYRinW+r50kB3wS Iw6w== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=JZR2lDh2; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbbfsqcaamgqecwlyhii@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBBFSQCAAMGQECWLYHII@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id 23sor1252652lfe.116.2021.01.14.02.12.20 (Google Transport Security); Thu, 14 Jan 2021 02:12:20 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrbbfsqcaamgqecwlyhii@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=JZR2lDh2; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbbfsqcaamgqecwlyhii@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBBFSQCAAMGQECWLYHII@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1610619140; cv=pass; d=google.com; s=arc-20160816; b=u1U2hcYe7xfCoqjkF+T7ROf+K1bBBcbaMFvBnsdOq63G454In867mH733jMQ//rjbn efvZ0NcppTzSaFlhMMLtykRyV5kh+x/h3lxkZvEcDEAHsjaR3ubjJuBYbJiYKxfoRJ5m b920GjvFb0K8NTH85hzOogCMqq1J2i8qN87hZwUky/23sXO7mkSTmIiSCgzbe5H9bdz8 uVUqCcbzAu335639tlzBCInVuSjPn0K340fWGDLAkWoJc0Rq6bw1X2w4cQfjd+rqqSzg qa9GjVR4SnjRObdxRQCCdbrAyZP8fegV4y0uEisalQvP4QmJGcM2KUOH5bIBvwYAnMqi KPgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=Ki2N978PTpXxbQCJevVCRSav8FegxVpick+o/fZZ3OA=; b=sERkrsU3kJAPbgz4n0bouYpGFdghJzfD3V7fySg40GW+mT9293LRSzISvw4Ezd21lG fygNbnVqXRSCMi1tbbl6R76i3As7IO7KGZy1Tqisq5y0MZ7oX+4njY+NpXy6tkcUn/Ii M2l1bf58KhqYEP8X84yHBB3Jsy0cWWXlmqUPKz3YcbHdUedQr2OJ8IGlFECe+KErxXzA bNKDMm+hNIMumXWD0l19NzMr5jCwf3gygMlbz6o/DMeedyt7WNUMLfl6pM1Uo1rIbmTq VUXK+t12Ji0pRWxhrqGbi9dh8D+KPeqSStmWNxPRWIPOv+6c5Zga7WS3FegxNqmxl2vo QGfw== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=Ki2N978PTpXxbQCJevVCRSav8FegxVpick+o/fZZ3OA=; b=JZR2lDh2fdk4R8UP5H0QJBvO1P0flSgXWhphzytoxW1JUCJOaChgstIS+4IeITqRaQ ADoD0LdeWdcDrRtyuIRmM68E73kxD4Da+86HbJHdG3dGhTiFFXSnQfob0Amxy6gMB24L 3EzaDIM+CdQfZBZMoPQ0lTDo+nN+ZoQcvCg1VXttlNx4vm7L8yTk0PB7LHn5L4MJrL8s 8/CzoWjd/GvW7yt1G4uVKgO6JMlAtAATUGCT4cpMfYAEgtCLEE1kuUG31g9VB8sUcF+t p6OuXxtaec/ppAMXHI2ZDYoZBmcM13aBmIZ8/9oSkHssmH3QA58GjAzPLZ9yBn+OFuX9 0euA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=Ki2N978PTpXxbQCJevVCRSav8FegxVpick+o/fZZ3OA=; b=CrUgDf3uUQzIcf+dMwOo/stEhWAALXiQa/ZxwlLstizSaeP6uKB3etryH6/ibWOzJx gUxLM1mZIX/8eJyS46tcE4dGa1HbtRKIUHIC+33hTypaBfIt17CkDGJmF1hfGsSDDi/3 Xc/AvPJKXchIjZr0/NkVvxKsKHu4d0hfYpluXKV5AxUpwU3TIEYYVTypTcwRzbD+ME0D 9cGlq1oFgBdBXhstYsvtTQJ9iHX7epL4WQWYlfjdOIrdLbl3GYH6cZAy84TipJTLX+7B eDH+1UyGjnZm7XC+9UIJopvEvSEuyy2hWUPa/11/evrPMR3Z8Kl6zrCHkcsJvmvnf8JT Pbrw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531dlCTOMs4oX2X9n5pcod7LmB5uDeSWUq8ekeT6Q03IribBocWc /mbZDh4pqF7GjDlQFlnQ+Yo= X-Google-Smtp-Source: ABdhPJwH25tsXZej8QTnYRxULeTQQPJR9GjBfBVEc+8DoqRIY47cbToh99poW+tGRwEcWWTluVXEIw== X-Received: by 2002:a19:81d5:: with SMTP id c204mr3053246lfd.366.1610619140536; Thu, 14 Jan 2021 02:12:20 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:a58c:: with SMTP id m12ls849102ljp.2.gmail; Thu, 14 Jan 2021 02:12:19 -0800 (PST) X-Received: by 2002:a2e:8e63:: with SMTP id t3mr2796657ljk.88.1610619139499; Thu, 14 Jan 2021 02:12:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610619139; cv=none; d=google.com; s=arc-20160816; b=Ph/dTXeiRw9T8HjIdq5RSwXwlFM34Mru/DGYGzoW88ebm5K2m6JfeMmY+nz9YsrhyH 3w7qZIMIjTmb+TrmyXiugwSJhrafmpKmHNuXikYZOqlJ6jMWYdsVN4qX5HcZUo1Tm4G/ x76qvOVJeXCLQY+7M7qN9ii/rZuaeUgofl6zhWMuS9McCcdx8nqug3lvfNifxc8XV45c YVdRnJ7tdov5zeQ4pB/IiOiDAZxB5THbhDVu14i7nWiwPie+X1McBPDQi/2RNuw6bvgO oGAIr+RiqB+YM0ZB6JJPAMIkqQyuEa0M8MvlfhbZlenqMvfXrx1PvlWJk863XnOuyIpt /QGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=6oryJtUDsrqKtS3EWv8DbrZWNJcCNvdVsBMYLXx1xFo=; b=amKcemnQsuovQgVHdXJZo2pqWcydIA2UjhJVZkEvLX6BYN7Txr978MOv9T17UXuzXd A8IzrX6OCVPt8UBhTyFzQ4ZpbYbdG+Kw8gHBxJ40mH+0ic2lpRDu2NCP3X8lKtyn1YNm E86lvL+AI3/e4846aRMWk5/DFiSacR9w2yiZJcvsuY3ilXsQ106uocEEoM5RJJT8FwuI VQDc7GmwpTqi0pF9FucasvqEnNjnL2fOf9FtFr4Wv1zObRtdRk98PHumwWdd58ivTt7y rlrGeRKFFRgPPJYpmeTj4KRtM33yYTxJPONBhPEtT0P09kr10Xm9lmdHBuwg14ShKw+E bhhw== 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 Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id d3si246952ljj.4.2021.01.14.02.12.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2021 02:12:19 -0800 (PST) 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; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4DGg8z06J3z1qs3l; Thu, 14 Jan 2021 11:12:19 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DGg8y71WNz1tSQP; Thu, 14 Jan 2021 11:12:18 +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 xgrqFtfL9ATX; Thu, 14 Jan 2021 11:12:17 +0100 (CET) X-Auth-Info: YK5cfL7bnWD1/xHK6U9g8iEfuDvwKosMhN5eeJyLVH8= Received: from maia.denx.de (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; Thu, 14 Jan 2021 11:12:17 +0100 (CET) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler , Jan Kiszka Subject: [PATCH v3 2/3] Add example initramfs module recipe Date: Thu, 14 Jan 2021 11:11:55 +0100 Message-Id: <20210114101156.243184-2-hws@denx.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210114101156.243184-1-hws@denx.de> References: <20210114101156.243184-1-hws@denx.de> MIME-Version: 1.0 X-Original-Sender: hws@denx.de X-Original-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 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1688856576482813376?= X-GMAIL-MSGID: =?utf-8?q?1688856576482813376?= Add the initramfs-example recipe/package which demonstrates how to write initramfs modules. It demonstrates how to add hook scripts, boot scripts, and conf-hooks. Signed-off-by: Harald Seiler --- Notes: Changes in v3: - None .../initramfs-example/files/example.conf-hook | 7 ++++ .../initramfs-example/files/example.hook | 19 +++++++++ .../initramfs-example/files/example.script | 21 ++++++++++ .../initramfs-example/initramfs-example.bb | 40 +++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.conf-hook create mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.hook create mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.script create mode 100644 meta-isar/recipes-initramfs/initramfs-example/initramfs-example.bb diff --git a/meta-isar/recipes-initramfs/initramfs-example/files/example.conf-hook b/meta-isar/recipes-initramfs/initramfs-example/files/example.conf-hook new file mode 100644 index 000000000000..2a3cf7a84040 --- /dev/null +++ b/meta-isar/recipes-initramfs/initramfs-example/files/example.conf-hook @@ -0,0 +1,7 @@ +# Example conf-hook. +# +# See "CONFIGURATION HOOK SCRIPTS" in initramfs-tools(7) for details. + +# Example: Use busybox instead of klibc-utils. The package must also add +# `busybox` as a dependency when this is set. +BUSYBOX=y diff --git a/meta-isar/recipes-initramfs/initramfs-example/files/example.hook b/meta-isar/recipes-initramfs/initramfs-example/files/example.hook new file mode 100644 index 000000000000..0d84e7a97efd --- /dev/null +++ b/meta-isar/recipes-initramfs/initramfs-example/files/example.hook @@ -0,0 +1,19 @@ +#!/bin/sh +# Example hook script. +# +# See "HOOK SCRIPTS" in initramfs-tools(7) for details. + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions +# Begin real processing below this line diff --git a/meta-isar/recipes-initramfs/initramfs-example/files/example.script b/meta-isar/recipes-initramfs/initramfs-example/files/example.script new file mode 100644 index 000000000000..784fad9c99bb --- /dev/null +++ b/meta-isar/recipes-initramfs/initramfs-example/files/example.script @@ -0,0 +1,21 @@ +#!/bin/sh +# Example boot script. +# +# See "BOOT SCRIPTS" in initramfs-tools(7) for details. + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +. /scripts/functions +# Begin real processing below this line + +log_success_msg "Hello from ISAR!" diff --git a/meta-isar/recipes-initramfs/initramfs-example/initramfs-example.bb b/meta-isar/recipes-initramfs/initramfs-example/initramfs-example.bb new file mode 100644 index 000000000000..c336dda92b5d --- /dev/null +++ b/meta-isar/recipes-initramfs/initramfs-example/initramfs-example.bb @@ -0,0 +1,40 @@ +# Example of a recipe containing an initramfs module. Packages like this can be +# used with initramfs.bbclass or installed directly into a rootfs, depending on +# the usecase. +# +# This software is a part of ISAR. + +DESCRIPTION = "Sample initramfs module for ISAR" +MAINTAINER = "Your name here " +DEBIAN_DEPENDS = "initramfs-tools" + +# If the conf-hook enables BUSYBOX=y, busybox is needed: +DEBIAN_DEPENDS .= ", busybox" + +SRC_URI = " \ + file://example.conf-hook \ + file://example.hook \ + file://example.script \ + " + +inherit dpkg-raw + +do_install[cleandirs] += " \ + ${D}/usr/share/initramfs-tools/conf-hooks.d \ + ${D}/usr/share/initramfs-tools/hooks \ + ${D}/usr/share/initramfs-tools/scripts/local-top \ + " +do_install() { + # See "CONFIGURATION HOOK SCRIPTS" in initramfs-tools(7) for details. + install "${WORKDIR}/example.conf-hook" \ + "${D}/usr/share/initramfs-tools/conf-hooks.d/isar-example" + + # See "HOOK SCRIPTS" in initramfs-tools(7) for details. + install "${WORKDIR}/example.hook" \ + "${D}/usr/share/initramfs-tools/hooks/isar-example" + + # Note that there are other places where a boot script might be deployed to, + # apart from local-top. See "BOOT SCRIPTS" in initramfs-tools(7) for details. + install "${WORKDIR}/example.script" \ + "${D}/usr/share/initramfs-tools/scripts/local-top/example.script" +} From patchwork Thu Jan 14 00:11:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 270 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:b386:0:0:0:0:0 with SMTP id p6csp1103059ooo; Thu, 14 Jan 2021 02:12:22 -0800 (PST) X-Received: by 2002:ac2:46e4:: with SMTP id q4mr2920202lfo.413.1610619141929; Thu, 14 Jan 2021 02:12:21 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1610619141; cv=pass; d=google.com; s=arc-20160816; b=OphEQpnAxv4iaxoHa86iL+AOCvzK+X6MnAgtjcyfWBRtmUFyyHDL7gqOl0JSwdanAk mixwsMDmJ2h8lca6pfft0eMmcRgE3LUA0PO1Int7UUpCfS8cfm2o3Mx7l2xjM2rmQ9Mb 8WU+knXPBuoMobfrLsCRzUUXzeLWMeAygxMmU79+LfoV8TB8yc61F8y7vuu4EN0d2E5A oDCB5cj7thEgovu6HxxeGUpguFsG/L3d07M+PCtdU+F9AxZJ2tA0H9qXeC7+xyu9kxnO Azun+1zCo6eFsMt2WDH32zQUE6/m+z+ZW75WkbipiOoYg2pm78jPAV501G6OoagfNpCw /9mw== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=xJ5AdKYHOzzBs0FyXi6edoDPjM8aNAaMNcy1d2C8gW4=; b=yqlYgZEBayyp2a1rFNN0vceZlmP51JjXgP6C+Z8PciIWnX1YqF1vPftP5x9ppSpyEG HoSJ9tSDfZvmLvLgAuVzbhs3fsBXwQo4nE7v/RmSSkFPTxO4Cjg432zRAvplCsu9Qtx2 H/BVJvddMK/9148ASnl6Mj6piF4IFaZ+rKR9v1Qid1C+trNuY42Qt7ko/Lg3Jf7gGXEc sY7oUWKW0ef4o42xJgifsY3JqLxL8kvwW9oOi0O+ZFkCMZ9On0jQgY+Kto+gxKc5x6Pp onIOkb1SH2LbV0rfird1o7y6tO4IOhs4j3mG1lLsP45Slq8q0MmFEp/Z4NCQ8P75pQrk xHgQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=sphNqlV1; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbbnsqcaamgqelir3nmq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBBNSQCAAMGQELIR3NMQ@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id n135sor347296lfa.31.2021.01.14.02.12.21 (Google Transport Security); Thu, 14 Jan 2021 02:12:21 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrbbnsqcaamgqelir3nmq@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=sphNqlV1; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbbnsqcaamgqelir3nmq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBBNSQCAAMGQELIR3NMQ@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1610619141; cv=pass; d=google.com; s=arc-20160816; b=mKiJOoKa+zl58CZWuBE5Saf/xcZmei5xpqOh1HTMpiQqqJ0FZut6mTZwUGLiCdJP5c 1dj026ZXgYXPxDYMoQevTIp3ktjiBV+Jre93nuNsHUqWp9LB0Qh9Q+zBvqGmmwUlAGNm igD20fyLtAxs6c3oe+O8O/CXmPvzKq/hJValDfAgt4UO4GcOjscXx0JyKjGsnCB382RU bUNF7NYybMm42zRBc5Ro8qnNcBwZZBz/rbPLzdhnGhfGo4WBxPdVRqibFWRnvx+Bv2ES jIEyFcPvqkLwt4kvITqa2baAxTM6KCcMRDRWx8NY8ZiAiLZsSqMyO5X9c8rJTCa3RIiH CSZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=xJ5AdKYHOzzBs0FyXi6edoDPjM8aNAaMNcy1d2C8gW4=; b=Ia+uFHnltBmoBk4slGb+mfzQUJvJErsbFYBy2az36h9nRUC6C1FnIVF0fv6DTguiTB fXmSkz04x0BZ+u5eA488TsBFBkGMz2JSZN74+o2ebMspl04oQFQxZzxZXodHf5hDfwWn yXfbVxAmUAMc4Gs6V6S7/EfzqXh1rKyHkexjXKJA9NUzhotE4aOPT0KUxkxpD7NtgzPH Cn88YwvrWF0jbO8VUXVqJLE2nytAxFQs/we7dclC6uiNAtSKhX0ozZ5D9WxEppW5lRz9 2a37kYbP7Cynx+HNluSe1Qagjvuz378E3+TgEa2/0RIHm9SY7u3QLvMh/fzXL5ioUgd4 DFtA== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=xJ5AdKYHOzzBs0FyXi6edoDPjM8aNAaMNcy1d2C8gW4=; b=sphNqlV1t/Tl+uNyDG2RJc/ywC1uIXWhWpSeeEFUFYx906KT5AbcqI67C83hU6w7TM 60vIpLyPtV05998BTWMI4G+i+BZlf7kjC+sc2G2+CQ15iaTdFSzfNStaJ8OvFB1huW1V X/W6Y1zEqG/SF2mmHPufqmMXlvTQpzpTbbKVnAmkrWehJ+Tq/yrBqTKeZOdG7slBP3tQ zUGShwvthBKwVJnn+TUW2w9i6/EeckGuJ/1rW1P9YNQdPlOSPYbQY3dnFLnyZPFSXUgG t0GE1MFbWjJ6d7VLlwLqrdySIUlJFU9+CVjDCDqFXkM82feL+DGlBYHDZBQQf5wVv4Qe lyLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=xJ5AdKYHOzzBs0FyXi6edoDPjM8aNAaMNcy1d2C8gW4=; b=htkia0pIcGF9CwmgxQYRX+LXFCX7O1IDNRzhcPaHdZXNr8u+Shc0YMAyoSVIwPQkjO ATaKChQb/Ve1HX5su4buOSF+TmP7mNhh2aI2QG9AGkjY0pojrLDgJawEflO6b1ttBsI2 J70I7/uQVyoFhRTZr+L+8eOafpTa8E/CcJ2iYNppWBDypl3MlZHfUzNmErduGsDtpT0f GACwVeubwpJktz74CrJM/MmDiuQxo9Q78I6HEHXgknYxgRZ86zeHRUGSUoLiarP0rWVc u7UVEYrIAHzQ42PzyTeUFUATfoPAwTK9qaazokXlqYlkUnbTeJwDfkI/nRTpfHRX+bMi tRzQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533dgHZFTGYwUrS64rWw12Z9XlyjMyUCpBohgM3QyHAF8qz6bvgC EW6ouEN6WzqwMkDqInDFHCo= X-Google-Smtp-Source: ABdhPJx0eczS3AF0ePhKp6+iTzm0kxxIuaIK+H88Du0xV+3bmJud+ZuslZS+MIwGfrMDGJ/RJulKeA== X-Received: by 2002:a19:7e01:: with SMTP id z1mr3015743lfc.450.1610619141331; Thu, 14 Jan 2021 02:12:21 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:6145:: with SMTP id m5ls761611lfk.2.gmail; Thu, 14 Jan 2021 02:12:20 -0800 (PST) X-Received: by 2002:a05:6512:3e6:: with SMTP id n6mr2864731lfq.262.1610619140321; Thu, 14 Jan 2021 02:12:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610619140; cv=none; d=google.com; s=arc-20160816; b=eobHpwAPXKLZYunKj6Lp9lmpsdle/h0fPuI1CN0o6D4uKRprUf4BHdXY1M7CcPY5m2 Xg1F4Tf/GtUi/BOe+bxGpwvFHJmkbfpDbxNuZagSssqKpVHvAiCj3gWulzilvl3VWlSx EPBc41bEf+9RpuGzqIlS4idXRI0TBiAo+lntMwsaF4vjM0S5Tm5QZn/i4xEkjqI6Thuv C7LWuT66s8RhQHsCL3Yfu/3K66cMCDhDEpkHYFwdX9u5P2InOSTzdABSgnhHGWu+/h0N G07qL87Fy1XF6fdeXjwVrdUC9TTKN8/0xjVsDZ7AywzDQWo4HUaGMPxdEFNgKX+0ggCD N2iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=2fNbuz6Q2xsdI/g/6S0ppfbAFT2EwfuCmb667GHBhnU=; b=RwLjgMNCVqNt6LqGqKrbOkAwhLXNg1/dii4HysLaW3T/LY+Qf4dKfC7F6Bs8UXCX7x fxptLSPBDZA4Iv21QXTU4RyLzYpTaiz14QxFwZM6CzlPGwOTaVA5GSjUcrZNPKs7AA9c FZCk4/3WyQlizucsMefMRwOgODmz71aWGbU90ckAEW11+PwBWnr8BY1PLAFf41RACt4T /60cWl4ypIO5JFL4sLd3Mwjj5u4Piap8My9ASMdtjXfLw99caAodpGEafjj9M7VRW/GU VRTfwnZQx+3OsEXsw6RQ/8kJ+ck9AK16jCH1/ijhrB1wh14PmFMPcSKhdQPCGCigFxJk BhlA== 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 Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id l8si178195ljc.2.2021.01.14.02.12.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2021 02:12:20 -0800 (PST) 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; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4DGg8z65NPz1qs40; Thu, 14 Jan 2021 11:12:19 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DGg8z5shGz1tSQP; Thu, 14 Jan 2021 11:12:19 +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 pJ8WXicj_KF0; Thu, 14 Jan 2021 11:12:19 +0100 (CET) X-Auth-Info: s2nIQBBM4cyrsNn9PRlWQjukxmpai8r7Tq9lh5tpn6A= Received: from maia.denx.de (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; Thu, 14 Jan 2021 11:12:19 +0100 (CET) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler , Jan Kiszka Subject: [PATCH v3 3/3] Add custom isar-initramfs example Date: Thu, 14 Jan 2021 11:11:56 +0100 Message-Id: <20210114101156.243184-3-hws@denx.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210114101156.243184-1-hws@denx.de> References: <20210114101156.243184-1-hws@denx.de> MIME-Version: 1.0 X-Original-Sender: hws@denx.de X-Original-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 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1678642370253287442?= X-GMAIL-MSGID: =?utf-8?q?1688856577127795138?= isar-initramfs is a custom initramfs which additionally has the initramfs-example module installed. It is also built as part of the CI. Signed-off-by: Harald Seiler --- Notes: Changes in v3: - Add this target to ci_build.sh for CI inclusion. .../recipes-initramfs/images/isar-initramfs.bb | 18 ++++++++++++++++++ scripts/ci_build.sh | 1 + 2 files changed, 19 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 \ + " diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh index f4c33a37247e..f6fc5e54f7d3 100755 --- a/scripts/ci_build.sh +++ b/scripts/ci_build.sh @@ -28,6 +28,7 @@ TARGETS_SET="\ mc:qemuamd64-stretch:isar-image-base \ mc:qemuamd64-buster:isar-image-base \ mc:qemuamd64-buster-tgz:isar-image-base \ + mc:qemuamd64-buster:isar-initramfs \ mc:qemumipsel-stretch:isar-image-base \ mc:qemumipsel-buster:isar-image-base \ mc:nand-ubi-demo-buster:isar-image-ubi \