From patchwork Fri Aug 4 14:25:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Eatmon X-Patchwork-Id: 28407 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 555C9C41513 for ; Fri, 4 Aug 2023 14:25:49 +0000 (UTC) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by mx.groups.io with SMTP id smtpd.web11.12422.1691159141196244727 for ; Fri, 04 Aug 2023 07:25:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=bl7Y4rf4; spf=pass (domain: ti.com, ip: 198.47.19.141, mailfrom: reatmon@ti.com) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 374EPbXO119369; Fri, 4 Aug 2023 09:25:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691159137; bh=5oAzARhqTfhjcVVq5ed7oMjjjV4hyyjGrVoUf7eW4hA=; h=From:To:Subject:Date; b=bl7Y4rf4yECuXz5rLg/S6+bMthDiPD1imMpjTeH9DKOBj409Pdb8EfF/z8aWEW5Vn rQper+rvbjLycqdACfOPLXCRe3sl8uAgqrdRwdh7VkXYXDKo5F1AzqChEQcA5ILJ1Q /i2zcMMJ64WCi/vpFUVXbl/43EyRyzXEwvnfbCcc= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 374EPb3l116438 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 4 Aug 2023 09:25:37 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 4 Aug 2023 09:25:37 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 4 Aug 2023 09:25:37 -0500 Received: from uda0214219 (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 374EPbJb029612; Fri, 4 Aug 2023 09:25:37 -0500 Received: from reatmon by uda0214219 with local (Exim 4.90_1) (envelope-from ) id 1qRvkH-0005kj-Dh; Fri, 04 Aug 2023 09:25:37 -0500 From: Ryan Eatmon To: Praneeth Bajjuri , Denys Dmytriyenko , Subject: [meta-arago][master/kirkstone][PATCH v2 1/3] tisdk-tiny-image: Set INITRAMFS_MAXSIZE Date: Fri, 4 Aug 2023 09:25:35 -0500 Message-ID: <20230804142537.22072-1-reatmon@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 04 Aug 2023 14:25:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14820 We have been running into issues where we add a package and then find out that the tiny image grew too big for our requirements. Turns out there is a variable we can set to prevent this. Signed-off-by: Ryan Eatmon --- meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb b/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb index 8117ebc5..1f63ca0b 100644 --- a/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb +++ b/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb @@ -16,6 +16,9 @@ IMAGE_FEATURES:remove = "package-management" IMAGE_FSTYPES += "cpio cpio.xz" +INITRAMFS_FSTYPES += "cpio cpio.xz" +INITRAMFS_MAXSIZE = "65536" + IMAGE_INSTALL += " \ ${ARAGO_TINY_IMAGE_EXTRA_INSTALL} \ " From patchwork Fri Aug 4 14:25:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Eatmon X-Patchwork-Id: 28408 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5381CC001DB for ; Fri, 4 Aug 2023 14:25:49 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by mx.groups.io with SMTP id smtpd.web11.12421.1691159141106327112 for ; Fri, 04 Aug 2023 07:25:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fptc0lPa; spf=pass (domain: ti.com, ip: 198.47.23.249, mailfrom: reatmon@ti.com) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 374EPcYC104009; Fri, 4 Aug 2023 09:25:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691159138; bh=gZKqe4L0h9znpYv9Ywesgv9q9LnjWOYMZHk/Kkn3gd4=; h=From:To:Subject:Date:In-Reply-To:References; b=fptc0lPa7Za5OfOTOAAZwRyLVrp/HXBfHn3wXnmTYLEWEnFnMyGmWQc91uJkEPNfS HrXyZkX+TaIXeYr/VsZgDGqK/wdkVBkLS9kOiO2/0ZjOTqD5uVPTOSwyg990pg40oD KwmBoecWaU2a3jFy0qPAie81WwBaBnAO+o9xSLRo= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 374EPcFe004237 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 4 Aug 2023 09:25:38 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 4 Aug 2023 09:25:37 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 4 Aug 2023 09:25:37 -0500 Received: from uda0214219 (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 374EPbK1006816; Fri, 4 Aug 2023 09:25:37 -0500 Received: from reatmon by uda0214219 with local (Exim 4.90_1) (envelope-from ) id 1qRvkH-0005kl-Gv; Fri, 04 Aug 2023 09:25:37 -0500 From: Ryan Eatmon To: Praneeth Bajjuri , Denys Dmytriyenko , Subject: [meta-arago][master/kirkstone][PATCH v2 2/3] tisdk-tiny-initramfs: Create a smaller dedicated initramfs for tiny Date: Fri, 4 Aug 2023 09:25:36 -0500 Message-ID: <20230804142537.22072-2-reatmon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230804142537.22072-1-reatmon@ti.com> References: <20230804142537.22072-1-reatmon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 04 Aug 2023 14:25:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14821 The initramfs does not need grub-efi or the /boot directory since it does not have to boot the system itself. So create a version of the tiny-image that strips those out and follow the oe-core methodology for initramfs. Signed-off-by: Ryan Eatmon --- .../classes/remove-boot-dir.bbclass | 8 ++++++ .../images/tisdk-tiny-initramfs.bb | 26 +++++++++++++++++++ .../packagegroup-arago-initramfs.bb | 4 +++ 3 files changed, 38 insertions(+) create mode 100644 meta-arago-distro/classes/remove-boot-dir.bbclass create mode 100644 meta-arago-distro/recipes-core/images/tisdk-tiny-initramfs.bb create mode 100644 meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-initramfs.bb diff --git a/meta-arago-distro/classes/remove-boot-dir.bbclass b/meta-arago-distro/classes/remove-boot-dir.bbclass new file mode 100644 index 00000000..bd0c09fc --- /dev/null +++ b/meta-arago-distro/classes/remove-boot-dir.bbclass @@ -0,0 +1,8 @@ +# Add a ROOTFS_POSTPROCESS_COMMAND that will remove some files from the +# rootfs for initramfs images. + +ROOTFS_POSTPROCESS_COMMAND += "remove_boot_dir;" + +remove_boot_dir () { + rm -rf ${IMAGE_ROOTFS}/boot +} diff --git a/meta-arago-distro/recipes-core/images/tisdk-tiny-initramfs.bb b/meta-arago-distro/recipes-core/images/tisdk-tiny-initramfs.bb new file mode 100644 index 00000000..0bea8276 --- /dev/null +++ b/meta-arago-distro/recipes-core/images/tisdk-tiny-initramfs.bb @@ -0,0 +1,26 @@ +SUMMARY = "Arago TI SDK super minimal base image for initramfs" + +DESCRIPTION = "Image meant for basic boot of linux kernel. Intended as\ + bare system, this image does not package the kernel in the\ + standard /boot folder in rootfs. Instead, it provides a base\ + rootfs allowing kernel to be deployed elsewhere\ + (tftp/separate boot partition/jtag log etc..) and boot\ + the image.\ +" + +LICENSE = "MIT" + +inherit core-image +inherit remove-boot-dir + +IMAGE_FEATURES:remove = "package-management" + +INITRAMFS_FSTYPES = "cpio cpio.xz" +INITRAMFS_MAXSIZE = "65536" +IMAGE_OVERHEAD_FACTOR = "1" + +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" + +PACKAGE_INSTALL = "packagegroup-arago-initramfs" + +export IMAGE_BASENAME = "tisdk-tiny-initramfs" diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-initramfs.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-initramfs.bb new file mode 100644 index 00000000..380cc0e3 --- /dev/null +++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-initramfs.bb @@ -0,0 +1,4 @@ + +require recipes-core/packagegroups/packagegroup-core-boot.bb + +RDEPENDS:${PN}:remove = "grub-efi kernel" From patchwork Fri Aug 4 14:25:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Eatmon X-Patchwork-Id: 28409 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57630C001DF for ; Fri, 4 Aug 2023 14:25:49 +0000 (UTC) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by mx.groups.io with SMTP id smtpd.web11.12419.1691159140938121722 for ; Fri, 04 Aug 2023 07:25:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Z8461wmO; spf=pass (domain: ti.com, ip: 198.47.19.141, mailfrom: reatmon@ti.com) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 374EPcCg119373; Fri, 4 Aug 2023 09:25:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691159138; bh=j9glTxLL9AGDuH7oNz3wGWFRwTzDXTnDsTJlxew3+wY=; h=From:To:Subject:Date:In-Reply-To:References; b=Z8461wmOHg7AVWkGp4dTPsy+8weVs+GBUjr5k8TZDUwgMjvjKMlshRBGQjbJUOEci rYe5w8HN8FdakF3WHsmxGp3DO61z7fOZGOBW88HapULfoo+du9QCHP6UAWS9/zRkTr rFMuUCUqRfgUEfGsQF4fohJMW0UwAy9ZFo45o9OQ= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 374EPcOR004231 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 4 Aug 2023 09:25:38 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 4 Aug 2023 09:25:37 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 4 Aug 2023 09:25:37 -0500 Received: from uda0214219 (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 374EPbUa004741; Fri, 4 Aug 2023 09:25:37 -0500 Received: from reatmon by uda0214219 with local (Exim 4.90_1) (envelope-from ) id 1qRvkH-0005kp-Js; Fri, 04 Aug 2023 09:25:37 -0500 From: Ryan Eatmon To: Praneeth Bajjuri , Denys Dmytriyenko , Subject: [meta-arago][master/kirkstone][PATCH v2 3/3] tisdk-tiny-image: Add dependency on tisdk-tiny-initramfs Date: Fri, 4 Aug 2023 09:25:37 -0500 Message-ID: <20230804142537.22072-3-reatmon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230804142537.22072-1-reatmon@ti.com> References: <20230804142537.22072-1-reatmon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 04 Aug 2023 14:25:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14819 Even if we do not tell the build that the initramfs should be bundled into the kernel, we want to build the initramfs with every build so that it can be manually specified through alternative testing schemes. Signed-off-by: Ryan Eatmon --- v2: Add this missing patch to the series. meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb b/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb index 1f63ca0b..12e73876 100644 --- a/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb +++ b/meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb @@ -23,4 +23,6 @@ IMAGE_INSTALL += " \ ${ARAGO_TINY_IMAGE_EXTRA_INSTALL} \ " +DEPENDS += " tisdk-tiny-initramfs" + export IMAGE_BASENAME = "tisdk-tiny-image"