This is mostly done to align the different device type and how the
initial raw disk image is processed. The "beaglebone" type differed
a lot from how it is done for "raspberrypi" and "qemu", the big
difference was that it did not extract the necessary images from
the raw disk image. move the them to the mender disk image where
addition processing was done. Instead it processed directly on
the raw disk image.
To be able to optmize the workflows and stages, they have to be
executed in a similar fashion on all the device types.
Now do_raw_disk_image_create_partitions will always extract the
the images from the raw disk image, instead of doing it in the
device specific do_make_sdimg_* functions which contained a lot
of duplication.
By aligning the workflow we have can also get rid of the
beagblebone specific stage-3, and it can use the "generic" one.
Changelog: Optimizations to speed up conversion, utilizing sparse
images.
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
There where multiple places where mount-points where created, and
in some cases it was even duplicate code.
Instead create it during convert-stage-4 where we do all generic Mender
installation, and do it unconditionally.
Changelog: None
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
This speeds up the conversion quite a lot, meaning that it will skip
copying large blocks of 'zero' data back and forth.
Converting a 2018-11-13-raspbian-stretch-lite.img went from 8m10s to
4m45s on my machine.
Changelog: None
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
The extract helper function does not need to know the type
of the image we are extracting.
Changelog: None
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
As the partition table has been modified 'resize2fs_once' service
no longer fulfils its purpose.
That service has been replaced with 'resizefs' systemd service
which extends data partition's size and resizes filesystem too
to fill the whole free unallocated space.
Issues: MEN-2254
Changelog: Title
Signed-off-by: Adam Podogrocki <a.podogrocki@gmail.com>
- bump mender-uboot (as patches for rpi0w are present in later revisions)
- reuse as much as possible rpi3 convert files
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Use associative array to keep raw disk image sizes
instead of separate variables.
Issues: MEN-2207
Changelog: None
Signed-off-by: Adam Podogrocki <a.podogrocki@gmail.com>
That amendment is dedicated for Mender images built from Yocto images
for qemu x86-64.
Issues: MEN-2207
Changelog: None
Signed-off-by: Adam Podogrocki <a.podogrocki@gmail.com>
Main aim is to handle Yocto generated image for x86-64 architecure.
Such an image contains boot, filesystem and swap partition.
Issues: MEN-2207
Changelog: Title
Signed-off-by: Adam Podogrocki <a.podogrocki@gmail.com>
Instead of passing mutable number of parameters related to
number of partitions for raw disk images, a single array
will be used to keep these values.
Issues: MEN-2207
Changelog: None
Signed-off-by: Adam Podogrocki <a.podogrocki@gmail.com>
Currently if this code is run cmdline.txt will have duplicated content.
First the original line and second the original line with init_resize.sh
added.
Changelog: Avoid duplicate content in cmdline.txt
Signed-off-by: Mika Tuupola <tuupola@appelsiini.net>
It is a bit exessive to compile the mender client every time
the mender-convert tool is launched using docker-mender-convert.
Move the build to the Dockerfile so it is done during image
creation.
Changelog: Title
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
This ensures we use same version of mender-convert inside
the container as the one used to launch the container.
It makes versioning and local development easier.
Changelog: Use local (checked out) version of mender-convert inside container
Signed-off-by: Eystein Måløy Stenberg <eystein.maloy.stenberg@northern.tech>
consistent and align with entry-point way of running mender-convert.
Changelog: None
Signed-off-by: Eystein Måløy Stenberg <eystein.maloy.stenberg@northern.tech>