public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <work@hennsch.de>
To: isar-users@googlegroups.com
Cc: vijaikumar.kanagarajan@gmail.com,
	Henning Schild <henning.schild@siemens.com>
Subject: [PATCH 2/2] meta-isar/rpi-sdimg: take boot content out of rootfs
Date: Thu,  3 Mar 2022 14:24:25 +0100	[thread overview]
Message-ID: <20220303132425.31172-2-work@hennsch.de> (raw)
In-Reply-To: <20220303132425.31172-1-work@hennsch.de>

From: Henning Schild <henning.schild@siemens.com>

boot is an extra partition which gets mounted over, no need to keep the
content in the underlying rootfs

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta-isar/classes/rpi-sdimg.bbclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta-isar/classes/rpi-sdimg.bbclass b/meta-isar/classes/rpi-sdimg.bbclass
index dde121d2616e..4bde61bf6b48 100644
--- a/meta-isar/classes/rpi-sdimg.bbclass
+++ b/meta-isar/classes/rpi-sdimg.bbclass
@@ -84,3 +84,16 @@ append_boot_fstab() {
 restore_fstab() {
     sudo cp -f ${WORKDIR}/fstab.orig ${IMAGE_ROOTFS}/etc/fstab
 }
+
+do_ext4_image[prefuncs] += " empty_boot_folder"
+do_ext4_image[postfuncs] += " restore_boot_folder"
+
+empty_boot_folder() {
+    sudo mv ${IMAGE_ROOTFS}/boot ${WORKDIR}/boot.orig
+    sudo mkdir -p ${IMAGE_ROOTFS}/boot
+}
+
+restore_boot_folder() {
+    sudo rm -rf ${IMAGE_ROOTFS}/boot
+    sudo mv ${WORKDIR}/boot.orig ${IMAGE_ROOTFS}/boot
+}
-- 
2.34.1


  reply	other threads:[~2022-03-03 13:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 13:24 [PATCH 1/2] meta-isar/raspbios: get rid of distro config script Henning Schild
2022-03-03 13:24 ` Henning Schild [this message]
2022-03-03 13:47 ` Henning Schild
2022-03-17 13:51 ` Anton Mikanovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220303132425.31172-2-work@hennsch.de \
    --to=work@hennsch.de \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=vijaikumar.kanagarajan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox