0024-x86-Fix-CONFIG_X86_GRUB_SERIAL.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
  2. Date: Sat, 10 Aug 2013 18:35:29 +0000
  3. Subject: x86: Fix CONFIG_X86_GRUB_SERIAL=""
  4. With
  5. .config:CONFIG_X86_GRUB_SERIAL=""
  6. which (AFAICT) is the way to tell GRUB not to use a serial console, in
  7. target/linux/x86/image/Makefile:ifneq ($(CONFIG_X86_GRUB_SERIAL),)
  8. $(CONFIG_X86_GRUB_SERIAL) expands to `""' (a literal double double-quote),
  9. making the condition unconditionally false.
  10. This patch fixes the situation by passing CONFIG_X86_GRUB_SERIAL through
  11. qstrip before testing.
  12. Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
  13. diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
  14. index 6e2bd54..2e73519 100644
  15. --- a/target/linux/x86/image/Makefile
  16. +++ b/target/linux/x86/image/Makefile
  17. @@ -27,8 +27,10 @@ ifneq ($(strip $(foreach subtarget,$(USE_ATKBD),$(CONFIG_TARGET_x86_$(subtarget)
  18. GRUB2_MODULES += at_keyboard
  19. endif
  20. -ifneq ($(CONFIG_X86_GRUB_SERIAL),)
  21. - GRUB_CONSOLE_CMDLINE += console=$(call qstrip,$(CONFIG_X86_GRUB_SERIAL)),$(CONFIG_X86_GRUB_BAUDRATE)n8
  22. +GRUB_SERIAL:=$(call qstrip,$(CONFIG_X86_GRUB_SERIAL))
  23. +
  24. +ifneq ($(GRUB_SERIAL),)
  25. + GRUB_CONSOLE_CMDLINE += console=$(GRUB_SERIAL),$(CONFIG_X86_GRUB_BAUDRATE)n8
  26. GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_X86_GRUB_BAUDRATE) --word=8 --parity=no --stop=1
  27. GRUB_TERMINALS += serial
  28. endif