Hi Tom, On Fri, 20 Dec 2024 at 13:48, Tom Rini <tr...@konsulko.com> wrote: > > On Fri, Dec 20, 2024 at 10:37:34AM -0700, Simon Glass wrote: > > Hi Tom, > > > > On Fri, 20 Dec 2024 at 10:23, Tom Rini <tr...@konsulko.com> wrote: > > > > > > On Fri, Dec 20, 2024 at 10:18:17AM -0700, Simon Glass wrote: > > > > Hi Tom, > > > > > > > > On Fri, 20 Dec 2024 at 07:56, Tom Rini <tr...@konsulko.com> wrote: > > > > > > > > > > On Thu, Dec 19, 2024 at 09:01:19PM -0700, Simon Glass wrote: > > > > > > > > > > > The current localboot implementation assumes that a 'localcmd' > > > > > > environment variable is provided, with the instructions to follow. > > > > > > This > > > > > > may not be included, so provide a fallback in that case. > > > > > > > > > > > > Add a test image and test as well. > > > > > > > > > > > > Signed-off-by: Simon Glass <s...@chromium.org> > > > > > > > > > > This is a pretty niche feature, I had to dig around a bit to see how > > > > > it's specified elsewhere (not really) and how it's used. And I think > > > > > that based on how it's used, making up a bootcmd when localcmd is > > > > > undefined is the wrong approach. It's the hook for "run what I defined > > > > > in the environment", so if not set erroring back out seems > > > > > appropriate. > > > > > > > > Yes, but unfortunately it seems to be used and we should support it. > > > > The problem with scripts is that we don't know the boot device, etc, > > > > so it needs to be integrated into PXE. I did consider putting > > > > something in bootstd, but we only find out that it is requesting a > > > > localboot when actually running the extlinux bootmeth, so this is what > > > > I came up with. > > > > > > > > It will be interesting to see if any other cases come up. > > > > > > It would be helpful at this point I think if you can point to how the > > > code for handling this case (the LOCALBOOT keyword followed by an > > > integer) in other projects so that we can be compliant with what's > > > expected, even if it's poorly documented. > > > > Yes, it seems very hard to find anything at all. > > > > The implementation in syslinux uses the BIOS to jump to a boot sector: > > > > https://repo.or.cz/syslinux.git/blob/HEAD:/core/bios/localboot.c > > > > I'm really not sure how it is supposed to work with a filesystem. > > > > [1] is a usage of it for rpi > > Yes, I did some searching on extlinux.conf and localboot and got a few > hits on people using localcmd for when they need to run their own > special thing, for various reasons, for example: > https://stackoverflow.com/questions/54258960/applying-fdt-overlay-with-u-boot-using-extlinux-conf > > > But other than that, even Gemini doesn't seems to have much idea. > > I'm only half surprised it didn't make something up for it.
I've been quite amazed at its capabilities recently. I can mostly get good answers to quite complex questions and it is very fast now. I'm just waiting for when I can start using it for development. I wonder who maintains the extlinux stuff. Do you have any idea? It would be nice to move it into a git tree and generate the spec from there. Regards, SImon