[syslinux] [PATCH] nictype.c32: PXELINUX module to display UNDI NIC bus type...

Torgeir.Wulfsberg at kongsberg.com Torgeir.Wulfsberg at kongsberg.com
Mon Nov 26 00:32:48 PST 2012


Hi!

At the moment, nictype.c32 does exactly what I needed it to do.
It works perfect for me, thumbs up to sha0 :)

Only one thing on line 149:

printf("Loading config-file '%s'...\n", vvvvdddd);
syslinux_run_kernel_image(vvvvdddd, "", 0, IMAGE_TYPE_CONFIG);
fprintf(stderr, "Failed to load config-file\n");
if (fallback) {
    printf("Falling back to command '%s'...\n", fallback);
    // syslinux_run_command(fallback); // I don't want command, I want a deviation default type of file
    syslinux_run_kernel_image(vvvvdddd, "", 0, IMAGE_TYPE_CONFIG); // I need this for fallback

The reason for this is that I wanted this to be run "nictype.fallback" with this content:
________________________
Default install

Label install
Kernel pxechn.c32
Append undionly.kpxe
________________________

I could not get "syslinux_run_command"  to work with kernel and append (just commands like "hdt.c32" or "ipxe.lkrn " ... worked as expected), it had to be "syslinux_run_kernel_image" for my deviation default type of file.
Guess that's just the way these commands are built and intended :)

Over to "ethersel.c":

I have tried to make some changes to "ethersel.c" to fit my needs.
But since this is NOT my field of expertise, and I had something working 100%, I gave up (makes no sense and the time spent are just not worth it).

--Torgeir

-----Original Message-----
From: Shao Miller [mailto:sha0.miller at gmail.com]
Sent: 24. november 2012 20:11
To: syslinux at zytor.com
Cc: Wulfsberg, Torgeir
Subject: Re: [syslinux] [PATCH] nictype.c32: PXELINUX module to display UNDI NIC bus type...

On 11/24/2012 11:48, Sergey Vlasov wrote:
> On Fri, Nov 23, 2012 at 03:52:07PM -0500, Shao Miller wrote:
>> On 11/22/2012 20:59, Shao Miller wrote:
>>> Applies to Syslinux 4.06.  Attached, below, and available at:
>>>
>>>      Repository: git://git.zytor.com/users/sha0/syslinux.git
>>>      Branch: nictype
>>>
>>
>> Please carbon-copy Torgeir for future discussion in this particular thread.
>>
>> I have updated the branch mentioned above to include a new '--fallback'
>> feature for the '--config' option, as well as a new '--label' option.
>>
>> Unfortunately, the '--fallback' option cannot be used with the '--label'
>> option at this time because trying to call a label, whether it exists
>> or not, does not return to the caller; it terminates the COMBOOT32
>> module before attempting to jump to the label.  Thus the fall-back
>> will be whatever Syslinux has been given with the most recently
>> loaded config-file's DEFAULT directive.  If someone has an idea for a
>> work-around, I'd be interested. :)
>
> One possible solution is to get the list of defined labels by reading
> the config file from the nictype.c32 module (like menu.c32 does,
> except the code may be much simpler - only LABEL, INCLUDE and TEXT
> commands need to be parsed).  Maybe even some indirection layer like
> used by ethersel.c32 (hidden from the core in comments) may be used
> (ethersel.c32 does not even try to handle INCLUDE or TEXT).
>
> BTW, ethersel.c32 also supports device ID masks, revision ID ranges
> and subsystem IDs with masks, which might also be useful for
> nictype.c32 (e.g., if some NIC chip has a problem only on a specific
> motherboard, which can be detected by the subsystem ID).

Thanks for the idea!

Since ethersel.c32 can already accomplish more than nictype.c32 and is already included in Syslinux, that's probably best for Torgeir to use, actually.

- Shao Miller

________________________________

CONFIDENTIALITY
This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly.




More information about the Syslinux mailing list