From patchwork Mon Sep 21 02:42:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 60 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp3403918ooj; Mon, 21 Sep 2020 03:43:03 -0700 (PDT) X-Received: by 2002:a05:600c:28d:: with SMTP id 13mr29038763wmk.69.1600684982855; Mon, 21 Sep 2020 03:43:02 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1600684982; cv=pass; d=google.com; s=arc-20160816; b=eXbBOaWXxonXIu6qX6sE0s2qQH6f10j1LGXGHW4QVpTrTUt/Wl+vbdrB/I66n6uWQN eozeKY0JNeXaJ1y1qdB0xNKKd3zPhX1mJ1BrMh94gd0/aLCTydZiamhWDTfqS2GjqEAn rjDJ9gxlKO9AeuYnenLGQPhjgmHy5Pe3uwDvznjcMfI3zeomsKuH9EzYwQd6LZUMRfGt uWS8R1U5Fasdj9UeBsv0r7PZuhHnONWgH/xMWeF42X6TZciW+EZfy33wZRVQ+j0uaFZ4 XCCXlZ3VRlCdP9zyHpA/eissvCuPyzh3sdrljKifu/kXqqBUkxnOyEBqPbuHx6wSoEsy 0ivw== 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=putdVWaS57fFngco0LR7Gm+CKMaldTidPD/az+KSCug=; b=y/keAkAsrrTzB+1v9vYCjAmlYQmlZB1Z7FPP5OehEJnbRuno3y2UE8XfFPxp/HUlx4 h03reKcmjOESpS3Ga+BsIRNPqf5G7raaGm4z9NVqEMaceTyOJLRPTNcddqMgKl3woEht WQpz4BBVg8Z3jjaGEEywuN2dZ4a6DqyrQ4gRisLPrBYJQPdGw0wb/Jx9KyhqxnY/k1SZ DmcO4Y9GG/JmiezX1YMwElfuwC4wKAyVIrzjqxdFXuzD/aeejLxMPdln8cx4aknMmScL wJeXNteJYfJ6bj6UdlaD9y3AsqvgZo8TXfKKMKFauI0Wsnd/PvuQx3WRWHRtIQJh8n1G OeuA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=fGPYss08; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbnuhul5qkgqeo675t2y@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBNUHUL5QKGQEO675T2Y@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 t22sor5145350wrb.25.2020.09.21.03.43.02 (Google Transport Security); Mon, 21 Sep 2020 03:43:02 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrbnuhul5qkgqeo675t2y@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=fGPYss08; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbnuhul5qkgqeo675t2y@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBNUHUL5QKGQEO675T2Y@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1600684982; cv=pass; d=google.com; s=arc-20160816; b=qhpKs5Pem3lV5keefupnSju41MBFWTAY3aB4YR4se8o6hJO37xheb28Jz/iJonKOuH l4lwGpumf8nnLwAHMsAjV7yk11BEzklPS10Bf78srCWkRNPTpbJXSX8cV+AmTwG6vwwJ +D6IyLtA6+hSRcr50qkezSDLuz+77f0MsBh9HKK9MDdhGmLSq6/uMqnHrylswp/umXbG ExtLnbYetYiJbAxzcLWfuUk3pbUWX68KfjKZCkrxdSoSgU2n5EQtCMFZvI3glEqAENic 9Lrgx/K9OKe0WragL6pqlymPi8rKWNnQb1JR2EKu0cswvJJ/w5ZGQI+IX2lMxfjLNa/y hr6g== 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=putdVWaS57fFngco0LR7Gm+CKMaldTidPD/az+KSCug=; b=G/krKBe9s5KmX8bfBEte5AI1Jp7KYkIvUFGp2vYrUl0RL83EoQaYpRJYH8ssJGj4E1 yiouiklzz6rI/ZUAdQ/GQ6UHln46pSZBVl45vWhChw5jtEGQrq1VhbTQ5sIRWR/sh/ox Zz2tT0nLBjN4VTivtWyFmH2pYMZeNaLmNnC7pyeZtFSMc6xnBQKFTW6UbIkUw9hzYdlU B8AIkAHsbqdHowpR/Ade8ZkE8xeF/8bP98aGKzLij8eLToGn8HcBKptkI4BSDySKGIFN /GYpPEFyePUbrKHgX5zFU5MZ9tK4Qr9N8Ou8FOFMMaoH1QW65DpGtNEWleBzMUEJn0re 7fXA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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=putdVWaS57fFngco0LR7Gm+CKMaldTidPD/az+KSCug=; b=fGPYss08NNJww2qF7m0IQIPfWElxLzUFEdxqoVfFdog0gDTS+JF7t+CMveStqVkD7u ELwg4LCOk8qi68qBJUPRAIZIMnyiwunc2osGG8kIIf73xrEZlVPV2ElxWAlAvjGN8r25 lu4/3F8UVA0kj81ghHb0Rv4fmx4A6ehY+Cn4JlocXWtSQHQmjQhdiVhdl2VLasYhmKwi uMNDerL4P9XOolhTKTH7sPDEHaKi8UOmOGxy7F6khzwQtDwroM72zJNU2FnTNKhPe7qF w4T+JX3Y60G1l1TV6YzrUNKiqAjIJgcoAezB9ir0d0CD0v5ANwPz2sP76suVsV3NP1pL G7ig== 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=putdVWaS57fFngco0LR7Gm+CKMaldTidPD/az+KSCug=; b=QL0QhLmzheoCK4NOCsj0do3fYriyBr4i8U5dgPyUEecFIuZ4GgUCWpfFHhtXmWORKh z7fY/2A/3ypwQ9jz/f3Pf6KDfH7X14l/C1EbkTJIGOEesD98hsyC5iui3hK+sPbbE+ZG 9j0YfS19BStqqxQsPMXrP6EAUlG4Pwq4+aElLy5ywefvaN7njABlOTGAXrSO3InEr3Fn UMMSIUHF/qM9GE3cdlWSBMe+cWKbgsS7Salep27uuYz9gYbgEpRIhgp5Rl9D/0OYvRjm PFok1u1HOtypGexh8U7xbEnGRWgeTLVUe69P4yfW9rnbfUg407m+l6iBVqHl57XPjCdR J9aw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531sFKxBQyy6V4Sh8A5jVc5muLpBjAHYCBp+oMmAj9VQh4lNHsj6 PiiaH2PMtuD91fv5RfeKl3M= X-Google-Smtp-Source: ABdhPJzgWab7nGp0Gy/+fuqZV2WT/V/p2IYNCN3MMJhGZ+7mND1QjglE+VvulAfmgt6A2O4ujmj3wg== X-Received: by 2002:adf:f80a:: with SMTP id s10mr54733946wrp.351.1600684982333; Mon, 21 Sep 2020 03:43:02 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:dd0a:: with SMTP id a10ls1000492wrm.2.gmail; Mon, 21 Sep 2020 03:43:01 -0700 (PDT) X-Received: by 2002:adf:dd82:: with SMTP id x2mr54891986wrl.419.1600684981457; Mon, 21 Sep 2020 03:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600684981; cv=none; d=google.com; s=arc-20160816; b=DHYA3DCKWuQ8Y8Lt+PNG060BOC4u39HnPaLYhLCIflPFdRbXA9FOKzQnvGPZluU/DH +tLlTbtNJYolob4FwjeFo0kCEtZW9ISMdEASowaUCN7TZSpx94E9nfYMVNE+aN075UTL EOogVmWeNm46tu+z4lMKosZxttQChsJQfQw0VREFBTzJDycf+mJpbQZ/AGvoLzEX5BV2 hOKGoTUcKN8hhiqu83LxnNZoWLARcb809tTbw9RdGtmmGMOABjat/pf0BTPGEId9WSTn 0CJfblHV+8+Pka67Bvo5IU9a8wWXsacPNMV7KaykhOO0nB2UXqVfR+w8wdULOZzmOE3P hOPw== 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=pSF04ONjaIeBaCyXTlajpM/Zw7YftXvz60EkWdE9JqY=; b=qb2u5P2UVv0oc5X/MA0g8O7GfjMwDVWt+b/2vg3fUBpJo477p+cICpjDZ5jmGAdgQK V/MehkSZEn26nMFd6VBnsfzZOZoFizwiWkZZRpbT8kty4qwSyYCvJ2xUs0mEYDvF20S7 62N7b9sSHpBFR82XHr8YXrAD5bKwJ9P98bQHR7KqhIXj1aDX4+q1FGRlLDulvdUv+XiN HCLuN3xpzOfhSZ+vpN+erIzSGEiAJEcXOF1BvsYO1/K1sOtoAfY9+dVcUiE7FEdhQKVC GBhurhcrKbulrhbdgbSeHlmo1PZNovXb5c5nF/4iaVrkKW2+RwvK0xkWCza78U7zBaDo xHGQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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.10]) by gmr-mx.google.com with ESMTPS id x1si352418wmk.2.2020.09.21.03.43.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Sep 2020 03:43:01 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Bw1HT0xcBz1rt4M; Mon, 21 Sep 2020 12:43:01 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Bw1HT0cfDz1qsnx; Mon, 21 Sep 2020 12:43:01 +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 EqtjLPQ2Mhrf; Mon, 21 Sep 2020 12:43:00 +0200 (CEST) X-Auth-Info: mnN8/10gVqKC0mKDPPrA7VoizvdSyNpSJyZjx2U+IgE= 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, 21 Sep 2020 12:43:00 +0200 (CEST) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler Subject: [RFC PATCH] classes: Add initramfs class Date: Mon, 21 Sep 2020 12:42:12 +0200 Message-Id: <20200921104212.1387227-1-hws@denx.de> X-Mailer: git-send-email 2.26.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.10 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?1678439856994304796?= X-GMAIL-MSGID: =?utf-8?q?1678439856994304796?= 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. 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 Wed Sep 23 08:20:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 80 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp601339ooj; Wed, 23 Sep 2020 09:21:55 -0700 (PDT) X-Received: by 2002:a5d:53d1:: with SMTP id a17mr462929wrw.98.1600878114868; Wed, 23 Sep 2020 09:21:54 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1600878114; cv=pass; d=google.com; s=arc-20160816; b=TaG6ij0UzSEBFa4uaHYwNtJx+Hcgys6iN5VoUIidAGQ7pURuC8JNQ97FkOqdQuPWf3 C+ZWDMfjltOfMq3TflT4mdXyMj98Jo7WssZP9KXap7dd3AByftiYbGlvSoRgBhAgPxKg t0JNhIHrYYehK8iTmp8JK2FFj6BK5a2KsTaXDl+Ws1L4uP1EoQJqRfxv48nGT6Ol1D/J J8J5C5Tx2Z2lSe8XCBzay+Hz6TtfmNuk8GP6yINrLwemeL6qm8VMlXGUJPJQbTFoTr6O /n8pg4aszIh+IoG85eXupMbXFVsmqpAlP1AbKh8AgB5dbmvaX4iNLgPTLeErzX1fhvck RAvQ== 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=McR+DKrrk90q0cO+miMRswXzm39TiGK3WX2SP78V/Bg=; b=iKkyKORMTux0HE/8AhwL+1VTNR263EMehP6s1qSNlJJ0xwJDYucm+8rqwdsdlPD6a4 sk0iyGtARHuUSe3BLpprVwSYxjzrGfJkWMENjU55fJ2xVi1XcVPr/wpgXF/xlnUDKFuc mXNTPBr1T85wwHkWuLjqkPXwUwOH884e3aKpGgKMmL/8cjwLc79zheN1vCdGIJiYohDg ZKQYsF5TRU62wdOHw0UBv+s0Rw7aZ9+h3Yqr6Pogm7hf8ptA8E5YmxrsI+LRzW+S825N Pw0BhOqPQ5mJHY/c/XfRVcTJhlBBolS3E4ALwKPKOPGBJDhZtG+iRFBAINZdva99kKHa Yf0g== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="BEUk/rKw"; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbihmvx5qkgqegxzi4ba@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBIHMVX5QKGQEGXZI4BA@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 a10sor60342wmc.8.2020.09.23.09.21.53 (Google Transport Security); Wed, 23 Sep 2020 09:21:54 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrbihmvx5qkgqegxzi4ba@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="BEUk/rKw"; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbihmvx5qkgqegxzi4ba@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBIHMVX5QKGQEGXZI4BA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1600878113; cv=pass; d=google.com; s=arc-20160816; b=CYYAkqWF08+TY4czHuS4h8J3Qg/HcbAi51V08FOLWl8Yx7C4RGNW2aykh6DLP2rxIj rT920fVzcaXSVW8ongvD5UM5UiuAWzovp/p7by11S3/mpc5gc0qxKE/3Sc5ejg8g2sqf VWn1NyFY9z+D5pytpDcHKET+LKJmT4aJmAASO0V5sV6yVruIgaPtObohi0CLlxMyrTb3 JOiGhuHemFAAa2nq8NDaLKz4AqxTCOx+7CsJMn/qbdTp5Bly7CG6wJHy0g0PPLmpt4Yg Q4uwtaRnVK9TEywbrKogLP69jGVjXxNglTpHYtvJbzaAgS7wcWv8xMtEf5J1LoKtfpoQ ttaA== 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=McR+DKrrk90q0cO+miMRswXzm39TiGK3WX2SP78V/Bg=; b=dL2U1zXZHzwKIBT+gjrAbW5ggKn6SEoJ0vCQSBv/0RfQLFfUp4x9Fl66IW6AF639ub 2h/jEB/u2UQevtv1GWr4KjhY0LLgemazZyDFgItxAg7RqiJ7zEY3qVKOqIhyxdhPH9AY ytFgZHqalfRC3K8thnbCDccOAlwU+FsGeFzoc8iMpj5FKVYgJaflpM0uIojeUKrexMy2 Go8nJzgI1hAspNf8NRuuG7FEr5Mj261TITOn02kE5wAody+QA5wyBHUfn9Z7XlgtS03G zDXff374EbOG3Dg0fe0VIx+3NIPcgvQnEkG63eGaExie8gX5rCFki+pkoCzXC/lXAuak twOA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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=McR+DKrrk90q0cO+miMRswXzm39TiGK3WX2SP78V/Bg=; b=BEUk/rKwMzGppLY9Wa3nw1ptZxzBplJOM4170qsmxqKtgvqT4oMlnN8SH2Pw6o9PaW 3WgCbS1NU3lQcgkiYAZpW/WbpArK8uHqfpXcomL0eocx7GEY3kuIh7oFBZJf/x+Jogye B/WBOblF+KzcYos+Q1xC1XxfCxR1AWiz1qQkJ+v3u++qxTuivFP2YUqFLPAEBP6vxey7 CK8TpwtCqFt+/R0toSUdjMYyy+xK7qMBfxbp0e5IWtbBGLI20J0wivEuAnwGwx13e7ic dEw2ShAFdRRtgOw76nozP2E7xmpmO2ir+/qeqyAY4d82FfaQnGSFeuw2ADo5wlTzt+dd PC5g== 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=McR+DKrrk90q0cO+miMRswXzm39TiGK3WX2SP78V/Bg=; b=my525mk19SlyEmBZVu0R+AlEZte2Tj2KeiDFGKK5YRc9SzZl9gveM+MLc0wydQ2xmt l1B0MjIMOgiz2V3KhLyfTVHxiwu2sPRd6SFX4X/e3Bewb0W77Ihm1Wpuzp5V/vDpRokx c01QVsSfVHn6EDTdQkde5PRgPK38qGrVs4WFDan6CTzpGiMsmia0cxjok2gGX4bGA/xq P9KXehMA3N8RCj8YFGLNbeXs8aBVvqLP01MwzymR/f/i/6IFnigPxsHj4+vfK6FSdJmH XTnzvXIUcNBIMFBx7H9Mue7f7b788mykQ+gMKmaM9xy21Vp0Z5QbcGGzpLbpRRv4sQlg wQMg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532ZkF12ICteP2ABEoZptNr9+XVftJkgXr7ybdab4H2rMcxh/YH1 PkObgJc2KtWPnIimsOqir6Q= X-Google-Smtp-Source: ABdhPJzigTz/QOGhEUcyUgNuRFR8SeIMzSmtB6YGiBdxosnYuTqi63xwNhX3Bla6RYg6PxEqFe+k1w== X-Received: by 2002:a1c:ed01:: with SMTP id l1mr385563wmh.152.1600878113072; Wed, 23 Sep 2020 09:21:53 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:e3c3:: with SMTP id k3ls467068wrm.1.gmail; Wed, 23 Sep 2020 09:21:52 -0700 (PDT) X-Received: by 2002:a5d:660d:: with SMTP id n13mr487559wru.308.1600878112186; Wed, 23 Sep 2020 09:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600878112; cv=none; d=google.com; s=arc-20160816; b=R98o0Xu8IgPIEmGggkCAALZLkC5L9sRMZPFwJqJ5VgYyYysojlZYDWMfGSNSoJO0uE 8pqnvxLuWSx8M22ZB8Hy+55VfQbXnEhrmzzz3eqvr7YPOZTHszTPtB0t7nn0aYEUkUGG aql+TBcylP2KYpiAzIKCfG1g2c9pRGuCMfTeZt7S3gPjX1Yx77W5VZn+AGZKmYyvGjZr uvOpi6uWHyN3nbZEiBac/Yrc4s7yeQAJbK/7TtYruH482g97Aloes7ROcQFfstQUJVeh Ait5v7CfGPPKH9DWm6O4qoynC4oyz7CYzAMdvdhay53sQProK/n0jlcivQDYwCMZ/ENE sk7g== 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=0nNs6VM37Z7hl3o+GXDeASyC2TnJwXoQyiFXBgZT+No=; b=EG4y9o+rEXonqHT+LOYnipMYqQ5LbcI1G9/1y7JFYF9fNrAoWRUGAkyLPB9lB3eaiF 2LBvG0bluzuKQlwEMYspdECUNYmDXoBx2LkQiAj4qZtb0Pz+x+t+hoFtrsARKU9NOiU9 90c/etCCeC57JWwSdD8SPH3DjDIyyLnTslyblzQ+LrKNXLY1dG3wS1Lk3W//xNSb6bgz c22Udpz5WfTvIafZjzQk9D29aQNYpcrYuAXCioPB+bhStYqYoRDnJYoxfRztmwZYoNaY /kdDmWUzmhUFJSbMWfJBiEQNS2QHH71CnQfSh5XBYGYCnL+uFywCDcgTfv3Ja0e40fiS YD7w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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.10]) by gmr-mx.google.com with ESMTPS id w2si9912wrr.5.2020.09.23.09.21.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2020 09:21:52 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4BxNjW6ffzz1rvyK; Wed, 23 Sep 2020 18:21:51 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4BxNjW6Vdhz1qwT6; Wed, 23 Sep 2020 18:21:51 +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 EUSt1hkRTzFY; Wed, 23 Sep 2020 18:21:51 +0200 (CEST) X-Auth-Info: a+7FALZBH1UViOz/Vnh/Z6VP1ifprQFz37IOBU61E2w= 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; Wed, 23 Sep 2020 18:21:50 +0200 (CEST) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler Subject: [PATCH v2 2/3] Add example initramfs module recipe Date: Wed, 23 Sep 2020 18:20:45 +0200 Message-Id: <20200923162046.206888-2-hws@denx.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200921104212.1387227-1-hws@denx.de> References: <20200921104212.1387227-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.10 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?1678642370578699991?= X-GMAIL-MSGID: =?utf-8?q?1678642370578699991?= 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 --- .../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 Wed Sep 23 08:20:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 81 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp601341ooj; Wed, 23 Sep 2020 09:21:55 -0700 (PDT) X-Received: by 2002:a2e:8693:: with SMTP id l19mr221391lji.25.1600878114978; Wed, 23 Sep 2020 09:21:54 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1600878114; cv=pass; d=google.com; s=arc-20160816; b=h8N619ZGr3DI7N+r0E6fyHsDH2Xkk4qFrS5Rc6Ms4pVZvE7VFAbbZM9BFyKt4B3is/ 0bJJp4ZERI5cH4KW5+QaErYEqY1wbtZXH3/NlCLBTd185Y90oifeBGXsfChu3N5vsrE6 JrwzQBKEKDX6RY7g3h9hCR16hacr1lRT2rob3eDPwduOTHsqvrxxxFZHHOX71cdbZ55i hax9hSim9sA54C5LYHUoIyUGBLIZbGRM3gvzHpZaqSr/Rc8ghlhC3483FWvWTGGrA3RQ 82IiB/6f6mWOVbqSeqk5jWnHvzxm+VBjA6SwEOCjhb91mzZnfib/WfvFSEmnwllKAggV rQ8g== 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=+cE4R6PlzOizESwJ0Pq/9F0Cj/2Fmhg3eHoH9hMNwME=; b=hos+eaDsRCk2ve/RTEj4UZfCIQsL7P2zoFuJ8r+nPeqxf3mLI3k7eZ6Ef7TpdEl2IJ COdFUxIdahdg7wpEcrhu15CPHVaKaNqWiKVckPxgWZedor1A3sXeisoFvkQtrC1rMMsW 7sRPNuCpra1r07LMLZU7MltAx6jDCPU/8mqlthK4dLis4Rsr0sDN4UXl+SbxW6vKcBCN Qes8zKVwl2jraCXJvfErPaK0nIaHMLAPYTwKPIQpeUP27LTrwLiwQbfl2rYglpSlFueE yvT9qOYPfntWXbK/2eK1rYNvooj+5kYcxlKImrB9y5XaFxFh496JL5q8QnXs2/7tmMad LIVA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=Q1JU1YfT; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbixmvx5qkgqebg7i5oi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBIXMVX5QKGQEBG7I5OI@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 v9sor6348134ljk.77.2020.09.23.09.21.54 (Google Transport Security); Wed, 23 Sep 2020 09:21:54 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbczlpqw3rykrbixmvx5qkgqebg7i5oi@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=Q1JU1YfT; arc=pass (i=2); spf=pass (google.com: domain of isar-users+bncbczlpqw3rykrbixmvx5qkgqebg7i5oi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZLPQW3RYKRBIXMVX5QKGQEBG7I5OI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1600878114; cv=pass; d=google.com; s=arc-20160816; b=Xik2zr0iT8zpXhkEmFy3cJit5HMTAaUz5YKPNRXPoSBRXoEFsPli5ioU3ip9VnUlId cqRs1mw0rAbvceZt0tDHU0LKeDVLNd3RYnwubAZJWVXUrrdzVJhXDcrdFRH8zhTADd9Z VXZC8bwvPM1sC8o3yiG4b5Skmsz3RpskbNdEg5fSt8ul17fxdzwLAblI+PVmzSYjDfKR gYhOS1/PpuxiiMWPl/zDDqQtzC9rJv3cCxNpmVX7uXkb3wb+GQq+uVL/fShNrgsm4ZjE yXe3Dan4eItQarsXHYaTXpGeZrKAUNy3MT5mXSAcUmuQP/GDKMBewjCxjrltgpGmKcys rIeQ== 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=+cE4R6PlzOizESwJ0Pq/9F0Cj/2Fmhg3eHoH9hMNwME=; b=T9HeQt/Zue36ShCKoNtczbXPA1xu0FAyAZVYZHxsOoIMBOfhcrg2laaAJgSL8T5MHS JNUHhGxY6K2TldAxsi2DjpliSzJ7MH6HCFslvIj+v+AI7G3a+GEjfij9pUsqmovBch2Q 0DjqHuFbsjQvTZK04tlc/iJqqrpQC0Axn7wroUqQk28SWtJCtJe0tPxeXmWCcQ8XVgRX zPTUw6xdQdOeue/uWNECO2zlRa/EIyZrZf17yPIVc6wg4kkvwVsEknBOcQdtZEHm3x90 /LRBVLE9I0EQGc3eXd177NGR4f034PH0X8SctNLR60n0e0pSK6UpvO0AcuwazVarkvEv EIrw== 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=+cE4R6PlzOizESwJ0Pq/9F0Cj/2Fmhg3eHoH9hMNwME=; b=Q1JU1YfTH7M7sjXluPTnftYNUtPHQ7EP4trq2YU0YdNJDbvHwF/yF43caWlj7eE6RR t/ySbp4p/3gnKLioB0Kdryf1r/Vx8johZhbUA0Al/uwN7syDYht3LY0i3Tc2Y8q/TbYI EKFkDQxAym+8VWfYaW1C/ZiKFwhGxnS3L9PasUgwBzH1skwEnUbJUbTlJuBeq8aNTNbA Kjg0YQ6jluPnSkSmjs5Sf13v57fLNefsU3Cwgs7skD4c4G8tDk/geyUy3x5hFxu6Eh25 Nz2ZT56wstdUIr23citt0UQXAsc3eh740ogsLk4PqdjOXZbFKotyTC9qX5AIuB4Aw1f0 J+yA== 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=+cE4R6PlzOizESwJ0Pq/9F0Cj/2Fmhg3eHoH9hMNwME=; b=Ay+uTmF5sUG3yCa/79gaV4mEEzwK8D2jTbsCijR8Sa7AUjhEuHBSp+kac4G06cao08 FHpHxpraescNF9kAoRMyLMVw0QAY0X0K1ZfhyjAy+s2gRaJtpABxkXZdBpJRBypz9Z1Q QBto2+n7waw8suBCK/Akve/IFTU4qwdgltx3cCrgyxzfbHrWEA3QfTcxEidhPgJgwxon gj3gQIoh3ME2/fC2PWR+ST3rShjPqtOFZMxvbHVkCzdZwsl6tgwgCsGqI4oADQhGjij2 g0SotDkrbFFbwz4nFXatvEQYpaidTXH3shie2PXtICQyGzd1uS7DfkWVoJMFvVIqUXNv rtHQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533sAAILWFjO21MqhXl0eaYKNIZHMuwcyFNMEGL2Gp7hroADzqnS xSoBqwg0H/NGIl5hQGVXEiM= X-Google-Smtp-Source: ABdhPJzIll9AucAFe7MTi6tlQhwxEt0A2g06z7kyhNeFokrvC/BPvCtydiCS4w3RRvmmxCVz1yOGUw== X-Received: by 2002:a2e:8884:: with SMTP id k4mr209428lji.333.1600878114510; Wed, 23 Sep 2020 09:21:54 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:7e02:: with SMTP id z2ls50956ljc.2.gmail; Wed, 23 Sep 2020 09:21:53 -0700 (PDT) X-Received: by 2002:a2e:a41b:: with SMTP id p27mr219922ljn.75.1600878113307; Wed, 23 Sep 2020 09:21:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600878113; cv=none; d=google.com; s=arc-20160816; b=TMzpUjnCq074fmNLRGWuSfaGlzZckJCl/I2I+YS7VDyT/GgokbN3/gFVpC6uPeYiP6 90XiiRzLFfLEAKWZ1IqRtBY1hprpc4KFuQzNhiBYI2rruJMgB6Ug5s5qN5twinoMg5le IDZjCGSnRAhp+AmrG4frWJdMs6qR2SwZv3U/6rfEGG5oXSqwcVx9eHt2RNwlpiVg87j9 QAsrN3Ph5jaS07S9zQf+S6pkfFx91dXGovpGihguSlbfxwUSZeM39NExJ++Y8ViT6nhH LJWUx0AOd/8hkP8YEIoTAHPXBODgzSrsgKX23ZToTLgIHWh9E0TIkGAtLittjCn7RqNQ D/xQ== 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=55NOqns2rjZ8bCHXs0IIv9E6AspsenUNaVEdzXelf98=; b=h3/Z85KROX+nCGWlKvdRlKOmKyeW3P+64S/k/oAqqVUAzI6ftvuqqKFg39V28yuVwn J5hDyooW/Lc8EJrDjbyeTDgyN9FuPtL7qHjSBhOot6hv5eu7tP7bGF168BE5/jwVdeHr hrK80tVK0gsi1nehrslf0NpU9sqV6g/gk2PBCcfLIHntQ7Y10RL5phZ7gnDEObzZLb43 FbfO3zQYt1a9nXjmwF3dCRiaGIiPIay2hlJV7DydHan6xJpaQYO51hi6HYcs7L5xLkzw kgI3JEhQqoVympBYZ6Qev2C1NQZ9tbj/ucoZcuWjemZIYzE23HSupBrZlcQf7QmhPyEy RExw== 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 r16si494883ljg.1.2020.09.23.09.21.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2020 09:21:53 -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; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4BxNjX5rhbz1qs3s; Wed, 23 Sep 2020 18:21:52 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4BxNjX5jLkz1qwT6; Wed, 23 Sep 2020 18:21:52 +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 5rQ451IkSP2c; Wed, 23 Sep 2020 18:21:52 +0200 (CEST) X-Auth-Info: EFd46gSjbgvXeZTY1gznUr4ZAOVmi7l/itKSNE05j98= 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; Wed, 23 Sep 2020 18:21:51 +0200 (CEST) From: Harald Seiler To: isar-users@googlegroups.com Cc: Harald Seiler Subject: [PATCH v2 3/3] Add custom isar-initramfs example Date: Wed, 23 Sep 2020 18:20:46 +0200 Message-Id: <20200923162046.206888-3-hws@denx.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200921104212.1387227-1-hws@denx.de> References: <20200921104212.1387227-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?1678642370253287442?= 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 \ + "