public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v2 3/7] isar-bootstrap-helper: Add option --copyisarapt to setup_root_file_system()
Date: Fri, 22 Jun 2018 14:40:18 +0200	[thread overview]
Message-ID: <20180622124022.30192-4-mosipov@ilbers.de> (raw)
In-Reply-To: <20180622124022.30192-1-mosipov@ilbers.de>

Add the option of copying isar-apt repo to rootfs instead of mounting it.

Signed-off-by: Maxim Osipov <mosipov@ilbers.de>
---
 meta/classes/isar-bootstrap-helper.bbclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass
index bc23ad2..9a3f710 100644
--- a/meta/classes/isar-bootstrap-helper.bbclass
+++ b/meta/classes/isar-bootstrap-helper.bbclass
@@ -29,12 +29,14 @@ def reverse_bb_array(d, varname):
 
 setup_root_file_system() {
     CLEAN=""
+    COPYISARAPT=""
     FSTAB=""
     ROOTFS_ARCH="${DISTRO_ARCH}"
     ROOTFS_DISTRO="${DISTRO}"
     while true; do
         case "$1" in
         --clean) CLEAN=1 ;;
+        --copyisarapt) COPYISARAPT=1 ;;
         --fstab) FSTAB=$2; shift ;;
         --host-arch) ROOTFS_ARCH=${HOST_ARCH} ;;
         --host-distro) ROOTFS_DISTRO=${HOST_DISTRO} ;;
@@ -60,8 +62,11 @@ setup_root_file_system() {
     echo "Package: *\nPin: release n=${DEBDISTRONAME}\nPin-Priority: 1000" | \
         sudo tee "$ROOTFSDIR/etc/apt/preferences.d/isar" >/dev/null
 
-    sudo mount --bind ${DEPLOY_DIR_APT}/${ROOTFS_DISTRO} $ROOTFSDIR/isar-apt
-
+    if [ ${COPYISARAPT} ]; then
+        sudo cp -Trpfx ${DEPLOY_DIR_APT}/${ROOTFS_DISTRO} $ROOTFSDIR/isar-apt
+    else
+        sudo mount --bind ${DEPLOY_DIR_APT}/${ROOTFS_DISTRO} $ROOTFSDIR/isar-apt
+    fi
     sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs $ROOTFSDIR/dev
     sudo mount -t proc none $ROOTFSDIR/proc
 
-- 
2.11.0


  parent reply	other threads:[~2018-06-22 12:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-22 12:40 [PATCH v2 0/7] Add ISAR SDK support Maxim Yu. Osipov
2018-06-22 12:40 ` [PATCH v2 1/7] isar-bootstrap: Move common part to include Maxim Yu. Osipov
2018-06-22 12:40 ` [PATCH v2 2/7] isar-bootstrap: Add host architecture support Maxim Yu. Osipov
2018-06-22 12:40 ` Maxim Yu. Osipov [this message]
2018-06-22 12:40 ` [PATCH v2 4/7] sdkchroot: Added recipe-devel to create SDK root filesystem Maxim Yu. Osipov
2018-06-22 12:40 ` [PATCH v2 5/7] meta/class/image: Add populate_sdk task to trigger SDK rootfs creation Maxim Yu. Osipov
2018-06-22 12:40 ` [PATCH v2 6/7] scripts: Add helper scripts to mount/umount chroot directory Maxim Yu. Osipov
2018-06-22 12:40 ` [PATCH v2 7/7] doc: Add description of ISAR SDK root filesystem creation Maxim Yu. Osipov
2018-06-29 12:57 ` [PATCH v2 0/7] Add ISAR SDK support Maxim Yu. Osipov

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=20180622124022.30192-4-mosipov@ilbers.de \
    --to=mosipov@ilbers.de \
    --cc=isar-users@googlegroups.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