commit | 317ff98bfe8f8d32a2e1603332ed509f12467f15 | [log] [tgz] |
---|---|---|
author | Brian Ma <chma0@nuvoton.com> | Tue Aug 01 16:09:54 2023 +0800 |
committer | Patrick Williams <patrick@stwcx.xyz> | Fri Aug 18 15:22:30 2023 +0000 |
tree | bd0000471c0597ee8afc8d042d5ddb31fadc77e0 | |
parent | f5f135fb7be69b475814c54b688917b493708be0 [diff] |
meta-phosphor: npcm8xx.bbclass: update padding Do not add padding size once binary file alreay aligned. Change-Id: I2c30d86f222f4cfd53a23ac128ad876413978224 Signed-off-by: Brian Ma <chma0@nuvoton.com>
diff --git a/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass b/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass index 6ea5389..9b6db79 100644 --- a/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass +++ b/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass
@@ -30,10 +30,12 @@ TIP_IMAGE = d.getVar('TIP_IMAGE', True) def Pad_bin_file_inplace(inF, align): padding_size = 0 - padding_size_end = 0 F_size = os.path.getsize(inF) + if ((F_size % align) == 0): + return + padding_size = align - (F_size % align) infile = open(inF, "ab")