Difference between revisions of "Ifcpu.c32"

From Syslinux Wiki
Jump to: navigation, search
m (Ifcpuhvm.c32 moved to Ifcpu.c32: ifcpu is more generic)
(Updating ifcpu)
Line 3: Line 3:
  
 
= About =  
 
= About =  
'''ifcpuhvm.c32''' is a comboot module for Syslinux that check's the CPU flags for hardware virtualisation(vmx|svm) and loads the appropriate label in a pxelinux.cfg file.
+
'''ifcpu.c32''' is a comboot module for Syslinux that checks some CPU flags and loads the appropriate label in a pxelinux.cfg file.
  
 
This is only available in Syslinux 3.84 or later.
 
This is only available in Syslinux 3.84 or later.
Line 9: Line 9:
 
= Requirements =  
 
= Requirements =  
 
* working Syslinux environment
 
* working Syslinux environment
* two kernel images
+
* two booting entry
* one environment that requires hvm and one regular environment.
+
  
 
= Syntax =  
 
= Syntax =  
  ifcpuhvm.c32 hvm_label -- regular_label
+
  ifcpu.c32 <options> <cpu_features> -- first_label -- second_label
 +
 
 +
if the <cpu_features> match the current host, first_label is loaded, else let's boot second_label.
  
 
The use of '''--''' is required!
 
The use of '''--''' is required!
 +
 +
== Options ==
 +
*    debug    : display some debugging messages
 +
*    dry-run  : just do the detection, don't boot
 +
 +
== CPU Features ==
 +
*    64        : CPU have to be x86_64 compatible
 +
*    hvm      : Processor must have hardware virtualization (hvm or svm)
 +
*    multicore : Processor must be multi-core
 +
*    smp      : System have to be SMP
 +
if you want to match many cpu features, just separate them with a single space
  
 
== Example ==
 
== Example ==
 
Here is an example pxelinux.cfg file for booting
 
Here is an example pxelinux.cfg file for booting
 
<pre>
 
<pre>
label boot_kernel
+
    label test
    com32 ifcpuhvm.c32
+
        com32 ifcpu.c32
    append boot_kernel_xen -- boot_kernel_regular
+
        append 64 hvm multicore -- boot_entry_1 -- boot_entry_2
label boot_kernel_xen
+
    label boot_entry_1
    com32 mboot.c32
+
        kernel vmlinuz
    append xen.gz dom0_mem=262144 -- vmlinuz-xen console=tty0 root=/dev/hda1 ro --- initrd.img-xen
+
        append ...
label boot_kernel_regular
+
    label boot_entry_2
    kernel vmlinuz_64
+
        kernel vmlinuz_64
    append ...
+
        append ...
  
 
</pre>
 
</pre>

Revision as of 19:57, 29 November 2009


About

ifcpu.c32 is a comboot module for Syslinux that checks some CPU flags and loads the appropriate label in a pxelinux.cfg file.

This is only available in Syslinux 3.84 or later.

Requirements

  • working Syslinux environment
  • two booting entry

Syntax

ifcpu.c32 <options> <cpu_features> -- first_label -- second_label

if the <cpu_features> match the current host, first_label is loaded, else let's boot second_label.

The use of -- is required!

Options

  • debug  : display some debugging messages
  • dry-run  : just do the detection, don't boot

CPU Features

  • 64  : CPU have to be x86_64 compatible
  • hvm  : Processor must have hardware virtualization (hvm or svm)
  • multicore : Processor must be multi-core
  • smp  : System have to be SMP

if you want to match many cpu features, just separate them with a single space

Example

Here is an example pxelinux.cfg file for booting

    label test
        com32 ifcpu.c32
        append 64 hvm multicore -- boot_entry_1 -- boot_entry_2
    label boot_entry_1
        kernel vmlinuz
        append ...
    label boot_entry_2
        kernel vmlinuz_64
        append ...

Further Reading

None