From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 1 22:24:12 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 0646316A41A for ; Fri, 1 Feb 2008 22:24:12 +0000 (UTC) (envelope-from ady@ady.ro) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.freebsd.org (Postfix) with ESMTP id BF34B13C45A for ; Fri, 1 Feb 2008 22:24:11 +0000 (UTC) (envelope-from ady@ady.ro) Received: by wx-out-0506.google.com with SMTP id i29so1204163wxd.7 for ; Fri, 01 Feb 2008 14:24:11 -0800 (PST) Received: by 10.142.103.6 with SMTP id a6mr2620156wfc.21.1201904649554; Fri, 01 Feb 2008 14:24:09 -0800 (PST) Received: by 10.143.167.6 with HTTP; Fri, 1 Feb 2008 14:24:09 -0800 (PST) Message-ID: <78cb3d3f0802011424w46fb71fbp7169a5e60ee5718f@mail.gmail.com> Date: Sat, 2 Feb 2008 00:24:09 +0200 From: "Adrian Penisoara" Sender: ady@ady.ro To: "Tim Kientzle" In-Reply-To: <4793C977.9000803@freebsd.org> MIME-Version: 1.0 References: <78cb3d3f0801201239x18c339a6sbc6a04d2b5670b81@mail.gmail.com> <4793C977.9000803@freebsd.org> X-Google-Sender-Auth: 789111fc6ef70a04 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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: Fri, 01 Feb 2008 22:24:12 -0000 Hi, On Jan 21, 2008 12:21 AM, Tim Kientzle wrote: > 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? Actually the code which should be modified is common for multiple platforms/loaders and I fear I might be breaking more things than resolving what I want. And I would not like adding yet another hardcoded "/boot" string in there ;). Thanks, Adrian Penisoara ROFUG / EnterpriseBSD