From: Andrey Nechypurenko <andreynech@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] Buildroot way to populate additional partition
Date: Wed, 7 Jul 2021 16:05:31 +0200 [thread overview]
Message-ID: <CAOiXNkCd2DhkFAqcuQrH_bWF5yaJoeEVmBnRp+DzjTH9pbrxew@mail.gmail.com> (raw)
In-Reply-To: <30ad3d8a-cc28-4630-bdcd-2d246670e771@mind.be>
Hi Buildrooters,
Just for the case if someone else will be facing a similar problem, here is
how I solve it. The idea is to extend the post-image.sh and create an image
for user-data partition "manually" by invoking the genimage utility
directly with corresponding --rootpath, etc. parameters.
Here is the relevant part of the post-image.sh script.
main()
{
echo "Initializing user data partition"
local USER_DATA="$(mktemp -d)"
local USER_DATA_TMP="$(mktemp -d)"
# Create directories required for OverlayFS
mkdir ${USER_DATA}/etc ${USER_DATA}/work_etc
mkdir ${USER_DATA}/var ${USER_DATA}/work_var
mkdir ${USER_DATA}/home ${USER_DATA}/work_home
# this will create images/data.img
# which will be used in complete image
genimage \
--rootpath "${USER_DATA}" \
--tmppath "${USER_DATA_TMP}" \
--outputpath "${BINARIES_DIR}" \
--config board/phyboard-sargas-l-877e/gendataimg.cfg
rm -rf ${USER_DATA} ${USER_DATA_TMP}
Thanks to Arnout and Maxim for suggestions which led me to this solution.
Regards,
Andrey.
prev parent reply other threads:[~2021-07-07 14:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 13:04 [Buildroot] Buildroot way to populate additional partition Andrey Nechypurenko
2021-07-04 15:11 ` Arnout Vandecappelle
2021-07-05 10:00 ` Andrey Nechypurenko
2021-07-07 14:05 ` Andrey Nechypurenko [this message]
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=CAOiXNkCd2DhkFAqcuQrH_bWF5yaJoeEVmBnRp+DzjTH9pbrxew@mail.gmail.com \
--to=andreynech@gmail.com \
--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.