From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 20 22:21:45 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D04916A419 for ; Sun, 20 Jan 2008 22:21:45 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 5662D13C468 for ; Sun, 20 Jan 2008 22:21:45 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.12.9/8.12.9) id m0KMLhnu028198; Sun, 20 Jan 2008 14:21:43 -0800 (PST) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.209] (p54.kientzle.com [66.166.149.54]) by kientzle.com with SMTP; Sun, 20 Jan 2008 14:21:43 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4793C977.9000803@freebsd.org> Date: Sun, 20 Jan 2008 14:21:43 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Adrian Penisoara References: <78cb3d3f0801201239x18c339a6sbc6a04d2b5670b81@mail.gmail.com> In-Reply-To: <78cb3d3f0801201239x18c339a6sbc6a04d2b5670b81@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Squeezing out some 70 bytes out of the boot2 loader X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2008 22:21:45 -0000 Adrian Penisoara wrote: > Hello > > I am trying to hack in some symlink support into the [sys/boot/i386/]boot2 > bootloader (for my project [1]) and I seem to fall short of about 69 bytes: > ... > > [1] I'm trying to get support for /boot being mounted as a separate FS and > as such I would need to have a "self-pointing" symlink (e.g. "boot -> ." ) Just because there is a symlink doesn't mean boot2 has to follow it. I haven't looked at the boot2 code, but I presume there's the equivalent of "chdir boot" in there. What if you just ignored failure (if there's no "boot" entry or "boot" isn't a dir, assume the boot files are in the root of the FS). Wouldn't that work just as well and require less space? Cheers, Tim Kientzle