diff options
author | Brian Ma <chma0@nuvoton.com> | 2023-08-01 11:09:54 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2023-08-18 18:22:30 +0300 |
commit | 317ff98bfe8f8d32a2e1603332ed509f12467f15 (patch) | |
tree | bd0000471c0597ee8afc8d042d5ddb31fadc77e0 | |
parent | f5f135fb7be69b475814c54b688917b493708be0 (diff) | |
download | openbmc-317ff98bfe8f8d32a2e1603332ed509f12467f15.tar.xz |
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>
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass b/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass index 6ea5389834..9b6db798d0 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 @@ python do_pad_binary() { 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") |