summaryrefslogtreecommitdiff
path: root/meta-nuvoton/conf
diff options
context:
space:
mode:
authorTim Lee <timlee660101@gmail.com>2022-07-29 11:42:15 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-09-27 00:57:08 +0300
commitdd14a9110cf16a8293d619b25ba26aa7fe1b6e2a (patch)
tree400242d2b9f294e9c22d21fb2f6e3e9993e6e489 /meta-nuvoton/conf
parent2b94a8ce468fa1faa6df1d9ed2cd1e0cf26a3240 (diff)
downloadopenbmc-dd14a9110cf16a8293d619b25ba26aa7fe1b6e2a.tar.xz
meta-nuvoton: add support to generate full flash image for npcm8xx
Nuvoton's npcm8xx full flash image includes TIP FW, Bootblock, ATF, OPTEE and UBOOT with headers. Generating headers and merging images are being done by Nuvoton's binary generator tool (Bingo) which uses external parameters from XML files for that. Thus, we need to add related fitimage and image type for npcm8xx. However, before merge this commit, we must wait for below commits were merged. meta-nuvoton: arm-trusted-firmware: add arm trusted firmware recipe https://gerrit.openbmc.org/c/openbmc/openbmc/+/55234 meta-nuvoton: add npcm8xx-bootblock recipe https://gerrit.openbmc.org/c/openbmc/openbmc/+/55117 meta-nuvoton: add npcm8xx-igps recipe https://gerrit.openbmc.org/c/openbmc/openbmc/+/55099 meta-nuvoton: npcm7xx-bingo: upgrade latest version 0.0.5 support Arbel https://gerrit.openbmc.org/c/openbmc/openbmc/+/55128 Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: I4599e39d3873f07cde6904d0f10161964fc45c7a
Diffstat (limited to 'meta-nuvoton/conf')
-rw-r--r--meta-nuvoton/conf/machine/evb-npcm845.conf54
-rw-r--r--meta-nuvoton/conf/machine/include/npcm8xx.inc48
2 files changed, 102 insertions, 0 deletions
diff --git a/meta-nuvoton/conf/machine/evb-npcm845.conf b/meta-nuvoton/conf/machine/evb-npcm845.conf
new file mode 100644
index 0000000000..47fdff21c9
--- /dev/null
+++ b/meta-nuvoton/conf/machine/evb-npcm845.conf
@@ -0,0 +1,54 @@
+KMACHINE = "nuvoton"
+KERNEL_DEVICETREE = "nuvoton/${KMACHINE}-npcm845-evb.dtb"
+
+UBOOT_MACHINE = "ArbelEVB_defconfig"
+UBOOT_DEVICETREE = "nuvoton-npcm845-evb"
+
+IGPS_MACHINE = "EB"
+DEVICE_GEN = "A1"
+
+require conf/machine/include/npcm8xx.inc
+require conf/machine/include/obmc-bsp-common.inc
+
+FLASH_SIZE = "65536"
+FLASH_UBOOT_OFFSET:flash-65536 = "0"
+FLASH_KERNEL_OFFSET:flash-65536 = "2048"
+FLASH_ROFS_OFFSET:flash-65536 = "10240"
+FLASH_RWFS_OFFSET:flash-65536 = "46080"
+
+IMAGE_FSTYPES += "cpio.${INITRAMFS_CTYPE}.u-boot"
+IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', \
+ 'phosphor-mmc', \
+ 'wic.gz mmc-ext4-tar', \
+ '', d)}"
+
+MACHINE_FEATURES += "\
+ obmc-phosphor-fan-mgmt \
+ obmc-phosphor-chassis-mgmt \
+ obmc-phosphor-flash-mgmt \
+ obmc-host-ipmi \
+ obmc-host-state-mgmt \
+ obmc-chassis-state-mgmt \
+ obmc-bmc-state-mgmt \
+ "
+
+KCS_DEVICE = "ipmi-kcs1"
+
+DISTRO_FEATURES:append = " ext2"
+MACHINE_FEATURES:append = " ext2"
+
+VIRTUAL-RUNTIME_obmc-host-state-manager ?= "x86-power-control"
+VIRTUAL-RUNTIME_obmc-chassis-state-manager ?= "x86-power-control"
+
+PREFERRED_PROVIDER_virtual/obmc-chassis-mgmt = "packagegroup-evb-npcm845-apps"
+PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "packagegroup-evb-npcm845-apps"
+PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-evb-npcm845-apps"
+PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-evb-npcm845-apps"
+PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw = "phosphor-ipmi-kcs"
+PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "evb-npcm845-led-manager-config-native"
+
+# Remove unneeded binaries from image
+IMAGE_FEATURES:remove = "obmc-fan-control"
+IMAGE_FEATURES:remove = "obmc-health-monitor"
+
+MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
diff --git a/meta-nuvoton/conf/machine/include/npcm8xx.inc b/meta-nuvoton/conf/machine/include/npcm8xx.inc
new file mode 100644
index 0000000000..fafa92d9b6
--- /dev/null
+++ b/meta-nuvoton/conf/machine/include/npcm8xx.inc
@@ -0,0 +1,48 @@
+#@TYPE: Machine
+#@NAME: Nuvoton NPCM8XX
+#@DESCRIPTION: Common machine configuration for Nuvoton NPCM8XX Chip
+
+require conf/machine/include/nuvoton.inc
+
+KERNEL_IMAGETYPE ?= "Image"
+KERNEL_EXTRA_ARGS ?= "UIMAGE_LOADADDR=0x00008000"
+
+UBOOT_MACHINE ?= "ArbelEVB_defconfig"
+UBOOT_ENTRYPOINT ?= "0"
+UBOOT_LOADADDRESS ?= "0"
+
+FLASH_SIZE ?= "32768"
+FLASH_UBOOT_OFFSET ?= "0"
+FLASH_KERNEL_OFFSET ?= "2048"
+FLASH_ROFS_OFFSET ?= "8192"
+FLASH_RWFS_OFFSET ?= "31744"
+
+# UBI volume sizes in KB unless otherwise noted.
+FLASH_UBI_RWFS_SIZE ?= "6144"
+FLASH_UBI_RWFS_TXT_SIZE ?= "6MiB"
+
+SERIAL_CONSOLES ?= "115200;ttyS0"
+
+SOC_FAMILY = "npcm8xx"
+include conf/machine/include/soc-family.inc
+MACHINEOVERRIDES .= ":npcm8xx"
+
+require conf/machine/include/arm/armv8a/tune-cortexa35.inc
+
+PREFERRED_VERSION_trusted-firmware-a = "2.6.0"
+
+UBOOT_MKIMAGE:append:npcm8xx = " -E -B 8"
+
+COMPATIBLE_MACHINE:npcm8xx = "npcm8xx"
+TFA_PLATFORM = "npcm845x"
+
+# Nuvoton prefers optee for BL32.
+TFA_SPD = "opteed"
+
+# Nuvoton prefers u-boot as BL33.
+TFA_UBOOT = "1"
+
+# Nuvoton prefers TFA default build is BL31.
+TFA_BUILD_TARGET = "bl31"
+
+OPTEEMACHINE ?= "nuvoton"