From owner-freebsd-arch@freebsd.org Thu Feb 1 05:03:04 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A71EAF0D6D2 for ; Thu, 1 Feb 2018 05:03:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 453D36AEC4 for ; Thu, 1 Feb 2018 05:03:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x233.google.com with SMTP id l17so17754631ioc.3 for ; Wed, 31 Jan 2018 21:03:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to; bh=b/bydFN3wyvcQ7lAjag9ZPrGISpWWhyszY3Ly5ZeOJ8=; b=XJ1CGuWIbuyz+igEcFeBqQgUNgE+SYNOySpgRqemXKH2Zyg5aNPSEMn0fbtiK/gQD5 sOedLvX3yqt/WkofmKoftZn3MpnaH9NtK2sSadg8IcqXkZgvJcijxSFI3WZb7fC4QePP i7JhdmDWHWDIJo1SqD0Ru69dml+VxGkfVnUVtGtSmHJqKHbSZL6UQL/DHUezD0C53iYK zj+KvPYlEd10j7qo1zkYEmZRCYC852dF/BCkiZXO6XBMB30XlYU13PxlOJv9rzq3u51O ZOj/odWVWSdWqxaXA4tN4ZqnqdKE4N5uABeAd1aAxloT6CEsJaXUiHwiMpaK/4xRuuAm neaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=b/bydFN3wyvcQ7lAjag9ZPrGISpWWhyszY3Ly5ZeOJ8=; b=pOwX0N/W61A4UouX2SNPMHJMi4U+AF2OK4AeKz9u2yNFaNwn6Ii88IjOZSfezqFSR0 mPR5X4jQiQ5B2yzALXZvsEAPyLpjXUQDdPdIdfnmqg8vEsDteHYivWBJrVg6QU9KP3RL 0f5LMe8hQRrrBWCMxtABkfDeS3jatsnHKVhEnoVr1WmHpdqV0m5+saKi58rVfZu7YJ+l jbj+BOURaJH31GDVRD3/msWgZZSwzuadDx4FXlsXXqrv8x7u4Bd1JxFHHaVvJJwSPPhN xl6KGBMiICFrvT93obhVLDf0BGf/EKigcSwslq605Kpg7NoOjttk5j4sG8GrRd55TnWR 54jg== X-Gm-Message-State: AKwxyteZisb8psSJwTq+9euhHTqISr0BtRpie0o6b342kx3yXET1nJYq YmWl/kErmM7We7xFopSLeDePG9D+6S/MvVg0R4S4TA== X-Google-Smtp-Source: AH8x224N74r8U/eKgrOPIjvkNnEN1zBik1pgnp7hBmr8g/pwyyrZ1hg3FXIGF5FSer5RwcxfKYhLfb2YFa2eyhCIzsk= X-Received: by 10.107.107.1 with SMTP id g1mr35963389ioc.63.1517461383111; Wed, 31 Jan 2018 21:03:03 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.201.67 with HTTP; Wed, 31 Jan 2018 21:03:02 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:18a2:a4f7:170:8dd9] From: Warner Losh Date: Wed, 31 Jan 2018 22:03:02 -0700 X-Google-Sender-Auth: IoKmsMIjUdwlWEgq1QJbiIwUbN4 Message-ID: Subject: Feedback on proposed loader changes To: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 05:03:04 -0000 Greetings, As you may have read or guessed, I'm nearing the end game on integrating lua into the boot loader from the GSoC a few years ago. I've tried to resolve all the issues it brought up in libsa and other structural changes. This has allowed lua to be imported unmodified, for example. I've been trying to figure out how to handle the transition from forth to lua and find myself with a few decisions that I should seek feedback on since I'm at a crossroads. The first one is that we have two sets of 4th words, both of which I wrote, that don't fit neatly into the current build system. We have a bit of a hack in place for both the pcibios-* and efi-* functions in 4th. The former was something I did as a hack for Netflix that I judged at the time to be more useful than it turned out to be (as far as I've been able to tell). The latter turns out to be a road not taken (I'd planned originally on implementing UEFI boot manager with 4th, but that turns out to be not desirable even if 4th might be out the door). My plan is to simply retire this stuff, along with pnp.4th which we've never installed. If I do this, then I can build everything in the tree w/o regard to whether FORTH is on or off, which dove tails nicely to my next question... If no .o depends on the interpreter we're using (other than the ones that implement the interpreter), then there'd be no technical barrier to building multiple interpreters. So, I'd like to change to building both the loader with forth and the one without, as well as installing both (as loader_simple and loader_forth) with a symlink to the default. This would allow people to switch, as well as provide a fallback for most systems (uboot on FAT would be trickier, but we don't directly install those from installworld, EFI on FAT would be as well, but there it will matter much less shortly). This would allow me to roll out loader_lua when it's ready and have it installed everywhere for people that want to take the plunge and switch it when the time is ripe. This path would also leave the old boot loaders around for people to interrupt boot1 with (EFI is another matter, but I'm hoping efibootmgr wills solve that ball of wax). So I'd like feedback on two questions: Should I kill the forth features I oulined above? And should I make the build system build multiple loaders with a link controlling the default? Comments? Warner From owner-freebsd-arch@freebsd.org Thu Feb 1 09:51:41 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93460ED8FE3 for ; Thu, 1 Feb 2018 09:51:41 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 2964E81BF4 for ; Thu, 1 Feb 2018 09:51:40 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 334AC27379; Thu, 1 Feb 2018 09:51:31 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id w119pFpw005017 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 1 Feb 2018 09:51:15 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id w119pEGQ005016; Thu, 1 Feb 2018 09:51:14 GMT (envelope-from phk) To: Warner Losh cc: "freebsd-arch@freebsd.org" Subject: Re: Feedback on proposed loader changes In-reply-to: From: "Poul-Henning Kamp" References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5014.1517478674.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Thu, 01 Feb 2018 09:51:14 +0000 Message-ID: <5015.1517478674@critter.freebsd.dk> X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 09:51:41 -0000 -------- In message , Warner Losh writes: >So I'd like feedback on two questions: Should I kill the forth features I >oulined above? And should I make the build system build multiple loaders >with a link controlling the default? I think you should just move forward and go for the end-stage without too many temporary bandaids. The loader is pretty decoupled from everything, so in case anybody needs any of these Forth cornercases, they can use 11.X loader with very little, if any, trouble. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-freebsd-arch@freebsd.org Thu Feb 1 17:24:37 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2115DEDF9CB for ; Thu, 1 Feb 2018 17:24:37 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B53E978EC4; Thu, 1 Feb 2018 17:24:36 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from mobile-166-170-40-137.mycingular.net ([166.170.40.137]:12446 helo=[10.131.175.84]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ehIb1-000BSg-24; Thu, 01 Feb 2018 17:24:23 +0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Devin Teske Mime-Version: 1.0 (1.0) Subject: Re: Feedback on proposed loader changes Date: Thu, 1 Feb 2018 08:58:24 -0800 Message-Id: References: <5015.1517478674@critter.freebsd.dk> Cc: Warner Losh , "freebsd-arch@freebsd.org" , dteske@freebsd.org In-Reply-To: <5015.1517478674@critter.freebsd.dk> To: Poul-Henning Kamp X-Mailer: iPhone Mail (15C153) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 17:24:37 -0000 > On Feb 1, 2018, at 1:51 AM, Poul-Henning Kamp wrote: >=20 > -------- > In message , Warner Losh writes: >=20 >> So I'd like feedback on two questions: Should I kill the forth features I= >> oulined above? And should I make the build system build multiple loaders >> with a link controlling the default? >=20 > I think you should just move forward and go for the end-stage > without too many temporary bandaids. >=20 > The loader is pretty decoupled from everything, so in case anybody > needs any of these Forth cornercases, they can use 11.X loader with > very little, if any, trouble. >=20 As a person that both reviewed the GSoC code you are working with (in-depth;= including a list of short-comings) and the most likely person to bring it u= p-to-par after it is committed, I have 2 opinions: 1. Please allow both boot systems for a while so that the lua-based menu can= be made as feature full as the Forth menu. Example: submenus were added in = Forth long after the GSoC lua project had ended 2. Please don=E2=80=99t force us to run Lua until I can code the new feature= s And as the principal author of the Forth menu since 9.0: 3. Please give me a way to run my code (at the very least until I can bring t= he Lua up to snuff; and if I can=E2=80=99t just let me run Forth in-perpetui= ty). Interrupting boot1 so I can drive the system in the pre-boot Execution env i= s very important to me. =E2=80=94=20 Devin= From owner-freebsd-arch@freebsd.org Thu Feb 1 17:59:16 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2312EE1B5D for ; Thu, 1 Feb 2018 17:59:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33F1F7A7E5 for ; Thu, 1 Feb 2018 17:59:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id m11so20107909iob.2 for ; Thu, 01 Feb 2018 09:59:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=a+OQGSZSEQpMRC2Yt9g//WAH3jFcy7/8KFXHUl+xPxA=; b=eqePrvJtWoRQYb572qV2hjbts0Z32G4JETnM8TEUDFaYHkekHMZL3H+w/kx39iyjBs ohocEcyEgTUsZ8wiodvLcdLW5AQUYYy4oJEWrcbkwc/zRBayz0GSHOZ6+P3ECERsFGQO r1iiLAT9jX8RfBdE5n2mB8+PrrgG/QTZ4Oio+hncNe6ZWcTfdN2Os5NBr+dY6f2LP9qK Rp9ukPif8m4njLdTIQtSHOZ2GKS4hPWTpqTTZzlEMaH4spMt80rMx2ph0IjqfbBqNLxN Wpum/ap1IArW/xiTZdM2CVDDCXaeGmwmzaRT21GkaHhlbXICMBV+uJMxFpUHH8KICDLE fhcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=a+OQGSZSEQpMRC2Yt9g//WAH3jFcy7/8KFXHUl+xPxA=; b=P8+mKn2MGowx4awikoDwF8lnVu97VyE3CqqVmetLc1X7rIpslwBE2xRxlV+a3luFqw rA2GMStJz64w+9ePkyD6XwGPdZkSyaRNqDytwfu8L8X0kGIAOM9Xwsp78C41ehrrNasp nL0vMgrov/lw59+5+Ef4KhRA4AofEROyzviZ0VLq/xObEVu+kdhaCpjhPJLMFzRqFJ3S TpSVblJimAv57E+ocOCGd6MNeCmlXIQbZryyS1Ci0iXKjOdWjA+ZQPXdC0UpusxtdPgK ScfryYT65780j1Btn7J8om6EP4v9rV1f/neTs1JnNW8Y9A53TXSgvPKIfUKGiC/WrBGd +3wg== X-Gm-Message-State: AKwxytd8cNzqN9+yLQL/mH9uIZfY6jsQuabHq8WbAeh1SMo4EWLTDRa+ yKZfUonWAzWjuLgUPFuwfY9ih7NHmrGwv21QE80spQ== X-Google-Smtp-Source: AH8x224dsgF2WQ0NzNoJ3KqGWRSjWQvToVGXI3IS63aOVVUd29jNnSjF9Cv902Uv25DU8IPd+/XYXyMPmJSFCzfyiN8= X-Received: by 10.107.107.1 with SMTP id g1mr38261557ioc.63.1517507955410; Thu, 01 Feb 2018 09:59:15 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.201.67 with HTTP; Thu, 1 Feb 2018 09:59:14 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <5015.1517478674@critter.freebsd.dk> From: Warner Losh Date: Thu, 1 Feb 2018 10:59:14 -0700 X-Google-Sender-Auth: 6JXh-S0l-Ck7TWW8YOr7IMnshQ4 Message-ID: Subject: Re: Feedback on proposed loader changes To: Devin Teske Cc: Poul-Henning Kamp , "freebsd-arch@freebsd.org" , Devin Teske Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 17:59:16 -0000 On Thu, Feb 1, 2018 at 9:58 AM, Devin Teske wrote: > > > > On Feb 1, 2018, at 1:51 AM, Poul-Henning Kamp > wrote: > > > > -------- > > In message n3ESiUw@mail.gmail.com>, Warner Losh writes: > > > >> So I'd like feedback on two questions: Should I kill the forth feature= s > I > >> oulined above? And should I make the build system build multiple loade= rs > >> with a link controlling the default? > > > > I think you should just move forward and go for the end-stage > > without too many temporary bandaids. > > > > The loader is pretty decoupled from everything, so in case anybody > > needs any of these Forth cornercases, they can use 11.X loader with > > very little, if any, trouble. > > > > As a person that both reviewed the GSoC code you are working with > (in-depth; including a list of short-comings) and the most likely person = to > bring it up-to-par after it is committed, I have 2 opinions: > > 1. Please allow both boot systems for a while so that the lua-based menu > can be made as feature full as the Forth menu. Example: submenus were add= ed > in Forth long after the GSoC lua project had ended > OK. The plan outlined does that. The lua code will be installed into /boot. But it will be .lua, so no conflicts with .4th. And we start from loader.lua not loader.rc. > 2. Please don=E2=80=99t force us to run Lua until I can code the new feat= ures > OK > And as the principal author of the Forth menu since 9.0: > > 3. Please give me a way to run my code (at the very least until I can > bring the Lua up to snuff; and if I can=E2=80=99t just let me run Forth > in-perpetuity). > > Interrupting boot1 so I can drive the system in the pre-boot Execution en= v > is very important to me. For !EFI, this is relatively easy. boot1 you can type /boot/loader_forth instead of the default /boot/loader if the symlink changes and you want to go back. For EFI the answer is more complicated. boot1.efi is going away, so loader.efi will move to the ESP in \efi\freebsd\loader.efi, but it's easy enough to have multiple versions there (loader_lua.efi and loader_forth.efi) and select via EFI Shell or EFI Env variables which one you want should you need to fall back. Does that answer your concerns? Warner