From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 16 10:03:37 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0978106566C for ; Sat, 16 Jun 2012 10:03:37 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward16.mail.yandex.net (forward16.mail.yandex.net [IPv6:2a02:6b8:0:1402::1]) by mx1.freebsd.org (Postfix) with ESMTP id 413D88FC08 for ; Sat, 16 Jun 2012 10:03:37 +0000 (UTC) Received: from smtp18.mail.yandex.net (smtp18.mail.yandex.net [95.108.252.18]) by forward16.mail.yandex.net (Yandex) with ESMTP id 1AC3FD2163C; Sat, 16 Jun 2012 14:03:36 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1339841016; bh=Rc246jk97Wh8okZGxfVfHxXgUnBpvkcsXElkXGW+lrQ=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=X5pBRINaAXyuwxdM5WHHFcqPnJnEuKk/0yetg+BVctQWlAaCP7coomXzks3hD02Ly 9OCPIvFROAKf3FqS38P0QejMOhUcQCgN+4TuTG91zvQpyOYDR0w3LR/kj7zqXBp+89 zL9xtNeG7kAVSFyS42SEYz4Q6utx97PdE6EkQn5c= Received: from smtp18.mail.yandex.net (localhost [127.0.0.1]) by smtp18.mail.yandex.net (Yandex) with ESMTP id EDB6B18A0233; Sat, 16 Jun 2012 14:03:35 +0400 (MSK) Received: from dynamic-178-141-5-132.kirov.comstar-r.ru (dynamic-178-141-5-132.kirov.comstar-r.ru [178.141.5.132]) by smtp18.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 3ZnCTo4U-3ZnOFikR; Sat, 16 Jun 2012 14:03:35 +0400 X-Yandex-Rcpt-Suid: eric@shadowsun.net X-Yandex-Rcpt-Suid: freebsd-hackers@freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1339841015; bh=Rc246jk97Wh8okZGxfVfHxXgUnBpvkcsXElkXGW+lrQ=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:X-Enigmail-Version:Content-Type: Content-Transfer-Encoding; b=CM9IEJRDBlsF8W8qIUthT65U6UhdMregFSkefyqCS1h7uIgJ1ly4o1u7Vf1y3VWTH H3SRHnaHuKizYegalkxXZ91lVyGGNPAGkMm57yHQ98GGB3uC6sAINIbdBiy4TTt0hK ewCw4FZqE61MQ4hUasRfl+nUojEeyvHELTwalqpI= Message-ID: <4FDC59F5.9010801@yandex.ru> Date: Sat, 16 Jun 2012 14:03:33 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120406 Thunderbird/10.0.3 MIME-Version: 1.0 To: Eric McCorkle References: <4FDBBACF.9040809@shadowsun.net> In-Reply-To: <4FDBBACF.9040809@shadowsun.net> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: EFI development tools 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: Sat, 16 Jun 2012 10:03:37 -0000 On 16.06.2012 02:44, Eric McCorkle wrote: > I've been working on EFI support for intel platforms. I've managed to > build the EFI Development Kit (EDK II) and the IASL compiler for > FreeBSD, which raises the possibility of integrating them either as > ports, or possibly into the base system. > > Here is some background: > > Right now, there is only one EFI program that gets built in the entire > system: loader.efi (for IA64, and in the future, i386 and amd64). > This is done by building a standard ELF program with a custom linker > script which produces code at a base address of 0x1000 (This is a > trick to get the effects of compiling for position-independent code, > as required by the PE format, as the actual .text section starts at > that offset into the file). It then uses objcopy to translate to the > PE executable format. I've had some strange behavior in some of the > EFI interfaces (notably, ConOut), which smacks of some sort of subtle > ABI issue. > > EDK seems to be made for development on a windows box, with marginal > support for Darwing and some Linux distros added as an afterthought. > It takes a bit of shoehorning to get it to build and run on FreeBSD, > but I did get it to work. However, it would take a nontrivial effort > to get it in shape for importation into the base FreeBSD system. It > also relies on mingw32 binutils and gcc, as well as python (though it > only uses python for build purposes; an effort to import it into the > base system would probably remove all the python bits). Hi, Eric. Did you try the GNU EFI toolchain? It contains a good descriptions on how to build EFI application and we probably can use some suggestions even without importing it. http://sourceforge.net/projects/gnu-efi/ -- WBR, Andrey V. Elsukov