Introduce bmap-tools as target + host package
v5 cover Introduce bmap-tools as target + host package
Hello,
Back in 2019, Nicolas Carrier started a patch series on bmap-tools, which was kind of abandonned after 4 iterations. I'm now trying to pick it up and revive it.
Compared to the v4 from Nicolas:
- Checked the list of optional runtime dependencies that bmap-tools can use, as suggested by Romain Naour, and added some explanations in the Config.in help text about them. There is not much more we can do about them in Buildroot: they are not optional build time dependencies, but only runtime dependencies, and only needed when certain features are needed (so there is no reason to make them mandatory dependencies).
- Added the missing pyexpat runtime dependency.
- Drop incorrect build-time dependencies, which are only runtime ones (target python-setuptools)
- Update to the latest version of bmap-tools
- Misc improvements to the test cases, migration to a newer toolchain that doesn't exhibit an fallocate() bug. Moving to a newer toolchain requires updating the pre-built kernel image used for the runtime test infrastructure.
- Added a host variant for the bmap-tools package, as this tool can also be very useful on the host to optimize the time needed to write an image. This host bmap-tools package comes with a test case as well.
Thanks!
Thomas Petazzoni
Nicolas Carrier (2):
package/bmap-tools: new package support/testing/tests/package/test_bmap_tools: new test
Thomas Petazzoni (3):
package/bmap-tools: enable host package support/testing/infra/emulator.py: update pre-built kernels support/testing/tests/package/test_bmap_tools: add test for host
bmap-tools
DEVELOPERS | 6 ++ package/Config.in | 1 + package/Config.in.host | 1 + package/bmap-tools/Config.in | 44 ++++++++++ package/bmap-tools/Config.in.host | 12 +++ package/bmap-tools/bmap-tools.hash | 3 + package/bmap-tools/bmap-tools.mk | 14 +++ support/testing/infra/emulator.py | 8 +- .../tests/package/sample_bmap_tools.sh | 15 ++++ .../testing/tests/package/test_bmap_tools.py | 88 +++++++++++++++++++ 10 files changed, 188 insertions(+), 4 deletions(-) create mode 100644 package/bmap-tools/Config.in create mode 100644 package/bmap-tools/Config.in.host create mode 100644 package/bmap-tools/bmap-tools.hash create mode 100644 package/bmap-tools/bmap-tools.mk create mode 100755 support/testing/tests/package/sample_bmap_tools.sh create mode 100644 support/testing/tests/package/test_bmap_tools.py
Signature · 1 line
2.31.1
PATCH v5 1/5 package/bmap-tools: new package
From: Nicolas Carrier <[email protected]>
--- DEVELOPERS | 2 ++ package/Config.in | 1 + package/bmap-tools/Config.in | 44 ++++++++++++++++++++++++++++++ package/bmap-tools/bmap-tools.hash | 3 ++ package/bmap-tools/bmap-tools.mk | 13 +++++++++ 5 files changed, 63 insertions(+) create mode 100644 package/bmap-tools/Config.in create mode 100644 package/bmap-tools/bmap-tools.hash create mode 100644 package/bmap-tools/bmap-tools.mk
DEVELOPERS +2 -0
@@ -1976,6 +1976,7 @@ F: board/intel/galileo/ F: configs/galileo_defconfig N: Nicolas Carrier <[email protected]> +F: package/bmap-tools/ F: package/php-xdebug/ N: Nicolas Cavallari <[email protected]>
@@ -2626,6 +2627,7 @@ F: configs/stm32mp157c_dk2_defconfig F: package/android-tools/ F: package/b43-firmware/ F: package/b43-fwcutter/ +F: package/bmap-tools/ F: package/c-periphery/ F: package/cdrkit/ F: package/cifs-utils/
package/Config.in +1 -0
@@ -196,6 +196,7 @@ menu "Filesystem and flash utilities" source "package/aufs/Config.in" source "package/aufs-util/Config.in" source "package/autofs/Config.in" + source "package/bmap-tools/Config.in" source "package/btrfs-progs/Config.in" source "package/cifs-utils/Config.in" source "package/cpio/Config.in"
package/bmap-tools/Config.in new file +44 -0
44 lines not on this page · raw message
package/bmap-tools/bmap-tools.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 0658afb972e7221aa16fece3f84e29e5102e901c929253d7fb6040bde28243f7 bmap-tools-3.6.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
package/bmap-tools/bmap-tools.mk new file +13 -0
@@ -0,0 +1,13 @@ +################################################################################ +# +# bmap-tools +# +################################################################################ + +BMAP_TOOLS_VERSION = 3.6 +BMAP_TOOLS_SITE = $(call github,intel,bmap-tools,v$(BMAP_TOOLS_VERSION)) +BMAP_TOOLS_LICENSE = GPL-2.0 +BMAP_TOOLS_LICENSE_FILES = COPYING +BMAP_TOOLS_SETUP_TYPE = setuptools + +$(eval $(python-package))
Signature · 1 line
2.31.1
PATCH v5 2/5 package/bmap-tools: enable host package
In reply to Thomas Petazzonibmaptool allows to drastically reduce the amount of data to transfer when writing to an SD card. Example with a 544 MiB sdcard.img:
$ bmaptool create sdcard.img > sdcard.bmap $ gzip sdcard.img $ bmaptool copy sdcard.img.gz /dev/sdc bmaptool: info: discovered bmap file 'sdcard.bmap' bmaptool: info: block map format version 2.0 bmaptool: info: 139265 blocks of size 4096 (544.0 MiB), mapped 23918 blocks (93.4 MiB or 17.2%) bmaptool: info: copying image 'sdcard.img.gz' to block device '/dev/sdc' using bmap file 'sdcard.bmap' bmaptool: info: 100% copied bmaptool: info: synchronizing '/dev/sdc' bmaptool: info: copying time: 7.7s, copying speed 12.1 MiB/sec
So it means that instead of writing 544 MiB, only 93.4 MiB had to be written.
In terms of implementation details, compared to the target bmap-tools package, there are fewer "selects" that are needed because:
- The dependency on setuptools is not needed, because the package uses the setuptools SETUP_TYPE, so host-python-setuptools is already a build dependency.
- host-python and host-python3 are always built with Expat XML support.
--- package/Config.in.host | 1 + package/bmap-tools/Config.in.host | 12 ++++++++++++ package/bmap-tools/bmap-tools.mk | 1 + 3 files changed, 14 insertions(+) create mode 100644 package/bmap-tools/Config.in.host
package/Config.in.host +1 -0
@@ -5,6 +5,7 @@ menu "Host utilities" source "package/android-tools/Config.in.host" source "package/asn1c/Config.in.host" source "package/babeltrace2/Config.in.host" + source "package/bmap-tools/Config.in.host" source "package/btrfs-progs/Config.in.host" source "package/cbootimage/Config.in.host" source "package/checkpolicy/Config.in.host"
package/bmap-tools/Config.in.host new file +12 -0
@@ -0,0 +1,12 @@ +config BR2_PACKAGE_HOST_BMAP_TOOLS + bool "host bmap-tools" + select BR2_PACKAGE_HOST_PYTHON_SIX # runtime + help + Tool to flash image files to block devices using the block map + bmaptool is a generic tool for creating the block map (bmap) + for a file, and copying files using the block map. The idea is + that large file containing unused blocks, like raw system + image files, can be copied or flashed a lot faster with + bmaptool than with traditional tools like "dd" or "cp". + + https://github.com/intel/bmap-tools
package/bmap-tools/bmap-tools.mk +1 -0
@@ -11,3 +11,4 @@ BMAP_TOOLS_LICENSE_FILES = COPYING BMAP_TOOLS_SETUP_TYPE = setuptools $(eval $(python-package)) +$(eval $(host-python-package))
Signature · 1 line
2.31.1
PATCH v5 3/5 support/testing/infra/emulator.py: update pre-built kernels
In reply to Thomas PetazzoniThe pre-built vexpress kernel used by the testing infrastructure is a 4.0.0 kernel, which is getting old to be used with reasonably recent toolchains.
This commit updates the pre-built kernels for both the versatile and vexpress machines to 5.10.7 (they have already been put online).
--- support/testing/infra/emulator.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
support/testing/infra/emulator.py +4 -4
@@ -54,16 +54,16 @@ class Emulator(object): if arch == "armv7": kernel = infra.download(self.downloaddir, - "kernel-vexpress") + "kernel-vexpress-5.10.7") dtb = infra.download(self.downloaddir, - "vexpress-v2p-ca9.dtb") + "vexpress-v2p-ca9-5.10.7.dtb") qemu_cmd += ["-dtb", dtb] qemu_cmd += ["-M", "vexpress-a9"] elif arch == "armv5": kernel = infra.download(self.downloaddir, - "kernel-versatile-4.19") + "kernel-versatile-5.10.7") dtb = infra.download(self.downloaddir, - "versatile-pb-4.19.dtb") + "versatile-pb-5.10.7.dtb") qemu_cmd += ["-dtb", dtb] qemu_cmd += ["-M", "versatilepb"] qemu_cmd += ["-device", "virtio-rng-pci"]
Signature · 1 line
2.31.1
PATCH v5 4/5 support/testing/tests/package/test_bmap_tools: new test
In reply to Thomas PetazzoniFrom: Nicolas Carrier <[email protected]>
This patch implements a simple test in which a dummy file system image is created, then bmaptool create and bmaptool copy are used to copy it to another file.
--- DEVELOPERS | 4 ++ .../tests/package/sample_bmap_tools.sh | 15 +++++ .../testing/tests/package/test_bmap_tools.py | 59 +++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100755 support/testing/tests/package/sample_bmap_tools.sh create mode 100644 support/testing/tests/package/test_bmap_tools.py
DEVELOPERS +4 -0
@@ -1978,6 +1978,8 @@ F: configs/galileo_defconfig N: Nicolas Carrier <[email protected]> F: package/bmap-tools/ F: package/php-xdebug/ +F: support/testing/tests/package/sample_bmap_tools.sh +F: support/testing/tests/package/test_bmap_tools.py N: Nicolas Cavallari <[email protected]> F: package/libgit2/
@@ -2678,6 +2680,8 @@ F: package/squashfs/ F: package/wayland/ F: package/weston/ F: support/testing/tests/boot/test_syslinux.py +F: support/testing/tests/package/sample_bmap_tools.sh +F: support/testing/tests/package/test_bmap_tools.py F: toolchain/ N: Timo Ketola <[email protected]>
support/testing/tests/package/sample_bmap_tools.sh new file +15 -0
@@ -0,0 +1,15 @@ +#!/bin/sh +# simple test which creates a dummy file system image, then use bmaptool create +# and bmaptool copy to copy it to another file + +set -xeu + +# create the necessary test files +dd if=/dev/zero of=disk.img bs=2M count=1 +mkfs.ext4 disk.img +fallocate -d disk.img +dd if=/dev/zero of=copy.img bs=2M count=1 + +# do a test copy of the file system image +bmaptool create -o disk.img.bmap disk.img +bmaptool copy disk.img copy.img
support/testing/tests/package/test_bmap_tools.py new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
2.31.1
PATCH v5 5/5 support/testing/tests/package/test_bmap_tools: add test for host bmap-tools
In reply to Thomas Petazzoni--- .../testing/tests/package/test_bmap_tools.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+)
support/testing/tests/package/test_bmap_tools.py +29 -0
@@ -1,5 +1,6 @@ import os import infra +import subprocess from infra.basetest import BRTest
@@ -57,3 +58,31 @@ class TestPy3BmapTools(TestBmapTools): """ BR2_PACKAGE_PYTHON3=y """ + + +class TestHostBmapTools(BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_PACKAGE_HOST_BMAP_TOOLS=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + cmd = [os.path.join(self.b.builddir, "host", "bin", "bmaptool"), + "create", + "-o", os.path.join(self.b.builddir, "images", "rootfs.ext2.bmap"), + os.path.join(self.b.builddir, "images", "rootfs.ext2")] + ret = subprocess.call(cmd, + stdout=self.b.logfile, + stderr=self.b.logfile) + self.assertEqual(ret, 0) + + cmd = [os.path.join(self.b.builddir, "host", "bin", "bmaptool"), + "copy", + os.path.join(self.b.builddir, "images", "rootfs.ext2"), + os.path.join(self.b.builddir, "images", "rootfs.ext2.copy")] + ret = subprocess.call(cmd, + stdout=self.b.logfile, + stderr=self.b.logfile) + self.assertEqual(ret, 0)
Signature · 1 line
2.31.1
v5 cover Introduce bmap-tools as target + host package
In reply to Thomas PetazzoniHello,
I've tested the patch series in both the current master and by applying it to our fork, which is based of 2020.02.11 and, after resolving the conflicts with our branch (mainly in the DEVELOPERS file), I could test it in both.
* the target package works fine
* so does the host package
* the tests TestPy3BmapTools and TestPy2BmapTools are failing at run time.
The first error in the run log is:
qemu-system-arm: Invalid SD card size: 60 MiB
SD card size has to be a power of 2, e.g. 64 MiB.
So I set a fixed image size of 64M.
With this modification, the python 2 test passes, but with that, the python 3 one, fails with a timeout issue:
...
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 181, inexpect_loop
return self.timeout(e)
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 144, in
timeout
raise exc
pexpect.exceptions.TIMEOUT: Timeout exceeded.
...
By increasing the timeout to 60 seconds, I could have all the tests passing.
I attached my diff for reference.
And I have a question, is keeping python 2 compatibility still required? Shouldn't we get rid of this test? It'd save quite an amount of CPU time :)
Quoted 75 lines · Thomas Petazzoni
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hello,
Back in 2019, Nicolas Carrier started a patch series on bmap-tools, which was kind of abandonned after 4 iterations. I'm now trying to pick it up and revive it.
Compared to the v4 from Nicolas:
?- Checked the list of optional runtime dependencies that bmap-tools ?? can use, as suggested by Romain Naour, and added some explanations ?? in the Config.in help text about them. There is not much more we ?? can do about them in Buildroot: they are not optional build time ?? dependencies, but only runtime dependencies, and only needed when ?? certain features are needed (so there is no reason to make them ?? mandatory dependencies).
?- Added the missing pyexpat runtime dependency.
?- Drop incorrect build-time dependencies, which are only runtime ones
?? (target python-setuptools)?- Update to the latest version of bmap-tools
?- Misc improvements to the test cases, migration to a newer toolchain
?? that doesn't exhibit anfallocate()bug. Moving to a newer ?? toolchain requires updating the pre-built kernel image used for the
?? runtime test infrastructure.?- Added a host variant for the bmap-tools package, as this tool can ?? also be very useful on the host to optimize the time needed to ?? write an image. This host bmap-tools package comes with a test case
?? as well.Thanks!
Thomas Petazzoni
Nicolas Carrier (2):
? package/bmap-tools: new package
? support/testing/tests/package/test_bmap_tools: new testThomas Petazzoni (3):
? package/bmap-tools: enable host package
?support/testing/infra/emulator.py: update pre-built kernels ? support/testing/tests/package/test_bmap_tools: add test for host ??? bmap-tools?DEVELOPERS??????????????????????????????????? |? 6 ++ ?package/Config.in???????????????????????????? |? 1 + ?package/Config.in.host??????????????????????? |? 1 + ?package/bmap-tools/Config.in????????????????? | 44 ++++++++++ ?package/bmap-tools/Config.in.host???????????? | 12 +++ ?package/bmap-tools/bmap-tools.hash??????????? |? 3 + ?package/bmap-tools/bmap-tools.mk????????????? | 14 +++ ?support/testing/infra/emulator.py???????????? |? 8 +- ?.../tests/package/sample_bmap_tools.sh??????? | 15 ++++ ?.../testing/tests/package/test_bmap_tools.py? | 88+++++++++++++++++++
?10 files changed, 188 insertions(+), 4 deletions(-) ?create mode 100644 package/bmap-tools/Config.in
?create mode 100644 package/bmap-tools/Config.in.host ?create mode 100644 package/bmap-tools/bmap-tools.hash ?create mode 100644package/bmap-tools/bmap-tools.mk?create mode 100755support/testing/tests/package/sample_bmap_tools.sh?create mode 100644support/testing/tests/package/test_bmap_tools.py
Quoted 3 lines
--
2.31.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minor_bmap_tests_fixes.patch
Type: text/x-patch
Size: 901 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210609/aeb3bd68/attachment.bin>
v5 cover Introduce bmap-tools as target + host package
Hello Nicolas,
Quoted 24 lines · On Wed, 09 Jun 2021 09:35:38 +0200 Nicolas Carrier…
* the target package works fine
* so does the host package
* the tests TestPy3BmapTools and TestPy2BmapTools are failing at run time.The first error in the run log is:
qemu-system-arm: Invalid SD card size: 60 MiB
SD card size has to be a power of 2, e.g. 64 MiB.So I set a fixed image size of 64M.
With this modification, the python 2 test passes, but with that, the python 3 one, fails with a timeout issue:...
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 181, inexpect_loop
returnself.timeout(e)
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 144, in
timeout
raise exc
pexpect.exceptions.TIMEOUT: Timeout exceeded.
...
Quoted 4 lines
By increasing the timeout to 60 seconds, I could have all the tests passing.
I attached my diff for reference.
Thanks a lot for the testing! I'll double check, but I believe the tests were working here. But of course, I've done quite a bit of back and forth, so let's double check :)
Quoted 3 lines
And I have a question, is keeping python 2 compatibility still required? Shouldn't we get rid of this test? It'd save quite an amount of CPU time :)
python2 is already marked deprecated in BR, and we're more and more thinking of getting rid of it. I think this may happen in the near future.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v5 cover Introduce bmap-tools as target + host package
Quoted 4 lines
Thanks a lot for the testing! I'll double check, but I believe the tests were working here. But of course, I've done quite a bit of back and forth, so let's double check :)
For the 64M thing, maybe a difference in qemu versions? I'm using debian bullseye (11) and my qemu version is:
$ qemu-system-arm --version QEMU emulator version 5.2.0 (Debian 1:5.2+dfsg-10) Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
About the timeout, I bet it was due to the work load, because I can't reproduce it today, when the activity on my machine is low. That said, the execution times range between 13s to 16s which makes me say that the orinigal 20s limit was maybe too optimistic. Maybe 60 seconds is not strictly required, but at least something like 40s would be safer.
Quoted 16 lines
Quoted 4 lines
And I have a question, is keeping python 2 compatibility still required? Shouldn't we get rid of this test? It'd save quite an amount
of CPU time :)python2 is already marked deprecated in BR, and we're more and more thinking of getting rid of it. I think this may happen in the near future.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
v5 cover Introduce bmap-tools as target + host package
In reply to Nicolas CarrierHello Nicolas,
Quoted 6 lines · On Wed, 09 Jun 2021 09:35:38 +0200 Nicolas Carrier…
The first error in the run log is:
qemu-system-arm: Invalid SD card size: 60 MiB
SD card size has to be a power of 2, e.g. 64 MiB.So I set a fixed image size of 64M.
This is weird, because all the ext2/3/4 test cases in our test infrastructure also do not specify a size, and so they get the default of 60 MiB.
Could you try:
./support/testing/run-tests tests.fs.test_ext.TestExt4
and see if it works for you ?
Which version of Qemu are you using? I'm using 4.2.1.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v5 cover Introduce bmap-tools as target + host package
Hi Thomas, Nicolas,
Le 09/06/2021 ? 20:52, Thomas Petazzoni a ?crit?:
Quoted 16 lines
Hello Nicolas,
Quoted 6 lines · On Wed, 09 Jun 2021 09:35:38 +0200 Nicolas Carrier…
The first error in the run log is:
qemu-system-arm: Invalid SD card size: 60 MiB
SD card size has to be a power of 2, e.g. 64 MiB.So I set a fixed image size of 64M.
This is weird, because all the ext2/3/4 test cases in our test infrastructure also do not specify a size, and so they get the default of 60 MiB.
Quoted 7 lines
Could you try:
./support/testing/run-tests tests.fs.test_ext.TestExt4
and see if it works for you ?
Which version of Qemu are you using? I'm using 4.2.1.
We had the same problem after a qemu version bump to 5.1:
https://git.buildroot.net/buildroot/commit/?id=4bd2a317a7d6c3b3b19396a9459816da76b2c796
Best regards,
Romain
Quoted 5 lines
Best regards,
Thomas
v5 cover Introduce bmap-tools as target + host package
Sure,
My qemu version is:
$ qemu-system-arm --version QEMU emulator version 5.2.0 (Debian 1:5.2+dfsg-10)
The Ext4 test passes:
$ ./support/testing/run-tests tests.fs.test_ext.TestExt4 -o tests -d dl 09:03:31 TestExt4 Starting 09:03:34 TestExt4 Building ah09:08:12 TestExt4 Building done Downloading to /home/ncarrier/workspace/buildroot/dl/tmp_43sbo0r Renaming from /home/ncarrier/workspace/buildroot/dl/tmp_43sbo0r to /home/ncarrier/workspace/buildroot/dl/kernel-vexpress-5.10.7 Downloading to /home/ncarrier/workspace/buildroot/dl/tmpnj5e2uiw Renaming from /home/ncarrier/workspace/buildroot/dl/tmpnj5e2uiw to /home/ncarrier/workspace/buildroot/dl/vexpress-v2p-ca9-5.10.7.dtb 09:08:20 TestExt4 Cleaning up . ---------------------------------------------------------------------- Ran 1 test in 289.374s
OK
But its file system image has a size of 16M which _is_ a power of two:
BR2_TARGET_ROOTFS_EXT2_SIZE="16384"
Quoted 46 lines · Romain Naour
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Thomas, Nicolas,
Le 09/06/2021 ? 20:52, Thomas Petazzoni a ?crit :
Quoted 17 lines
Hello Nicolas,
Quoted 6 lines · On Wed, 09 Jun 2021 09:35:38 +0200 Nicolas Carrier…
The first error in the run log is:
qemu-system-arm: Invalid SD card size: 60 MiB
SD card size has to be a power of 2, e.g. 64 MiB.So I set a fixed image size of 64M.
This is weird, because all the ext2/3/4 test cases in our test infrastructure also do not specify a size, and so they get the default
of 60 MiB.Quoted 7 lines
Could you try:
./support/testing/run-tests tests.fs.test_ext.TestExt4
and see if it works for you ?
Which version of Qemu are you using? I'm using 4.2.1.
We had the same problem after a qemu version bump to 5.1:
https://git.buildroot.net/buildroot/commit/?id=4bd2a317a7d6c3b3b19396a9459816da76b2c796
Best regards,
RomainQuoted 5 lines
Best regards,
Thomas
v5 cover Introduce bmap-tools as target + host package
Hello Nicolas,
Quoted 22 lines · On Thu, 10 Jun 2021 09:39:43 +0200 Nicolas Carrier…
Sure,
My qemu version is:
$ qemu-system-arm --version QEMU emulator version 5.2.0 (Debian 1:5.2+dfsg-10)The Ext4 test passes:
$ ./support/testing/run-tests tests.fs.test_ext.TestExt4 -o tests -d dl 09:03:31 TestExt4 Starting 09:03:34 TestExt4 Building ah09:08:12 TestExt4 Building done Downloading to /home/ncarrier/workspace/buildroot/dl/tmp_43sbo0r Renaming from /home/ncarrier/workspace/buildroot/dl/tmp_43sbo0r to /home/ncarrier/workspace/buildroot/dl/kernel-vexpress-5.10.7 Downloading to /home/ncarrier/workspace/buildroot/dl/tmpnj5e2uiw Renaming from /home/ncarrier/workspace/buildroot/dl/tmpnj5e2uiw to /home/ncarrier/workspace/buildroot/dl/vexpress-v2p-ca9-5.10.7.dtb 09:08:20 TestExt4 Cleaning up . ---------------------------------------------------------------------- Ran 1 test in 289.374s
Quoted 3 lines
OK
But its file system image has a size of 16M which _is_ a power of two:
Sorry, I picked the wrong test. Could you try the Ext3 tests, i.e tests.fs.test_ext.TestExt3 ? This one doesn't specify a size, so it should fallback to the default, which is 60MB.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v5 cover Introduce bmap-tools as target + host package
Ok,
So I ran the test and this time, it failed as expected :)
buildroot$ tail -f tests/TestExt3-run.log
Quoted 1 line
starting qemu with 'qemu-system-arm -serial stdio -display none -m
256 -drive file=/home/ncarrier/workspace/buildroot/tests/TestExt3/images/rootfs.ex t3,if=sd -dtb /home/ncarrier/workspace/buildroot/dl/vexpress-v2p-ca9- 5.10.7.dtb -M vexpress-a9 -kernel /home/ncarrier/workspace/buildroot/dl/kernel-vexpress-5.10.7 -append root=/dev/mmcblk0 rootfstype=ext3 console=ttyAMA0'
WARNING: Image format was not specified for '/home/ncarrier/workspace/buildroot/tests/TestExt3/images/rootfs.ext3' and probing guessed raw.
Automatically detecting the format is dangerous for raw
images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the
restrictions.
qemu-system-arm: Invalid SD card size: 60 MiB
SD card size has to be a power of 2, e.g. 64 MiB.
You can resize disk images with 'qemu-img resize <imagefile> <new- size>'
(note that this will lose data if you make the image smaller than it currently is).
Quoted 49 lines · Thomas Petazzoni
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hello Nicolas,
Quoted 24 lines · On Thu, 10 Jun 2021 09:39:43 +0200 Nicolas Carrier…
Sure,
My qemu version is:
$ qemu-system-arm? --version QEMU emulator version 5.2.0 (Debian 1:5.2+dfsg-10)The Ext4 test passes:
$ ./support/testing/run-tests tests.fs.test_ext.TestExt4 -o tests - d dl 09:03:31 TestExt4???????????????????????????????? Starting 09:03:34 TestExt4???????????????????????????????? Building ah09:08:12 TestExt4???????????????????????????????? Building done Downloading to /home/ncarrier/workspace/buildroot/dl/tmp_43sbo0r Renaming from /home/ncarrier/workspace/buildroot/dl/tmp_43sbo0r to /home/ncarrier/workspace/buildroot/dl/kernel-vexpress-5.10.7 Downloading to /home/ncarrier/workspace/buildroot/dl/tmpnj5e2uiw Renaming from /home/ncarrier/workspace/buildroot/dl/tmpnj5e2uiw to /home/ncarrier/workspace/buildroot/dl/vexpress-v2p-ca9-5.10.7.dtb 09:08:20 TestExt4???????????????????????????????? Cleaning up . ------------------------------------------------------------------- --- Ran 1 test in 289.374sQuoted 4 lines
OK
But its file system image has a size of 16M which _is_ a power of two:
Sorry, I picked the wrong test. Could you try the Ext3 tests, i.e tests.fs.test_ext.TestExt3 ? This one doesn't specify a size, so it should fallback to the default, which is 60MB.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com