From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7D226209574D1 for ; Mon, 26 Feb 2018 07:49:23 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8DC2E81A8B86; Mon, 26 Feb 2018 15:55:27 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-149.rdu2.redhat.com [10.10.120.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9F2DAFD73; Mon, 26 Feb 2018 15:55:26 +0000 (UTC) To: Pankaj Bansal , "Kinney, Michael D" , "edk2-devel@lists.01.org" Cc: "Gao, Liming" References: <1519626521-15902-1-git-send-email-pankaj.bansal@nxp.com> From: Laszlo Ersek Message-ID: <76e5168a-e3c2-97bb-dac1-22ffc212c7ee@redhat.com> Date: Mon, 26 Feb 2018 16:55:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 26 Feb 2018 15:55:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 26 Feb 2018 15:55:27 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [RFC] Add Platform Include path in modules X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2018 15:49:24 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 02/26/18 11:55, Pankaj Bansal wrote: > Hi, > > Consider a simple driver which needs that some data structures be > filled by the Platform, which is using the driver. > > Driver.c #include > > Struct a = platformVal; > > We can define platformVal in Platform.h, which would be unique to the > platform being built. This Platform.h can be placed in include > directories, whose path would be defined in Platform.dec file. > > Now, whenever we build driver for each unique platform, we need not > to mention Platform.dec file in driver.inf [packages] section. We can > append Platform.dec include paths to each driver. i.e. look for the > include files in [packages] section as well as in Platform include > directories. > > For this, I am looking for Platform.dec file in same directory as > Platform.dsc and using same name as Platform.dsc > > We can refine this change further. i.e. add Platform include > directories to driver's include paths based on some condition in > driver.inf file. (Apologies in advance if I failed to grasp the use case.) If I understand correctly, you have multiple platforms (defined by DSC and FDF files), and you build a given driver for several of these platforms, separately. And, when building the driver for the separate platforms, you'd like the driver to get different initializers for various static (global) structure variables. Have you tried the structured PCD format? I think that could cover your use case. Unfortunately I couldn't find anything about structured PCDs in the edk2 specs, but there are several BZ references in the following mailing list message: [edk2] [Patch 00/14] Enable Structure PCD support in edk2 http://mid.mail-archive.com/1512140335-6932-1-git-send-email-liming.gao@intel.com Thanks Laszlo