Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 15/16] support/testing: update logical eraseblock and physical eraseblock size for qemu >= 2.9
Date: Sun, 17 Oct 2021 21:51:36 +0200	[thread overview]
Message-ID: <20211017195136.GL2400@scaer> (raw)
In-Reply-To: <20210912141140.253778-13-romain.naour@gmail.com>

Romain, All,

On 2021-09-12 16:11 +0200, Romain Naour spake thusly:
> The current ubi/ubifs test (test_ubi.py) rely on a Qemu bug present in
> 2.8.0 that was fixed in Qemu 2.9.0 [1]. The ubi/ubifs settings is
> updated to run with Qemu >= 2.9.0 using the new multiple chip handling.
> 
> If needed, the old behavior can be enabled using the pflash01 property
> "old-multiple-chip-handling" [2].
> 
> The issue was not detected until now since we are sill using an old
> qemu (2.8 from Debian stretch) for testing in gitlab (using the
> Buildroot Docker image used by gitlab-ci.yml).
> 
> First the logical eraseblock size (LEB) must be updated to the value
> 0x3ff80 reported by the kernel when using qemu >= 2.9.0.
> 
>   UBIFS (ubi0:0): Mounting in unauthenticated mode
>   UBIFS error (ubi0:0 pid 1): ubifs_read_superblock: LEB size mismatch: 524160 in superblock, 262016 real
>   UBIFS error (ubi0:0 pid 1): ubifs_read_superblock: bad superblock, error 1
> 
> But the system is still failing to boot:
> 
>  UBIFS error (ubi0:0 pid 1): ubifs_scan: garbage
>  UBIFS error (ubi0:0 pid 1): ubifs_recover_master_node: failed to recover master node
> 
> ubifs is reading garbage since Qemu >= 2.9.0 report a sector
> length per device divided by the number of devices (see commit [1]).
> 
> The kernel detect two flash devices (dmesg):
> 
>   Concatenating MTD devices:
>   (0): "40000000.flash"
>   (1): "40000000.flash"
>   into device "40000000.flash"
> 
> Divide the physical eraseblock (PEB) size by two.
> 
> Tested with qemu 2.9.0, 5.1.0.
> 
> Fixes:
> https://gitlab.com/kubu93/buildroot/-/jobs/1543100932
> 
> [1] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=feb0b1aa11f14ee71660aba46b46387d1f923c9e
> [2] http://lists.busybox.net/pipermail/buildroot/2021-September/622069.html

I am not sure I understood that reference: the patch in [2] was never
applied, it is no longer present in patchwork, but I could not find a
discsuuion about it either... Did you withdraw that patch?

> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  support/testing/tests/fs/test_ubi.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/support/testing/tests/fs/test_ubi.py b/support/testing/tests/fs/test_ubi.py
> index eeb55b1d59..7c687c1982 100644
> --- a/support/testing/tests/fs/test_ubi.py
> +++ b/support/testing/tests/fs/test_ubi.py
> @@ -8,10 +8,10 @@ class TestUbi(infra.basetest.BRTest):
>      config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
>          """
>          BR2_TARGET_ROOTFS_UBIFS=y
> -        BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x7ff80
> +        BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x3ff80
>          BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1
>          BR2_TARGET_ROOTFS_UBI=y
> -        BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x80000
> +        BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x40000
>          BR2_TARGET_ROOTFS_UBI_SUBSIZE=1
>          """
>  
> -- 
> 2.31.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-10-17 19:51 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12 14:11 [Buildroot] [PATCH 03/16] support/testing: test_f2fs: bump to kernel 4.19.204 Romain Naour
2021-09-12 14:11 ` [Buildroot] [PATCH 04/16] support/testing: test_glxinfo: " Romain Naour
2021-10-04 20:02   ` Peter Korsgaard
2021-09-12 14:11 ` [Buildroot] [PATCH 05/16] support/testing: test_openrc: switch to ARM arm toolchain and builtin kernel Romain Naour
2021-10-04 20:02   ` Peter Korsgaard
2021-09-12 14:11 ` [Buildroot] [PATCH 06/16] support/testing: test_iso9660: bump to kernel 4.19.204 Romain Naour
2021-10-04 20:02   ` Peter Korsgaard
2021-09-12 14:11 ` [Buildroot] [PATCH 07/16] support/testing: test_lxc " Romain Naour
2021-10-04 20:03   ` Peter Korsgaard
2021-09-12 14:11 ` [Buildroot] [PATCH 08/16] support/testing: test_rust: remove kernel build Romain Naour
2021-10-04 20:03   ` Peter Korsgaard
2021-09-12 14:11 ` [Buildroot] [PATCH 09/16] support/testing: test_openssh: use a prebuilt toolchain Romain Naour
2021-10-04 20:06   ` Peter Korsgaard
2021-11-14 17:20     ` Romain Naour
2021-09-12 14:11 ` [Buildroot] [PATCH 10/16] support/testing: switch to prebuilt toolchain, core2duo to Nehalem Romain Naour
2021-10-04 20:09   ` Peter Korsgaard
2021-09-12 14:11 ` [Buildroot] [PATCH 11/16] support/docker: bump docker image for the gitlab-ci to Debian bullseye Romain Naour
2021-09-21 20:34   ` Arnout Vandecappelle
2021-09-22 20:10   ` [Buildroot] [PATCH] .gitlab-ci.yml: update docker image to 20210922.2200 Arnout Vandecappelle (Essensium/Mind)
2021-09-22 21:45     ` Romain Naour
2021-09-23 18:25       ` Arnout Vandecappelle
2021-09-23 20:52         ` Romain Naour
2021-10-07 20:31           ` Romain Naour
2021-10-17 17:05     ` Yann E. MORIN
2021-09-22 20:13   ` [Buildroot] [PATCH 11/16] support/docker: bump docker image for the gitlab-ci to Debian bullseye Arnout Vandecappelle
2021-09-22 20:50     ` Romain Naour
2021-09-12 14:11 ` [Buildroot] [PATCH 12/16] package/qemu: bump to version 6.1.0 Romain Naour
2021-10-17 19:49   ` Yann E. MORIN
2021-09-12 14:11 ` [Buildroot] [PATCH 13/16] support/testing: test_ubi: reduce the rootfs.ubi size to 64M to match the Qemu emulated flash device Romain Naour
2021-10-17 19:49   ` Yann E. MORIN
2021-09-12 14:11 ` [Buildroot] [PATCH 14/16] support/testing: test_ubi: add image format on the qemu command line Romain Naour
2021-10-17 19:50   ` Yann E. MORIN
2021-09-12 14:11 ` [Buildroot] [PATCH 15/16] support/testing: update logical eraseblock and physical eraseblock size for qemu >= 2.9 Romain Naour
2021-10-17 19:51   ` Yann E. MORIN [this message]
2021-10-17 20:05     ` Romain Naour
2021-09-12 14:11 ` [Buildroot] [PATCH 16/16] support/testing: test_ubi: allow to boot several times using the same ubi image Romain Naour
2021-10-17 19:51   ` Yann E. MORIN
2021-10-04 20:02 ` [Buildroot] [PATCH 03/16] support/testing: test_f2fs: bump to kernel 4.19.204 Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2021-09-12 14:06 [Buildroot] [PATCH 01/16] support/testing: test_file_capabilities: " Romain Naour
2021-09-12 14:06 ` [Buildroot] [PATCH 02/16] support/testing: test_systemd: " Romain Naour
2021-10-04 20:02   ` Peter Korsgaard
2021-09-12 14:06 ` [Buildroot] [PATCH 03/16] support/testing: test_f2fs: " Romain Naour
2021-10-04 20:01 ` [Buildroot] [PATCH 01/16] support/testing: test_file_capabilities: " Peter Korsgaard

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=20211017195136.GL2400@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.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