summaryrefslogtreecommitdiff
path: root/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass')
-rw-r--r--meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass4
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")