From patchwork Mon Jan 18 00:07:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 272 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:b386:0:0:0:0:0 with SMTP id p6csp2288831ooo; Mon, 18 Jan 2021 02:08:46 -0800 (PST) X-Received: by 2002:a7b:c4c5:: with SMTP id g5mr7320417wmk.170.1610964525968; Mon, 18 Jan 2021 02:08:45 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1610964525; cv=pass; d=google.com; s=arc-20160816; b=wZjoKUxxut4X1a/v4tC8qNvAHXbi/rZuClGkN3RlmjpZoEOHdR1vUvAiabGTVIN7zj N3anc+Y4gJ3YDCArABmIC/9c3r3+2TjFLGBaC9AHvwDZ/KyuumJHFLHf206ajFMSrh5p +HzS5xVpDkGePM/XY1XPOloz/4uxDWKcmKpGaS7HgLv+/NnQAZ0ZhdPlMRoggFPsdCiB OR9fd6v/XCQNIxPA9rqUom+aJgsqD7DyahVm2cB9pUyJjqEx/RUlRJO41O8sq5oE+C/G aCYzjtDaLHpJHCzjwGO/qIltqRZf6Z2jlHW8/7hWr1IW8QX3cIF9eZWnM7nUeWIOTuZy E5gA== 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:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=bRVz02yMLj5keX3PSCx+MwekgP45INpJHvSckhJ/InQ=; b=v9LfIPrcrMnMbOUDCm+RV454yZmuAgo55Gl66N80cgkV4q1YgAnWyb56FqAxbW2Pii vjds741biZoE5NVK3+o8lypxn74QHP0ucFhIXkpGPODXE9GTYiS+r8K8rACF0FuIAEaF uoIL2QIRJD9wTld6aB0QeD/bYA74F1GNi2l8QTk23N187HDp0q+193OUyFLiVl3FuLKi lGQCes7T16dBu5PTwJxK1jmjdtrFBvLXK06noejqV6KmRT9abDTjGSTycOUB4iuU0xbM mzZq1mAC2acfS9BvEKFnFmSf80nuJqnouDNymUyGtP7vJuPfDXPVV2cIDJmrgxc+joR4 LHcQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="AX/nSry8"; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbln4swaamgqech4juqa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBLN4SWAAMGQECH4JUQA@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 j15sor3877895wmi.0.2021.01.18.02.08.45 (Google Transport Security); Mon, 18 Jan 2021 02:08:45 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrbln4swaamgqech4juqa@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="AX/nSry8"; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbln4swaamgqech4juqa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBLN4SWAAMGQECH4JUQA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1610964525; cv=pass; d=google.com; s=arc-20160816; b=VJutclhbefQ92Af8WmQ4BLiWHNzTD54UvvKRUJIqwdSZHNinRbVUvu82NzWWVparhp tHcgzxScY6ABd0iawomg8t5iqoJ0ZeFOphR9ip6ao0sFsGDzSjO6LQQumivZADLkVNYD zLxAT0roPetQjW3Mf9S62hxxwIsEccRT210/x+o4AcM0ueJAMPBmrs1HA+pxMgoH1OuT VyW4G0/ckobxBI9bxrp41dX4+eF/M+GUQ4Qtfd3UHilXEzn5Oi0udKQ3hBmgCCGe3aCZ jcAFg5Ig7RkY5xjrFobfW8Z6Ut+ODHxDZNreSCkv2ejMVLCL5fdeuZW9ZKp1N5b7B+af NgyQ== 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:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=bRVz02yMLj5keX3PSCx+MwekgP45INpJHvSckhJ/InQ=; b=rnDIAXaa9KaORPmWAPBWhxF+zeK2CU87MSkYpoaxAZJNIGAupJeY3sQk0apy0VUHUF 1MzBX65OZvpyP4M59pwV370xxWHqNpQPTHSRtG9GTrODxaz0yVovHBadVlgxgPSGkUCl Wi7EALxAtFacEj6DQ7wPupY3ch3GLR2dWN6ZYJm11+AaWokq6AhFcQD4jodDjZhYKe2X 56SKcN/Kc1fhXWh5LED8oONO5sC9a4CU4/x6zIVL2EW0kt38xVLXLRUIyjQMK8XhbEJn Kbg3w+eeRMQkwTShkz9O61JIOlnyridSuyv3vAXV2/4fuflJ+bPHABrdwt7S/+l3Oj/E SrSg== 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: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=bRVz02yMLj5keX3PSCx+MwekgP45INpJHvSckhJ/InQ=; b=AX/nSry8VOxHVV5Ccz8XG/4mIi3j2Kvi1ev2RPn/4tuqM79enYiPyiMIEvNKkPiSSW ksezWW9WAubsbC/dzy+unCj0fK2oUp+mEXcyL+r+YjFxEz/ztd/80DuCFI3q5to7yFug 8sNRWDaiRLnfzhXCyrubCychCA9vJCQKv4Eu456lDiBIZevF3ZUrbd78zvF2mF4jT+N+ AZhESTz+CaRknKDFuRPlsh/WbRb8w+N43faZDHcudSrenIZt+Bmai8OQb2yewZZbdh2V Gr/q1Jel7PCAVi+NVaw9VYfhIFNUv8vtONEybTdGDYCl4/IFxZA0t1NUCRdQIjKuZBVt ITjA== 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 :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=bRVz02yMLj5keX3PSCx+MwekgP45INpJHvSckhJ/InQ=; b=ICdNNgRmtB1BU5Sg34OqKS5gCc1L4BYOhiVZIzyIIXC/0wcH6bKZTwJthpq4B5z9fD +b7lub4XOXMQkh3lcokjo7qrgGFS5nNxuwdKGw/FjdLv7eaym+eV296JqItLFWIeenzM 83ayOWvC8T7+PgmhHU0EQ+JtBtHPt0NDrTqAo40IBp60p7R8E9ghWl1OueGOdF2uH8oP U1ZKc0atM5cotRclOJHFwxVToWx5WBolvQF5QT0ESTCOqWrJf6EtcUh4Rs+eJBeGFqC2 yJEtGKPIqqd0Tgb8BVfYQ1IadmaRQF0KJFKm5VQdZKCTEHnA9LMsPjJotM51rpOrNmhe 9TMA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532n16bFwyNUoIUfZB/+eQeJKqllNJxFGT11lGm65pkCFjWVCl1X FdEeafLjl3lZra2Libp3pLw= X-Google-Smtp-Source: ABdhPJxvj2FyiAay7BHXFuBN+7GqfaB0BCrvevTP6ACnbLPqASyuXE4NCtwPN0XovSslSnMrNx6XWw== X-Received: by 2002:a05:600c:21cb:: with SMTP id x11mr4356828wmj.29.1610964525711; Mon, 18 Jan 2021 02:08:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:bb0b:: with SMTP id l11ls5262752wmf.0.gmail; Mon, 18 Jan 2021 02:08:44 -0800 (PST) X-Received: by 2002:a7b:c018:: with SMTP id c24mr18955085wmb.41.1610964524918; Mon, 18 Jan 2021 02:08:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610964524; cv=none; d=google.com; s=arc-20160816; b=IenOV/tAAY7fkhjej6EkX8o6nudgUOIKFiMvKIK72Bf+Xb4usltcdyJZmmAKVtNQVp x48shZgnCV03me50XOYmUBd/L2ZGsRv8CwXgnnf+aM6x0x6KYpVjeyqCZbrBhwdZloZS JM5T5PKCSJ8lX5ch1m8vH0QMW1nbo6oqXwPnXBwu/EV7wOCbe4oAphBzu5VYYZElCvTs egLi/0pXik9+mzw6U7pt3vJoj3xG1Yc0/9xhriEANaYhtiaB4oLng1p1CzWu8Y+m1lkh MewvfWkTXxilHfe7009YP5I0zRt/jdaMiDu7w4IM6wRJboj/ssmzxmLdtx7geMyl3Gq1 zuHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=1G1/+m9Q3W6gNAgtQ/j7MXyklTfOFBe6nhNdxG2A7SI=; b=C5jb6qE0te+O58/QGHblGRp9ESXPTsRzyWF33Eqs57xUgSBEIJgSMypq+vr9EmO4c6 gEfKx8E0/y+fx6KsIMQ+7pjHEMxwLkhXpu6cNDGiAkFaeOV3NcuuFrbX3MiygMYzInSx S4x8b6MTnRnNvv0M1GVkD8HXHVFp8ErrBn52qv7JpYpnaAUZGUdJgoGRvYHxXLgwivaI SDuwdZ+Q2wSxpT4yZ4GTOTvUrP3CTW/EVa0Aq1Y7QwKQ6eEZVg57e7gXkE0ZYWKxTOiR Oww6KRFfzm4+58EbY3y8DW1pCQRxR53295bRh8z2CZg4+IRkI6GhQNBzt/cMtaDiZRdX jtRg== 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 y1si773550wrl.4.2021.01.18.02.08.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2021 02:08:44 -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 4DK6v04Xrjz1qs3P; Mon, 18 Jan 2021 11:08:44 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DK6v04CF9z1tSQn; Mon, 18 Jan 2021 11:08:44 +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 36vuJ85oTk-4; Mon, 18 Jan 2021 11:08:43 +0100 (CET) X-Auth-Info: X3LQtA+qypJQK3P9OAiRUc7obMS1Va9h4PIdKlQfCJU= 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; Mon, 18 Jan 2021 11:08:43 +0100 (CET) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler , Jan Kiszka , "florian . bezdeka @ siemens . com" Subject: [PATCH v4 1/3] classes: Add initramfs class Date: Mon, 18 Jan 2021 11:07:27 +0100 Message-Id: <20210118100729.138523-1-hws@denx.de> X-Mailer: git-send-email 2.29.2 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?1689218738541676172?= 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 Changes in v4: - Add ${DEPLOY_DIR_IMAGE} to task [dirs] to ensure it is present. meta/classes/initramfs.bbclass | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 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..10a642b1a6be --- /dev/null +++ b/meta/classes/initramfs.bbclass @@ -0,0 +1,42 @@ +# 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[dirs] = "${DEPLOY_DIR_IMAGE}" +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 Mon Jan 18 00:07:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 273 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:b386:0:0:0:0:0 with SMTP id p6csp2288850ooo; Mon, 18 Jan 2021 02:08:47 -0800 (PST) X-Received: by 2002:a2e:2e19:: with SMTP id u25mr9766786lju.468.1610964527364; Mon, 18 Jan 2021 02:08:47 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1610964527; cv=pass; d=google.com; s=arc-20160816; b=U5tw9T5dQpBwjwNokoB2HlHKCOtEL7EBb/SeIA0pSJeQy+/Bp7uC51jgPxaHFVyDRD 4SfoyVL+RNmJMcJokO8lsTw8Xsexdmpkwk+sq6hLNXVaWzuppoo7IksgRwANTKRM5xEK y0z4WppgLEKaWuJHgSlBrEKOBOB9HVr+b8axA3oiAE8ShN4IuSUHuap6u+Vs4kvyNsS8 X1oZuUNNINjHxN4g6j0TFJsV50qvOTj0ZcsuQuY5T1n9HsKdefc/oNZhuZu9eQQaNjUn g6bj2+rb3ovL/S/QL0SXY7HxMndoX6+MtyhNDIoE3pFOK0NMCdtk1TIy8C66PcqIEjs6 ommA== 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=IXRSAhrr+rcGaoK6fk/XvHgMYHG1Xct/1Z1iupZf/Q0=; b=hwsgaJN8LRpEDy6Vct1XumHKtkleS9ORLChhv0nU6GU9WxwreC/CqDZXc3kJ0V7baJ V06DDhNNX7/GoWyj5pw1aZCINMzg7c/le1bvNpN+3dnYzjZsLG8RFD4uzEJpRBacOScJ zlxSYNfSrCRIjUDYzq6xB2bjQdVTD4ytjBsjuFtXMhvRd36D+/eKVcJz0OK6Zp439nN3 gch+BgFAGgCXegmx3l1rj0eHzWtmH25DxnVLGoLGLhBsLzI5a3poE5p9ZTB0KIdtyA+A qPSMBN8f0jkg5+elzTB+nQMdzKjPQoFIJgue9L+ECe/XFtmKOPr5poAA5yroAQcVmq+6 Mpbg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=JZy867gO; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrblv4swaamgqekiqblei@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBLV4SWAAMGQEKIQBLEI@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 o13sor3753120lfg.44.2021.01.18.02.08.47 (Google Transport Security); Mon, 18 Jan 2021 02:08:47 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrblv4swaamgqekiqblei@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=JZy867gO; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrblv4swaamgqekiqblei@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBLV4SWAAMGQEKIQBLEI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1610964527; cv=pass; d=google.com; s=arc-20160816; b=GlBPIbVl6akGvjHOfxXzCfVth9FesecbhPWgBP9rSFommXtttNn0lmbG2o/XQnYR2M tYlFtDWErCIcN5SnmtYuVmNIiEWuO4JXkFxL9Ae7HKgfXaM++ET1xUO3P8+301rId11+ ClVIL7Wh42zd6P89l5V277daKZWzJeInufwP++6vf+32J5FAyeep0emALpNzGVNH6qnP ZIboL8esqa84VMIhtLRkUHYPqOCJIPxYJ0RGjojtd51rfhu85qpUcj3vWRIwM1/5OQxp X2rj1E8leNLHdznwgi0Gs/LndZxuJwe65Qp0f/b6pxJz8vgxcHS0NNmkHXNnp0OWFJ9z nWqg== 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=IXRSAhrr+rcGaoK6fk/XvHgMYHG1Xct/1Z1iupZf/Q0=; b=I3zxt9PLHNIi3/yTFU261Rq0l06dKVPX1415P7PwdUj6YNUmLt9vlB/L55s5zPRrD6 weS4jz5prxu8TqL35/WfEj9wogemQaOuCuNwD8Rs16AJFYwhgiPgpOYzklYWCsUb1Eax krRFaNn8e2LN81mjtpxYfBnOexnJLHmSV8Y9+Zf5/+oPZNNIHswcj9wK1EBcdMcVcTbu jV/nIJdrYR11g+yLQ7HUP25ryUEzmdrUoSY3YbyTWPbTJpRw646E6KGKfqntElNygBIx YbizQKJIESdipc8rjIeAR2VjEABOt9vKPTX/ozu5O/16HMqeGn0BVZgWY30TcW5SYICj mQYA== 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=IXRSAhrr+rcGaoK6fk/XvHgMYHG1Xct/1Z1iupZf/Q0=; b=JZy867gOluNzNVKPBZKqVjEKPLln5/iGoFUhWJSQHU9VSdieKcy5ejF7sDKo5ITEDM ua1FeiNoAkmzgH/wsmBoWpM48j7kbyDrvCxO4EBkpi8Q+3QsWnCwhT29JuWKVRQvmDzZ V7pv+KxsY8ZZ9sX9ECJegIYvBI7/oWXq5/vokuaNLhhGFX9QqOtyf4Rd/vgAR64jf2ZM r2fwkQsAzJmxhTSfRhv8kEC/D+gs0hexFWkFQX6gG3HMfXaZy0+2JyE4LW1x83ajd/Kr SSic3qvYpj3gi40kaBfk9WjC4thOD5e/hSRXQvheE9hbbF00CogFT4pGBvokBStHHCoi ujDA== 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=IXRSAhrr+rcGaoK6fk/XvHgMYHG1Xct/1Z1iupZf/Q0=; b=bOP1yjZyRaUYAW0TBHgXAX4fWZ4i5KbFcEBnrYfOnjQQK4yGrhYMsh5euGooBOFXqZ DFTUD/L7ujNTdZtd0ofOVC7VNHMBY9070tIBwuSiRgmQBtPWjTuDyNHhHaYGKwRQUkqJ cTOQgOuUixKJX8KjEwob9oT6r10gOpRevy0IYZ4stdW7LfFydB7foyf/iqEKqumtt3N9 vO4fDCYRlUcqE3CKgvzS5e4A/kbn56zUIhSav/4bpWjx8ur0tMphw8PB+lP5n387WuPg xZz11yUL6cEcjksDZTPXILv4V1gDXiBLUWov4Hvb3N7kcX4Aa9+dcY82GaoGhFYjqJdO pa7w== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532Kogx8SxdMBKm7mSIJBpLI11aBzsNDNNSgQCGEeMAUXTVqWIcS qvAmhbia3BRWgbb36cHXVJw= X-Google-Smtp-Source: ABdhPJzmLWNwFx0VzGxPBVmu1eznQVjCDbX9XnBfQDZT12qiqMiixkovr2XxbfQ3ZtEAPt3az8ChiA== X-Received: by 2002:a19:797:: with SMTP id 145mr10620374lfh.651.1610964527072; Mon, 18 Jan 2021 02:08:47 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:6145:: with SMTP id m5ls2435121lfk.2.gmail; Mon, 18 Jan 2021 02:08:46 -0800 (PST) X-Received: by 2002:ac2:46e7:: with SMTP id q7mr10516397lfo.311.1610964526208; Mon, 18 Jan 2021 02:08:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610964526; cv=none; d=google.com; s=arc-20160816; b=wiixAjTYmkfsNzpAEhhERuRqiLOoZlPRJSin6PuGAFa4BNuf+LXXs2krsNlPxKbb+2 wNgECqECx8G2oA+TafjJuPIzo5RVv5oEkcIjDnv/SY/hNOfI9fgjtUnMtMXwSIfU9ITg 9HbSLa4BPsCD12PD3PvQSzNPLiTvJUp6x5wGJC3IqU/YLaqYMaSrzA4j9tuerx1gWE5e ZXwfHpTbJBvO7MnpK2dGlSZPUaxCHHKDqicxiwZw/0tUmSJ7vPn41V/5NGjq4r70eSIu U6CM5tLU1WI4LcVqGPnF2VvSxeteP/Q9tDuBr5Vfe5bWcB7vPMhSJqCbRqeOG5f4kzNg 8dqg== 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=CDVew4gbAsnRTQ13Xl4RRpCV1PfelN0ZqX1Dg6Zz4SI=; b=fKYny9/gpMuhF/060sne0R3gUntq1mO54zvWsuu9U5Tz/54VpKV449uncG1TlrDEgg hwb1IY11VKm64ZJvz+y8ZTYpPf4FKgQhMUwxsgB6j9WYFGS+osaNmgz2edmPf1z6XUiH dSJVLjOhLDrsMYTcYUEVL/gkPJFEMpdnHWWAVq1bES1HlMu09tY9xyi+4wpc9JsWoKHN yLaYd1EfO3M1RIcIRklMFXXIt5/hb88yEwrJ2RrfNbqZXFnGbn25XDDvhhv9HN1swbDj VMuoj3hNHKjjFGVWMnrahRKE0wzhWEpkd6PBDPc+Kx7trioOtC+AIpCEgGWq/gUUP4z5 urMQ== 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 r12si595531ljm.1.2021.01.18.02.08.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2021 02:08:46 -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 4DK6v15mXzz1qs3n; Mon, 18 Jan 2021 11:08:45 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DK6v15TMBz1tSQZ; Mon, 18 Jan 2021 11:08:45 +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 UOggrWUeQgI1; Mon, 18 Jan 2021 11:08:44 +0100 (CET) X-Auth-Info: TDL5YHWqIAJcAWDT4PJkqqCapDXqC5c5CHWbtCOHsK8= 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; Mon, 18 Jan 2021 11:08:44 +0100 (CET) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler , Jan Kiszka , "florian . bezdeka @ siemens . com" Subject: [PATCH v4 2/3] Add example initramfs module recipe Date: Mon, 18 Jan 2021 11:07:28 +0100 Message-Id: <20210118100729.138523-2-hws@denx.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210118100729.138523-1-hws@denx.de> References: <20210118100729.138523-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?1689218740138428341?= X-GMAIL-MSGID: =?utf-8?q?1689218740138428341?= 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 Changes in v4: - 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 Mon Jan 18 00:07:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 274 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:b386:0:0:0:0:0 with SMTP id p6csp2288860ooo; Mon, 18 Jan 2021 02:08:48 -0800 (PST) X-Received: by 2002:ac2:43b6:: with SMTP id t22mr10803686lfl.32.1610964528588; Mon, 18 Jan 2021 02:08:48 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1610964528; cv=pass; d=google.com; s=arc-20160816; b=bMr3Qeh31T7bAygjXYmiKJO60L0pEzil/2Kz5LUaaqovkhSUCXnDNWwPOZhuKC2kr9 NHrveR8jSAq3ogAZuFhpOd+zjh3PRU5yCzAewUFfMgKcHObq2BsvYQwnywLWV9OFghgA LN1w9i3jxLmH3n3ZhyU3cxqY7JUpdGbZ5tRCGsXeZtLxzUn6XzOih46z29Nv6phqE7Rt pIUaG0HYTG9lc7dlGEXbNwzIPXMLV8YS8SIKQFnrbwYNSY4pbpV9M2/UQa/qWJnJ/jIh AsGXv0Kpr5MBg/Je5CO1K8BN3CZ8uiQo3ZSP4XYHjsbZmMy0HxCNoAu2dsPlSvnC5hjF ML/Q== 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=nLSwJCF2jde03O/SE3HO9AlgrJh0TDvbn0xdk0pr0rI=; b=LYMf22v1fyuXD5V9fvGUTnEfJDAzkeHFJuW8ohHRCGaBQAGv0KRjbNAjVsRcQKiYZb 8wCRc+QnIEjt6VcIb3kTZAP8ua5kthnklG3jS3j8DEp4fxRmX0EssvCqxFEnidKboIYA ue7EvMNcBq5DcPWsIE8DmXgY/dLgiWeyFFuclev4SjpWH25w09Mknw/6hz5uJGsUsYUH 2keCRf96Q/R4N/SqLJO+ASK7V7ZcVceXfJxsx+DldvoJr8qBBM/gISMxl3gVIZFt6MJ8 tj4a1FVf+kMTl/k/RC9YlHAqUkf2KWd8i/imqnkHn8mGGWqaeXvCQzrQhHyiY1uV82xd /s2g== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=OTbGj5TH; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbmf4swaamgqeknkvr5i@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBMF4SWAAMGQEKNKVR5I@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 i6sor3982504lfg.15.2021.01.18.02.08.48 (Google Transport Security); Mon, 18 Jan 2021 02:08:48 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrbmf4swaamgqeknkvr5i@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=OTbGj5TH; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbmf4swaamgqeknkvr5i@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBMF4SWAAMGQEKNKVR5I@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1610964528; cv=pass; d=google.com; s=arc-20160816; b=Jv1Yi+iiXQHC1QZV1zLFN2VfugZd66Lm7Btb8XEWk1TdmA3oOTh6yStWXjMIcbSJz9 aMUfIQJDlSo7up3vrKSDidWNOKV/slscjEje+QqiXW9ba1ipyP4WAQIVKA5zxWDHdLc6 aUQp3GGPbJRclsG7iy9kWUCLRxf9ahoPB/bf8rhLI6PgKdoieTCm5bFOnJyyKcITTQ5p DjAh5rmnhZlgzhMBU2fLZajG8mYrKtaO8bVajSLcEjcLJquUjRuTi4EFLh7bNcxbG/+e GeKWrsq1XS8RprvxbW/c67G7TGwW3FUVoo+owO/E5dJMRXVAaycpWD1l+XP55bEQ73Z6 /uEA== 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=nLSwJCF2jde03O/SE3HO9AlgrJh0TDvbn0xdk0pr0rI=; b=fP4JMOfzAEuXaEB0rwILMvPzxnAPN5a3mal6qF7FPn2F2cVoCHGFCKqcn4/RC+eRfs bRks9JaZh6Cuufixkdcdm9sDtXEg5peEqAS73p0P34QYqnGlJ/QFLeJcCmEfLxsCjrA5 UY2S4OkVW9GQYOR/D7lMu7E5LK2sW4Ry9UmZCoUv82X8WsL2bDA73l1CsV5YCujweDJg QaRi/pYv+/K6s43vmBUK8ZqBWvx8KSj5MO0EwqAPXIAJS30xo9YNQ88V+iTtkG+Jkx1b x3iEQaEpdcy4a6uqR5TKen6oTJWtRDR2yjEcQGDOAEvhHirupnUxGkZlgJ987Vb7SpWr JBXg== 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=nLSwJCF2jde03O/SE3HO9AlgrJh0TDvbn0xdk0pr0rI=; b=OTbGj5THi972hhcpIP1IchrHJgl/ZYTpAa2Hxa58q4ZaI3Vs3Ra+8eP6CzfWENVg7j FHMAJ8uq9oxdpAdYOYWdpWqK1OHl8xiGUYQmCiTjcosqlqbpIemAM71pi7sBtnzKR1yc RYAr3HjCJ1uKiz+kyxAglJl0pd8Yc4aCKMNk/9GgcypMWQax7odqt6xJjWEmcuc/Qf72 8GBsnhx2t0+IoYr3nk2Lznhz6JSykLvuolYU474+RFV7POQ//eNQeD1NJ1O+maq3yKj1 B85sKMxXDM/rXS2yAsaNA+j2A53MiA4WzeKfyQwDtQ3ZlPQl9fh/g5G+6NGoC91JXnMX TJNg== 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=nLSwJCF2jde03O/SE3HO9AlgrJh0TDvbn0xdk0pr0rI=; b=dJ87tDyVsdlJlhHf8Pxk7Axx66WDw/u5pkd8cnxJGRFz5JdB4w5Q9tsztHFVvB1tP4 5A9K+rkAcQRJSe47m4IQzGTFjq5UF79tTE/k2oIV4oHKyYUf1aPdAgci58TQR9ioHUwO wzN4SV2+xy99rygjemJXgQ5YvGflmoJeVfp3/ao7ZFjCMkoZNSRsoZrJAeZy64/wzleF E3W0lvUA/LlQOiVvx98gkLfZI9Jd6vzJbZczSytFK/MuVrdh7ByiIWJoNS4DoxuewVat d2aW6nuzzFcLypFLHfcqy1nYA4n648GCjP+QMIUGUoL/lGmrNGRzYoPzOzZjRxhMJFR6 Efug== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530UWZAX5pnvszevqZ6+xKUMB7ukY+bvOBNonaQn09XovmpS4LMK TXbBjKEcgy6aCySo+PN0opY= X-Google-Smtp-Source: ABdhPJxRkuQOKOFM/6jk4qZy5Jbzmr1CbKNmWBfINxYnompDBuVMIP3mp9nVXesIotLAYkXF24uPNQ== X-Received: by 2002:ac2:551c:: with SMTP id j28mr11292975lfk.474.1610964528295; Mon, 18 Jan 2021 02:08:48 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:c1cd:: with SMTP id r196ls2434506lff.1.gmail; Mon, 18 Jan 2021 02:08:47 -0800 (PST) X-Received: by 2002:ac2:44da:: with SMTP id d26mr10190166lfm.221.1610964527351; Mon, 18 Jan 2021 02:08:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610964527; cv=none; d=google.com; s=arc-20160816; b=R+6nWjRZb8QHvom093fNtSeSwwRmXuxjnY2+w95+DSycOHY9JKn3PsB+4Uh3UoFMKJ fbA1zc3Gn2S36f+IFFxoBT4LuGn24N/mZotedObmCbKR2sS111p4Ygbhlw+sI79Qeepl SUvLrSfxWb6ikErq/2k4/l1XrWHGXCiq2zoIm82PFT6YzjY5B4frddRZiKJP2pa9+Djx 1m16m5bn79SrsUQZAaLu5v2I8ZyDcKmAlNHmtw+SXEKC6rLa07a67IROFjCJxQTpkaqo fN0LY5y+buzKRggzMU6D5PVvq44PW9ELNt8fZcT2fhT7C7Ukgu+dDeMgKVWLDeTFv3pq JDFQ== 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=LvtK9yQd1UPluNo7MPGxc/bi46j/VwgHVQ3VJnb5Gvo=; b=iopC4w6Eq+plLKSi28dOVhSOrryPnM0W7AXyHXkSK1TVW+8n21nTgO640YIW4pb/iK LJQFatC3Oatqi6e1pxJv0yeaedYU37u2LlNbMGupg4GKIO1kyHBR6Jw3asfI8YW3K554 NAKfMluz7Vop8JhoZCMMsZfy3Y6KWrbxeuHvsSuCnzNuTuOBj0QPl/1yePnausLqRaXc KA3zTOPzkuMmaK3J4Nr2qApi1zOfmbinv9GD204X3pC/DCiWpX1Urs4+FwAp99sCfkPK yLmJNtTVUdhzI+MB/iXZKohE3YL/2wcdhP2Oi9ysqV8W1h0eo6HtwKlqFaDGDK5dgfwA chPw== 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 u25si697303lfd.11.2021.01.18.02.08.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2021 02:08:47 -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 4DK6v25pBhz1qs43; Mon, 18 Jan 2021 11:08:46 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DK6v25VlQz1tSQZ; Mon, 18 Jan 2021 11:08:46 +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 H-bRwaaZ7ki3; Mon, 18 Jan 2021 11:08:45 +0100 (CET) X-Auth-Info: Td0RRJQPPftOKfM+VY2yzIRC8nOWSTmIhfLBVIgnNr8= 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; Mon, 18 Jan 2021 11:08:45 +0100 (CET) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler , Jan Kiszka , "florian . bezdeka @ siemens . com" Subject: [PATCH v4 3/3] Add custom isar-initramfs example Date: Mon, 18 Jan 2021 11:07:29 +0100 Message-Id: <20210118100729.138523-3-hws@denx.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210118100729.138523-1-hws@denx.de> References: <20210118100729.138523-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?1689218741542985004?= X-GMAIL-MSGID: =?utf-8?q?1689218741542985004?= 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. Changes in v4: - None .../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 \