From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 15 03:20:50 2015 Return-Path: Delivered-To: freebsd-hackers@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02E3CC76 for ; Mon, 15 Jun 2015 03:20:50 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CD69EE78 for ; Mon, 15 Jun 2015 03:20:49 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from jre-mbp.elischer.org (ppp121-45-248-228.lns20.per4.internode.on.net [121.45.248.228]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t5F3Kb8o086950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 14 Jun 2015 20:20:40 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <557E4480.6000603@freebsd.org> Date: Mon, 15 Jun 2015 11:20:32 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Don whY , FreeBSD-Hackers Mailing List Subject: Re: PXE boot an XIP image? References: <557C073E.1060702@gmx.com> <557C2BD7.1000104@freebsd.org> <557C844F.1010107@gmx.com> In-Reply-To: <557C844F.1010107@gmx.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2015 03:20:50 -0000 On 6/14/15 3:28 AM, Don whY wrote: > On 6/13/2015 6:10 AM, Julian Elischer wrote: >> On 6/13/15 6:34 PM, Don whY wrote: >> >>> I'd like to PXE boot a kernel then fetch (any choice of protocol) >>> a *single* image to load into RAM thereafter not requiring any >>> access to external media to operate. I.e., as if the image >>> had resided in the device all along. >> >> what do you mean by "single"? any PXE boot is by definition a >> number of >> transactions. > > Load kernel, load *an* executable, CUT NETWORK CORD. Thereafter, > behave > as if the device was operating from built-in FLASH. > >> The regular PXE boot code from FreeBSD is capable of loading a >> kernel and a >> matching ram filesystem, which when executed, will boot up as a >> running >> system and not touch any medium. I haven't done it for a while but at >> one stage there used to be a suitable memory filesystem on one fo >> the boot media. >> (that may no longer be true) > > A memory filesystem is not the same as XIP. You'd have *two* copies of > anything that is executing in RAM at any given time: the one stored > in the filesystem and the one that is executing in process memory. you didn't explain clearly you wanted "execute in place" (XIP) (or if you did you didn't explain what it means becasue I only figured it out from your other email). As far as I know there is no facility for that. It's an interesting concept.. You could probably start from tmpfs and add a 'preloaded image' feature and a vfs layer that uses a copy-on-write getpages entrypoint. But I think it's going to be you doing much of the work. You may need a special image activator to handle the loading. Others may chime in if there is work underway already but I don't recall hearing about such.