Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qemu-uefi-x86: new board for virtualized environment with serial console support, kernel boot messages #6307

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config/boards/qemu-uefi-x86.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# x86_64 via UEFI/BIOS for generic virtual board
#
# Usage: Use this board to run armbian on a
# virtualized environment (eg: QEMU/KVM)
#
# Notes:
# - Differences with the 'uefi-x86' board:
# - support kernel boot messages on graphical
# and console/serial devices
# - support prompt on graphical/console devices
# - Patches targeting virtualized env on x86
rpardini marked this conversation as resolved.
Show resolved Hide resolved
# should be added here - when it make sense :)
#
declare -g BOARD_NAME="UEFI x86 (QEMU)"
declare -g BOARDFAMILY="uefi-x86"
declare -g BOARD_MAINTAINER="@davidandreoletti"
declare -g KERNEL_TARGET="legacy,current,edge"
declare -g SERIALCON="tty1,ttyS0"

declare -g BOOT_LOGO=desktop

declare -g GRUB_CMDLINE_LINUX_DEFAULT="earlyprintk=ttyS0,115200,keep"
declare -g DEFAULT_CONSOLE="both"
declare -g UEFI_GRUB_TERMINAL="gfxterm vga_text console serial"
3 changes: 2 additions & 1 deletion config/boards/uefi-x86.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# x86_64 via UEFI/BIOS for all boards
# x86_64 via UEFI/BIOS for a generic hardware board
declare -g BOARD_NAME="UEFI x86"
declare -g BOARDFAMILY="uefi-x86"
declare -g BOARD_MAINTAINER="rpardini"
declare -g KERNEL_TARGET="legacy,current,edge"
declare -g SERIALCON="tty1"

declare -g BOOT_LOGO=desktop
2 changes: 1 addition & 1 deletion config/sources/families/include/uefi_common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
#
declare -g SERIALCON="tty1" # Cant reasonably expect UEFI stuff to have a serial console. Customize if otherwise.
declare -g SERIALCON="${SERIALCON:-tty1}" # Consistent serial console device unlikely on UEFI arch pair. Customize if otherwise.
declare -g UEFI_GRUB_TIMEOUT=${UEFI_GRUB_TIMEOUT:-3} # Default 3-seconds timeout for GRUB menu.
declare -g BOARD_FIRMWARE_INSTALL="-full" # Install full firmware for UEFI boards
declare -g DISTRO_GENERIC_KERNEL=no
Expand Down
2 changes: 1 addition & 1 deletion config/sources/families/uefi-x86.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# Important: LINUXFAMILY and ARCH are defined _before_ including the common family include
[[ "$BUILD_DESKTOP" == yes && "$RELEASE" == jammy ]] && enable_extension "nvidia"
declare -g UEFI_GRUB_TERMINAL="gfxterm"
declare -g UEFI_GRUB_TERMINAL="${UEFI_GRUB_TERMINAL:-gfxterm}"
declare -g LINUXFAMILY="x86"
declare -g ARCH="amd64"
source "${BASH_SOURCE%/*}/include/uefi_common.inc"
Expand Down
2 changes: 1 addition & 1 deletion extensions/grub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ pre_umount_final_image__install_grub() {
fi

# Check and warn if the wallpaper was not picked up by grub-mkconfig, if UEFI_GRUB_TERMINAL==gfxterm
if [[ "${UEFI_GRUB_TERMINAL}" == "gfxterm" ]]; then
if [[ "${UEFI_GRUB_TERMINAL}" =~ "gfxterm" ]]; then
if ! grep -q "background_image" "${chroot_target}/boot/grub/grub.cfg"; then
display_alert "GRUB mkconfig problem" "no wallpaper detected in generated grub.cfg" "warn"
else
Expand Down