diff options
Diffstat (limited to 'meta-ibs/meta-cp2-5422')
31 files changed, 774 insertions, 0 deletions
diff --git a/meta-ibs/meta-cp2-5422/conf/bblayers.conf.sample b/meta-ibs/meta-cp2-5422/conf/bblayers.conf.sample new file mode 100644 index 0000000000..7f46447184 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/conf/bblayers.conf.sample @@ -0,0 +1,23 @@ +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "8" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ##OEROOT##/meta \ + ##OEROOT##/meta-poky \ + ##OEROOT##/meta-openembedded/meta-oe \ + ##OEROOT##/meta-openembedded/meta-networking \ + ##OEROOT##/meta-openembedded/meta-perl \ + ##OEROOT##/meta-openembedded/meta-python \ + ##OEROOT##/meta-openembedded/meta-webserver \ + ##OEROOT##/meta-security \ + ##OEROOT##/meta-phosphor \ + ##OEROOT##/meta-aspeed \ + ##OEROOT##/meta-ibs \ + ##OEROOT##/meta-ibs/meta-common \ + ##OEROOT##/meta-ibs/meta-ast2500 \ + ##OEROOT##/meta-ibs/meta-cp2-5422 \ + " diff --git a/meta-ibs/meta-cp2-5422/conf/conf-notes.txt b/meta-ibs/meta-cp2-5422/conf/conf-notes.txt new file mode 100644 index 0000000000..071fc724e5 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/conf/conf-notes.txt @@ -0,0 +1,3 @@ +Common targets are: + obmc-phosphor-image + qemu-helper-native diff --git a/meta-ibs/meta-cp2-5422/conf/layer.conf b/meta-ibs/meta-cp2-5422/conf/layer.conf new file mode 100644 index 0000000000..0fbda955cf --- /dev/null +++ b/meta-ibs/meta-cp2-5422/conf/layer.conf @@ -0,0 +1,17 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "sila" +BBFILE_PATTERN_sila := "^${LAYERDIR}/" +BBFILE_PRIORITY_sila = "5" +BBFILE_PATTERN_IGNORE_EMPTY_sila = "1" + +LAYERSERIES_COMPAT_sila := "honister kirkstone" + +hostname:pn-base-files = "${MACHINE}" + +FACTORY:ibs:append = "sila" diff --git a/meta-ibs/meta-cp2-5422/conf/local.conf.sample b/meta-ibs/meta-cp2-5422/conf/local.conf.sample new file mode 100644 index 0000000000..1d2f7f82da --- /dev/null +++ b/meta-ibs/meta-cp2-5422/conf/local.conf.sample @@ -0,0 +1,274 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +MACHINE ??= "cp2-5422" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" +#DL_DIR ?= "/home/akosteltsev/var/openbmc/downloads" +#DL_DIR ?= "/home/mzakharov/var/openbmc/downloads" +#DL_DIR ?= "/home/ailenko/var/openbmc/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "openbmc-phosphor" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to ipk: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686, x86_64, aarch64 +#SDKMACHINE ?= "i686" + +SANITY_TESTED_DISTROS:append ?= " *" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" +EXTRA_IMAGE_FEATURES += "validation-unsecure" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +USER_CLASSES ?= "buildstats" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO:qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less than 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necessary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + HALT,${TMPDIR},100M,1K \ + HALT,${DL_DIR},100M,1K \ + HALT,${SSTATE_DIR},100M,1K \ + HALT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can be +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG:append:pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG:append:pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# +# Memory Resident Bitbake +# +# Bitbake's server component can stay in memory after the UI for the current command +# has completed. This means subsequent commands can run faster since there is no need +# for bitbake to reload cache files and so on. Number is in seconds, after which the +# server will shut down. +# +#BB_SERVER_TIMEOUT = "60" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "3" + +INHERIT += "extrausers" + +# +# Default root password '0penBmc' is set by meta-phosphor/conf/distro/include/phosphor-defaults.inc +# + +# +# Add default administrative account (login: admin, password: '0penBmc'): +# +DEFAULT_ADMIN_PASSWORD = "'\$6\$IBS\$3umMGtoW.bu0HC9HOGQZLgBKumD/XVW4Kg0l8l5tvnX1vEnqX/fCOoiUv4tzWotVQXKeE6.j92AqZEXr3JRTc.'" + +EXTRA_USERS_PARAMS:append:pn-obmc-phosphor-image = " \ + useradd -p ${DEFAULT_ADMIN_PASSWORD} -g users -G priv-admin,web,redfish,ipmi -N admin; \ + " diff --git a/meta-ibs/meta-cp2-5422/conf/machine/cp2-5422.conf b/meta-ibs/meta-cp2-5422/conf/machine/cp2-5422.conf new file mode 100644 index 0000000000..893dcc3fce --- /dev/null +++ b/meta-ibs/meta-cp2-5422/conf/machine/cp2-5422.conf @@ -0,0 +1 @@ +require conf/machine/include/sila-ast2500.inc diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console/obmc-console.conf new file mode 100644 index 0000000000..1d332e2a21 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console/obmc-console.conf @@ -0,0 +1,3 @@ +baud = 921600 +local-tty = ttyS3 +local-tty-baud = 921600 diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console/obmc-console@.service b/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console/obmc-console@.service new file mode 100644 index 0000000000..38a16c3168 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console/obmc-console@.service @@ -0,0 +1,22 @@ +[Unit] +Description=Phosphor Console Muxer listening on device /dev/%I +ConditionPathExists=/etc/obmc-console/server.%i.conf +BindsTo=dev-%i.device +After=dev-%i.device + +[Service] +ExecStartPre=/usr/bin/sol-option-check.sh +ExecStartPre=/bin/sh -c 'echo -n "uart3" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart1' +ExecStartPre=/bin/sh -c 'echo -n "uart1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart3' +ExecStartPre=/bin/sh -c 'echo -n "io1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart4' +ExecStartPre=/bin/sh -c 'echo -n "uart4" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/io1' +ExecStart=/usr/bin/env obmc-console-server --config {sysconfdir}/obmc-console.conf %i +ExecStopPost=/bin/sh -c 'echo -n "io1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart1' +ExecStopPost=/bin/sh -c 'echo -n "io3" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart3' +ExecStopPost=/bin/sh -c 'echo -n "io4" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart4' +ExecStopPost=/bin/sh -c 'echo -n "uart1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/io1' +SyslogIdentifier=%i-console-server +Restart=always + +[Install] +WantedBy={SYSTEMD_DEFAULT_TARGET} diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console/sol-option-check.sh b/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console/sol-option-check.sh new file mode 100755 index 0000000000..19179c4975 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console/sol-option-check.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# Copyright 2017-2020 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +CPUPART="CPU part" +AST2500_ID="0xb76" +AST2600_ID="0xc07" + +if ([ $(grep "$CPUPART" /proc/cpuinfo | grep "$AST2500_ID" | wc -l) != 0 ] && \ + [ $(grep 192000000 /sys/class/tty/ttyS0/uartclk | wc -l) != 0 ]) || \ + ([ $(grep "$CPUPART" /proc/cpuinfo | grep "$AST2600_ID" | wc -l) != 0 ] && \ + [ $(grep 14769216 /sys/class/tty/ttyS0/uartclk | wc -l) != 0 ]); then + echo "hs-uart" + sed -i -e 's/115200/921600/g' /etc/obmc-console.conf +else + echo "normal uart" + sed -i -e 's/921600/115200/g' /etc/obmc-console.conf +fi diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console_%.bbappend new file mode 100644 index 0000000000..d9ff90d9c6 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/console/obmc-console_%.bbappend @@ -0,0 +1,17 @@ +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" +OBMC_CONSOLE_HOST_TTY = "ttyVUART0" +SRC_URI += "file://sol-option-check.sh \ + file://obmc-console@.service \ + " +inherit obmc-phosphor-systemd + +SYSTEMD_SERVICE:${PN} += " \ + ${PN}@${OBMC_CONSOLE_HOST_TTY}.service \ + " + +do_install:append() { + rm -rf ${D}${base_libdir}/udev/rules.d/80-obmc-console-uart.rules + install -m 0644 ${WORKDIR}/${PN}@.service ${D}${systemd_system_unitdir} + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/sol-option-check.sh ${D}${bindir} +} diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager_%.bbappend new file mode 100644 index 0000000000..04f574b10b --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +PACKAGECONFIG:append = " verify_signature" diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/fru/default-fru.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/fru/default-fru.bbappend new file mode 100644 index 0000000000..cef8105da3 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/fru/default-fru.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append = " file://decodeBoardID.sh;subdir=${BP}" diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/fru/default-fru/decodeBoardID.sh b/meta-ibs/meta-cp2-5422/recipes-phosphor/fru/default-fru/decodeBoardID.sh new file mode 100644 index 0000000000..98b4c98441 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/fru/default-fru/decodeBoardID.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# this script uses the BOARD_ID set from checkFru.sh and provides the NAME, +# PRODID, and EEPROM_FRU values for this platform +decode_board_id() { + if grep -q 'CPU part\s*: 0xb76' /proc/cpuinfo; then + # AST2500 + if [ -f $fruFile -a -f $prodIDFile -a $BOARD_ID -ne 0 ]; then + exit 0 + fi + NAME="CP2-5422" + PRODID="0x7b" + fi +} diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend new file mode 100644 index 0000000000..ce7bc597ae --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +EXTRA_OEMESON += "\ + -Dredfish-allow-deprecated-power-thermal=disabled \ + -Dredfish-new-powersubsystem-thermalsubsystem=enabled \ + -Dredfish-host-logger=enabled \ + -Dredfish-dump-log=enabled \ + -Dredfish-dbus-log=enabled \ + -Dvm-nbdproxy=enabled \ + -Dhttp-body-limit=70 \ + " diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/logging/phosphor-hostlogger/cp2-5422/ttyVUART0.conf b/meta-ibs/meta-cp2-5422/recipes-phosphor/logging/phosphor-hostlogger/cp2-5422/ttyVUART0.conf new file mode 100644 index 0000000000..c75186415a --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/logging/phosphor-hostlogger/cp2-5422/ttyVUART0.conf @@ -0,0 +1,7 @@ +SOCKET_ID= +BUF_MAXSIZE=3000 +BUF_MAXTIME=0 +FLUSH_FULL=false +HOST_STATE=/xyz/openbmc_project/state/host0 +OUT_DIR=/var/lib/obmc/hostlogs +MAX_FILES=10 diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/logging/phosphor-hostlogger_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/logging/phosphor-hostlogger_%.bbappend new file mode 100644 index 0000000000..a8366ea8d6 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/logging/phosphor-hostlogger_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:" + +# Default service instance to install (single-host mode) +DEFAULT_INSTANCE = "ttyVUART0" + +SRC_URI:remove = "file://${BPN}.conf" +SRC_URI += "file://ttyVUART0.conf" + diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend new file mode 100644 index 0000000000..ca35bcb6a1 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG:append = " log-threshold log-pulse" diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json b/meta-ibs/meta-cp2-5422/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json new file mode 100644 index 0000000000..913a3e6df0 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json @@ -0,0 +1,47 @@ +{ + "gpio_configs": { + + "power_config": { + "power_good_in": "PGOOD", + "power_up_outs": [ + {"name": "POWER_OUT", "polarity": true} + ], + "reset_outs": [ + {"name": "RESET_OUT", "polarity": false} + ] + } + }, + + "gpio_definitions": [ + { + "name": "PGOOD", + "pin": "AB3", + "direction": "in" + }, + { + "name": "POWER_BUTTON", + "pin": "E2", + "direction": "both" + }, + { + "name": "POWER_OUT", + "pin": "E3", + "direction": "out" + }, + { + "name": "RESET_BUTTON", + "pin": "E0", + "direction": "both" + }, + { + "name": "RESET_OUT", + "pin": "E1", + "direction": "out" + }, + { + "name": "ID_BTN", + "pin": "AB2", + "direction": "both" + } + ] +} diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend new file mode 100644 index 0000000000..94d062959a --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS:prepend:ibs := "${THISDIR}/${PN}:" diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media.bbappend new file mode 100644 index 0000000000..5925b776aa --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += "\ + file://0001-VM-include-fstream-header.patch \ + " + +RDEPENDS:${PN}:append = " nfs-utils-mount" diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0001-VM-include-fstream-header.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0001-VM-include-fstream-header.patch new file mode 100644 index 0000000000..44f5b55f2f --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0001-VM-include-fstream-header.patch @@ -0,0 +1,50 @@ +From 7bd55a821af91f1d804393435dc32dca57fad3f7 Mon Sep 17 00:00:00 2001 +From: "Andrey V.Kosteltsev" <AKosteltsev@IBS.RU> +Date: Sun, 22 May 2022 23:46:35 +0300 +Subject: [PATCH] VM: include <fstream> header + +--- + src/state/activating_state.cpp | 1 + + src/system.hpp | 1 + + src/utils.hpp | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/src/state/activating_state.cpp b/src/state/activating_state.cpp +index 7143545..1098192 100644 +--- a/src/state/activating_state.cpp ++++ b/src/state/activating_state.cpp +@@ -13,6 +13,7 @@ + #include <boost/process.hpp> + #include <boost/system/detail/error_code.hpp> + #include <filesystem> ++#include <fstream> + #include <iostream> + #include <memory> + #include <nlohmann/json.hpp> +diff --git a/src/system.hpp b/src/system.hpp +index ea88e25..d0af549 100644 +--- a/src/system.hpp ++++ b/src/system.hpp +@@ -8,6 +8,7 @@ + #include <boost/container/flat_map.hpp> + #include <boost/process.hpp> + #include <filesystem> ++#include <fstream> + #include <sdbusplus/asio/object_server.hpp> + + namespace fs = std::filesystem; +diff --git a/src/utils.hpp b/src/utils.hpp +index db9f325..1c03aa0 100644 +--- a/src/utils.hpp ++++ b/src/utils.hpp +@@ -9,6 +9,7 @@ + #include <boost/process/async_pipe.hpp> + #include <boost/type_traits/has_dereference.hpp> + #include <filesystem> ++#include <fstream> + #include <memory> + #include <optional> + #include <sdbusplus/asio/object_server.hpp> +-- +2.35.1 + diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/phosphor-webui/config.json b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/phosphor-webui/config.json new file mode 100644 index 0000000000..348a7792df --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/phosphor-webui/config.json @@ -0,0 +1,9 @@ +{ + "customKeyEnable": true, + "keyType" : "VT100+", + "customConsoleDisplaySize": { + "width": 100, + "height": 32 + }, + "VirtualMediaEnabled" : true +} diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/phosphor-webui/favicon.ico b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/phosphor-webui/favicon.ico Binary files differnew file mode 100644 index 0000000000..c287048077 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/phosphor-webui/favicon.ico diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/phosphor-webui_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/phosphor-webui_%.bbappend new file mode 100644 index 0000000000..1e22d05503 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/phosphor-webui_%.bbappend @@ -0,0 +1,13 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:" + +SRC_URI += "\ + file://favicon.ico \ + " + +do_update_logo () { + cp ${WORKDIR}/favicon.ico \ + ${S}/app/assets/images/. +} + +addtask update_logo after do_unpack before do_configure diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/.env.sila b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/.env.sila new file mode 100644 index 0000000000..52a1cc7b76 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/.env.sila @@ -0,0 +1,11 @@ +NODE_ENV=production +VUE_APP_COMPANY_NAME="IBS" +VUE_APP_GUI_NAME="BMC System Management" +VUE_APP_SUBSCRIBE_SOCKET_DISABLED="true" +VUE_APP_SWITCH_TO_BACKUP_IMAGE_DISABLED="true" +VUE_APP_MODIFY_SSH_POLICY_DISABLED="true" +VUE_APP_VIRTUAL_MEDIA_LIST_ENABLED="true" +CUSTOM_STYLES="true" +CUSTOM_APP_NAV="true" +CUSTOM_STORE="true" +CUSTOM_ROUTER="true" diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/0001-Set-login-brand-width.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/0001-Set-login-brand-width.patch new file mode 100644 index 0000000000..bdcb8ddc7f --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/0001-Set-login-brand-width.patch @@ -0,0 +1,36 @@ +From 4d8254ef05b5dba035940f3194ef09f1a8770dc9 Mon Sep 17 00:00:00 2001 +From: "Andrey V.Kosteltsev" <AKosteltsev@IBS.RU> +Date: Wed, 16 Mar 2022 03:55:19 +0300 +Subject: [PATCH] Set login brand width + +--- + src/layouts/LoginLayout.vue | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/layouts/LoginLayout.vue b/src/layouts/LoginLayout.vue +index cdff204..46939e1 100644 +--- a/src/layouts/LoginLayout.vue ++++ b/src/layouts/LoginLayout.vue +@@ -5,7 +5,7 @@ + <div> + <div class="login-brand mb-5"> + <img +- width="90px" ++ width="60%" + src="@/assets/images/login-company-logo.svg" + :alt="altLogo" + /> +@@ -22,8 +22,8 @@ + </div> + <div class="login-aside__logo-bmc"> + <img +- height="60px" +- src="@/assets/images/built-on-openbmc-logo.svg" ++ height="24px" ++ src="@/assets/images/login-company-logo.svg" + alt="Built on OpenBMC" + /> + </div> +-- +2.33.0 + diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/favicon.ico b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/favicon.ico Binary files differnew file mode 100644 index 0000000000..1014ebd9c6 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/favicon.ico diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/login-company-logo.svg b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/login-company-logo.svg new file mode 100644 index 0000000000..57d11ff43c --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/login-company-logo.svg @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<svg + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + width="220px" height="50px" viewBox="0 0 89 13" + version="1.1"> + <style type="text/css"> + .st0{fill:#e11717;} + </style> + <g id="surface1"> + <path class="st0" style=" stroke:none;fill-rule:nonzero;fill-opacity:1;" d="M 5.648438 3.261719 C 5.351562 3.253906 5.0625 3.363281 4.847656 3.566406 C 4.628906 3.773438 4.503906 4.054688 4.496094 4.351562 L 4.496094 8.160156 C 4.511719 8.773438 5.019531 9.261719 5.636719 9.246094 L 19.867188 9.246094 L 19.867188 12.960938 L 3.414062 12.960938 C 1.578125 13 0.0625 11.542969 0.0195312 9.710938 C -0.0273438 9.664062 0.0195312 3.28125 0.0195312 3.28125 C 0.0625 1.449219 1.578125 -0.0078125 3.414062 0.03125 L 19.867188 0.03125 L 19.867188 3.261719 Z M 5.648438 3.261719 "/> + <path class="st0" style=" stroke:none;fill-rule:nonzero;fill-opacity:1;" d="M 38.398438 0.0390625 L 28.191406 9.738281 L 28.191406 3.199219 L 30.476562 3.195312 L 30.476562 0.0390625 L 23.609375 0.0390625 L 23.609375 12.96875 L 29.929688 12.96875 L 39.78125 3.296875 L 39.78125 12.96875 L 44.269531 12.96875 L 44.269531 0.0390625 Z M 38.398438 0.0390625 "/> + <path class="st0" style=" stroke:none;fill-rule:nonzero;fill-opacity:1;" d="M 59.210938 0.0390625 L 50.109375 0.0390625 L 50.109375 3.226562 L 51.542969 3.226562 L 46.457031 12.96875 L 50.761719 12.96875 L 55.828125 3.269531 L 57.519531 3.269531 L 62.582031 12.96875 L 67.132812 12.96875 L 60.347656 0.0390625 Z M 59.210938 0.0390625 "/> + <path class="st0" style=" stroke:none;fill-rule:nonzero;fill-opacity:1;" d="M 82.214844 0.0390625 L 72.0625 0.0390625 L 72.0625 3.226562 L 73.410156 3.226562 L 68.34375 12.96875 L 72.648438 12.96875 L 73.46875 11.347656 L 83.597656 11.347656 L 84.441406 12.96875 L 88.996094 12.96875 Z M 75.160156 8.117188 L 77.6875 3.261719 L 79.378906 3.261719 L 81.910156 8.109375 Z M 75.160156 8.117188 "/> + </g> +</svg> diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/logo-header.svg b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/logo-header.svg new file mode 100644 index 0000000000..60eed5870d --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue/logo-header.svg @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<svg + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + width="90px" height="32px" viewBox="0 0 89 13" + version="1.1"> + <style type="text/css"> + .st0{fill:#e11717;} + </style> + <g id="surface1"> + <path class="st0" style=" stroke:none;fill-rule:nonzero;fill-opacity:1;" d="M 5.648438 3.261719 C 5.351562 3.253906 5.0625 3.363281 4.847656 3.566406 C 4.628906 3.773438 4.503906 4.054688 4.496094 4.351562 L 4.496094 8.160156 C 4.511719 8.773438 5.019531 9.261719 5.636719 9.246094 L 19.867188 9.246094 L 19.867188 12.960938 L 3.414062 12.960938 C 1.578125 13 0.0625 11.542969 0.0195312 9.710938 C -0.0273438 9.664062 0.0195312 3.28125 0.0195312 3.28125 C 0.0625 1.449219 1.578125 -0.0078125 3.414062 0.03125 L 19.867188 0.03125 L 19.867188 3.261719 Z M 5.648438 3.261719 "/> + <path class="st0" style=" stroke:none;fill-rule:nonzero;fill-opacity:1;" d="M 38.398438 0.0390625 L 28.191406 9.738281 L 28.191406 3.199219 L 30.476562 3.195312 L 30.476562 0.0390625 L 23.609375 0.0390625 L 23.609375 12.96875 L 29.929688 12.96875 L 39.78125 3.296875 L 39.78125 12.96875 L 44.269531 12.96875 L 44.269531 0.0390625 Z M 38.398438 0.0390625 "/> + <path class="st0" style=" stroke:none;fill-rule:nonzero;fill-opacity:1;" d="M 59.210938 0.0390625 L 50.109375 0.0390625 L 50.109375 3.226562 L 51.542969 3.226562 L 46.457031 12.96875 L 50.761719 12.96875 L 55.828125 3.269531 L 57.519531 3.269531 L 62.582031 12.96875 L 67.132812 12.96875 L 60.347656 0.0390625 Z M 59.210938 0.0390625 "/> + <path class="st0" style=" stroke:none;fill-rule:nonzero;fill-opacity:1;" d="M 82.214844 0.0390625 L 72.0625 0.0390625 L 72.0625 3.226562 L 73.410156 3.226562 L 68.34375 12.96875 L 72.648438 12.96875 L 73.46875 11.347656 L 83.597656 11.347656 L 84.441406 12.96875 L 88.996094 12.96875 Z M 75.160156 8.117188 L 77.6875 3.261719 L 79.378906 3.261719 L 81.910156 8.109375 Z M 75.160156 8.117188 "/> + </g> +</svg> diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue_%.bbappend new file mode 100644 index 0000000000..a254f3e022 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue_%.bbappend @@ -0,0 +1,31 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:" + +PR = "r1" +PV = "1.0+git${SRCPV}" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +SRC_URI = "git://git@git.sila.ru/srv/pub/scm/git/openbmc/webui-vue.git;branch=sila;protocol=ssh" +SRCREV = "35be8fba7201cd69218415fb453e39c13994b0c9" + +SRC_URI += "\ + file://.env.sila \ + file://favicon.ico \ + file://login-company-logo.svg \ + file://logo-header.svg \ + file://0001-Set-login-brand-width.patch \ + " + +do_update_logo () { + cp ${WORKDIR}/.env.sila ${S}/.env + + cp ${WORKDIR}/favicon.ico \ + ${S}/public/. + + cp ${WORKDIR}/login-company-logo.svg \ + ${WORKDIR}/logo-header.svg \ + ${S}/src/assets/images/. +} + +addtask update_logo after do_unpack before do_configure diff --git a/meta-ibs/meta-cp2-5422/recipes-x86/chassis/x86-power-control/power-config-host0.json b/meta-ibs/meta-cp2-5422/recipes-x86/chassis/x86-power-control/power-config-host0.json new file mode 100644 index 0000000000..126d2ef1a4 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-x86/chassis/x86-power-control/power-config-host0.json @@ -0,0 +1,87 @@ +{ + "gpio_configs":[ + { + "Name" : "IdButton", + "LineName" : "ID_BUTTON", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "NMIButton", + "LineName" : "NMI_BUTTON", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "NMIOut", + "LineName" : "NMI_OUT", + "Type" : "GPIO", + "Polarity" : "ActiveHigh" + }, + { + "Name" : "PostComplete", + "LineName" : "POST_COMPLETE", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "PowerButton", + "LineName" : "POWER_BUTTON", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "PowerOk", + "LineName" : "PS_PWROK", + "Type" : "GPIO", + "Polarity" : "ActiveHigh" + }, + { + "Name" : "PowerOut", + "LineName" : "POWER_OUT", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "ResetButton", + "LineName" : "RESET_BUTTON", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "ResetOut", + "LineName" : "RESET_OUT", + "Type" : "GPIO", + "Polarity" : "ActiveHigh" + }, + { + "Name" : "SioPowerGood", + "LineName" : "SIO_POWER_GOOD", + "Type" : "GPIO", + "Polarity" : "ActiveHigh" + }, + { + "Name" : "SioOnControl", + "LineName" : "SIO_ONCONTROL", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "SIOS5", + "LineName" : "SIO_S5", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + } + ], + "timing_configs":{ + "PowerPulseMs": 200, + "ForceOffPulseMs": 15000, + "ResetPulseMs": 500, + "PowerCycleMs": 5000, + "SioPowerGoodWatchdogMs": 12000, + "PsPowerOKWatchdogMs": 8000, + "GracefulPowerOffS": 300, + "WarmResetCheckMs": 500, + "PowerOffSaveMs": 7000 + } +} diff --git a/meta-ibs/meta-cp2-5422/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-x86/chassis/x86-power-control_%.bbappend new file mode 100644 index 0000000000..c0fe1dd726 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-x86/chassis/x86-power-control_%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +SRC_URI:append = " \ + file://power-config-host0.json \ +" + +RDEPENDS:${PN}:append = " bash" + +do_install:append() { + install -d ${D}${datadir}/${PN} + install -m 0644 ${WORKDIR}/power-config-host0.json ${D}${datadir}/${PN} +} |