Re: LUA boot loader coming very soon

2018-08-20 Thread Manfred Antar


> On Aug 20, 2018, at 10:47 AM, Kyle Evans  wrote:
> 
> On Mon, Aug 20, 2018 at 12:44 PM, Manfred Antar  
> wrote:
>> 
>> 
>>> On Aug 20, 2018, at 9:20 AM, Warner Losh  wrote:
>>> 
>>> 
>>> 
>>> On Mon, Aug 20, 2018 at 9:55 AM, Kyle Evans  wrote:
>>> On Mon, Aug 20, 2018 at 10:39 AM, Manfred Antar  
>>> wrote:
 Hi
 How do i get the menu back after switching to LUA loader?
 I’m using a comconsole. Before the switch to LUA I had a menu and a little 
 devil with pitchfork:)
 Now just get the countdown from 10 , then boot.
 Here is my loader.conf.local:
 
 console="comconsole"
 beastie_disable="NO"
 hw.vga.textmode=1
 kern.vt.spclkeys=15
 nvidia_load="YES"
 linux_common_load="YES"
 linux_load="YES"
 linprocfs_load="YES"
 linsysfs_load=“YES"
 
>>> 
>>> Hmm... seems that there was a miscommunication at some point, and the
>>> menu is disabled explicitly on serial boots. console="comconsole" is
>>> enough to disable this in lualoader land. An excerpt from an e-mail I
>>> was forwarded regarding this:
>>> 
>>> if $console contains (space or comma separated) "efi" then do
>>> not draw a menu (fall back to autoboot routine).
>>> 
>>> if $beastie_disable is set to "YES" (case insensitive), then do not
>>> draw a menu (fall back to autoboot routine).
>>> 
>>> We are clearly doing this wrong. I will fix it ASAP.
>>> 
>>> I think that we need  https://reviews.freebsd.org/D16816 to fix all the 
>>> bits.
>>> 
>>> Warner
>> 
>> Ok that works
>> I had to edit /boot/lua/drawer.lua to get the devil-pitchfork back, 
>> otherwise just have devilhead.
>> 
>> drawer.default_color_logodef = 'orb'
>> drawer.default_bw_logodef = ‘orbbw'
>> 
>> to:
>> 
>> drawer.default_color_logodef = 'beastie'
>> drawer.default_bw_logodef = ‘beastiebw'
>> 
>> and it’s pretty much the same as the 4th menu i had before.
>> Is there a way to put:
>> 
>> drawer.default_color_logodef = 'beastie'
>> drawer.default_bw_logodef = 'beastiebw'
>> 
>> somewhere else ie loader.rc or loader.lua.local so I don’t have to edit the 
>> /boot/lua/drawer.lua everytime I rebuild world?
>> It doesn’t work to put in loader.conf.local
> 
> In loader.conf(5) land, this is called "loader_logo"
> 
> e.g. loader_logo=“beastie"

I got it now.
I was putting the wrong line in loader.conf.local
loader_logo works!!
Thanks

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: LUA boot loader coming very soon

2018-08-20 Thread Kyle Evans
On Mon, Aug 20, 2018 at 12:44 PM, Manfred Antar  wrote:
>
>
>> On Aug 20, 2018, at 9:20 AM, Warner Losh  wrote:
>>
>>
>>
>> On Mon, Aug 20, 2018 at 9:55 AM, Kyle Evans  wrote:
>> On Mon, Aug 20, 2018 at 10:39 AM, Manfred Antar  
>> wrote:
>> > Hi
>> > How do i get the menu back after switching to LUA loader?
>> > I’m using a comconsole. Before the switch to LUA I had a menu and a little 
>> > devil with pitchfork:)
>> > Now just get the countdown from 10 , then boot.
>> > Here is my loader.conf.local:
>> >
>> > console="comconsole"
>> > beastie_disable="NO"
>> > hw.vga.textmode=1
>> > kern.vt.spclkeys=15
>> > nvidia_load="YES"
>> > linux_common_load="YES"
>> > linux_load="YES"
>> > linprocfs_load="YES"
>> > linsysfs_load=“YES"
>> >
>>
>> Hmm... seems that there was a miscommunication at some point, and the
>> menu is disabled explicitly on serial boots. console="comconsole" is
>> enough to disable this in lualoader land. An excerpt from an e-mail I
>> was forwarded regarding this:
>>
>> if $console contains (space or comma separated) "efi" then do
>> not draw a menu (fall back to autoboot routine).
>>
>> if $beastie_disable is set to "YES" (case insensitive), then do not
>> draw a menu (fall back to autoboot routine).
>>
>> We are clearly doing this wrong. I will fix it ASAP.
>>
>> I think that we need  https://reviews.freebsd.org/D16816 to fix all the bits.
>>
>> Warner
>
> Ok that works
> I had to edit /boot/lua/drawer.lua to get the devil-pitchfork back, otherwise 
> just have devilhead.
>
> drawer.default_color_logodef = 'orb'
> drawer.default_bw_logodef = ‘orbbw'
>
> to:
>
> drawer.default_color_logodef = 'beastie'
> drawer.default_bw_logodef = ‘beastiebw'
>
> and it’s pretty much the same as the 4th menu i had before.
> Is there a way to put:
>
> drawer.default_color_logodef = 'beastie'
> drawer.default_bw_logodef = 'beastiebw'
>
> somewhere else ie loader.rc or loader.lua.local so I don’t have to edit the 
> /boot/lua/drawer.lua everytime I rebuild world?
> It doesn’t work to put in loader.conf.local

In loader.conf(5) land, this is called "loader_logo"

e.g. loader_logo="beastie"

Thanks,

Kyle Evans
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: LUA boot loader coming very soon

2018-08-20 Thread Manfred Antar


> On Aug 20, 2018, at 9:20 AM, Warner Losh  wrote:
> 
> 
> 
> On Mon, Aug 20, 2018 at 9:55 AM, Kyle Evans  wrote:
> On Mon, Aug 20, 2018 at 10:39 AM, Manfred Antar  
> wrote:
> > Hi
> > How do i get the menu back after switching to LUA loader?
> > I’m using a comconsole. Before the switch to LUA I had a menu and a little 
> > devil with pitchfork:)
> > Now just get the countdown from 10 , then boot.
> > Here is my loader.conf.local:
> >
> > console="comconsole"
> > beastie_disable="NO"
> > hw.vga.textmode=1
> > kern.vt.spclkeys=15
> > nvidia_load="YES"
> > linux_common_load="YES"
> > linux_load="YES"
> > linprocfs_load="YES"
> > linsysfs_load=“YES"
> >
> 
> Hmm... seems that there was a miscommunication at some point, and the
> menu is disabled explicitly on serial boots. console="comconsole" is
> enough to disable this in lualoader land. An excerpt from an e-mail I
> was forwarded regarding this:
> 
> if $console contains (space or comma separated) "efi" then do
> not draw a menu (fall back to autoboot routine).
> 
> if $beastie_disable is set to "YES" (case insensitive), then do not
> draw a menu (fall back to autoboot routine).
> 
> We are clearly doing this wrong. I will fix it ASAP.
> 
> I think that we need  https://reviews.freebsd.org/D16816 to fix all the bits.
> 
> Warner 

