Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # libflash - builds libflash libraries from skiboot source |
| 4 | # |
| 5 | ################################################################################ |
| 6 | |
Stewart Smith | 1e49b59 | 2017-08-01 16:31:38 +1000 | [diff] [blame] | 7 | LIBFLASH_VERSION = v5.7-76-g830fc9a0ed0a |
Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 8 | LIBFLASH_SITE = $(call github,open-power,skiboot,$(LIBFLASH_VERSION)) |
Charles P. Hofer | 0ca27df | 2017-08-10 14:20:00 -0500 | [diff] [blame] | 9 | |
Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 10 | LIBFLASH_INSTALL_STAGING = YES |
| 11 | LIBFLASH_INSTALL_TARGET = YES |
| 12 | |
Stewart Smith | b16ba5b | 2017-01-10 12:55:55 +1100 | [diff] [blame] | 13 | LIBFLASH_LICENSE_FILES = LICENCE |
| 14 | |
Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 15 | LIBFLASH_MAKE_OPTS += CC="$(TARGET_CC)" LD="$(TARGET_LD)" \ |
| 16 | AS="$(TARGET_AS)" AR="$(TARGET_AR)" NM="$(TARGET_NM)" \ |
| 17 | OBJCOPY="$(TARGET_OBJCOPY)" OBJDUMP="$(TARGET_OBJDUMP)" \ |
| 18 | SIZE="$(TARGET_CROSS)size" |
| 19 | |
Samuel Mendoza-Jonas | 70a42c6 | 2017-06-20 14:07:50 +1000 | [diff] [blame] | 20 | LIBFLASH_MAKE_ENV = \ |
| 21 | SKIBOOT_VERSION=$(LIBFLASH_VERSION) \ |
| 22 | $(MAKE1) $(LIBFLASH_MAKE_OPTS) CROSS_COMPILE=$(TARGET_CROSS) |
| 23 | |
| 24 | |
Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 25 | define LIBFLASH_BUILD_CMDS |
Samuel Mendoza-Jonas | 70a42c6 | 2017-06-20 14:07:50 +1000 | [diff] [blame] | 26 | PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared |
| 27 | $(if $(BR2_PACKAGE_PFLASH), |
| 28 | PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) \ |
| 29 | -C $(@D)/external/pflash) |
Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 30 | endef |
| 31 | |
Charles P. Hofer | 0ca27df | 2017-08-10 14:20:00 -0500 | [diff] [blame] | 32 | define HOST_LIBFLASH_BUILD_CMDS |
Samuel Mendoza-Jonas | 70041c5 | 2017-08-30 11:01:38 +1000 | [diff] [blame^] | 33 | $(HOST_MAKE_ENV) SKIBOOT_VERSION=$(LIBFLASH_VERSION) \ |
| 34 | $(MAKE) -C $(@D)/external/pflash |
Charles P. Hofer | 0ca27df | 2017-08-10 14:20:00 -0500 | [diff] [blame] | 35 | endef |
| 36 | |
Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 37 | define LIBFLASH_INSTALL_STAGING_CMDS |
Samuel Mendoza-Jonas | 70a42c6 | 2017-06-20 14:07:50 +1000 | [diff] [blame] | 38 | PREFIX=$(STAGING_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared \ |
| 39 | install |
Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 40 | endef |
| 41 | |
| 42 | define LIBFLASH_INSTALL_TARGET_CMDS |
Samuel Mendoza-Jonas | 70a42c6 | 2017-06-20 14:07:50 +1000 | [diff] [blame] | 43 | PREFIX=$(TARGET_DIR)/usr $(LIBFLASH_MAKE_ENV) -C $(@D)/external/shared \ |
| 44 | install-lib |
| 45 | $(if $(BR2_PACKAGE_PFLASH), |
| 46 | DESTDIR=$(TARGET_DIR) $(LIBFLASH_MAKE_ENV) \ |
| 47 | -C $(@D)/external/pflash install) |
Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 48 | endef |
| 49 | |
Charles P. Hofer | 0ca27df | 2017-08-10 14:20:00 -0500 | [diff] [blame] | 50 | define HOST_LIBFLASH_INSTALL_CMDS |
| 51 | $(INSTALL) $(@D)/external/pflash/pflash $(HOST_DIR)/usr/bin/pflash |
| 52 | endef |
| 53 | |
Sam Mendoza-Jonas | 61bfdf2 | 2016-02-10 10:15:24 +1100 | [diff] [blame] | 54 | $(eval $(generic-package)) |
Charles P. Hofer | 0ca27df | 2017-08-10 14:20:00 -0500 | [diff] [blame] | 55 | $(eval $(host-generic-package)) |