From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TQFza-0006fa-10 for mharc-grub-devel@gnu.org; Mon, 22 Oct 2012 07:16:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQFzN-0006cs-Te for grub-devel@gnu.org; Mon, 22 Oct 2012 07:16:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQFzL-0004jj-Qv for grub-devel@gnu.org; Mon, 22 Oct 2012 07:16:09 -0400 Received: from service87.mimecast.com ([91.220.42.44]:36827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQFzL-0004jU-Ib for grub-devel@gnu.org; Mon, 22 Oct 2012 07:16:07 -0400 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 22 Oct 2012 12:16:05 +0100 Received: from [10.1.69.77] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 22 Oct 2012 12:16:03 +0100 Message-ID: <50852AF0.8090609@arm.com> Date: Mon, 22 Oct 2012 12:16:00 +0100 From: Leif Lindholm User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: GRUB port for ARMv7-A U-Boot References: <5081a0b0.0a4a340a.1cd2.ffffb04aSMTPIN_ADDED@mx.google.com> <5081A5ED.1080003@gmail.com> In-Reply-To: <5081A5ED.1080003@gmail.com> X-OriginalArrivalTime: 22 Oct 2012 11:16:03.0201 (UTC) FILETIME=[9F650710:01CDB046] X-MC-Unique: 112102212160503301 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 91.220.42.44 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: Mon, 22 Oct 2012 11:16:19 -0000 On 10/19/12 20:11, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: > On 19.10.2012 20:47, Leif Lindholm wrote: >> libfdt is dual-licensed, GPLv2+/BSD, and the copyright belongs to David >> Gibson . I have a patch against the libfdt included in >> http://jdl.com/software/dtc-v1.3.0.tgz that makes it build under GRUB. > > I'd prefer rather without libfdt and share more code with openfirmware > since it's similar brain damage. I would agree, but the current openfirmware code is very openfirmware-specific, and the devicetree code is not separated from the re= st. If they should be shared, would it not make sense to use libfdt for both? Openfirmware code would likely need to change anyway, and it would look a b= it confusing to insert calls to grub_ieee1275_finddevice() in the U-Boot code. >> The U-Boot API is released under GPLv2+ consists of 3 source files. They >> are licensed under GPLv2+. The port also contains a crc32 checker I >> included from the FreeBSD loader, copyright Gary S. Brown with the >> statement that "You may use this program, or code or tables extracted >> from it, as desired without restriction.". The crc32 checker is not >> strictly speaking required, so could be removed if this poses any >> problems. > > GRUB already has crc32 from libgcrypt. Could you use it? I think that is available only as a module? And this is called effectively = as the first thing in grub_machine_init(). I could simply leave it out for now... >> In addition to this, the port includes libgcc helper functions (aeabi_*) >> taken from linux/arch/arm/lib, licensed under GPLv2+. > > These should be included at compile time from system libgcc. Unfortunately, there is a snag with that; arm libgcc also provides the __clear_cache function (for cleaning and synchronizing instruction and data caches). Calls to this function are generated by the compiler, for trampolines, when it encounters nested functions. However, unless building with a "bare-metal" cross-compiler, your libgcc implementation will contain= a system call for performing this privileged operation. U-Boot has a similar thing in place with CONFIG_PRIVATE_LIBGCC. All of the scavenged source files are (c) FSF. >> My intent is to set up a public repository on launchpad.net containing >> my modifications on Monday. > > Could you send the patch here even if it's not finished? Of course. I will start with a couple of patches that could probably be included regardless of the rest, and follow on with one large patch for the ARM-uboo= t support, minus libfdt and crc32. Regards, Leif