From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QaIXm-0001Hh-Iv for mharc-grub-devel@gnu.org; Fri, 24 Jun 2011 22:24:22 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaIXj-0001Hb-SW for grub-devel@gnu.org; Fri, 24 Jun 2011 22:24:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaIXi-0004UE-QV for grub-devel@gnu.org; Fri, 24 Jun 2011 22:24:19 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:39663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaIXi-0004U8-Kc for grub-devel@gnu.org; Fri, 24 Jun 2011 22:24:18 -0400 Received: by pzk4 with SMTP id 4so2573302pzk.0 for ; Fri, 24 Jun 2011 19:24:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=arz1C+/O5w2vLEhP/AeKpc7VvltKwkFnnqSAvdddzX0=; b=a27P+jLgzuVl1BxmCY2w2C4dgpoQ6bEuzVpEvfYRR+tWgvGr29pphzQnMSJ0P6Phkt ok0BoGlGunmQzBwZQx2/Xu20iV1E7MdID2TlzcBmZi4X/K5nodmhJFw1BXWgeSUkSzaF 5f+D2EBNKHi0oG0JCfm7jFP+M1QLkoCr7xvlc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=haqCkFxiD5iad+ebuIMteYoLeDFVgodBLrjEazZdEUBsblxJnhGzC8bKagJ132k26y xlP/irBHX425fh4BJ2gT3yFNufqKzVZRzQt4kY9gl4dxUKZQc7AlQ3h2xUXvCrDwCGDW kNShMwqnD+F9s6yXK9CwjPYo2p6IFdc7fzOKk= Received: by 10.142.135.4 with SMTP id i4mr706491wfd.34.1308968657030; Fri, 24 Jun 2011 19:24:17 -0700 (PDT) Received: from [10.1.1.12] (d122-104-32-184.sbr6.nsw.optusnet.com.au [122.104.32.184]) by mx.google.com with ESMTPS id b8sm2489770pbj.46.2011.06.24.19.24.13 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Jun 2011 19:24:15 -0700 (PDT) Message-ID: <4E0546CA.9070704@gmail.com> Date: Sat, 25 Jun 2011 12:24:10 +1000 From: Graeme Russ User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: Contribution: a file loading module References: <4E035EF8.8050803@gmail.com> In-Reply-To: <4E035EF8.8050803@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.41 Cc: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= , Pierre-Nicolas Clauss X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jun 2011 02:24:21 -0000 On 24/06/11 01:42, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > On 17.06.2011 18:11, Pierre-Nicolas Clauss wrote: >> Hi folks, >> >> I subscribed to this list in order to share with you a humble >> contribution of mine to grub. >> >> As an OS developer enthusiastic, I needed to load a file to memory at >> a given specific address. I also have such a requirement - I am developing U-Boot for x86 systems and I have real trouble getting documentation for the SDRAM initialisation code. I figured I could leave that to BIOS for the time being and use GRUB to load my U-Boot image into memory. This way, I do not have to flash the BIOS chip until very late in the development cycle. > While such a functionality would be a toy for loader developpers, it's > completely useless for the end users. If the user has to know any single > address or any single address figures in grub.cfg it's automatically a > bad design. Also while it would be possible to write a loader in scripts > using such kind of commands it's simply a wrong place for it. Loaders > have to be written in C. Also people who really need such kind of > functionality (devs) can quickly add such a kludge to the loader they > are currently developping. As for the user the syntax has to be sth like > loader_name Well, I now have GRUB2 installed on a USB pen drive and have it run memtestx86+. So from here I would like it to be a simple matter of copying the U-Boot binary onto the USB pen drive and adding an entry in the grub.cfg file - But I need the 'raw image loader' module to do this > This allows for a much higher flexibility, portability and future-proof. >> No command in grub 1.99 was fitting my needs (as my file as no >> semantic known to grub: it's not a module, it's not an initrd, it's >> not a multiboot kernel either), so I developed my own module. >> > What is it then? I'm willing to consider adding new loading as long as > they are sane and make sense. I think a command like: exec_file file load_address [execute_address] would fit my needs perfectly. The U-Boot images are raw (not ELF) with a 32-bit entry point at the first byte of the file but this may change (I may put the version string at the start of the file) so the optional execute_address could come in handy. Regards, Graeme