buildroot/configs/pc_x86_64_bios_defconfig
Yann E. MORIN 086c96b452 configs/pc_x86_64_bios_defconfig: fix image generation after grub2 rework
Commit 82d1e8c628 (boot/grub2: use none platform when building for
host) changed host-grub2 to only install the tools, not the actual
bootloader or its modules, as they are of no use on the host.

It so happened that, when not instructed to built for a specific
platform, the grub2 buildsystem would default to build the legacy bios
platform (at least when the build happens on an x86 or x86_64 host).

However, because the host is more often than not an x86 or x86_64, when
the target was also an x68 or x86_64, the modules built for the host
could be re-used for the target, and this is what was done for our
pc_x86_64_bios_defconfig.

But now that we explicitly tell the grub2 buildsystem to not build any
platform when we build host-grub2, we no longer have access to the grub2
modules from the host directory, and the build fails when assembling the
final image.

We fix that in two ways:

First, we ensure that individual modules from the target grub2 get installed
in target/; we can only do that if the target grub2 tools are also
installed, so we enable that in the configuration.

Second, we fix the post-build script to look in target/ rather than in
host/.

All that, just for the 512-byte boot.img bootstrap, which pulls in all
the other modules (4.3MiB), the tools (8.8MiB)... But we are not going
to cherry-pick individual modules; this is error prone and
unmaintainable...

Reported-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Köry Maincent <kory.maincent@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-12-05 12:32:24 +01:00

67 lines
2 KiB
Plaintext

# Architecture
BR2_x86_64=y
# Toolchain, required for eudev (to autoload drivers)
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
# System
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
# Required tools to create bootable media
BR2_PACKAGE_HOST_GENIMAGE=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_INSTALL_TOOLS=y
# Filesystem / image
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
# BR2_TARGET_ROOTFS_TAR is not set
BR2_ROOTFS_POST_BUILD_SCRIPT="board/pc/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pc/genimage-bios.cfg"
# Linux headers same as kernel, a 4.19 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.204"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
# Firmware
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3168=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_5000=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2A=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2B=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7260=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265D=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8000C=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8265=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y
# Packages
#
# Use connman so that networking setup is simpler, via connmanctl tool
# acpid is for seamless power button support
BR2_PACKAGE_ACPID=y
BR2_PACKAGE_CONNMAN=y
BR2_PACKAGE_CONNMAN_CLIENT=y
BR2_PACKAGE_CONNMAN_WIFI=y