Ok that works
I had to edit /boot/lua/drawer.lua to get the devil-pitchfork back, otherwise 
just have devilhead.

drawer.default_color_logodef = 'orb'
drawer.default_bw_logodef = ‘orbbw'

to:

drawer.default_color_logodef = 'beastie'
drawer.default_bw_logodef = ‘beastiebw'

and it’s pretty much the same as the 4th menu i had before.
Is there a way to put:

drawer.default_color_logodef = 'beastie'
drawer.default_bw_logodef = 'beastiebw'

somewhere else ie loader.rc or loader.lua.local so I don’t have to edit the 
/boot/lua/drawer.lua everytime I rebuild world?
It doesn’t work to put in loader.conf.local
Thanks
Manfred
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: LUA boot loader coming very soon

2018-08-20 Thread Warner Losh
On Mon, Aug 20, 2018 at 9:55 AM, Kyle Evans  wrote:

> On Mon, Aug 20, 2018 at 10:39 AM, Manfred Antar 
> wrote:
> > Hi
> > How do i get the menu back after switching to LUA loader?
> > I’m using a comconsole. Before the switch to LUA I had a menu and a
> little devil with pitchfork:)
> > Now just get the countdown from 10 , then boot.
> > Here is my loader.conf.local:
> >
> > console="comconsole"
> > beastie_disable="NO"
> > hw.vga.textmode=1
> > kern.vt.spclkeys=15
> > nvidia_load="YES"
> > linux_common_load="YES"
> > linux_load="YES"
> > linprocfs_load="YES"
> > linsysfs_load=“YES"
> >
>
> Hmm... seems that there was a miscommunication at some point, and the
> menu is disabled explicitly on serial boots. console="comconsole" is
> enough to disable this in lualoader land. An excerpt from an e-mail I
> was forwarded regarding this:
>
> if $console contains (space or comma separated) "efi" then do
> not draw a menu (fall back to autoboot routine).
>
> if $beastie_disable is set to "YES" (case insensitive), then do not
> draw a menu (fall back to autoboot routine).
>
> We are clearly doing this wrong. I will fix it ASAP.
>

I think that we need  https://reviews.freebsd.org/D16816 to fix all the
bits.

Warner
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: LUA boot loader coming very soon

2018-08-20 Thread Kyle Evans
On Mon, Aug 20, 2018 at 10:39 AM, Manfred Antar  wrote:
> Hi
> How do i get the menu back after switching to LUA loader?
> I’m using a comconsole. Before the switch to LUA I had a menu and a little 
> devil with pitchfork:)
> Now just get the countdown from 10 , then boot.
> Here is my loader.conf.local:
>
> console="comconsole"
> beastie_disable="NO"
> hw.vga.textmode=1
> kern.vt.spclkeys=15
> nvidia_load="YES"
> linux_common_load="YES"
> linux_load="YES"
> linprocfs_load="YES"
> linsysfs_load=“YES"
>

Hmm... seems that there was a miscommunication at some point, and the
menu is disabled explicitly on serial boots. console="comconsole" is
enough to disable this in lualoader land. An excerpt from an e-mail I
was forwarded regarding this:

if $console contains (space or comma separated) "efi" then do
not draw a menu (fall back to autoboot routine).

if $beastie_disable is set to "YES" (case insensitive), then do not
draw a menu (fall back to autoboot routine).

We are clearly doing this wrong. I will fix it ASAP.

Thanks,

Kyle Evans
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: LUA boot loader coming very soon

2018-08-20 Thread Manfred Antar
Hi
How do i get the menu back after switching to LUA loader?
I’m using a comconsole. Before the switch to LUA I had a menu and a little 
devil with pitchfork:)
Now just get the countdown from 10 , then boot.
Here is my loader.conf.local:

console="comconsole"
beastie_disable="NO"
hw.vga.textmode=1
kern.vt.spclkeys=15
nvidia_load="YES"
linux_common_load="YES"
linux_load="YES"
linprocfs_load="YES"
linsysfs_load=“YES"

I also had a loader.rc file but it does not seem relevant to LUA:

\ Loader.rc
\ $FreeBSD: head/stand/i386/loader/loader.rc 332413 2018-04-11 18:02:13Z imp $
\
\ Includes additional commands
include /boot/loader.4th
include /boot/efi.4th
try-include /boot/loader.rc.local

\ Reads and processes loader.conf variables
initialize

maybe-efi-resizecons

\ Tests for password -- executes autoboot first if a password was defined
check-password

\ Load in the boot menu
include /boot/beastie.4th

\ Start the boot menu
beastie-start

Thanks
Manfred
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: LUA boot loader coming very soon

2018-02-14 Thread David Wolfskill
Also, after reverting r329225, I was able to build & boot the build
machine with the Lua loader... but I didn't even see any way of
interacting with it on the serial console.  (I do get that opportunity
with the Forth loader.)

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
The circus around that memo helps confirm that Mr. Trump is unfit for office.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: LUA boot loader coming very soon

2018-02-14 Thread David Wolfskill
On Mon, Feb 12, 2018 at 08:27:27AM -0700, Warner Losh wrote:
> ...
> So please give it a spin and give me any feedback, documentation updates
> and/or bug fixes. I'm especially interested in reviews from people that
> have embedded Lua in other projects or experts in Lua that can improve the
> robustness of the menu code.
> 

