Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # skiboot |
| 4 | # |
| 5 | ################################################################################ |
| 6 | |
Stewart Smith | 1168cb4 | 2015-10-27 10:44:33 +1100 | [diff] [blame] | 7 | SKIBOOT_VERSION = $(call qstrip,$(BR2_SKIBOOT_VERSION)) |
| 8 | |
Reza Arbab | 9e1c47b | 2018-11-21 21:07:56 -0600 | [diff] [blame] | 9 | ifeq ($(BR2_SKIBOOT_CUSTOM_GIT),y) |
| 10 | SKIBOOT_SITE = $(call qstrip,$(BR2_SKIBOOT_CUSTOM_REPO_URL)) |
| 11 | SKIBOOT_SITE_METHOD = git |
| 12 | else |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 13 | SKIBOOT_SITE = $(call github,open-power,skiboot,$(SKIBOOT_VERSION)) |
Reza Arbab | 9e1c47b | 2018-11-21 21:07:56 -0600 | [diff] [blame] | 14 | endif |
| 15 | |
Stewart Smith | 1866e61 | 2016-07-28 09:50:28 +1000 | [diff] [blame] | 16 | SKIBOOT_LICENSE = Apache-2.0 |
Stewart Smith | b16ba5b | 2017-01-10 12:55:55 +1100 | [diff] [blame] | 17 | SKIBOOT_LICENSE_FILES = LICENCE |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 18 | SKIBOOT_INSTALL_IMAGES = YES |
| 19 | SKIBOOT_INSTALL_TARGET = NO |
| 20 | |
Reza Arbab | 92f08be | 2019-02-20 16:42:09 -0600 | [diff] [blame^] | 21 | ifeq ($(BR2_SKIBOOT_DEVICETREE),y) |
| 22 | SKIBOOT_DEPENDENCIES += host-dtc |
| 23 | endif |
| 24 | |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 25 | SKIBOOT_MAKE_OPTS += CC="$(TARGET_CC)" LD="$(TARGET_LD)" \ |
| 26 | AS="$(TARGET_AS)" AR="$(TARGET_AR)" NM="$(TARGET_NM)" \ |
| 27 | OBJCOPY="$(TARGET_OBJCOPY)" OBJDUMP="$(TARGET_OBJDUMP)" \ |
| 28 | SIZE="$(TARGET_CROSS)size" |
| 29 | |
| 30 | ifeq ($(BR2_TARGET_SKIBOOT_EMBED_PAYLOAD),y) |
| 31 | SKIBOOT_MAKE_OPTS += KERNEL="$(BINARIES_DIR)/$(LINUX_IMAGE_NAME)" |
| 32 | |
| 33 | ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) |
Stewart Smith | 906bdba | 2015-08-26 16:05:20 +1000 | [diff] [blame] | 34 | SKIBOOT_DEPENDENCIES += linux-rebuild-with-initramfs |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 35 | else |
| 36 | SKIBOOT_DEPENDENCIES += linux |
| 37 | endif |
| 38 | |
| 39 | endif |
| 40 | |
| 41 | define SKIBOOT_BUILD_CMDS |
Stewart Smith | bdbcb26 | 2015-07-30 18:29:28 +1000 | [diff] [blame] | 42 | $(TARGET_CONFIGURE_OPTS) SKIBOOT_VERSION=`cat $(SKIBOOT_VERSION_FILE)` \ |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 43 | $(MAKE) $(SKIBOOT_MAKE_OPTS) -C $(@D) all |
Reza Arbab | 92f08be | 2019-02-20 16:42:09 -0600 | [diff] [blame^] | 44 | |
| 45 | $(if $(BR2_SKIBOOT_DEVICETREE), \ |
| 46 | $(MAKE) -C $(@D)/external/devicetree) |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 47 | endef |
| 48 | |
| 49 | define SKIBOOT_INSTALL_IMAGES_CMDS |
| 50 | $(INSTALL) -D -m 755 $(@D)/skiboot.lid $(BINARIES_DIR) |
Reza Arbab | 92f08be | 2019-02-20 16:42:09 -0600 | [diff] [blame^] | 51 | |
| 52 | $(if $(BR2_SKIBOOT_DEVICETREE), \ |
| 53 | $(INSTALL) -D -m 644 \ |
| 54 | $(@D)/external/devicetree/*.dtb $(BINARIES_DIR)) |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 55 | endef |
| 56 | |
| 57 | $(eval $(generic-package)) |