summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-nuvoton/conf/machine/include/npcm8xx.inc6
-rw-r--r--meta-phosphor/classes/image_types_phosphor_nuvoton_npcm8xx.bbclass14
2 files changed, 13 insertions, 7 deletions
diff --git a/meta-nuvoton/conf/machine/include/npcm8xx.inc b/meta-nuvoton/conf/machine/include/npcm8xx.inc
index fafa92d9b6..a40e8fb65c 100644
--- a/meta-nuvoton/conf/machine/include/npcm8xx.inc
+++ b/meta-nuvoton/conf/machine/include/npcm8xx.inc
@@ -23,6 +23,12 @@ FLASH_UBI_RWFS_TXT_SIZE ?= "6MiB"
SERIAL_CONSOLES ?= "115200;ttyS0"
+BB_ALIGN ?= "4096"
+ATF_ALIGN ?= "4096"
+OPTEE_ALIGN ?= "4096"
+UBOOT_ALIGN ?= "4096"
+ALIGN_END ?= "4096"
+
SOC_FAMILY = "npcm8xx"
include conf/machine/include/soc-family.inc
MACHINEOVERRIDES .= ":npcm8xx"
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] += " \