From owner-freebsd-arch@freebsd.org Mon Oct 9 05:45:40 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AD10E260C9 for ; Mon, 9 Oct 2017 05:45:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id EE3297E39A for ; Mon, 9 Oct 2017 05:45:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id E5B6FE260C8; Mon, 9 Oct 2017 05:45:39 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2ADEE260C7 for ; Mon, 9 Oct 2017 05:45:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (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 72F917E38C for ; Mon, 9 Oct 2017 05:45:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22d.google.com with SMTP id j140so7083462itj.1 for ; Sun, 08 Oct 2017 22:45:39 -0700 (PDT) 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=QzBUkz56odmNNwY79LOnRS0x8MwVJSshT0CpI718WhU=; b=IPQAlKcFZESCU3Je1KRt2OaB21Qoy2Z3LGffbDPxYJtPo8bfumCbJ+ef+PgsKYmtWv EnYgzg3S13uIiXtceaviEtt/kR3mMpIKDD6RQr/ZJLDO8A7WxlKzwVJ/tmyVEKfXWFaw 0cYFZtYGHbJiZA2VCiEIxxvc38rP+aN1vxyV9i6IX4rOyhRXKweAzTq6rukAwcIux25/ XVN6uNEb/Vux+ZevvGubeYqM3NBOb4BBT6GEPOphu0job8lSpDBHfKL+B/mW8MGNs99t jUzkZEvj8FZhHRj+uSUkie1HfPnZIYRgbQJS3PxX3Eic+SouTKDfi8aOw3hRuUyBL/is l2qw== 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=QzBUkz56odmNNwY79LOnRS0x8MwVJSshT0CpI718WhU=; b=PstAkmSk7DpXOWAQyyH1G//e2sdsbZPu8gFHldomOmcQzIpCR9GkWv6BfyiBvROomr AmHmibHZPt9U+VNG7BfsSHkN7y87zVvif8K4Lqo03ktvXmWU1FDsgcMymWKkqmIHRDx+ OZZWjojkzKsEEJ/M+e7L2yrQeqrCSu9c9Ik5wIwIky9XbyAe41QK7DyaZCIHNW3oizp0 BmNI7e2N7TMh7Xi+rDFGlPvkOV6p91BbFxp9MlGfR74/zdcWV+3+1VJxgz7/AJ/RzVEF SEGruXzE6PaCOQgWftCpKEjX9xZGGnB/Xqowrc+4EXn3so+RGiUc/thWR2LkEx4T7goc tZtA== X-Gm-Message-State: AMCzsaXi1nStEryar6YQwTF4UkAggn7D2CWBkim00X6BlPMoAzYdTB7w z7U7jOLNm4A6Bq02oZDSbTetfuqiar1xVfQfudbnVQ== X-Google-Smtp-Source: AOwi7QB82+cls6E1SZIg4ug7jzV2ZEALMuIgqfpue4r+kJuDDXvW+CBMUVEQctfzjj8rMOjeYr1jGUkkvs4c4ThLyaw= X-Received: by 10.36.201.4 with SMTP id h4mr12671216itg.26.1507527938271; Sun, 08 Oct 2017 22:45:38 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.94.130 with HTTP; Sun, 8 Oct 2017 22:45:37 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:8936:338a:89de:d5ea] From: Warner Losh Date: Sun, 8 Oct 2017 23:45:37 -0600 X-Google-Sender-Auth: u-cCHr6IPPmrXyyzMsOOgObF4Bc Message-ID: Subject: deorbiting /usr/lib/libstand.a, moving to sysboot To: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2017 05:45:40 -0000 I'd like to deorbit /usr/lib/stand.a and /usr/include/stand.h. These are really parts of the boot loader with an unstable API and shouldn't be installed into the system. It's really a private library to the boot loader. Further, I'd like to move the whole shooting match into sys/boot/libsa (the name change is on purpose to break anything that used libstand). With these changes, one can cd sys/boot and do a make clean; make all and have it not depend (too much) on the host computer. It will also let us clean up a lot of the cut and paste and only half working implementations of this idea we have now in a clean way. We can also move the files in sys/boot/common that aren't actually part of /boot/loader into libsa since there's would be no good reason to keep them separate (though ultra-tiny loaders can cherry pick individual files, or compile things in a custom way if that's really needed). I've been cleaning up the sys/boot Makefile technical debt and this will go a long way towards disentangling things (though there's a lot to do besides these fixes). History is against FreeBSD's practice, btw. We're the only BSD that cross-threads like this (dragonfly may also, I haven't checked, but they got it from us if so). NetBSD/OpenBSD have sys/lib/libsa for this stuff. 4.4bsd had each arch build its own libsa.a from files living in sys/ARCH/stand. 4.2BSD did install things as /usr/lib/libsa.a, but it was from inside of sys/stand and friends. v7 had a similar structure to 4.2BSD, but with files living in different directories (they installed libsa.a into /usr/lib, but again from sys directories). Since we've ditched the 4.4BSD structure that NetBSD/OpenBSD evolved, I don't think it makes sense to go the sys/lib route (since this is only used in the boot loader) Since sys/boot programs know its internals so much that claims of independence would be hard to sustain. Having it in sys/boot would also help the POLA this change might cause by fixing a POLA breakage now (it fixes when libstand API changes break the naive build, as well as ensuring hacks to libstand will get built when a new boot loader is built). So we invented the current situation, we can change it since nothing outside the boot loader uses it (and if there are out-of-tree examples that use it, they could be converted to the new structure). Any objections to my moving forward with this (assume I'll help people fix any in-flight work this disrupts)? I know the plans are a little vague, but I was hoping to get rough consensus while I came up with woking code and go all IETF old-school on the problem. Warner