From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 23 17:05:04 2013 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D2655364 for ; Sat, 23 Feb 2013 17:05:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 7D88A933 for ; Sat, 23 Feb 2013 17:05:04 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.6/8.14.6) with ESMTP id r1NH53R5082820 for ; Sat, 23 Feb 2013 10:05:04 -0700 (MST) (envelope-from ian@FreeBSD.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r1NH4f5n056070; Sat, 23 Feb 2013 10:04:41 -0700 (MST) (envelope-from ian@FreeBSD.org) Subject: Re: TFTP single file kernel load From: Ian Lepore To: Wojciech Puchar In-Reply-To: References: <1361637752.1185.99.camel@revolution.hippie.lan> Content-Type: text/plain; charset="us-ascii" Date: Sat, 23 Feb 2013 10:04:41 -0700 Message-ID: <1361639081.1185.104.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2013 17:05:04 -0000 On Sat, 2013-02-23 at 17:57 +0100, Wojciech Puchar wrote: > > > > Basically what needs doing is to link the kernel with a modified > > ldscript that doesn't add space for the program headers, and then run > > the output of that link through "objcopy -S -O binary" to create a > > kernel.bin file. That file can be directly loaded to the address it was > > linked for, and a jump to the load address launches the kernel. > > is btxld(8) a tool i have to use after making kernel.bin file? > > what should i use for -b and -l > I've never heard of btxld before now, and from a quick look at its manpage its not clear to me what it does. It may be a part of the x86 build process I've never noticed before. > > > > Whether the kernel runs properly when launched that way is a different > > question. An arm kernel will run that way because we haven't had the > > luxury of loader(8) in the arm world until recently. The x86 kernel may > > expect values in the environment that the loader obtained from the bios. > > it can be loaded without loader for now - if you press a key before > loader(8) is loaded and enter kernel image. > > at least it was like that. Oh, good point, maybe it'll just work fine (although it's been years since I last loaded an x86 kernel directly from boot2, way back before the days of acpi and smap data and all of that modern stuff). -- Ian