-ifeq ($(CONFIG_X86_GRUB_IMAGES),y)
-ifneq ($(HOST_OS),Darwin)
- define Image/cmdline/squashfs
- block2mtd.block2mtd=$(ROOTPART),65536,rootfs root=/dev/mtdblock0 rootfstype=squashfs init=/etc/preinit
- endef
+ifneq ($(CONFIG_X86_GRUB_CONSOLE),)
+ GRUB_CONSOLE_CMDLINE += console=tty0
+ GRUB_TERMINALS += console
+endif
+
+ifneq ($(CONFIG_X86_GRUB_SERIAL),)
+ GRUB_CONSOLE_CMDLINE += console=$(call qstrip,$(CONFIG_X86_GRUB_SERIAL)),$(CONFIG_X86_GRUB_BAUDRATE)n8
+ GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_X86_GRUB_BAUDRATE) --word=8 --parity=no --stop=1
+ GRUB_TERMINALS += serial
+endif
+
+ifneq ($(GRUB_TERMINALS),)
+ GRUB_TERMINAL_CONFIG := terminal --timeout=2 $(GRUB_TERMINALS)
+endif
+
+
+ifneq ($(CONFIG_X86_GRUB_IMAGES),)
+ ifneq ($(HOST_OS),Darwin)
+
+ BOOTOPTS:=$(call qstrip,$(CONFIG_X86_GRUB_BOOTOPTS))
+ ROOTPART:=$(call qstrip,$(CONFIG_X86_GRUB_ROOTPART))