Go to file
Romain Naour d8447c38f5 support/testing: update logical eraseblock and physical eraseblock size for qemu >= 2.9
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

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-10-17 21:47:02 +02:00
arch package/gcc: remove csky version 2021-10-17 18:59:22 +02:00
board configs: remove qemu_csky defconfigs 2021-10-17 18:58:47 +02:00
boot boot/barebox: bump version to 2021.10.0 2021-10-15 22:50:32 +02:00
configs configs: remove qemu_csky defconfigs 2021-10-17 18:58:47 +02:00
docs docs/website: update for 2021.02.6 2021-10-12 08:17:36 +02:00
fs fs/ext2: fir (again) namespace for variables 2021-10-13 18:01:34 +02:00
linux {linux, linux-headers}: bump 4.{4, 9, 14, 19}.x / 5.{4, 10, 13, 14}.x series 2021-10-14 12:08:57 +02:00
package package/qemu: bump to version 6.1.0 2021-10-17 21:46:55 +02:00
support support/testing: update logical eraseblock and physical eraseblock size for qemu >= 2.9 2021-10-17 21:47:02 +02:00
system system: support br2-external init systems 2020-10-14 22:48:42 +02:00
toolchain toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_43744 2021-10-09 22:20:09 +02:00
utils utils/scanpypi: remove python2 compatibility imports 2021-09-22 21:40:43 +02:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 Revert ".flake8: fix check for 80/132 columns" 2021-01-02 17:38:20 +01:00
.gitignore
.gitlab-ci.yml .gitlab-ci.yml: update docker image to 20210922.2200 2021-10-17 19:04:37 +02:00
CHANGES Update for 2021.02.6 2021-10-12 08:15:00 +02:00
Config.in Config.in: disable Fortify Source for microblaze 2021-08-23 23:08:05 +02:00
Config.in.legacy package/binutils: remove csky version 2021-10-17 18:59:25 +02:00
COPYING
DEVELOPERS package/firmware-utils: add package 2021-10-15 22:45:21 +02:00
Makefile Revert "make: support: use command -v' instead of which'" 2021-10-01 20:09:58 +02:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches