Barreleye platform definition for buildroot.
[stewart@linux.vnet.ibm.com: use the non-deprecated buildroot
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4 config option. Also bump
kernel version to match other platforms.]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
diff --git a/openpower/configs/barreleye_defconfig b/openpower/configs/barreleye_defconfig
new file mode 100755
index 0000000..b747eaa
--- /dev/null
+++ b/openpower/configs/barreleye_defconfig
@@ -0,0 +1,69 @@
+BR2_powerpc64le=y
+BR2_powerpc_power8=y
+BR2_OPENPOWER_PLATFORM=y
+
+BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
+BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+# BR2_TOOLCHAIN_BUILDROOT_LIBSTDCPP is not set
+
+BR2_OPENPOWER_CONFIG_NAME="barreleye"
+BR2_OPENPOWER_XML_PACKAGE="barreleye-xml"
+BR2_HOSTBOOT_CONFIG_FILE="barreleye.config"
+
+BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
+BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
+BR2_HOSTBOOT_BINARY_WINK_FILENAME="p8.ref_image.hdr.bin.ecc"
+
+BR2_OCC_BIN_FILENAME="occ.bin"
+
+BR2_BARRELEYE_SYSTEM_XML_FILENAME="BARRELEYE_hb.system.xml"
+BR2_BARRELEYE_MRW_XML_FILENAME="BARRELEYE_hb.mrw.xml"
+BR2_BARRELEYE_BIOS_XML_FILENAME="BARRELEYE_bios.xml"
+
+BR2_OPENPOWER_TARGETING_BIN_FILENAME="BARRELEYE_HB.targeting.bin"
+BR2_OPENPOWER_TARGETING_ECC_FILENAME="BARRELEYE_HB.targeting.bin.ecc"
+BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
+
+BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayoutWithGoldenSide.xml"
+BR2_OPENPOWER_PNOR_FILENAME="barreleye.pnor"
+BR2_OPENPOWER_PNOR_UPDATE_FILENAME="barreleye_update.pnor"
+
+# skiboot requirements
+BR2_TARGET_SKIBOOT=y
+BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=n
+
+# petitboot requirements
+BR2_ENABLE_LOCALE_PURGE=y
+BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
+BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
+BR2_ROOTFS_OVERLAY="../openpower/overlay"
+BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
+BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
+BR2_KERNEL_HEADERS_4_4=y
+BR2_DEFAULT_KERNEL_HEADERS="4.4"
+BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/linux"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
+BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
+BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
+BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
+BR2_PACKAGE_I2C_TOOLS=y
+BR2_PACKAGE_NCURSES_WCHAR=y
+BR2_PACKAGE_DROPBEAR=y
+# BR2_PACKAGE_DROPBEAR_SERVER is not set
+BR2_PACKAGE_ETHTOOL=y
+BR2_PACKAGE_NETCAT=y
+BR2_PACKAGE_RSYNC=y
+BR2_PACKAGE_PETITBOOT=y
+BR2_PACKAGE_IPMITOOL=y
+BR2_PACKAGE_POWERPC_UTILS=y
+BR2_PACKAGE_MDADM=y
+BR2_TARGET_ROOTFS_CPIO_XZ=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
diff --git a/openpower/configs/hostboot/barreleye.config b/openpower/configs/hostboot/barreleye.config
new file mode 100755
index 0000000..7dc6619
--- /dev/null
+++ b/openpower/configs/hostboot/barreleye.config
@@ -0,0 +1,62 @@
+# The Serial Flash Controller is the AST2400 BMC.
+set SFC_IS_AST2400
+set BMC_DOES_SFC_INIT
+unset SFC_IS_IBM_DPSS
+set ALLOW_MICRON_PNOR
+set ALLOW_MACRONIX_PNOR
+
+# VPD options.
+set MVPD_READ_FROM_HW
+set MVPD_WRITE_TO_HW
+set MVPD_READ_FROM_PNOR
+set MVPD_WRITE_FROM_PNOR
+set DJVPD_READ_FROM_HW
+set DJVPD_WRITE_TO_HW
+set DJVPD_READ_FROM_PNOR
+set DJVPD_WRITE_TO_PNOR
+set CVPD_READ_FROM_HW
+set CVPD_WRITE_TO_HW
+set CVPD_READ_FROM_PNOR
+set CVPD_WRITE_TO_PNOR
+set PVPD_READ_FROM_HW
+set PVPD_WRITE_TO_HW
+set PVPD_READ_FROM_PNOR
+set PVPD_WRITE_TO_PNOR
+set SKIP_RESTRICT_EX_UNITS
+unset CDIMM_FORMAT_FOR_CVPD
+
+# gpio config
+set GPIODD
+set PALMETTO_VDDR
+
+# disable SBE updates
+set NO_SBE_UPDATES
+
+unset PCIE_HOTPLUG_CONTROLLER
+
+# turn on console output
+set CONSOLE
+set BMC_AST2400
+
+# Enable Kingston dimm voltage workaround
+set KINGSTON_1_35_VOLT
+
+unset DISABLE_HOSTBOOT_RUNTIME
+
+# Compile in hostboot runtime PRD
+set HBRT_PRD
+set HTMGT
+set START_OCC_DURING_BOOT
+
+#PNOR flags
+set PNOR_TWO_SIDE_SUPPORT
+set BMC_BT_LPC_IPMI
+
+# Enable Checktop Analysis
+set ENABLE_CHECKSTOP_ANALYSIS
+
+# Hostboot will detect hardware changes
+set HOST_HCDB_SUPPORT
+
+# set for trace debug to console
+unset CONSOLE_OUTPUT_TRACE
diff --git a/openpower/package/Config.in b/openpower/package/Config.in
old mode 100644
new mode 100755
index 9902881..e7e26fb
--- a/openpower/package/Config.in
+++ b/openpower/package/Config.in
@@ -5,6 +5,7 @@
source "$BR2_EXTERNAL/package/habanero-xml/Config.in"
source "$BR2_EXTERNAL/package/firestone-xml/Config.in"
source "$BR2_EXTERNAL/package/garrison-xml/Config.in"
+source "$BR2_EXTERNAL/package/barreleye-xml/Config.in"
source "$BR2_EXTERNAL/package/openpower-pnor/Config.in"
source "$BR2_EXTERNAL/package/petitboot/Config.in"
source "$BR2_EXTERNAL/package/p8-pore-binutils/Config.in"
diff --git a/openpower/package/barreleye-xml/Config.in b/openpower/package/barreleye-xml/Config.in
new file mode 100755
index 0000000..9187dac
--- /dev/null
+++ b/openpower/package/barreleye-xml/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_BARRELEYE_XML
+ bool "barreleye_xml"
+ default y if (BR2_OPENPOWER_CONFIG_NAME = "barreleye")
+ help
+ Utilites for building xml and the targeting binary image
+
+config BR2_BARRELEYE_SYSTEM_XML_FILENAME
+ string "Barreleye targeting system xml filename"
+ default ""
+ help
+ Defines the name of the system XML filename to be used when creating targeting binary image
+
+config BR2_BARRELEYE_MRW_XML_FILENAME
+ string "Barreleye targeting mrw xml filename"
+ default ""
+ help
+ Defines the name of the mrw XML filename to be used when creating targeting binary image
+
+config BR2_BARRELEYE_BIOS_XML_FILENAME
+ string "Barreleye BIOS metadata XML filename"
+ default ""
+ help
+ Defines the name of the BIOS XML filename to parse when generating BIOS metadata
diff --git a/openpower/package/barreleye-xml/barreleye-xml.mk b/openpower/package/barreleye-xml/barreleye-xml.mk
new file mode 100755
index 0000000..3aca110
--- /dev/null
+++ b/openpower/package/barreleye-xml/barreleye-xml.mk
@@ -0,0 +1,75 @@
+################################################################################
+#
+# barreleye_xml
+#
+################################################################################
+
+BARRELEYE_XML_VERSION = 2b18a23290b8073349d49d8c1782dc9a7cfe2f74
+BARRELEYE_XML_SITE = $(call github,open-power,barreleye-xml,$(BARRELEYE_XML_VERSION))
+
+BARRELEYE_XML_LICENSE = Apache-2.0
+BARRELEYE_XML_DEPENDENCIES = hostboot-install-images openpower-mrw-install-images common-p8-xml-install-images
+
+BARRELEYE_XML_INSTALL_IMAGES = YES
+BARRELEYE_XML_INSTALL_TARGET = YES
+
+MRW_SCRATCH=$(STAGING_DIR)/openpower_mrw_scratch
+MRW_HB_TOOLS=$(STAGING_DIR)/hostboot_build_images
+
+# Defines for BIOS metadata creation
+BIOS_SCHEMA_FILE = $(MRW_HB_TOOLS)/bios.xsd
+BARRELEYE_BIOS_XML_CONFIG_FILE = $(MRW_SCRATCH)/$(BR2_BARRELEYE_BIOS_XML_FILENAME)
+BIOS_XML_METADATA_FILE = \
+ $(MRW_HB_TOOLS)/$(BR2_OPENPOWER_CONFIG_NAME)_bios_metadata.xml
+PETITBOOT_XSLT_FILE = $(MRW_HB_TOOLS)/bios_metadata_petitboot.xslt
+PETITBOOT_BIOS_XML_METADATA_FILE = \
+ $(MRW_HB_TOOLS)/$(BR2_OPENPOWER_CONFIG_NAME)_bios_metadata_petitboot.xml
+PETITBOOT_BIOS_XML_METADATA_INITRAMFS_FILE = \
+ $(TARGET_DIR)/usr/share/bios_metadata.xml
+
+define BARRELEYE_XML_BUILD_CMDS
+ # copy the barreleye xml where the common lives
+ bash -c 'mkdir -p $(MRW_SCRATCH) && cp -r $(@D)/* $(MRW_SCRATCH)'
+
+ # generate the system mrw xml
+ perl -I $(MRW_HB_TOOLS) \
+ $(MRW_HB_TOOLS)/processMrw.pl -x $(MRW_SCRATCH)/barreleye.xml
+
+ # merge in any system specific attributes, hostboot attributes
+ $(MRW_HB_TOOLS)/mergexml.sh $(MRW_SCRATCH)/$(BR2_BARRELEYE_SYSTEM_XML_FILENAME) \
+ $(MRW_HB_TOOLS)/attribute_types.xml \
+ $(MRW_HB_TOOLS)/attribute_types_hb.xml \
+ $(MRW_HB_TOOLS)/target_types_merged.xml \
+ $(MRW_HB_TOOLS)/target_types_hb.xml \
+ $(MRW_SCRATCH)/$(BR2_BARRELEYE_MRW_XML_FILENAME) > $(MRW_HB_TOOLS)/temporary_hb.hb.xml;
+
+ # creating the targeting binary
+ $(MRW_HB_TOOLS)/xmltohb.pl \
+ --hb-xml-file=$(MRW_HB_TOOLS)/temporary_hb.hb.xml \
+ --fapi-attributes-xml-file=$(MRW_HB_TOOLS)/fapiattrs.xml \
+ --src-output-dir=none \
+ --img-output-dir=$(MRW_HB_TOOLS)/ \
+ --vmm-consts-file=$(MRW_HB_TOOLS)/vmmconst.h --noshort-enums \
+ --bios-xml-file=$(BARRELEYE_BIOS_XML_CONFIG_FILE) \
+ --bios-schema-file=$(BIOS_SCHEMA_FILE) \
+ --bios-output-file=$(BIOS_XML_METADATA_FILE)
+
+ # Transform BIOS XML into Petitboot specific BIOS XML via the schema
+ xsltproc -o \
+ $(PETITBOOT_BIOS_XML_METADATA_FILE) \
+ $(PETITBOOT_XSLT_FILE) \
+ $(BIOS_XML_METADATA_FILE)
+endef
+
+define BARRELEYE_XML_INSTALL_IMAGES_CMDS
+ mv $(MRW_HB_TOOLS)/targeting.bin $(MRW_HB_TOOLS)/$(BR2_OPENPOWER_TARGETING_BIN_FILENAME)
+endef
+
+define BARRELEYE_XML_INSTALL_TARGET_CMDS
+ # Install Petitboot specific BIOS XML into initramfs's usr/share/ dir
+ $(INSTALL) -D -m 0644 \
+ $(PETITBOOT_BIOS_XML_METADATA_FILE) \
+ $(PETITBOOT_BIOS_XML_METADATA_INITRAMFS_FILE)
+endef
+
+$(eval $(generic-package))