Commit fa19e83e authored by Mikhail Gordeev's avatar Mikhail Gordeev Committed by Michael Shigorin

Add BASE_BOOTARGS -- variable containing arguments to bootloader

The case at hand was the need to pass serial console parameters, see the next commit.
parent 429f1d18
......@@ -13,6 +13,7 @@ use/bootloader: use/pkgpriorities
@$(call try,BASE_BOOTLOADER,grub)
@$(call xport,BASE_BOOTLOADER)
@$(call add,BASE_LISTS,$$(BASE_BOOTLOADER))
@$(call xport,BASE_BOOTARGS)
ifeq (distro,$(IMAGE_CLASS))
@$(call add,BASE_PACKAGES,alterator-$$(BASE_BOOTLOADER))
@$(call add,PINNED_PACKAGES,alterator-$$(BASE_BOOTLOADER))
......
#!/bin/sh -eu
if [ -n "${GLOBAL_BASE_BOOTARGS-}" ]; then
if [ -s /etc/sysconfig/grub2 ]; then
sed -Ei \
"s/(GRUB_CMDLINE_LINUX_DEFAULT=)(.*)(['\"])/\1\2 $GLOBAL_BASE_BOOTARGS\3/" \
/etc/sysconfig/grub2
fi
fi
......@@ -2,13 +2,16 @@ use/tty:
@$(call add_feature)
@$(call xport,TTY_DEV)
@$(call xport,TTY_RATE)
@$(call xport,BASE_BOOTARGS)
ifeq (distro,$(IMAGE_CLASS))
@$(call add,INSTALL2_PACKAGES,installer-feature-serial-stage2)
@$(call add,BASE_PACKAGES,installer-feature-serial-stage3)
endif
comma := ,
use/tty/S0 use/tty/SI0 use/tty/AMA0: use/tty/%: use/tty
@$(call add,THE_PACKAGES,agetty)
@$(call add,TTY_DEV,tty$*)
@$(call set,TTY_RATE,115200)
@$(call add,SYSLINUX_CFG,tty$*)
@$(call add,BASE_BOOTARGS,console=tty1 console=$$(TTY_DEV)$(comma)$$(TTY_RATE)n8)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment