[1/2] syslinux.bbclass: make PROMPT settable

Submitted by Dexuan Cui on Feb. 17, 2012, 11:10 a.m.

Details

Message ID 006648391fcab720548143a8b843fcf553bc8a7f.1329470047.git.dexuan.cui@intel.com
State New
Headers show

Commit Message

Dexuan Cui Feb. 17, 2012, 11:10 a.m.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
---
 meta/classes/syslinux.bbclass |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index 1569074..8225c80 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -136,10 +136,6 @@  python build_syslinux_cfg () {
 	except OSError:
 		raise bb.build.funcFailed('Unable to open %s' % (cfile))
 
-	# FIXME - the timeout should be settable
-	# And maybe the default too
-	# Definately the prompt
-
 	cfgfile.write('# Automatically created by OE\n')
 
 	opts = d.getVar('SYSLINUX_OPTS', 1)
@@ -158,7 +154,12 @@  python build_syslinux_cfg () {
 	else:
 		cfgfile.write('TIMEOUT 50\n')
 
-	cfgfile.write('PROMPT 1\n')
+	prompt = d.getVar('SYSLINUX_PROMPT', 1)
+
+	if prompt:
+		cfgfile.write('PROMPT %s\n' % prompt)
+	else:
+		cfgfile.write('PROMPT 1\n')
 
 	menu = d.getVar('AUTO_SYSLINUXMENU', 1)