Skip to content

Commit

Permalink
Merge pull request #324 from bradbishop/dir-structure
Browse files Browse the repository at this point in the history
Add virtual workbook / config-in-skeleton classes
  • Loading branch information
williamspatrick committed Jun 15, 2016
2 parents 56a1700 + 65b40a8 commit 39a4eff
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 60 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
IMAGE_INSTALL += " \
inventory-upload \
"
OBMC_IMAGE_EXTRA_INSTALL_append = " inventory-upload"
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ VIRTUAL-RUNTIME_obmc-phosphor-ipmi-parsers = " \
host-ipmid-oem \
host-ipmid-fru \
"
VIRTUAL-RUNTIME_skeleton_workbook = "${MACHINE}-config"

PREFERRED_PROVIDER_virtual/obmc-phosphor-host-ipmi-hw = "btbridged"
PREFERRED_PROVIDER_virtual/obmc-phosphor-chassis-mgmt = "skeleton"
PREFERRED_PROVIDER_virtual/obmc-phosphor-event-mgmt = "obmc-phosphor-event"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
SRC_URI += "file://firestone.patch"
SRC_URI += "file://poweron.patch"
SRC_URI += "file://occ-path.patch"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SUMMARY = "Firestone board wiring"
DESCRIPTION = "Board wiring information for the Firestone system."
HOMEPAGE = "http://github.com/openbmc/skeleton"
PR = "r1"

SRCREV = "5213a991a5a3bd107636f1b2cc3bbca560843462"
inherit config-in-skeleton
inherit obmc-phosphor-license
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
SRC_URI += "file://garrison.patch"
SRC_URI += "file://poweron.patch"
SRC_URI += "file://occ-path.patch"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SUMMARY = "Garrison board wiring"
DESCRIPTION = "Board wiring information for the Garrison system."
HOMEPAGE = "http://github.com/openbmc/skeleton"
PR = "r1"

SRCREV = "5213a991a5a3bd107636f1b2cc3bbca560843462"
inherit config-in-skeleton
inherit obmc-phosphor-license
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SUMMARY = "Palmetto board wiring"
DESCRIPTION = "Board wiring information for the Palmetto system."
HOMEPAGE = "http://github.com/openbmc/skeleton"
PR = "r1"

SRCREV = "5213a991a5a3bd107636f1b2cc3bbca560843462"
inherit config-in-skeleton
inherit obmc-phosphor-license

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SUMMARY = "Barreleye board wiring"
DESCRIPTION = "Board wiring information for the Barreleye system."
HOMEPAGE = "http://github.com/openbmc/skeleton"
PR = "r1"

SRCREV = "5213a991a5a3bd107636f1b2cc3bbca560843462"
inherit config-in-skeleton
inherit obmc-phosphor-license
28 changes: 28 additions & 0 deletions meta-phosphor/classes/config-in-skeleton.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# In general this class should only be used by board layers
# that keep their machine-readable-workbook in the skeleton repository.

inherit allarch
inherit setuptools

SRC_URI += "git://github.com/openbmc/skeleton;subpath=configs"
S = "${WORKDIR}/configs"

python() {
machine = d.getVar('MACHINE', True).capitalize() + '.py'
d.setVar('_config_in_skeleton', machine)
}

do_make_setup() {
cp ${S}/${_config_in_skeleton} \
${S}/obmc_system_config.py
cat <<EOF > ${S}/setup.py
from distutils.core import setup

setup(name='${BPN}',
version='${PR}',
py_modules=['obmc_system_config'],
)
EOF
}

addtask make_setup after do_patch before do_configure
6 changes: 4 additions & 2 deletions meta-phosphor/classes/obmc-phosphor-image.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ IMAGE_FEATURES += " \
ssh-server-dropbear \
"

IMAGE_INSTALL += " \
bash \
CORE_IMAGE_EXTRA_INSTALL_append = " bash \
packagegroup-obmc-phosphor-apps-extras \
i2c-tools \
screen \
inarp \
obmc-console \
${OBMC_IMAGE_EXTRA_INSTALL} \
"

OBMC_IMAGE_EXTRA_INSTALL ?= ""

def build_overlay(d):
if bb.utils.contains("IMAGE_FSTYPES", "overlay", "overlay", "0", d) != "0":
return "image-overlay"
Expand Down
35 changes: 20 additions & 15 deletions meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,39 @@ inherit obmc-phosphor-flash-mgmt
inherit obmc-phosphor-policy-mgmt
inherit obmc-phosphor-sensor-mgmt
inherit obmc-phosphor-system-mgmt
inherit pythonnative
inherit python-dir

VIRTUAL-RUNTIME_skeleton_workbook ?= ""

DEPENDS += "glib-2.0 systemd"
RDEPENDS_${PN} += "python-subprocess python-compression libsystemd"
RDEPENDS_${PN} += "python-subprocess python-compression libsystemd ${VIRTUAL-RUNTIME_skeleton_workbook}"
SRC_URI += "git://github.com/openbmc/skeleton"

FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*"

# RDEPEND on pflash if the openpower-pflash machine feature is set.
PACKAGECONFIG ??= "${@bb.utils.contains('MACHINE_FEATURES', 'openpower-pflash', 'openpower-pflash', '', d)}"
PACKAGECONFIG[openpower-pflash] = ",,,pflash"

SRCREV = "b2f3fd7a29ddf16ea6171b4b4649d9a0ea8be58d"
SRCREV = "40187443840d0e419c13391b2091fda29d63dea4"

S = "${WORKDIR}"

do_compile() {
oe_runmake -C git
# needed to invoke setuptools
export STAGING_INCDIR
export STAGING_LIBDIR
export BUILD_SYS
export HOST_SYS
export PYTHON_SITEPACKAGES_DIR

# Remove deprecated files.
rm ${S}/git/bin/pflash
do_compile() {
oe_runmake -C git PYTHON=${PYTHON}
}

do_install() {
source=${S}/git

install -d ${D}/${sbindir} ${D}${libdir}
for i in ${source}/bin/*; do
install $i ${D}/${sbindir}
done
for i in ${source}/lib/*; do
install $i ${D}/${libdir}
done
oe_runmake -C git install \
PYTHON=${PYTHON} \
DESTDIR=${D} \
PREFIX=/usr
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description=Temp placeholder for skeleton function

[Service]
Restart=always
ExecStart=/usr/sbin/system_manager.py Palmetto
ExecStart=/usr/sbin/system_manager.py

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion meta-phosphor/conf/machine/include/obmc-bsp-common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MACHINEOVERRIDES =. "openbmc:"

IMAGE_FSTYPES += "overlay"
IMAGE_FSTYPES += "cpio.${INITRAMFS_CTYPE}.u-boot"
IMAGE_INSTALL += "u-boot-fw-utils"
OBMC_IMAGE_EXTRA_INSTALL_append = " u-boot-fw-utils"

IMAGE_CLASSES += "obmc-phosphor-image_types_uboot"

Expand Down

0 comments on commit 39a4eff

Please sign in to comment.