From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YKsN6-0008JT-8z for mharc-grub-devel@gnu.org; Mon, 09 Feb 2015 12:43:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKsN3-0008Ie-O1 for grub-devel@gnu.org; Mon, 09 Feb 2015 12:43:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKsN0-0001Tn-F6 for grub-devel@gnu.org; Mon, 09 Feb 2015 12:43:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKsN0-0001TO-7z for grub-devel@gnu.org; Mon, 09 Feb 2015 12:43:38 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t19HhXo7029319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 9 Feb 2015 12:43:34 -0500 Received: from [10.16.186.145] (prarit-guest.khw.lab.eng.bos.redhat.com [10.16.186.145]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t19HhWYn022082; Mon, 9 Feb 2015 12:43:32 -0500 Message-ID: <54D8F1C4.8080702@redhat.com> Date: Mon, 09 Feb 2015 12:43:32 -0500 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131028 Thunderbird/17.0.10 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH v2] Add a module for retrieving SMBIOS information References: <87wq3s5j49.fsf@gmail.com> <54D8AB80.9000804@redhat.com> <54D8E032.4040206@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Raghuraman Thirumalairajan , David Michael , Andrei Borzenkov , Rajat Jain , Leif Lindholm , Sanjay Jain , Stu Grossman 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, 09 Feb 2015 17:43:43 -0000 On 02/09/2015 12:38 PM, Rajat Jain wrote: > Hello Prarit, > >> -----Original Message----- >> From: Prarit Bhargava [mailto:prarit@redhat.com] >> Sent: Monday, February 09, 2015 8:29 AM >> To: Rajat Jain >> Cc: David Michael; grub-devel@gnu.org; Leif Lindholm; Andrei Borzenkov; >> Sanjay Jain; Raghuraman Thirumalairajan; Stu Grossman >> Subject: Re: [PATCH v2] Add a module for retrieving SMBIOS information >> >> >> >> On 02/09/2015 10:27 AM, Rajat Jain wrote: >>> Hello, >>> >>>>> 1) We have a board that boots Linux and this board itself can be >>>>> plugged >>>> into one of different chassis types. We need to pass different >>>> parameters to the kernel based on the "CHASSIS_TYPE" information that >>>> is passed by the bios in the DMI / SMBIOS tables. >>> >>> Actually, I had simplified the problem statement, to avoid complicating the >> discussion. Basically, we have enhanced the grub with a "devicetree" >> command that supplies a flattened device tree to the kernel (just like u-boot >> or others do in embedded world). >>> >>> http://www.denx.de/wiki/view/DULG/LinuxFDTBlob >>> >>> However, we need to pass different flattened device tree to the kernel >> based on different CHASSIS_TYPE. (because different chassis have different >> hardware components, slots etc that need to be handled differently). >>> >>>>> >>>> >>>> Whups ... somehow stripped all the cc's on my original reply. >>>> >>>> why isn't 1) already in the kernel itself? >>> >>> I hope my problem statement clarification above makes it clearer. >> However, I think the problem is more generic - essentially depending on the >> current machine type, we may have to do different things on different >> platforms, such as: >>> * Loading different kernels / initrd / device tree etc. >>> * Passing different kernel parameters for: >>> - different root fs mount points (root=/dev/sda[a/b/c/d]......) >>> - enabling disabling different kernel features / drivers / subsystem >> (pci=[nocrs/use_crs]...) >>> - etc. >>> >> >> Well I understand the request for different kernels, but 1) implies that you're >> adding additional kernel parameters based on the CHASSIS type? So I'm >> wondering why you're not making some boot time decision based on the >> CHASSIS type instead of a bootloader time decision. > > Oh OK. I guess you are saying why not read the CHASSIS_TYPE in the kernel and take different paths depending on the value? The reason is because we may want to pass different kernel options that *exist today*. (E.g. different root file systems, or hw tuning parametes etc). Ideally once deployed, we neither want to change the bootloader, nor the kernel since that would require a recompilation which is best avoided. If something changes, it is much easier to change the grub config file which can be changed anytime, and thus we are requesting the *capability* to do it in a grub script or config file. > Ah, I get it. That certainly makes sense. I just thought there was some specific HW command that you always wanted executed on these boards. >> >> /me is not against the patchset. I think the idea of booting different kernels >> based on the HW sounds reasonable from a administration perspective. > > Yup, understood. > > Also from admin perspective, I'm suggesting that we may need tune the kernel differently depending on the HW. Thanks for the info :) P. > > Thanks, > > Rajat > >> >> P. >>> Thanks, >>> >>> Rajat >>> >>> >>> >>>> -----Original Message----- >>>> From: Prarit Bhargava [mailto:prarit@redhat.com] >>>> Sent: Monday, February 09, 2015 4:44 AM >>>> To: David Michael >>>> Cc: grub-devel@gnu.org; Leif Lindholm; Andrei Borzenkov; Rajat Jain; >>>> Sanjay Jain; Raghuraman Thirumalairajan; Stu Grossman >>>> Subject: Re: [PATCH v2] Add a module for retrieving SMBIOS >>>> information >>>> >>>> On 02/08/2015 01:54 PM, David Michael wrote: >>>>> The following are two use cases from Rajat Jain : >>>>> >>>>> 1) We have a board that boots Linux and this board itself can be >>>>> plugged >>>> into one of different chassis types. We need to pass different >>>> parameters to the kernel based on the "CHASSIS_TYPE" information that >>>> is passed by the bios in the DMI / SMBIOS tables. >>>>> >>>> >>>> Whups ... somehow stripped all the cc's on my original reply. >>>> >>>> why isn't 1) already in the kernel itself? >>>> >>>> P. >>> > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >