summaryrefslogtreecommitdiff
path: root/meta-phosphor
diff options
context:
space:
mode:
authorTim Lee <timlee660101@gmail.com>2022-10-28 11:57:26 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-11-01 19:01:31 +0300
commit9d9d9e37a145014dd6f4ebf5733062f56f9b3c86 (patch)
tree7576eabcfb41a7cd86781d988ef745bd75fee2d8 /meta-phosphor
parentd9981bf7ca301fa61f2a9a665baddde0ca86cef0 (diff)
downloadopenbmc-9d9d9e37a145014dd6f4ebf5733062f56f9b3c86.tar.xz
meta-phosphor: npcm8xx.bbclass: adjust each image alignment by its definition
Tested: buid pass and boot up successful when loading BB at 0x80000 for example Verified by bootblock log as below: ========== Load bootblock ========== tip_firmware_image_init fiu0 cs0 BOOTBLOCK tag U. scan from 0x80000000 to 0x88000000 tip_firmware_image_scan_flash BOOTBLOCK found addr 0x80080000 dst 0xfffd0000 Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: I62eced6d80b48d488348d43468f8f01edf83d79a
Diffstat (limited to 'meta-phosphor')
-rw-r--r--meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass b/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass
index 297db35a5e..dc82c4eb40 100644
--- a/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass
+++ b/meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass
@@ -35,7 +35,7 @@ do_prepare_bootloaders() {
python do_merge_bootloaders() {
- def Merge_bin_files_and_pad(inF1, inF2, outF, align, padding_at_end):
+ def Merge_bin_files_and_pad(inF1, inF2, outF, align, align_end):
padding_size = 0
padding_size_end = 0
F1_size = os.path.getsize(inF1)
@@ -44,8 +44,8 @@ python do_merge_bootloaders() {
if ((F1_size % align) != 0):
padding_size = align - (F1_size % align)
- if ((F2_size % align) != 0):
- padding_size_end = align - (F2_size % align)
+ if ((F2_size % align_end) != 0):
+ padding_size_end = align_end - (F2_size % align_end)
with open(outF, "wb") as file3:
with open(inF1, "rb") as file1:
@@ -63,22 +63,22 @@ python do_merge_bootloaders() {
Merge_bin_files_and_pad(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('KMT_TIPFW_BINARY',True)),
os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('BOOTBLOCK',True)),
os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('KMT_TIPFW_BB_BINARY',True)),
- 0x1000, 0x20)
+ int(d.getVar('BB_ALIGN', True)), int(d.getVar('ALIGN_END', True)))
Merge_bin_files_and_pad(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('KMT_TIPFW_BB_BINARY',True)),
os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('ATF_BINARY',True)),
os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('KMT_TIPFW_BB_BL31_BINARY',True)),
- 0x1000, 0x20)
+ int(d.getVar('ATF_ALIGN', True)), int(d.getVar('ALIGN_END', True)))
Merge_bin_files_and_pad(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('KMT_TIPFW_BB_BL31_BINARY',True)),
os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('OPTEE_BINARY',True)),
os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('KMT_TIPFW_BB_BL31_TEE_BINARY',True)),
- 0x1000, 0x20)
+ int(d.getVar('OPTEE_ALIGN', True)), int(d.getVar('ALIGN_END', True)))
Merge_bin_files_and_pad(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('KMT_TIPFW_BB_BL31_TEE_BINARY',True)),
os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s.full' % d.getVar('UBOOT_BINARY',True)),
os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), '%s' % d.getVar('KMT_TIPFW_BB_UBOOT_BINARY',True)),
- 0x1000, 0x20)
+ int(d.getVar('UBOOT_ALIGN', True)), int(d.getVar('ALIGN_END', True)))
}
do_prepare_bootloaders[depends] += " \