From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755842AbbIBQzN (ORCPT ); Wed, 2 Sep 2015 12:55:13 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:59328 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755227AbbIBQzL (ORCPT ); Wed, 2 Sep 2015 12:55:11 -0400 Message-ID: <55E729DA.5070909@ti.com> Date: Wed, 2 Sep 2015 12:54:50 -0400 From: Murali Karicheri Organization: Texas Instruments User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: David Woodhouse , , Subject: Re: Question on adding a firmware ihex file in the kernel source References: <55D64AD2.9060900@ti.com> <1440112532.3303.100.camel@infradead.org> In-Reply-To: <1440112532.3303.100.camel@infradead.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/20/2015 07:15 PM, David Woodhouse wrote: > On Thu, 2015-08-20 at 17:46 -0400, Murali Karicheri wrote: >> All, >> >> Please help me understand the procedure to add a firmware ihex file to >> kernel source tree under firmware/ folder. The README.AddingFirmware >> file explains that file should be added to >> git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git and >> the patch for the same to be send to linux-firmware@kernel.org. And this >> requires it to be in binary form. How does then that end up in the >> firmware/ folder of the Linux source tree as an ihex file? > > You cannot do that. The old firmware/ directory in the source tree is > incomplete, out of date and scheduled for deletion. > > Firmware should *only* go into the separate linux-firmware.git > repository. > >> I would like to have one of the firmware statically built into the >> kernel as it is needed to be loaded even before file system is >> initialized in kernel (network driver firmware). > > Do not do that. It is believed by many to be a violation of the GPL. > > If the firmware is needed to mount the root file system, then you can > put it into an initramfs and load it that way, rather than building it > into the GPL'd kernel image. Can you point me to a script in initramfs that I can use to switch rootfs using switch_root during kernel boot up? For example, in my case, the PCIe serdes firmware is required to initialize PCIe to use SATA harddisk. So I plan to put the firmware in initramfs to request_firmware() and initialize the serdes so that PCIe become functional so that at a later point in bootup, I can switch my rootfs to the rootfs on harddisk using switch_root Murali > > -- Murali Karicheri Linux Kernel, Keystone