From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by ml01.01.org (Postfix) with ESMTP id 2312B1A1DED for ; Thu, 11 Aug 2016 05:01:16 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 11 Aug 2016 05:01:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,504,1464678000"; d="scan'208,217";a="1033773435" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 11 Aug 2016 05:01:16 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 11 Aug 2016 05:01:15 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 11 Aug 2016 05:01:14 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.181]) with mapi id 14.03.0248.002; Thu, 11 Aug 2016 20:01:13 +0800 From: "Gao, Liming" To: "edk2-devel@lists.01.org" Thread-Topic: [edk2][RFC] Image definition file for HII Image package Thread-Index: AdHzwPcckHNnLx6ITZm3mAuWjS7duA== Date: Thu, 11 Aug 2016 12:01:11 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155EA440@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: [RFC] Image definition file for HII Image package X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2016 12:01:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, all This proposal is to add support of HII Image package generation in edk2 B= aseTools. Like uni file for HII string package, it includes the following = things. Please help review and raise your comments. 1) New file type *.idf Image definition file to describe HII image res= ource. It is the ASCII text file, and includes one or more "#image IMAGE_ID= [TRANSPARENT] ImageFileName". a. IMAGE_ID is macro name. IMAGE_TOKEN (IMAGE_ID) is referred in othe= r source files. b. TRANSPARENT is optional. If it is specified, BaseTools will add TRA= NS image block type for the input ImageFile. UEFI spec doesn't define TRANS= JPG and PNG block type. So, this flag is ignored for JPG and PNG image. c. ImageFileName is also listed in [Sources] section of INF, and its = file extension is one of .bmp, .jpg, .png (case insensitive). d. BaseTools parses idf files and gets every image file, then bases on= file extension to generate the different image block data, last combine th= em and output HII image package. i. If m= ore than one idf files are listed in [Sources] section of one INF, they wil= l be merged and parsed. ii. If th= e image file is not found or its file extension is unsupported, BaseTools w= ill report build error. iii. If th= e file extension is bmp, BaseTools will convert it convert it to EFI_HII_II= BT_IMAGE_BLOCK and EFI_HII_IMAGE_PALETTE_INFO. iv. If the = file extension is jpg, BaseTools will only check 'JFIF' signature at offset= 6 in the image file, then add it into EFI_HII_IIBT_JPEG_BLOCK. v. If the= file extension is png, BaseTools directly adds it into EFI_HII_IIBT_PNG_B= LOCK without any check. 2) New IMAGE_TOKEN macro is used to refer to IMAGE_ID. 3) New AutoGen header file $(MODULE_NAME)ImgDefs.h to include the gene= rated ImageId definition. 4) New $(MODULE_NAME)Idf.hpk or $(MODULE_NAME)Images are generated as = the output binary HII image package. Sample.idf: #image IMG_LOGO TRANSPARENT Logo.bmp #image IMG_FULL_LOGO Logo.jpg #image IMG_OEM_LOGO Logo.png Thanks Liming