summaryrefslogtreecommitdiffstats
path: root/openpower/package/libflash
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-06-20 14:07:50 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-08-11 08:33:52 +1000
commit70a42c677e1eefa696ee24106986722031fbe50d (patch)
tree1035cdb48187aa431a5948ca6ed5a78d660de2a4 /openpower/package/libflash
parent5c8aa950e251eedcc283db809b7e8561a6c200fb (diff)
downloadblackbird-op-build-70a42c677e1eefa696ee24106986722031fbe50d.tar.gz
blackbird-op-build-70a42c677e1eefa696ee24106986722031fbe50d.zip
libflash: Add option to install pflash
Extend the libflash package to also install the pflash utility. This enables users to query and modify the PNOR safely from the host, as well as supporting future automation changes. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'openpower/package/libflash')
-rw-r--r--openpower/package/libflash/Config.in5
-rw-r--r--openpower/package/libflash/libflash.mk25
2 files changed, 21 insertions, 9 deletions
diff --git a/openpower/package/libflash/Config.in b/openpower/package/libflash/Config.in
index eb6f56d3..3fb323f8 100644
--- a/openpower/package/libflash/Config.in
+++ b/openpower/package/libflash/Config.in
@@ -2,3 +2,8 @@ config BR2_PACKAGE_LIBFLASH
bool "libflash"
help
Build libflash shared library
+
+config BR2_PACKAGE_PFLASH
+ bool "pflash"
+ help
+ Install pflash utility to target
diff --git a/openpower/package/libflash/libflash.mk b/openpower/package/libflash/libflash.mk
index 5417bebb..d47edf77 100644
--- a/openpower/package/libflash/libflash.mk
+++ b/openpower/package/libflash/libflash.mk
@@ -17,22 +17,29 @@ LIBFLASH_MAKE_OPTS += CC="$(TARGET_CC)" LD="$(TARGET_LD)" \
OBJCOPY="$(TARGET_OBJCOPY)" OBJDUMP="$(TARGET_OBJDUMP)" \
SIZE="$(TARGET_CROSS)size"
+LIBFLASH_MAKE_ENV = \
+ SKIBOOT_VERSION=$(LIBFLASH_VERSION) \
+ $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS)
+
+
define LIBFLASH_BUILD_CMDS
- PREFIX=$(STAGING_DIR)/usr SKIBOOT_VERSION=$(LIBFLASH_VERSION) \
- $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS) \
- -C $(@D)/external/shared
+ PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared
+ $(if $(BR2_PACKAGE_PFLASH),
+ PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) \
+ -C $(@D)/external/pflash)
endef
define LIBFLASH_INSTALL_STAGING_CMDS
- PREFIX=$(STAGING_DIR)/usr SKIBOOT_VERSION=$(LIBFLASH_VERSION) \
- $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS) \
- -C $(@D)/external/shared install
+ PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared \
+ install
endef
define LIBFLASH_INSTALL_TARGET_CMDS
- PREFIX=$(TARGET_DIR)/usr SKIBOOT_VERSION=$(LIBFLASH_VERSION) \
- $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS) \
- -C $(@D)/external/shared install-lib
+ PREFIX=$(TARGET_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared \
+ install-lib
+ $(if $(BR2_PACKAGE_PFLASH),
+ DESTDIR=$(TARGET_DIR) $(LIBFLASH_MAKE_ENV) \
+ -C $(@D)/external/pflash install)
endef
$(eval $(generic-package))
OpenPOWER on IntegriCloud