Go to file
Carlos Santos 44be514b21 package/qemu: refactor target emulator selection
The current mechanism to select emulation targets works this way:

- BR2_PACKAGE_QEMU_SYSTEM selects the "system" (softmmu) targets. It
  selects FDT and creates a dependency on the "dtc" package but this is
  not always necessary. Only 14 system targets, out of 31, actually
  require FDT.

- BR2_PACKAGE_QEMU_LINUX_USER selects the "linux-user" targets. It does
  not select FDT, which is not required by linux-user emulators.

- Alternatively, we fill BR2_PACKAGE_QEMU_CUSTOM_TARGETS with a list of
  emulators (e.g.  "x86_64-softmmu x86_64-linux-user"). Then we pass
  "--enable-system --enable-linux-user --target-list="..." to the
  configure script, so QEMU builds its list of default targets, from
  which it checks if the specified subset is valid.

Since CUSTOM_TARGETS does not select FDT, we can get build errors like
this:

  ../meson.build:2778:2: ERROR: Problem encountered: fdt not available but required by targets x86_64-softmmu

We could select FDT when CUSTOM_TARGETS is set, but this would force an
unnecessary dependency on dtc, as BR2_PACKAGE_QEMU_SYSTEM does.

In order to fix these problems, refactor the package configuration:

- Keep BR2_PACKAGE_QEMU_SYSTEM and BR2_PACKAGE_QEMU_LINUX_USER, which by
  default build all corresponding target emulators.

- Add a BR2_PACKAGE_QEMU_CHOOSE_TARGETS config, to permit choosing the
  desired emulators.

- Add configs for each supported target. They select FDT, when needed.

- Move QEMU to a separate menu, since the number of configuration itens
  became too large.

- Select BR2_LEGACY if BR2_PACKAGE_QEMU_CUSTOM_TARGETS is set, because
  this situation requires user intervention to reconfigure the package.

- Reorganize the make file accordingly. Selecting CHOOSE_TARGETS without
  choosing at least one emulator is considered an error.

Notes about the list of enabled targets:

- when the user enables both system and user emulation, we provide no
  way to be able to build all system bt only parts of user (or the other
  way around), because the qemu build system does not allow that: when a
  list of target is passed, it applies to both system and user
  emulation;

- as a consequence and in the same spirit, we also do not sanity-check
  that at least one system, resp. user, target is enabled when system,
  resp. user, emulation is enabled; we only require that one target is
  enabled, so that the list is not empty.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
[yann.morin.1998@free.fr:
  - always build at least user or system
  - add help text to BR2_PACKAGE_QEMU_CHOOSE_TARGETS
  - simplify prompt for BR2_PACKAGE_QEMU_CHOOSE_TARGETS
  - simplify list of targets with unique QEMU_TARGET_LIST_y
  - extend the commit log with "Notes about the list of enabled targets"
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-12-29 22:34:52 +01:00
arch arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains 2022-11-13 22:32:31 +01:00
board configs/visionfive2_defconfig: new defconfig 2022-12-19 10:05:23 +01:00
boot boot/sun20i-d1-spl: drop package 2022-12-13 21:20:53 +01:00
configs configs/sipeed_licheee_rv_defconfig: use 6.1 kernel headers 2022-12-19 22:25:09 +01:00
docs docs/website: update for 2022.02.8 2022-12-10 20:59:24 +01:00
fs fs/ext2: generate Y2K38-resilient filesystems 2022-12-14 20:29:11 +01:00
linux {linux, linux-headers}: 5.{4, 10, 15}.x / 6.{0, 1}.x series 2022-12-22 08:39:31 +01:00
package package/qemu: refactor target emulator selection 2022-12-29 22:34:52 +01:00
support support/testing: add test for python-munch 2022-12-29 10:38:11 +01:00
system system: add options for /var factory and tmpfiles pre-seed 2022-12-22 11:07:59 +01:00
toolchain {toolchain, linux-headers}: add support for 6.1 headers 2022-12-18 14:56:37 +01:00
utils utils/scancpan: bump required perl version 2022-12-20 17:22:27 +01:00
.clang-format
.defconfig
.flake8
.gitignore
.gitlab-ci.yml utils/checkpackagelib/lib_sysv: run shellcheck 2022-02-06 18:27:03 +01:00
.shellcheckrc utils/check-package: improve shellcheck reproducibility 2022-07-25 23:52:47 +02:00
CHANGES Update for 2022.02.8 2022-12-10 20:57:31 +01:00
Config.in Config.in: update default CPAN mirror to https, update mirrors URL 2022-12-21 14:03:25 +01:00
Config.in.legacy package/qemu: refactor target emulator selection 2022-12-29 22:34:52 +01:00
COPYING
DEVELOPERS support/testing: add test for python-munch 2022-12-29 10:38:11 +01:00
Makefile Merge branch 'next' 2022-12-05 10:01:26 +01:00
Makefile.legacy
README

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