From: "Gao, Liming" <liming.gao@intel.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: [RFC] Image definition file for HII Image package
Date: Thu, 11 Aug 2016 12:01:11 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155EA440@shsmsx102.ccr.corp.intel.com> (raw)
Hi, all
This proposal is to add support of HII Image package generation in edk2 BaseTools. 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 resource. 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 other source files.
b. TRANSPARENT is optional. If it is specified, BaseTools will add TRANS 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 them and output HII image package.
i. If more than one idf files are listed in [Sources] section of one INF, they will be merged and parsed.
ii. If the image file is not found or its file extension is unsupported, BaseTools will report build error.
iii. If the file extension is bmp, BaseTools will convert it convert it to EFI_HII_IIBT_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_BLOCK 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 generated 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
reply other threads:[~2016-08-11 12:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A1155EA440@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox