All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/5] fs/custom: generate complete, partition-based device images
Date: Tue, 29 Aug 2017 23:24:19 +0200	[thread overview]
Message-ID: <20170829212419.GC3338@scaer> (raw)
In-Reply-To: <trinity-8f575ef2-2fac-4332-b16e-a4c7bd66652a-1504006025728@3c-app-gmx-bs19>

Jan, All,

On 2017-08-29 13:27 +0200, Jan Schmidt spake thusly:
> I was looking for a way to customize the root file system in the
> way, that all except /var is read only. And /var is at a separate
> partition which will be enlarged at the first start to the
> maximum size of the storage media. (I'm using RPi 3)
> 
> I'm using BR 2017.02.1. The above patch seems not to be included
> yet. And I didn't fount any discussion about accepting the patch.
> Is there a other way to solve my issue?

At first, I was very puzzled about what patch this was refering to. ANd
it truns out it was something I wrote almost 4 years ago... Damn, time
flies...

Anyway, back on topic: no, that was not accepted at all, see the
discussion in the thread:
    https://patchwork.ozlabs.org/patch/306631/

So, the best option for you is that you do something like:

  - only generate a tarball out of Buildroot,
  - provide a post-image script that:
    - extract the tarball into ${TMP_ROOT_DIR}
    - generate an ext2 (or other writable FS) out of ${TMP_ROOT_DIR}/var
    - remove ${TMP_ROOT_DIR}/var/*
    - tweak ${TMP_ROOT_DIR}/etc/fstab to add the mountpoint for /var
    - create the readonly root fs with out of ${TMP_ROOT_DIR}/

Note that the post-image script should run under fakeroot, and Buildroot
does not guarantee that, so your script would probalby need to start
with something like:

    if [ $(id -u) -ne 0 ]; then
        fakeroot "${0}" "${@}"
        exit ${?}
    fi

which would ensure that the script runs under fakeroot.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2017-08-29 21:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 11:27 [Buildroot] [PATCH 2/5] fs/custom: generate complete, partition-based device images Jan Schmidt
2017-08-29 21:24 ` Yann E. MORIN [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-01-03 17:19 [Buildroot] [PATCH 0/5 v4] SUBJECT Yann E. MORIN
2014-01-03 17:19 ` [Buildroot] [PATCH 2/5] fs/custom: generate complete, partition-based device images Yann E. MORIN
2014-01-04 16:38   ` Maxime Hadjinlian
2014-01-04 17:43     ` Yann E. MORIN
2014-01-04 17:52       ` Maxime Hadjinlian
2014-04-09 13:28   ` Andreas Naumann
2014-04-09 17:09     ` Yann E. MORIN
2014-04-10 13:53       ` Andreas Naumann

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=20170829212419.GC3338@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.