Skip to contentSkip to conversation

Enable additional kernel parameters for syslinux

PATCH In review Mark Hatle 3 participants 3 messages Apr 3, 2013 – Apr 4, 2013

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

PATCH 1/1 Enable additional kernel parameters for syslinux

From: Konrad Scherer <[email protected]>

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

---
 meta/classes/syslinux.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
meta/classes/syslinux.bbclass +5 -0
index 0b90eab..1eca4f8 100644
@@ -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)
 
Signature · 1 line
1.8.1.2.545.g2f19ada
#1 lore raw
Quoted 2 lines · Mark Hatle

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

#2 lore raw
Quoted 6 lines · Ross
Quoted 2 lines · Mark Hatle

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?

Signature · 2 lines
Konrad Scherer, Sr. Engineer, Linux Products Group, Wind River
direct 613-963-1342   fax 613-592-2283