* [PATCH openbmc 0/4] Use pflash from upstream skiboot instead of skeleton.
@ 2016-04-15 16:30 OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 1/4] pflash: Add pflash recipe OpenBMC Patches
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: OpenBMC Patches @ 2016-04-15 16:30 UTC (permalink / raw)
To: openbmc
Fixes #103.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/openbmc/openbmc/233)
<!-- Reviewable:end -->
https://github.com/openbmc/openbmc/pull/233
Joel Stanley (1):
pflash: Add pflash recipe
Patrick Williams (3):
meta-openpower: add common/recipes-* tree
pflash: Use skiboot-5.2.0
skeleton: Use pflash recipe
.../common/recipes-bsp/pflash/pflash.bb | 23 +++++
.../0001-pflash-Allow-building-under-yocto.patch | 98 ++++++++++++++++++++++
.../meta-openpower/conf/layer.conf | 3 +
.../conf/machine/include/openpower.inc | 1 +
.../common/recipes-phosphor/skeleton/skeleton.bb | 7 ++
5 files changed, 132 insertions(+)
create mode 100644 meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash.bb
create mode 100644 meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash/0001-pflash-Allow-building-under-yocto.patch
--
2.7.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH openbmc 1/4] pflash: Add pflash recipe
2016-04-15 16:30 [PATCH openbmc 0/4] Use pflash from upstream skiboot instead of skeleton OpenBMC Patches
@ 2016-04-15 16:30 ` OpenBMC Patches
2016-04-27 0:46 ` Stewart Smith
2016-04-15 16:30 ` [PATCH openbmc 2/4] meta-openpower: add common/recipes-* tree OpenBMC Patches
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: OpenBMC Patches @ 2016-04-15 16:30 UTC (permalink / raw)
To: openbmc
From: Joel Stanley <joel@jms.id.au>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
---
.../common/recipes-bsp/pflash/pflash.bb | 23 +++++
.../0001-pflash-Allow-building-under-yocto.patch | 98 ++++++++++++++++++++++
2 files changed, 121 insertions(+)
create mode 100644 meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash.bb
create mode 100644 meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash/0001-pflash-Allow-building-under-yocto.patch
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash.bb b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash.bb
new file mode 100644
index 0000000..b84335c
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash.bb
@@ -0,0 +1,23 @@
+SUMMARY = "pflash programmer for OpenPower"
+DESCRIPTION = "pflash firmware programming tool for OpenPower machines"
+HOMEPAGE = "https://github.com/open-power"
+LICENSE = "Apache-2.0"
+
+SRC_URI += "git://github.com/open-power/skiboot.git"
+LIC_FILES_CHKSUM = "file://${S}/LICENCE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRCREV = "6677d2cefb60103156db713e2cdffb02b4a2d270"
+PV = "pflash-git${SRCPV}"
+SRC_URI += "file://0001-pflash-Allow-building-under-yocto.patch"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} PFLASH_VERSION=${PV} V=1'
+
+do_compile () {
+ oe_runmake -C external/pflash all
+}
+
+do_install () {
+ oe_runmake -C external/pflash install DESTDIR=${D}
+}
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash/0001-pflash-Allow-building-under-yocto.patch b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash/0001-pflash-Allow-building-under-yocto.patch
new file mode 100644
index 0000000..60d6a7b
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash/0001-pflash-Allow-building-under-yocto.patch
@@ -0,0 +1,98 @@
+From bb362203a7cc7012ba723d8828491756f9bb4ecb Mon Sep 17 00:00:00 2001
+From: Patrick Williams <patrick@stwcx.xyz>
+Date: Thu, 14 Apr 2016 10:46:22 -0500
+Subject: [PATCH] pflash: Allow building under yocto.
+
+The makefiles under external/* utilize the $(CROSS_COMPILE) variable
+to determine the cross-compiler prefix. In a few places,
+$(CROSS_COMPILE)gcc is called instead of $(CC). The issue with this is
+that yocto build passes some compile flags as part of $(CC) instead of
+$(CFLAGS), the most important of these is '--sysroot=...'. Without the
+proper --sysroot flag, pflash compile fails to find critical libc
+headers like stdio.h.
+
+This change delegates setting of $(CC) and $(LD) to
+external/common/rules.mk, which is widely used in the external tree, and
+ensures that:
+ 1) $(CC) is used instead of $(CROSS_COMPILE)gcc.
+ 2) CC is only set when not passed from the environment.
+
+Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
+---
+ external/common/rules.mk | 6 ++++--
+ external/gard/rules.mk | 2 --
+ external/opal-prd/Makefile | 2 --
+ external/pflash/rules.mk | 2 --
+ external/shared/Makefile | 1 -
+ 5 files changed, 4 insertions(+), 9 deletions(-)
+
+diff --git a/external/common/rules.mk b/external/common/rules.mk
+index ec20593..95a2757 100644
+--- a/external/common/rules.mk
++++ b/external/common/rules.mk
+@@ -1,3 +1,5 @@
++CC ?= $(CROSS_COMPILE)gcc
++LD ?= $(CROSS_COMPILE)ld
+ ARCH := $(shell $(GET_ARCH) "$(CROSS_COMPILE)")
+
+ ifeq ($(ARCH),ARCH_ARM)
+@@ -42,8 +44,8 @@ arch_clean:
+ $(ARCH_SRC): | common
+
+ $(ARCH_OBJS): common-%.o: common/%.c
+- $(Q_CC)$(CROSS_COMPILE)gcc $(CFLAGS) $(CPPFLAGS) -c $< -o $@
++ $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ common-arch_flash.o: $(ARCH_OBJS)
+- $(Q_LD)$(CROSS_COMPILE)ld -r $(ARCH_OBJS) -o $@
++ $(Q_LD)$(LD) -r $(ARCH_OBJS) -o $@
+
+diff --git a/external/gard/rules.mk b/external/gard/rules.mk
+index f0086a2..0dd14ed 100644
+--- a/external/gard/rules.mk
++++ b/external/gard/rules.mk
+@@ -7,8 +7,6 @@ OBJS += $(LIBFLASH_OBJS)
+ OBJS += common-arch_flash.o
+ EXE = gard
+
+-CC = $(CROSS_COMPILE)gcc
+-
+ prefix = /usr/local/
+ sbindir = $(prefix)/sbin
+ datadir = $(prefix)/share
+diff --git a/external/opal-prd/Makefile b/external/opal-prd/Makefile
+index 3f34371..ff5ba6b 100644
+--- a/external/opal-prd/Makefile
++++ b/external/opal-prd/Makefile
+@@ -1,5 +1,3 @@
+-CC = $(CROSS_COMPILE)gcc
+-
+ CFLAGS += -m64 -Werror -Wall -g2 -ggdb
+ LDFLAGS += -m64
+ ASFLAGS = -m64
+diff --git a/external/pflash/rules.mk b/external/pflash/rules.mk
+index 219e3d3..aa426b5 100644
+--- a/external/pflash/rules.mk
++++ b/external/pflash/rules.mk
+@@ -9,8 +9,6 @@ OBJS += $(LIBFLASH_OBJS)
+ OBJS += common-arch_flash.o
+ EXE = pflash
+
+-CC = $(CROSS_COMPILE)gcc
+-
+ PFLASH_VERSION ?= $(shell ../../make_version.sh $(EXE))
+
+ version.c: .version
+diff --git a/external/shared/Makefile b/external/shared/Makefile
+index ffc049f..4c31657 100644
+--- a/external/shared/Makefile
++++ b/external/shared/Makefile
+@@ -1,5 +1,4 @@
+ .DEFAULT_GOAL := all
+-CC ?= $(CROSS_COMPILE)gcc
+ GET_ARCH = ../../external/common/get_arch.sh
+ include ../../external/common/rules.mk
+
+--
+2.6.3
+
--
2.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH openbmc 2/4] meta-openpower: add common/recipes-* tree
2016-04-15 16:30 [PATCH openbmc 0/4] Use pflash from upstream skiboot instead of skeleton OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 1/4] pflash: Add pflash recipe OpenBMC Patches
@ 2016-04-15 16:30 ` OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 3/4] pflash: Use skiboot-5.2.0 OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 4/4] skeleton: Use pflash recipe OpenBMC Patches
3 siblings, 0 replies; 6+ messages in thread
From: OpenBMC Patches @ 2016-04-15 16:30 UTC (permalink / raw)
To: openbmc
From: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
---
meta-openbmc-machines/meta-openpower/conf/layer.conf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta-openbmc-machines/meta-openpower/conf/layer.conf b/meta-openbmc-machines/meta-openpower/conf/layer.conf
index a902796..46c5a5d 100644
--- a/meta-openbmc-machines/meta-openpower/conf/layer.conf
+++ b/meta-openbmc-machines/meta-openpower/conf/layer.conf
@@ -1,5 +1,8 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
+BBFILES += "${LAYERDIR}/common/recipes-*/*/*.bb \
+ ${LAYERDIR}/common/recipes-*/*/*.bbappend"
+
BBFILE_COLLECTIONS += "openpower"
BBFILE_PATTERN_openpower = ""
--
2.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH openbmc 3/4] pflash: Use skiboot-5.2.0
2016-04-15 16:30 [PATCH openbmc 0/4] Use pflash from upstream skiboot instead of skeleton OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 1/4] pflash: Add pflash recipe OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 2/4] meta-openpower: add common/recipes-* tree OpenBMC Patches
@ 2016-04-15 16:30 ` OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 4/4] skeleton: Use pflash recipe OpenBMC Patches
3 siblings, 0 replies; 6+ messages in thread
From: OpenBMC Patches @ 2016-04-15 16:30 UTC (permalink / raw)
To: openbmc
From: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
---
.../meta-openpower/common/recipes-bsp/pflash/pflash.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash.bb b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash.bb
index b84335c..6c2b0b6 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pflash/pflash.bb
@@ -6,8 +6,8 @@ LICENSE = "Apache-2.0"
SRC_URI += "git://github.com/open-power/skiboot.git"
LIC_FILES_CHKSUM = "file://${S}/LICENCE;md5=3b83ef96387f14655fc854ddc3c6bd57"
-SRCREV = "6677d2cefb60103156db713e2cdffb02b4a2d270"
-PV = "pflash-git${SRCPV}"
+SRCREV = "skiboot-5.2.0"
+PV = "5.2.0"
SRC_URI += "file://0001-pflash-Allow-building-under-yocto.patch"
S = "${WORKDIR}/git"
--
2.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH openbmc 4/4] skeleton: Use pflash recipe
2016-04-15 16:30 [PATCH openbmc 0/4] Use pflash from upstream skiboot instead of skeleton OpenBMC Patches
` (2 preceding siblings ...)
2016-04-15 16:30 ` [PATCH openbmc 3/4] pflash: Use skiboot-5.2.0 OpenBMC Patches
@ 2016-04-15 16:30 ` OpenBMC Patches
3 siblings, 0 replies; 6+ messages in thread
From: OpenBMC Patches @ 2016-04-15 16:30 UTC (permalink / raw)
To: openbmc
From: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
---
.../meta-openpower/conf/machine/include/openpower.inc | 1 +
meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc b/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc
index fe2b44a..6660a56 100644
--- a/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc
+++ b/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc
@@ -4,6 +4,7 @@ OBMC_MACHINE_FEATURES += "\
obmc-phosphor-sensor-mgmt \
obmc-phosphor-flash-mgmt \
obmc-phosphor-event-mgmt \
+ openpower-pflash \
"
VIRTUAL-RUNTIME_obmc-phosphor-fan-ctl = " \
diff --git a/meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb b/meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb
index 08e4d33..551843e 100644
--- a/meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb
+++ b/meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb
@@ -16,12 +16,19 @@ DEPENDS += "glib-2.0 systemd"
RDEPENDS_${PN} += "python-subprocess python-compression libsystemd"
SRC_URI += "git://github.com/openbmc/skeleton"
+# 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 = "27ca44ad1a96f90d42dcb50183700e5ca5358642"
S = "${WORKDIR}"
do_compile() {
oe_runmake -C git
+
+ # Remove deprecated files.
+ rm ${S}/git/bin/pflash
}
do_install() {
--
2.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH openbmc 1/4] pflash: Add pflash recipe
2016-04-15 16:30 ` [PATCH openbmc 1/4] pflash: Add pflash recipe OpenBMC Patches
@ 2016-04-27 0:46 ` Stewart Smith
0 siblings, 0 replies; 6+ messages in thread
From: Stewart Smith @ 2016-04-27 0:46 UTC (permalink / raw)
To: OpenBMC Patches, openbmc
OpenBMC Patches <openbmc-patches@stwcx.xyz> writes:
> .../0001-pflash-Allow-building-under-yocto.patch | 98
> ++++++++++++++++++++++
FYI, this patch won't be needed with the very-soon-to-be-tagged skiboot
5.2.1.
--
Stewart Smith
OPAL Architect, IBM.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-27 2:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 16:30 [PATCH openbmc 0/4] Use pflash from upstream skiboot instead of skeleton OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 1/4] pflash: Add pflash recipe OpenBMC Patches
2016-04-27 0:46 ` Stewart Smith
2016-04-15 16:30 ` [PATCH openbmc 2/4] meta-openpower: add common/recipes-* tree OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 3/4] pflash: Use skiboot-5.2.0 OpenBMC Patches
2016-04-15 16:30 ` [PATCH openbmc 4/4] skeleton: Use pflash recipe OpenBMC Patches
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.