From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 30 04:28:50 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08A9FB0A for ; Mon, 30 Mar 2015 04:28:50 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D085FC3D for ; Mon, 30 Mar 2015 04:28:49 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (c-73-162-13-215.hsd1.ca.comcast.net [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NM000FD3CFXI720@st11p02mm-asmtp002.mac.com> for freebsd-hackers@freebsd.org; Mon, 30 Mar 2015 04:28:47 +0000 (GMT) Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: ZFS support for EFI From: Rui Paulo In-reply-to: <55189CBA.9040107@metricspace.net> Date: Sun, 29 Mar 2015 21:28:45 -0700 Content-transfer-encoding: quoted-printable Message-id: <543637C0-A4FF-4801-BE5C-859F2D968D48@me.com> References: <55189CBA.9040107@metricspace.net> To: Eric McCorkle X-Mailer: Apple Mail (2.2070.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-03-30_01:2015-03-28,2015-03-29,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1503300046 Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2015 04:28:50 -0000 Hi, > On Mar 29, 2015, at 17:45, Eric McCorkle wrote: >=20 > Hi folks, >=20 > I've been messing around off and on for a while with adding ZFS = support > to the EFI boot. It's been mostly exploratory and self-contained up = to > this point, but I've gotten to a point that warrants some discussion. >=20 >=20 > First, I've converted boot1.c (the EFI boot block) to use an FS module > framework. This facilitates the addition of ZFS, and should also come > in handy if someone wants to add other functionality later (ie. = crypto, > netboot, etc.) Good. :-) > More importantly, the EFI loader doesn't seem to make use of its > command-line arguments at all. But a ZFS-enabled loader would really > need the ability to take arguments from boot1 (or grub, or whatever > else). On the boot1 side, with ZFS you need to load and parse > /boot/loader.conf (which may cause you to switch pools), then hand off > the information to loader. In the BIOS loader, that's done through a > binary data object that gets passed in. Command-line strings seem = like > the most sensible way to do it with EFI. >=20 > Would this be the right way to go, and if so, what ought these > command-line strings look like? I have a crazy idea: why not use getopt() in loader.efi ? getopt() is = already part of libstand, so it should be easy to use it. Alternatively you can just use key value pairs. -- Rui Paulo