[syslinux] core/fs/lib/loadconfig.c: Add architecture-specific config name to search

Ady ady-sf at hotmail.com
Mon Sep 21 08:16:28 PDT 2015


> On Sun, Sep 20, 2015 at 3:57 PM, syslinux-bot for Ady
> <ady-sf at hotmail.com> wrote:
> > Commit-ID:  7d9c9eca562857fed25b4c8ef902e3de968d7631
> > Gitweb:     http://www.syslinux.org/commit/7d9c9eca562857fed25b4c8ef902e3de968d7631
> > Author:     Ady <ady-sf at hotmail.com>
> > AuthorDate: Sun, 20 Sep 2015 15:35:52 -0400
> > Committer:  Gene Cumm <gene.cumm at gmail.com>
> > CommitDate: Sun, 20 Sep 2015 15:35:54 -0400
> >
> > core/fs/lib/loadconfig.c: Add architecture-specific config name to search
> >
> > When multiple architectures are on a single media, all will try to use the
> > same config, preventing PATH from pointing to an architecture-specific
> > directory.
> >
> > Signed-off-by: Gene Cumm <gene.cumm at gmail.com>
> >
> > ---
> >  core/fs/lib/loadconfig.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/core/fs/lib/loadconfig.c b/core/fs/lib/loadconfig.c
> > index 95e6f3f..d164ae1 100644
> > --- a/core/fs/lib/loadconfig.c
> > +++ b/core/fs/lib/loadconfig.c
> > @@ -22,6 +22,11 @@ int generic_open_config(struct com32_filedata *filedata)
> >      };
> >      static const char *filenames[] = {
> >         "extlinux.conf",
> > +#if defined(__FIRMWARE_EFI64__)
> > +       "syslx64.cfg",
> > +#elif defined(__FIRMWARE_EFI32__)
> > +       "syslia32.cfg",
> > +#endif
> >         "syslinux.cfg",
> >         NULL
> >      };
> 
> From the thread "[syslinux] syslinux efi configuration file name
> proposal" at http://www.syslinux.org/archives/2014-October/022712.html
> 
> -- 
> -Gene
 
FWIW, the original context that triggered this patch is described at:
"syslinux efi configuration file name proposal"
 http://www.syslinux.org/archives/2014-August/022545.html 

In case it is not clear enough, the added configuration file names are 
relevant for syslinux.efi when booting storage media (the patch does 
not affect network booting).

And, to prevent potential misunderstandings, this patch does not 
replace other selections (such as if*.c32 used in BIOS systems). The 
selection of these file names when syslinux.efi boots storage media 
depends on UEFI's architecture (IA32 or X64), not to be confused with 
the CPU's architecture (32/64 bit), and of course not to be confused 
with the OS's architecture.

I mention these matters because I have been asked in the past questions 
like "aren't ifcpu[64].c32 modules available for this?". The answer is 
that the selection of the cfg file name depends on the UEFI's 
architecture, and so are the c32 modules. The selection of the cfg file 
name cannot be performed by some (theoretical non-existent 
firmware-generic) "if*.c32" module, since the c32 modules already 
depend on UEFI's architecture.

Hopefully this comments do not make this more confusing, but rather 
clarify the intention and usage of these alternative / optional 
configuration file names.

Thanks to Gene (and others that commented about the issue, a year ago) 
for the indispensable help with the code and for merging it into 
official Syslinux.

Regards,
Ady.
 
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> 




More information about the Syslinux mailing list