summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/syslinux.bbclass14
1 files changed, 11 insertions, 3 deletions
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index dae66097bc..49f58f5d08 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -12,7 +12,9 @@
12# ${APPEND} - an override list of append strings for each label 12# ${APPEND} - an override list of append strings for each label
13# ${SYSLINUX_OPTS} - additional options to add to the syslinux file ';' delimited 13# ${SYSLINUX_OPTS} - additional options to add to the syslinux file ';' delimited
14# ${SYSLINUX_SPLASH} - A background for the vga boot menu if using the boot menu 14# ${SYSLINUX_SPLASH} - A background for the vga boot menu if using the boot menu
15# ${SYSLINUX_DEFAULT_CONSOLE} - set to "console=ttyX" to change kernel boot default console
15# ${SYSLINUX_SERIAL} - Set an alternate serial port or turn off serial with empty string 16# ${SYSLINUX_SERIAL} - Set an alternate serial port or turn off serial with empty string
17# ${SYSLINUX_SERIAL_TTY} - Set alternate console=tty... kernel boot argument
16 18
17do_bootimg[depends] += "syslinux:do_populate_sysroot \ 19do_bootimg[depends] += "syslinux:do_populate_sysroot \
18 syslinux-native:do_populate_sysroot" 20 syslinux-native:do_populate_sysroot"
@@ -21,7 +23,11 @@ SYSLINUXCFG = "${S}/syslinux.cfg"
21 23
22ISOLINUXDIR = "/isolinux" 24ISOLINUXDIR = "/isolinux"
23SYSLINUXDIR = "/" 25SYSLINUXDIR = "/"
26# The kernel has an internal default console, which you can override with
27# a console=...some_tty...
28SYSLINUX_DEFAULT_CONSOLE ?= ""
24SYSLINUX_SERIAL ?= "0 115200" 29SYSLINUX_SERIAL ?= "0 115200"
30SYSLINUX_SERIAL_TTY ?= "ttyS0,115200"
25ISO_BOOTIMG = "isolinux/isolinux.bin" 31ISO_BOOTIMG = "isolinux/isolinux.bin"
26ISO_BOOTCAT = "isolinux/boot.cat" 32ISO_BOOTCAT = "isolinux/boot.cat"
27MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table" 33MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table"
@@ -105,6 +111,8 @@ python build_syslinux_cfg () {
105 cfgfile.write('%s\n' % opt) 111 cfgfile.write('%s\n' % opt)
106 112
107 cfgfile.write('ALLOWOPTIONS 1\n'); 113 cfgfile.write('ALLOWOPTIONS 1\n');
114 syslinux_default_console = d.getVar('SYSLINUX_DEFAULT_CONSOLE', True)
115 syslinux_serial_tty = d.getVar('SYSLINUX_SERIAL_TTY', True)
108 syslinux_serial = d.getVar('SYSLINUX_SERIAL', True) 116 syslinux_serial = d.getVar('SYSLINUX_SERIAL', True)
109 if syslinux_serial: 117 if syslinux_serial:
110 cfgfile.write('SERIAL %s\n' % syslinux_serial) 118 cfgfile.write('SERIAL %s\n' % syslinux_serial)
@@ -147,10 +155,10 @@ python build_syslinux_cfg () {
147 localdata.setVar('OVERRIDES', label + ':' + overrides) 155 localdata.setVar('OVERRIDES', label + ':' + overrides)
148 bb.data.update_data(localdata) 156 bb.data.update_data(localdata)
149 157
150 btypes = [ [ "", "console=tty0" ] ] 158 btypes = [ [ "", syslinux_default_console ] ]
151 if menu and syslinux_serial: 159 if menu and syslinux_serial:
152 btypes = [ [ "Graphics console ", " console=tty0" ], 160 btypes = [ [ "Graphics console ", syslinux_default_console ],
153 [ "Serial console ", " console=ttyS0,115200" ] ] 161 [ "Serial console ", syslinux_serial_tty ] ]
154 162
155 for btype in btypes: 163 for btype in btypes:
156 cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label)) 164 cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))