> the loader program. You may also have to disable the lua build, since it uses 
> more stack and is just a smidge
> larger than the forth build. _simp will be the smallest of them
> all. On my system, without bearssl, I see:

Back when I first did the LOADER_VERIEXEC bits, I found lua
pushed things over the edge.
We use 4th anyway, and will likely be stuck with it for another decade
at least.

> -r-xr-xr-x  3 root  wheel  503808 May 22 15:25 /boot/loader_lua
> -r-xr-xr-x  1 root  wheel  446464 May 22 15:25 /boot/loader_4th
> -r-xr-xr-x  1 root  wheel  385024 May 22 15:25 /boot/loader_simp
> which suggests a ~60k bump for adding forth and ~115k bump for lua. So the 
> 560,000 may need to be 625,000
> which is living life on the edge for 4th, and simply too big for lua.
> 
> I'd be open to adding docs on this, since I don't think this option is 
> currently documented since I added it
> to experiment around with a good value.

My own experiments found somewhere around 550k to  be the limit.

> And no, I really do not want to support 'loadable modules'. BIOS
> booting is on the way out, and people 
> that want to do complex stuff in the boot loader will simply have to
> do that in UEFI or maybe kboot/LinuxBoot. 
> There's low RoI on adding this complexity, imho. We'd be better off,
> imho, making things like the graphics 
> console optional since the fonts and code for that free up about 30k
> in stupid experiments that I've done

Yes. For those of us with serial only consoles, the graphics stuff is
pure overhead.

> Without the extras and ZFS, you might have bearssl and lua together even...

FWIW our i386 loader with BEARSSL and LOADER_VERIEXEC and 4th rather
than lua is 312K I can get that down to 308K by dropping
LOADER_EXT2FS_SUPPORT which I am pretty sure we don't need.

If I enable lua and disable 4th, the loader is still only 352K
in our stable/12 branch and 364K in main

I just did a quick test on a VM - that loader_lua was able to load
kernel ok, so looks promising.

Of course we have 8k lines of 4th that would need translating to lua
before I could be sure.

--sjg

Reply via email to