Skip to content
Open
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
16 changes: 12 additions & 4 deletions extensions/grub-riscv64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,17 @@ configure_grub() {
[[ -n "$SERIALCON" ]] &&
GRUB_CMDLINE_LINUX_DEFAULT+=" console=${SERIALCON}"

[[ "$BOOT_LOGO" == "yes" || "$BOOT_LOGO" == "desktop" && "$BUILD_DESKTOP" == "yes" ]] &&
GRUB_CMDLINE_LINUX_DEFAULT+=" quiet splash plymouth.ignore-serial-consoles i915.force_probe=* loglevel=3" ||
GRUB_CMDLINE_LINUX_DEFAULT+=" splash=verbose i915.force_probe=*"
# Kernel cmdline. Always pass the graphical-Plymouth flags
# regardless of whether this image is being built as CLI or
# desktop — same reasoning as in extensions/grub.sh: users
# add a desktop later via armbian-config and we can't
# regenerate grub.cfg from there. Plymouth handles the
# "no theme installed" / "no DRM" cases gracefully.
# (No i915.force_probe here — that's an x86 Intel-graphics
# driver knob and is meaningless on riscv64. No 'quiet' /
# 'loglevel=3' either: kernel boot messages stay visible
# underneath the splash so users can see what's happening.)
GRUB_CMDLINE_LINUX_DEFAULT+=" splash plymouth.ignore-serial-consoles"

# Enable Armbian Wallpaper on GRUB
if [[ "${VENDOR}" == Armbian ]]; then
Expand All @@ -135,7 +143,7 @@ configure_grub() {
GRUB_DISTRIBUTOR="${UEFI_GRUB_DISTRO_NAME}" # On GRUB menu will show up as "Armbian GNU/Linux" (will show up in some UEFI BIOS boot menu (F8?) as "armbian", not on others)
GRUB_DISABLE_OS_PROBER=false # Have to be explicit about enabling os-prober
GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD=keep
GRUB_GFXPAYLOAD_LINUX=text # See extensions/grub.sh — correct var name is GRUB_GFXPAYLOAD_LINUX, not GRUB_GFXPAYLOAD, and 'text' disables Ubuntu's vt.handoff=7 injection.
GRUB_DISABLE_UUID=false # Be explicit about wanting UUID
GRUB_DISABLE_LINUX_UUID=false # Be explicit about wanting UUID
grubCfgFrag
Expand Down
28 changes: 24 additions & 4 deletions extensions/grub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,29 @@ configure_grub() {
[[ -n "$SERIALCON" ]] &&
GRUB_CMDLINE_LINUX_DEFAULT+=" console=${SERIALCON}"

[[ "$BOOT_LOGO" == "yes" || "$BOOT_LOGO" == "desktop" && "$BUILD_DESKTOP" == "yes" ]] &&
GRUB_CMDLINE_LINUX_DEFAULT+=" quiet splash plymouth.ignore-serial-consoles i915.force_probe=* loglevel=3" ||
GRUB_CMDLINE_LINUX_DEFAULT+=" splash=verbose i915.force_probe=*"
# Kernel cmdline. We always pass the graphical-Plymouth flags
# (splash plymouth.ignore-serial-consoles) on UEFI x86,
# regardless of whether this image is being built as CLI or
# desktop. Two reasons:
# 1. Users routinely add a desktop later via armbian-config
# and we don't want that to require regenerating grub.cfg.
# The .cfg is baked once at image-build time and stays
# put across desktop installs.
# 2. Plymouth handles the "no theme installed" / "no DRM"
# cases gracefully — the flags are harmless on a CLI
# install. They are NOT harmless when wrong: the previous
# 'splash=verbose' value was rejected by the kernel
# ("Unknown kernel command line parameters splash=verbose"
# in dmesg) AND interpreted by Plymouth as "render the
# verbose/text theme", so a desktop installed later still
# booted to a black/text screen.
#
# Deliberately NO 'quiet' and NO 'loglevel=3' here. Plymouth
# still draws the splash on top of the kernel boot messages,
# but the messages remain visible underneath so users can see
# what their system is doing. Press Esc during boot to drop
# the splash and read the messages directly.
GRUB_CMDLINE_LINUX_DEFAULT+=" splash plymouth.ignore-serial-consoles i915.force_probe=*"

# Enable Armbian Wallpaper on GRUB
if [[ "${VENDOR}" == Armbian ]]; then
Expand All @@ -290,7 +310,7 @@ configure_grub() {
GRUB_DISABLE_SUBMENU=y # Do not put all kernel options into a submenu, instead, list them all on the main menu.
GRUB_DISABLE_OS_PROBER=false # Have to be explicit about enabling os-prober
GRUB_FONT="/usr/share/grub/unicode.pf2" # Be explicit about the font to use so Ubuntu does not freak out and mess gfxterm
GRUB_GFXPAYLOAD=keep
GRUB_GFXPAYLOAD_LINUX=text # Note the correct var name is GRUB_GFXPAYLOAD_LINUX, not GRUB_GFXPAYLOAD (the latter is silently ignored). The 'text' value disables Ubuntu's vt.handoff=7 injection: Ubuntu's grub2 10_linux only expands 'vt.handoff=7' inside grub.cfg's gfxmode function when the gfxpayload arg is exactly 'keep'. Setting it to 'text' makes the runtime check fail and the framebuffer console stays bound to fbcon for the entire userspace lifetime — which is what we want, otherwise after Plymouth quits on a CLI install (or after the user uninstalls the desktop), the kernel hands the framebuffer to VT7 waiting for an X server, nothing ever claims it, and the local console goes black even though getty@tty1 is running.
GRUB_DISABLE_UUID=false # Be explicit about wanting UUID
GRUB_DISABLE_LINUX_UUID=false # Be explicit about wanting UUID
grubCfgFrag
Expand Down
Loading