NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-amd64/58814: Can't use "fs" bootloader command in boot.cfg w/o menu
The following reply was made to PR port-amd64/58814; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-amd64/58814: Can't use "fs" bootloader command in boot.cfg w/o menu
Date: Thu, 7 Nov 2024 06:24:52 -0000 (UTC)
gnats-admin%NetBSD.org@localhost ("Martin Husemann via gnats") writes:
> If I don't mind spurious menu display, using
>
> menu=:fs cgdrd.img;boot netbsd
>
> works.
boot.cfg commands are executed by libsa, except for machine specific
commands that are handled by a callback.
For x86 this is:
/*
* XXX
* if module_add, userconf_add are strictly mi they can be folded back
* into sys/lib/libsa/bootcfg.c:perform_bootcfg().
*/
static void
do_bootcfg_command(const char *cmd, char *arg)
{
if (strcmp(cmd, BOOTCFG_CMD_LOAD) == 0)
module_add(arg);
else if (strcmp(cmd, BOOTCFG_CMD_USERCONF) == 0)
userconf_add(arg);
}
So you can only do
load=...
userconf=...
fs= is simply missing. There isn't a BOOTCFG_CMD_FS declared either.
libsa checks commands by prefix like:
if (!strncmp(key, "banner", 6)) {
and it knows about BOOTCFG_CMD_LOAD and BOOTCFG_CMD_USERCONF
to identify these commands in the same way but still passes
them to the callback.
Commands not known are passed as-is to the callback.
libsa is used for boot.cfg commands by x86 (i386), sparc and zaurus.
sparc knows about "bootpartition".
zaurus just provides a dummy callback.
N.B. For the menu command in boot.cfg, libsa gathers the entries and
the MD code (x86 only) executes it in a separate routine ("doboottypemenu")
like interactive input.
Home |
Main Index |
Thread Index |
Old Index