[syslinux] Conditional kernel selection based on CPUID/DMI info
Jacob Alifrangis
jalifrangis at authenticlick.net
Tue Jan 29 12:49:24 PST 2008
I think that the best place for something like this would be in the C32
modules,
I could work up a spec for the language / keywords and place it on the
wiki for comment, might take me a few days.
This is exactly the type of leap that syslinux needs.
-----Original Message-----
From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On
Behalf Of H. Peter Anvin
Sent: Tuesday, January 29, 2008 12:06 PM
To: For discussion of SYSLINUX and tftp-hpa
Subject: Re: [syslinux] Conditional kernel selection based on CPUID/DMI
info
Craig Johnston wrote:
>
> What do people think of the following for a string substitution
method?
>
> DEFAULT linux
>
> LABEL linux
> KERNEL cpuselect.c32
> APPEND ${LM?"x86_64":"i386"}/bzImage-${SMP?"smp":"up"}
> initrd=${LM?"x86_64":"i386"}/initrd-${SMP?"smp":"up"} console=ttyS0
>
> LABEL linux-single
> KERNEL cpuselect.c32
> APPEND ${LM?"x86_64":"i386"}/bzImage-${SMP?"smp":"up"}
> initrd=${LM?"x86_64":"i386"}/initrd-${SMP?"smp":"up"} console=ttyS0
> single
>
> The parameters "LM" and "SMP" are Boolean values that are set in the
> cpuselect.c32 module, and select the replacement text ala the C-like
> conditional statement. This is just one of many ways to do something
> like this, and it would seem a lot simpler than a full fledged
> scripting language (it's all kept inside a module).
>
> Am I reinventing the wheel here, or inventing a square wheel? :)
>
I think we can consider a pattern-substitution module to be the
beginning of a scripting language. We should probably have it collect
information from as many sources as possible (CPUID, ...)
On the other hand, a fullblown scripting language probably would be easy
enough -- it's not really any different than what you're doing above.
It's just a matter of having the time to do it...
-hpa
_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX at zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
More information about the Syslinux
mailing list