44be514b21
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> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
utils | ||
.clang-format | ||
.defconfig | ||
.flake8 | ||
.gitignore | ||
.gitlab-ci.yml | ||
.shellcheckrc | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
DEVELOPERS | ||
Makefile | ||
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