I was able to build, install, and (start to -- not loader's fault)
boot my laptop; I have placed screenshots at
.

Some notes:
* For loader_1_lua.jpg, I had (reflexively) already hit "v" to boot
  verbosely, so "Verbose:On" does NOT reflect the default.  On the
  other hand, "ACPI   :off" DOES reflect the default, which is
  opposite from the Forth loader (ref. loader_1_4th.jpg); I suspect that
  this warrants changing.

* The lower left corner of the box seems to have an odd artifact for the
  Lua loader.  I haven't looked, but suspect it will be easy to fix.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
The circus around that memo helps confirm that Mr. Trump is unfit for office.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: LUA boot loader coming very soon

2018-02-12 Thread Warner Losh
On Mon, Feb 12, 2018 at 2:53 PM, John Baldwin  wrote:

> On Monday, February 12, 2018 02:31:46 PM Warner Losh wrote:
> > On Mon, Feb 12, 2018 at 10:12 AM, John Baldwin  wrote:
> >
> > > On Monday, February 12, 2018 08:27:27 AM Warner Losh wrote:
> > > > Greetings,
> > > >
> > > > As you may know, the Lua (http://www.lua.org) boot loader has been
> in
> > > the
> > > > works for some time. It started out life as a GSoC in 2014 by Pedro
> Souza
> > > > mentored by Wojciech A. Koszek. Rui Paulo created a svn project
> branch to
> > > > try to integrate it. I rebased that effort into a github branch which
> > > Pedro
> > > > Arthur fixed up. Over the past year, I've been cleaning up the boot
> > > loader
> > > > for other reasons, and found the time was ripe to start integrating
> this
> > > > into the tree. However, those integration efforts have taken a while
> as
> > > my
> > > > day-job work on the boot loader took priority. In the mean time, Ed
> Maste
> > > > and the FreeBSD Foundation funded Zakary Nafziger to enhance the
> original
> > > > GSoC Lua scripts to bring it closer to parity with the evolution of
> the
> > > > FORTH menu system since the GSoC project started.
> > > >
> > > > I'm pleased to announce that all these threads of development have
> > > > converged and I'll be pushing the FreeBSD Lua Loader later today.
> This
> > > > loader uses Lua as its scripting language instead of FORTH. While
> > > > co-existance is planned, the timeline for it is looking to be a few
> weeks
> > > > and I didn't want to delay pushing this into the tree for that.
> > > >
> > > > To try the loader, you'll need to build WITHOUT_FORTH=yes and
> > > > WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to do
> this,
> > > > you can do it in src/stand and install the result (be sure to have
> the
> > > > options for both the build and the install). This will replace your
> > > current
> > > > /boot/loader that is scripted with FORTH to one that's scripted with
> Lua.
> > > > It will install the lua scripts in /boot/lua. The boot is scripted
> with
> > > > /boot/lua/loader.lua instead of /boot/loader.rc. You are strongly
> advised
> > > > to create a backup copy of /boot/loader before testing (eg cp
> > > /boot/loader
> > > > /boot/loader_forth), since you'll need to boot that from boot2 if
> > > something
> > > > goes wrong. I've tested it extensively, though, with userboot.so and
> it's
> > > > test program, so all the initial kinks of finding the lua scripts,
> etc
> > > have
> > > > been worked out.
> > > >
> > > > While it's possible to build all the /boot/loader variants with Lua,
> I've
> > > > just tested a BIOS booting /boot/loader both with and without menus
> > > > enabled. I've not tested any of the other variants and the
> instructions
> > > for
> > > > testing some of them may be rather tedious (especially UEFI, if you
> want
> > > a
> > > > simple path to back out). Since there's not been full convergence
> > > testing,
> > > > you'll almost certainly find bumps in this system. Also, all the
> > > > build-system APIs are likely not yet final.
> > > >
> > > > I put  MFC after a month on the commit. Due to the heroic (dare I say
> > > > almost crazy) work of Kyle Evans on merging all the revs from
> -current to
> > > > 11, I'm planning a MFC to 11 after the co-existence issues are
> hammered
> > > > out. In 11, FORTH will be the default, and Lua will  be built by
> default,
> > > > but users will have to do something to use it. 12, both FORTH and Lua
> > > will
> > > > be built and installed, with Lua as default (barring unforeseen
> > > > complications). Once the co-existence stuff goes in, I imagine we'll
> make
> > > > the switch to Lua by default shortly after that. In 13, FORTH will be
> > > > removed unless there's a really really compelling case made to keep
> it.
> > > >
> > > > So please give it a spin and give me any feedback, documentation
> updates
> > > > and/or bug fixes. I'm especially interested in reviews from people
> that
> > > > have embedded Lua in other projects or experts in Lua that can
> improve
> > > the
> > > > robustness of the menu code.
> > >
> > > Do you have some memory usage numbers for LUA vs forth for the
> different
> > > BIOS loaders (text/data/bss sizes)?  For the EFI case we probably have
> lots
> > > of room, but for the non-EFI case we are constrained to 0xa -
> 0xa000
> > > for the text/data/bss and stack (in some cases like PXE booting the top
> > > can be lower than 0xa).  I'm not sure if we have any other
> platforms
> > > with similar memory constraints.
> > >
> >
> > Lua is about 60-70k larger than FORTH for this application:
> >
> > Forth based:
> > -r-xr-xr-x  1 root  wheel  385024 Feb 12 14:14
> > /home/imp/roots/amd64/boot/loader
> > -r-xr-xr-x  1 root  wheel  450560 Feb 12 14:14
> > /home/imp/roots/amd64/boot/zfsloader
> > Lua based:
> > -r-xr-xr-x  1 root  wheel  450560 Feb 12 14:20
> > 

Re: LUA boot loader coming very soon

2018-02-12 Thread John Baldwin
On Monday, February 12, 2018 02:31:46 PM Warner Losh wrote:
> On Mon, Feb 12, 2018 at 10:12 AM, John Baldwin  wrote:
> 
> > On Monday, February 12, 2018 08:27:27 AM Warner Losh wrote:
> > > Greetings,
> > >
> > > As you may know, the Lua (http://www.lua.org) boot loader has been in
> > the
> > > works for some time. It started out life as a GSoC in 2014 by Pedro Souza
> > > mentored by Wojciech A. Koszek. Rui Paulo created a svn project branch to
> > > try to integrate it. I rebased that effort into a github branch which
> > Pedro
> > > Arthur fixed up. Over the past year, I've been cleaning up the boot
> > loader
> > > for other reasons, and found the time was ripe to start integrating this
> > > into the tree. However, those integration efforts have taken a while as
> > my
> > > day-job work on the boot loader took priority. In the mean time, Ed Maste
> > > and the FreeBSD Foundation funded Zakary Nafziger to enhance the original
> > > GSoC Lua scripts to bring it closer to parity with the evolution of the
> > > FORTH menu system since the GSoC project started.
> > >
> > > I'm pleased to announce that all these threads of development have
> > > converged and I'll be pushing the FreeBSD Lua Loader later today. This
> > > loader uses Lua as its scripting language instead of FORTH. While
> > > co-existance is planned, the timeline for it is looking to be a few weeks
> > > and I didn't want to delay pushing this into the tree for that.
> > >
> > > To try the loader, you'll need to build WITHOUT_FORTH=yes and
> > > WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to do this,
> > > you can do it in src/stand and install the result (be sure to have the
> > > options for both the build and the install). This will replace your
> > current
> > > /boot/loader that is scripted with FORTH to one that's scripted with Lua.
> > > It will install the lua scripts in /boot/lua. The boot is scripted with
> > > /boot/lua/loader.lua instead of /boot/loader.rc. You are strongly advised
> > > to create a backup copy of /boot/loader before testing (eg cp
> > /boot/loader
> > > /boot/loader_forth), since you'll need to boot that from boot2 if
> > something
> > > goes wrong. I've tested it extensively, though, with userboot.so and it's
> > > test program, so all the initial kinks of finding the lua scripts, etc
> > have
> > > been worked out.
> > >
> > > While it's possible to build all the /boot/loader variants with Lua, I've
> > > just tested a BIOS booting /boot/loader both with and without menus
> > > enabled. I've not tested any of the other variants and the instructions
> > for
> > > testing some of them may be rather tedious (especially UEFI, if you want
> > a
> > > simple path to back out). Since there's not been full convergence
> > testing,
> > > you'll almost certainly find bumps in this system. Also, all the
> > > build-system APIs are likely not yet final.
> > >
> > > I put  MFC after a month on the commit. Due to the heroic (dare I say
> > > almost crazy) work of Kyle Evans on merging all the revs from -current to
> > > 11, I'm planning a MFC to 11 after the co-existence issues are hammered
> > > out. In 11, FORTH will be the default, and Lua will  be built by default,
> > > but users will have to do something to use it. 12, both FORTH and Lua
> > will
> > > be built and installed, with Lua as default (barring unforeseen
> > > complications). Once the co-existence stuff goes in, I imagine we'll make
> > > the switch to Lua by default shortly after that. In 13, FORTH will be
> > > removed unless there's a really really compelling case made to keep it.
> > >
> > > So please give it a spin and give me any feedback, documentation updates
> > > and/or bug fixes. I'm especially interested in reviews from people that
> > > have embedded Lua in other projects or experts in Lua that can improve
> > the
> > > robustness of the menu code.
> >
> > Do you have some memory usage numbers for LUA vs forth for the different
> > BIOS loaders (text/data/bss sizes)?  For the EFI case we probably have lots
> > of room, but for the non-EFI case we are constrained to 0xa - 0xa000
> > for the text/data/bss and stack (in some cases like PXE booting the top
> > can be lower than 0xa).  I'm not sure if we have any other platforms
> > with similar memory constraints.
> >
> 
> Lua is about 60-70k larger than FORTH for this application:
> 
> Forth based:
> -r-xr-xr-x  1 root  wheel  385024 Feb 12 14:14
> /home/imp/roots/amd64/boot/loader
> -r-xr-xr-x  1 root  wheel  450560 Feb 12 14:14
> /home/imp/roots/amd64/boot/zfsloader
> Lua based:
> -r-xr-xr-x  1 root  wheel  450560 Feb 12 14:20
> /home/imp/roots/amd64/boot/loader
> -r-xr-xr-x  1 root  wheel  520192 Feb 12 14:20
> /home/imp/roots/amd64/boot/zfsloader
> 
> So with Lua:
> %  size loader.bin
> textdata bss  dec   hex   filename
>   411840   22264   48304   482408   0x75c68   loader.bin
> % size zfsloader.bin
> textdata bss 

Re: LUA boot loader coming very soon

2018-02-12 Thread Warner Losh
On Mon, Feb 12, 2018 at 10:12 AM, John Baldwin  wrote:

> On Monday, February 12, 2018 08:27:27 AM Warner Losh wrote:
> > Greetings,
> >
> > As you may know, the Lua (http://www.lua.org) boot loader has been in
> the
> > works for some time. It started out life as a GSoC in 2014 by Pedro Souza
> > mentored by Wojciech A. Koszek. Rui Paulo created a svn project branch to
> > try to integrate it. I rebased that effort into a github branch which
> Pedro
> > Arthur fixed up. Over the past year, I've been cleaning up the boot
> loader
> > for other reasons, and found the time was ripe to start integrating this
> > into the tree. However, those integration efforts have taken a while as
> my
> > day-job work on the boot loader took priority. In the mean time, Ed Maste
> > and the FreeBSD Foundation funded Zakary Nafziger to enhance the original
> > GSoC Lua scripts to bring it closer to parity with the evolution of the
> > FORTH menu system since the GSoC project started.
> >
> > I'm pleased to announce that all these threads of development have
> > converged and I'll be pushing the FreeBSD Lua Loader later today. This
> > loader uses Lua as its scripting language instead of FORTH. While
> > co-existance is planned, the timeline for it is looking to be a few weeks
> > and I didn't want to delay pushing this into the tree for that.
> >
> > To try the loader, you'll need to build WITHOUT_FORTH=yes and
> > WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to do this,
> > you can do it in src/stand and install the result (be sure to have the
> > options for both the build and the install). This will replace your
> current
> > /boot/loader that is scripted with FORTH to one that's scripted with Lua.
> > It will install the lua scripts in /boot/lua. The boot is scripted with
> > /boot/lua/loader.lua instead of /boot/loader.rc. You are strongly advised
> > to create a backup copy of /boot/loader before testing (eg cp
> /boot/loader
> > /boot/loader_forth), since you'll need to boot that from boot2 if
> something
> > goes wrong. I've tested it extensively, though, with userboot.so and it's
> > test program, so all the initial kinks of finding the lua scripts, etc
> have
> > been worked out.
> >
> > While it's possible to build all the /boot/loader variants with Lua, I've
> > just tested a BIOS booting /boot/loader both with and without menus
> > enabled. I've not tested any of the other variants and the instructions
> for
> > testing some of them may be rather tedious (especially UEFI, if you want
> a
> > simple path to back out). Since there's not been full convergence
> testing,
> > you'll almost certainly find bumps in this system. Also, all the
> > build-system APIs are likely not yet final.
> >
> > I put  MFC after a month on the commit. Due to the heroic (dare I say
> > almost crazy) work of Kyle Evans on merging all the revs from -current to
> > 11, I'm planning a MFC to 11 after the co-existence issues are hammered
> > out. In 11, FORTH will be the default, and Lua will  be built by default,
> > but users will have to do something to use it. 12, both FORTH and Lua
> will
> > be built and installed, with Lua as default (barring unforeseen
> > complications). Once the co-existence stuff goes in, I imagine we'll make
> > the switch to Lua by default shortly after that. In 13, FORTH will be
> > removed unless there's a really really compelling case made to keep it.
> >
> > So please give it a spin and give me any feedback, documentation updates
> > and/or bug fixes. I'm especially interested in reviews from people that
> > have embedded Lua in other projects or experts in Lua that can improve
> the
> > robustness of the menu code.
>
> Do you have some memory usage numbers for LUA vs forth for the different
> BIOS loaders (text/data/bss sizes)?  For the EFI case we probably have lots
> of room, but for the non-EFI case we are constrained to 0xa - 0xa000
> for the text/data/bss and stack (in some cases like PXE booting the top
> can be lower than 0xa).  I'm not sure if we have any other platforms
> with similar memory constraints.
>

Lua is about 60-70k larger than FORTH for this application:

Forth based:
-r-xr-xr-x  1 root  wheel  385024 Feb 12 14:14
/home/imp/roots/amd64/boot/loader
-r-xr-xr-x  1 root  wheel  450560 Feb 12 14:14
/home/imp/roots/amd64/boot/zfsloader
Lua based:
-r-xr-xr-x  1 root  wheel  450560 Feb 12 14:20
/home/imp/roots/amd64/boot/loader
-r-xr-xr-x  1 root  wheel  520192 Feb 12 14:20
/home/imp/roots/amd64/boot/zfsloader

So with Lua:
%  size loader.bin
textdata bss  dec   hex   filename
  411840   22264   48304   482408   0x75c68   loader.bin
% size zfsloader.bin
textdata bss  dec   hex   filename
  478712   22968   52368   554048   0x87440   zfsloader.bin

so we're at 555k out of 640k before we look at heap usage. Of course, these
numbers are only going to get a lot worse as we pile-in new crypto
features... I know that 

Re: LUA boot loader coming very soon

2018-02-12 Thread John Baldwin
On Monday, February 12, 2018 08:27:27 AM Warner Losh wrote:
> Greetings,
> 
> As you may know, the Lua (http://www.lua.org) boot loader has been in the
> works for some time. It started out life as a GSoC in 2014 by Pedro Souza
> mentored by Wojciech A. Koszek. Rui Paulo created a svn project branch to
> try to integrate it. I rebased that effort into a github branch which Pedro
> Arthur fixed up. Over the past year, I've been cleaning up the boot loader
> for other reasons, and found the time was ripe to start integrating this
> into the tree. However, those integration efforts have taken a while as my
> day-job work on the boot loader took priority. In the mean time, Ed Maste
> and the FreeBSD Foundation funded Zakary Nafziger to enhance the original
> GSoC Lua scripts to bring it closer to parity with the evolution of the
> FORTH menu system since the GSoC project started.
> 
> I'm pleased to announce that all these threads of development have
> converged and I'll be pushing the FreeBSD Lua Loader later today. This
> loader uses Lua as its scripting language instead of FORTH. While
> co-existance is planned, the timeline for it is looking to be a few weeks
> and I didn't want to delay pushing this into the tree for that.
> 
> To try the loader, you'll need to build WITHOUT_FORTH=yes and
> WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to do this,
> you can do it in src/stand and install the result (be sure to have the
> options for both the build and the install). This will replace your current
> /boot/loader that is scripted with FORTH to one that's scripted with Lua.
> It will install the lua scripts in /boot/lua. The boot is scripted with
> /boot/lua/loader.lua instead of /boot/loader.rc. You are strongly advised
> to create a backup copy of /boot/loader before testing (eg cp /boot/loader
> /boot/loader_forth), since you'll need to boot that from boot2 if something
> goes wrong. I've tested it extensively, though, with userboot.so and it's
> test program, so all the initial kinks of finding the lua scripts, etc have
> been worked out.
> 
> While it's possible to build all the /boot/loader variants with Lua, I've
> just tested a BIOS booting /boot/loader both with and without menus
> enabled. I've not tested any of the other variants and the instructions for
> testing some of them may be rather tedious (especially UEFI, if you want a
> simple path to back out). Since there's not been full convergence testing,
> you'll almost certainly find bumps in this system. Also, all the
> build-system APIs are likely not yet final.
> 
> I put  MFC after a month on the commit. Due to the heroic (dare I say
> almost crazy) work of Kyle Evans on merging all the revs from -current to
> 11, I'm planning a MFC to 11 after the co-existence issues are hammered
> out. In 11, FORTH will be the default, and Lua will  be built by default,
> but users will have to do something to use it. 12, both FORTH and Lua will
> be built and installed, with Lua as default (barring unforeseen
> complications). Once the co-existence stuff goes in, I imagine we'll make
> the switch to Lua by default shortly after that. In 13, FORTH will be
> removed unless there's a really really compelling case made to keep it.
> 
> So please give it a spin and give me any feedback, documentation updates
> and/or bug fixes. I'm especially interested in reviews from people that
> have embedded Lua in other projects or experts in Lua that can improve the
> robustness of the menu code.

Do you have some memory usage numbers for LUA vs forth for the different
BIOS loaders (text/data/bss sizes)?  For the EFI case we probably have lots
of room, but for the non-EFI case we are constrained to 0xa - 0xa000
for the text/data/bss and stack (in some cases like PXE booting the top
can be lower than 0xa).  I'm not sure if we have any other platforms
with similar memory constraints.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: LUA boot loader coming very soon

2018-02-12 Thread Warner Losh
On Mon, Feb 12, 2018 at 9:51 AM, Warner Losh  wrote:

>
>
> On Mon, Feb 12, 2018 at 9:45 AM, Kris Moore  wrote:
>
>> On 02/12/2018 11:31, Warner Losh wrote:
>>
>>
>>
>> On Mon, Feb 12, 2018 at 9:26 AM, Kris Moore  wrote:
>>
>>> On 02/12/2018 10:27, Warner Losh wrote:
>>> > Greetings,
>>> >
>>> > As you may know, the Lua (http://www.lua.org) boot loader has been in
>>> the
>>> > works for some time. It started out life as a GSoC in 2014 by Pedro
>>> Souza
>>> > mentored by Wojciech A. Koszek. Rui Paulo created a svn project branch
>>> to
>>> > try to integrate it. I rebased that effort into a github branch which
>>> Pedro
>>> > Arthur fixed up. Over the past year, I've been cleaning up the boot
>>> loader
>>> > for other reasons, and found the time was ripe to start integrating
>>> this
>>> > into the tree. However, those integration efforts have taken a while
>>> as my
>>> > day-job work on the boot loader took priority. In the mean time, Ed
>>> Maste
>>> > and the FreeBSD Foundation funded Zakary Nafziger to enhance the
>>> original
>>> > GSoC Lua scripts to bring it closer to parity with the evolution of the
>>> > FORTH menu system since the GSoC project started.
>>> >
>>> > I'm pleased to announce that all these threads of development have
>>> > converged and I'll be pushing the FreeBSD Lua Loader later today. This
>>> > loader uses Lua as its scripting language instead of FORTH. While
>>> > co-existance is planned, the timeline for it is looking to be a few
>>> weeks
>>> > and I didn't want to delay pushing this into the tree for that.
>>> >
>>> > To try the loader, you'll need to build WITHOUT_FORTH=yes and
>>> > WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to do
>>> this,
>>> > you can do it in src/stand and install the result (be sure to have the
>>> > options for both the build and the install). This will replace your
>>> current
>>> > /boot/loader that is scripted with FORTH to one that's scripted with
>>> Lua.
>>> > It will install the lua scripts in /boot/lua. The boot is scripted with
>>> > /boot/lua/loader.lua instead of /boot/loader.rc. You are strongly
>>> advised
>>> > to create a backup copy of /boot/loader before testing (eg cp
>>> /boot/loader
>>> > /boot/loader_forth), since you'll need to boot that from boot2 if
>>> something
>>> > goes wrong. I've tested it extensively, though, with userboot.so and
>>> it's
>>> > test program, so all the initial kinks of finding the lua scripts, etc
>>> have
>>> > been worked out.
>>> >
>>> > While it's possible to build all the /boot/loader variants with Lua,
>>> I've
>>> > just tested a BIOS booting /boot/loader both with and without menus
>>> > enabled. I've not tested any of the other variants and the
>>> instructions for
>>> > testing some of them may be rather tedious (especially UEFI, if you
>>> want a
>>> > simple path to back out). Since there's not been full convergence
>>> testing,
>>> > you'll almost certainly find bumps in this system. Also, all the
>>> > build-system APIs are likely not yet final.
>>> >
>>> > I put  MFC after a month on the commit. Due to the heroic (dare I say
>>> > almost crazy) work of Kyle Evans on merging all the revs from -current
>>> to
>>> > 11, I'm planning a MFC to 11 after the co-existence issues are hammered
>>> > out. In 11, FORTH will be the default, and Lua will  be built by
>>> default,
>>> > but users will have to do something to use it. 12, both FORTH and Lua
>>> will
>>> > be built and installed, with Lua as default (barring unforeseen
>>> > complications). Once the co-existence stuff goes in, I imagine we'll
>>> make
>>> > the switch to Lua by default shortly after that. In 13, FORTH will be
>>> > removed unless there's a really really compelling case made to keep it.
>>> >
>>> > So please give it a spin and give me any feedback, documentation
>>> updates
>>> > and/or bug fixes. I'm especially interested in reviews from people that
>>> > have embedded Lua in other projects or experts in Lua that can improve
>>> the
>>> > robustness of the menu code.
>>> >
>>> > Warner
>>> > ___
>>> > freebsd-current@freebsd.org mailing list
>>> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
>>> > To unsubscribe, send any mail to "freebsd-current-unsubscribe@f
>>> reebsd.org"
>>>
>>> Warner & Co,
>>>
>>> Great job all! Been wanting this for years, very excited to see it start
>>> landing :)
>>>
>>> One question, if we switch to Lua loader in TrueOS, do you know if the
>>> ZFS boot-environment menus have been implemented / tested yet?
>>
>>
>> I don't think that they have been implemented yet. I've certainly not
>> tested them.
>>
>> Warner
>>
>> Ok, I'll have to mess about with it. I recall there was some library
>> which created to expose ZFS in limited functionality over to the FORTH
>> code. That's probably a good place to start and see if that still works and
>> Lua can probe the pool 

Re: LUA boot loader coming very soon

2018-02-12 Thread Warner Losh
On Mon, Feb 12, 2018 at 9:45 AM, Kris Moore  wrote:

> On 02/12/2018 11:31, Warner Losh wrote:
>
>
>
> On Mon, Feb 12, 2018 at 9:26 AM, Kris Moore  wrote:
>
>> On 02/12/2018 10:27, Warner Losh wrote:
>> > Greetings,
>> >
>> > As you may know, the Lua (http://www.lua.org) boot loader has been in
>> the
>> > works for some time. It started out life as a GSoC in 2014 by Pedro
>> Souza
>> > mentored by Wojciech A. Koszek. Rui Paulo created a svn project branch
>> to
>> > try to integrate it. I rebased that effort into a github branch which
>> Pedro
>> > Arthur fixed up. Over the past year, I've been cleaning up the boot
>> loader
>> > for other reasons, and found the time was ripe to start integrating this
>> > into the tree. However, those integration efforts have taken a while as
>> my
>> > day-job work on the boot loader took priority. In the mean time, Ed
>> Maste
>> > and the FreeBSD Foundation funded Zakary Nafziger to enhance the
>> original
>> > GSoC Lua scripts to bring it closer to parity with the evolution of the
>> > FORTH menu system since the GSoC project started.
>> >
>> > I'm pleased to announce that all these threads of development have
>> > converged and I'll be pushing the FreeBSD Lua Loader later today. This
>> > loader uses Lua as its scripting language instead of FORTH. While
>> > co-existance is planned, the timeline for it is looking to be a few
>> weeks
>> > and I didn't want to delay pushing this into the tree for that.
>> >
>> > To try the loader, you'll need to build WITHOUT_FORTH=yes and
>> > WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to do
>> this,
>> > you can do it in src/stand and install the result (be sure to have the
>> > options for both the build and the install). This will replace your
>> current
>> > /boot/loader that is scripted with FORTH to one that's scripted with
>> Lua.
>> > It will install the lua scripts in /boot/lua. The boot is scripted with
>> > /boot/lua/loader.lua instead of /boot/loader.rc. You are strongly
>> advised
>> > to create a backup copy of /boot/loader before testing (eg cp
>> /boot/loader
>> > /boot/loader_forth), since you'll need to boot that from boot2 if
>> something
>> > goes wrong. I've tested it extensively, though, with userboot.so and
>> it's
>> > test program, so all the initial kinks of finding the lua scripts, etc
>> have
>> > been worked out.
>> >
>> > While it's possible to build all the /boot/loader variants with Lua,
>> I've
>> > just tested a BIOS booting /boot/loader both with and without menus
>> > enabled. I've not tested any of the other variants and the instructions
>> for
>> > testing some of them may be rather tedious (especially UEFI, if you
>> want a
>> > simple path to back out). Since there's not been full convergence
>> testing,
>> > you'll almost certainly find bumps in this system. Also, all the
>> > build-system APIs are likely not yet final.
>> >
>> > I put  MFC after a month on the commit. Due to the heroic (dare I say
>> > almost crazy) work of Kyle Evans on merging all the revs from -current
>> to
>> > 11, I'm planning a MFC to 11 after the co-existence issues are hammered
>> > out. In 11, FORTH will be the default, and Lua will  be built by
>> default,
>> > but users will have to do something to use it. 12, both FORTH and Lua
>> will
>> > be built and installed, with Lua as default (barring unforeseen
>> > complications). Once the co-existence stuff goes in, I imagine we'll
>> make
>> > the switch to Lua by default shortly after that. In 13, FORTH will be
>> > removed unless there's a really really compelling case made to keep it.
>> >
>> > So please give it a spin and give me any feedback, documentation updates
>> > and/or bug fixes. I'm especially interested in reviews from people that
>> > have embedded Lua in other projects or experts in Lua that can improve
>> the
>> > robustness of the menu code.
>> >
>> > Warner
>> > ___
>> > freebsd-current@freebsd.org mailing list
>> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
>> > To unsubscribe, send any mail to "freebsd-current-unsubscribe@f
>> reebsd.org"
>>
>> Warner & Co,
>>
>> Great job all! Been wanting this for years, very excited to see it start
>> landing :)
>>
>> One question, if we switch to Lua loader in TrueOS, do you know if the
>> ZFS boot-environment menus have been implemented / tested yet?
>
>
> I don't think that they have been implemented yet. I've certainly not
> tested them.
>
> Warner
>
> Ok, I'll have to mess about with it. I recall there was some library which
> created to expose ZFS in limited functionality over to the FORTH code.
> That's probably a good place to start and see if that still works and Lua
> can probe the pool for BE information.
>

OK. There's no such functionality in FORTH in the tree today. However, zfs
sets a number of env vars that loader.getenv() can get in lua.

Warner

Re: LUA boot loader coming very soon

2018-02-12 Thread Kris Moore
On 02/12/2018 11:31, Warner Losh wrote:
>
>
> On Mon, Feb 12, 2018 at 9:26 AM, Kris Moore  > wrote:
>
> On 02/12/2018 10:27, Warner Losh wrote:
> > Greetings,
> >
> > As you may know, the Lua (http://www.lua.org) boot loader has
> been in the
> > works for some time. It started out life as a GSoC in 2014 by
> Pedro Souza
> > mentored by Wojciech A. Koszek. Rui Paulo created a svn project
> branch to
> > try to integrate it. I rebased that effort into a github branch
> which Pedro
> > Arthur fixed up. Over the past year, I've been cleaning up the
> boot loader
> > for other reasons, and found the time was ripe to start
> integrating this
> > into the tree. However, those integration efforts have taken a
> while as my
> > day-job work on the boot loader took priority. In the mean time,
> Ed Maste
> > and the FreeBSD Foundation funded Zakary Nafziger to enhance the
> original
> > GSoC Lua scripts to bring it closer to parity with the evolution
> of the
> > FORTH menu system since the GSoC project started.
> >
> > I'm pleased to announce that all these threads of development have
> > converged and I'll be pushing the FreeBSD Lua Loader later
> today. This
> > loader uses Lua as its scripting language instead of FORTH. While
> > co-existance is planned, the timeline for it is looking to be a
> few weeks
> > and I didn't want to delay pushing this into the tree for that.
> >
> > To try the loader, you'll need to build WITHOUT_FORTH=yes and
> > WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to
> do this,
> > you can do it in src/stand and install the result (be sure to
> have the
> > options for both the build and the install). This will replace
> your current
> > /boot/loader that is scripted with FORTH to one that's scripted
> with Lua.
> > It will install the lua scripts in /boot/lua. The boot is
> scripted with
> > /boot/lua/loader.lua instead of /boot/loader.rc. You are
> strongly advised
> > to create a backup copy of /boot/loader before testing (eg cp
> /boot/loader
> > /boot/loader_forth), since you'll need to boot that from boot2
> if something
> > goes wrong. I've tested it extensively, though, with userboot.so
> and it's
> > test program, so all the initial kinks of finding the lua
> scripts, etc have
> > been worked out.
> >
> > While it's possible to build all the /boot/loader variants with
> Lua, I've
> > just tested a BIOS booting /boot/loader both with and without menus
> > enabled. I've not tested any of the other variants and the
> instructions for
> > testing some of them may be rather tedious (especially UEFI, if
> you want a
> > simple path to back out). Since there's not been full
> convergence testing,
> > you'll almost certainly find bumps in this system. Also, all the
> > build-system APIs are likely not yet final.
> >
> > I put  MFC after a month on the commit. Due to the heroic (dare
> I say
> > almost crazy) work of Kyle Evans on merging all the revs from
> -current to
> > 11, I'm planning a MFC to 11 after the co-existence issues are
> hammered
> > out. In 11, FORTH will be the default, and Lua will  be built by
> default,
> > but users will have to do something to use it. 12, both FORTH
> and Lua will
> > be built and installed, with Lua as default (barring unforeseen
> > complications). Once the co-existence stuff goes in, I imagine
> we'll make
> > the switch to Lua by default shortly after that. In 13, FORTH
> will be
> > removed unless there's a really really compelling case made to
> keep it.
> >
> > So please give it a spin and give me any feedback, documentation
> updates
> > and/or bug fixes. I'm especially interested in reviews from
> people that
> > have embedded Lua in other projects or experts in Lua that can
> improve the
> > robustness of the menu code.
> >
> > Warner
> > ___
> > freebsd-current@freebsd.org 
> mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
> 
> > To unsubscribe, send any mail to
> "freebsd-current-unsubscr...@freebsd.org
> "
>
> Warner & Co,
>
> Great job all! Been wanting this for years, very excited to see it
> start
> landing :)
>
> One question, if we switch to Lua loader in TrueOS, do you know if the
> ZFS boot-environment menus have been implemented / tested yet?
>
>
> I don't think that they have been implemented yet. I've certainly not
> 

Re: LUA boot loader coming very soon

2018-02-12 Thread Warner Losh
On Mon, Feb 12, 2018 at 9:26 AM, Kris Moore  wrote:

> On 02/12/2018 10:27, Warner Losh wrote:
> > Greetings,
> >
> > As you may know, the Lua (http://www.lua.org) boot loader has been in
> the
> > works for some time. It started out life as a GSoC in 2014 by Pedro Souza
> > mentored by Wojciech A. Koszek. Rui Paulo created a svn project branch to
> > try to integrate it. I rebased that effort into a github branch which
> Pedro
> > Arthur fixed up. Over the past year, I've been cleaning up the boot
> loader
> > for other reasons, and found the time was ripe to start integrating this
> > into the tree. However, those integration efforts have taken a while as
> my
> > day-job work on the boot loader took priority. In the mean time, Ed Maste
> > and the FreeBSD Foundation funded Zakary Nafziger to enhance the original
> > GSoC Lua scripts to bring it closer to parity with the evolution of the
> > FORTH menu system since the GSoC project started.
> >
> > I'm pleased to announce that all these threads of development have
> > converged and I'll be pushing the FreeBSD Lua Loader later today. This
> > loader uses Lua as its scripting language instead of FORTH. While
> > co-existance is planned, the timeline for it is looking to be a few weeks
> > and I didn't want to delay pushing this into the tree for that.
> >
> > To try the loader, you'll need to build WITHOUT_FORTH=yes and
> > WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to do this,
> > you can do it in src/stand and install the result (be sure to have the
> > options for both the build and the install). This will replace your
> current
> > /boot/loader that is scripted with FORTH to one that's scripted with Lua.
> > It will install the lua scripts in /boot/lua. The boot is scripted with
> > /boot/lua/loader.lua instead of /boot/loader.rc. You are strongly advised
> > to create a backup copy of /boot/loader before testing (eg cp
> /boot/loader
> > /boot/loader_forth), since you'll need to boot that from boot2 if
> something
> > goes wrong. I've tested it extensively, though, with userboot.so and it's
> > test program, so all the initial kinks of finding the lua scripts, etc
> have
> > been worked out.
> >
> > While it's possible to build all the /boot/loader variants with Lua, I've
> > just tested a BIOS booting /boot/loader both with and without menus
> > enabled. I've not tested any of the other variants and the instructions
> for
> > testing some of them may be rather tedious (especially UEFI, if you want
> a
> > simple path to back out). Since there's not been full convergence
> testing,
> > you'll almost certainly find bumps in this system. Also, all the
> > build-system APIs are likely not yet final.
> >
> > I put  MFC after a month on the commit. Due to the heroic (dare I say
> > almost crazy) work of Kyle Evans on merging all the revs from -current to
> > 11, I'm planning a MFC to 11 after the co-existence issues are hammered
> > out. In 11, FORTH will be the default, and Lua will  be built by default,
> > but users will have to do something to use it. 12, both FORTH and Lua
> will
> > be built and installed, with Lua as default (barring unforeseen
> > complications). Once the co-existence stuff goes in, I imagine we'll make
> > the switch to Lua by default shortly after that. In 13, FORTH will be
> > removed unless there's a really really compelling case made to keep it.
> >
> > So please give it a spin and give me any feedback, documentation updates
> > and/or bug fixes. I'm especially interested in reviews from people that
> > have embedded Lua in other projects or experts in Lua that can improve
> the
> > robustness of the menu code.
> >
> > Warner
> > ___
> > freebsd-current@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscribe@
> freebsd.org"
>
> Warner & Co,
>
> Great job all! Been wanting this for years, very excited to see it start
> landing :)
>
> One question, if we switch to Lua loader in TrueOS, do you know if the
> ZFS boot-environment menus have been implemented / tested yet?


I don't think that they have been implemented yet. I've certainly not
tested them.

Warner
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: LUA boot loader coming very soon

2018-02-12 Thread Kris Moore
On 02/12/2018 10:27, Warner Losh wrote:
> Greetings,
>
> As you may know, the Lua (http://www.lua.org) boot loader has been in the
> works for some time. It started out life as a GSoC in 2014 by Pedro Souza
> mentored by Wojciech A. Koszek. Rui Paulo created a svn project branch to
> try to integrate it. I rebased that effort into a github branch which Pedro
> Arthur fixed up. Over the past year, I've been cleaning up the boot loader
> for other reasons, and found the time was ripe to start integrating this
> into the tree. However, those integration efforts have taken a while as my
> day-job work on the boot loader took priority. In the mean time, Ed Maste
> and the FreeBSD Foundation funded Zakary Nafziger to enhance the original
> GSoC Lua scripts to bring it closer to parity with the evolution of the
> FORTH menu system since the GSoC project started.
>
> I'm pleased to announce that all these threads of development have
> converged and I'll be pushing the FreeBSD Lua Loader later today. This
> loader uses Lua as its scripting language instead of FORTH. While
> co-existance is planned, the timeline for it is looking to be a few weeks
> and I didn't want to delay pushing this into the tree for that.
>
> To try the loader, you'll need to build WITHOUT_FORTH=yes and
> WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to do this,
> you can do it in src/stand and install the result (be sure to have the
> options for both the build and the install). This will replace your current
> /boot/loader that is scripted with FORTH to one that's scripted with Lua.
> It will install the lua scripts in /boot/lua. The boot is scripted with
> /boot/lua/loader.lua instead of /boot/loader.rc. You are strongly advised
> to create a backup copy of /boot/loader before testing (eg cp /boot/loader
> /boot/loader_forth), since you'll need to boot that from boot2 if something
> goes wrong. I've tested it extensively, though, with userboot.so and it's
> test program, so all the initial kinks of finding the lua scripts, etc have
> been worked out.
>
> While it's possible to build all the /boot/loader variants with Lua, I've
> just tested a BIOS booting /boot/loader both with and without menus
> enabled. I've not tested any of the other variants and the instructions for
> testing some of them may be rather tedious (especially UEFI, if you want a
> simple path to back out). Since there's not been full convergence testing,
> you'll almost certainly find bumps in this system. Also, all the
> build-system APIs are likely not yet final.
>
> I put  MFC after a month on the commit. Due to the heroic (dare I say
> almost crazy) work of Kyle Evans on merging all the revs from -current to
> 11, I'm planning a MFC to 11 after the co-existence issues are hammered
> out. In 11, FORTH will be the default, and Lua will  be built by default,
> but users will have to do something to use it. 12, both FORTH and Lua will
> be built and installed, with Lua as default (barring unforeseen
> complications). Once the co-existence stuff goes in, I imagine we'll make
> the switch to Lua by default shortly after that. In 13, FORTH will be
> removed unless there's a really really compelling case made to keep it.
>
> So please give it a spin and give me any feedback, documentation updates
> and/or bug fixes. I'm especially interested in reviews from people that
> have embedded Lua in other projects or experts in Lua that can improve the
> robustness of the menu code.
>
> Warner
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Warner & Co,

Great job all! Been wanting this for years, very excited to see it start
landing :)

One question, if we switch to Lua loader in TrueOS, do you know if the
ZFS boot-environment menus have been implemented / tested yet?


-- 
Kris Moore
Vice President of Engineering
iXsystems
Enterprise Storage & Servers Driven By Open Source

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


LUA boot loader coming very soon

2018-02-12 Thread Warner Losh
Greetings,

As you may know, the Lua (http://www.lua.org) boot loader has been in the
works for some time. It started out life as a GSoC in 2014 by Pedro Souza
mentored by Wojciech A. Koszek. Rui Paulo created a svn project branch to
try to integrate it. I rebased that effort into a github branch which Pedro
Arthur fixed up. Over the past year, I've been cleaning up the boot loader
for other reasons, and found the time was ripe to start integrating this
into the tree. However, those integration efforts have taken a while as my
day-job work on the boot loader took priority. In the mean time, Ed Maste
and the FreeBSD Foundation funded Zakary Nafziger to enhance the original
GSoC Lua scripts to bring it closer to parity with the evolution of the
FORTH menu system since the GSoC project started.

I'm pleased to announce that all these threads of development have
converged and I'll be pushing the FreeBSD Lua Loader later today. This
loader uses Lua as its scripting language instead of FORTH. While
co-existance is planned, the timeline for it is looking to be a few weeks
and I didn't want to delay pushing this into the tree for that.

To try the loader, you'll need to build WITHOUT_FORTH=yes and
WITH_LOADER_LUA=yes. Fortunately, you needn't do a full world to do this,
you can do it in src/stand and install the result (be sure to have the
options for both the build and the install). This will replace your current
/boot/loader that is scripted with FORTH to one that's scripted with Lua.
It will install the lua scripts in /boot/lua. The boot is scripted with
/boot/lua/loader.lua instead of /boot/loader.rc. You are strongly advised
to create a backup copy of /boot/loader before testing (eg cp /boot/loader
/boot/loader_forth), since you'll need to boot that from boot2 if something
goes wrong. I've tested it extensively, though, with userboot.so and it's
test program, so all the initial kinks of finding the lua scripts, etc have
been worked out.

While it's possible to build all the /boot/loader variants with Lua, I've
just tested a BIOS booting /boot/loader both with and without menus
enabled. I've not tested any of the other variants and the instructions for
testing some of them may be rather tedious (especially UEFI, if you want a
simple path to back out). Since there's not been full convergence testing,
you'll almost certainly find bumps in this system. Also, all the
build-system APIs are likely not yet final.

I put  MFC after a month on the commit. Due to the heroic (dare I say
almost crazy) work of Kyle Evans on merging all the revs from -current to
11, I'm planning a MFC to 11 after the co-existence issues are hammered
out. In 11, FORTH will be the default, and Lua will  be built by default,
but users will have to do something to use it. 12, both FORTH and Lua will
be built and installed, with Lua as default (barring unforeseen
complications). Once the co-existence stuff goes in, I imagine we'll make
the switch to Lua by default shortly after that. In 13, FORTH will be
removed unless there's a really really compelling case made to keep it.

So please give it a spin and give me any feedback, documentation updates
and/or bug fixes. I'm especially interested in reviews from people that
have embedded Lua in other projects or experts in Lua that can improve the
robustness of the menu code.

Warner
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"