Patchwork Enable additional kernel parameters for syslinux

login
register
mail settings
Submitter Mark Hatle
Date April 3, 2013, 5:47 p.m.
Message ID <1365011250-24355-1-git-send-email-mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/47359/
State New
Headers show

Comments

Mark Hatle - April 3, 2013, 5:47 p.m.
From: Konrad Scherer <Konrad.Scherer@windriver.com>

Add additional parameter 'SYSLINUX_KERNEL_ARGS' in order to allow
for specific kernel parameters to be set when using syslinux.

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/syslinux.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
Ross Burton - April 3, 2013, 5:48 p.m.
On 3 April 2013 18:47, Mark Hatle <mark.hatle@windriver.com> wrote:
> Add additional parameter 'SYSLINUX_KERNEL_ARGS' in order to allow
> for specific kernel parameters to be set when using syslinux.

Why would you use this and not APPEND? (or am I totally
misunderstanding something?)

Ross
Konrad Scherer - April 4, 2013, 3:07 p.m.
On 04/03/2013 01:48 PM, Burton, Ross wrote:
> On 3 April 2013 18:47, Mark Hatle <mark.hatle@windriver.com> wrote:
>> Add additional parameter 'SYSLINUX_KERNEL_ARGS' in order to allow
>> for specific kernel parameters to be set when using syslinux.
>
> Why would you use this and not APPEND? (or am I totally
> misunderstanding something?)

A few more lines of context would have helped. Here is the code just after the 
patch.

             if append:
                 cfgfile.write('APPEND ')

                 if initrd:
                     cfgfile.write('initrd=/initrd ')

                 cfgfile.write('LABEL=%s '% (label))

                 cfgfile.write('%s %s\n' % (append, btype[1]))
             else:
                 cfgfile.write('APPEND %s\n' % btype[1])

The extra kernel parameters are added to btype[1] and then written out as part 
of the APPEND field.

Does that make sense?

Patch

diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index 0b90eab..1eca4f8 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -13,6 +13,7 @@ 
 # ${SYSLINUX_OPTS} - additional options to add to the syslinux file ';' delimited
 # ${SYSLINUX_SPLASH} - A background for the vga boot menu if using the boot menu
 # ${SYSLINUX_SERIAL} - Set an alternate serial port or turn off serial with empty string
+# ${SYSLINUX_KERNEL_ARGS} - Add additional kernel arguments
 
 do_bootimg[depends] += "syslinux:do_populate_sysroot \
                         syslinux-native:do_populate_sysroot"
@@ -150,6 +151,10 @@  python build_syslinux_cfg () {
         for btype in btypes:
             cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
 
+            exargs = d.getVar('SYSLINUX_KERNEL_ARGS', True)
+            if exargs:
+                btype[1] += " " + exargs
+
             append = localdata.getVar('APPEND', True)
             initrd = localdata.getVar('INITRD', True)