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 | |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 21 | |
Klaus Heinrich Kiwi | bdfc1ac | 2020-12-11 07:27:58 -0500 | [diff] [blame] | 22 | ifeq ($(BR2_PACKAGE_SKIBOOT_EMBED_PAYLOAD),y) |
| 23 | SKIBOOT_MAKE_OPTS += KERNEL=$(BINARIES_DIR)/$(LINUX_IMAGE_NAME) |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 24 | SKIBOOT_DEPENDENCIES += linux |
| 25 | endif |
| 26 | |
Klaus Heinrich Kiwi | ebab261 | 2020-12-15 10:05:35 -0500 | [diff] [blame] | 27 | ifeq ($(BR2_SKIBOOT_DEVICETREE),y) |
| 28 | SKIBOOT_DEPENDENCIES += host-dtc |
| 29 | define SKIBOOT_BUILD_DEVICETREE |
| 30 | $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/external/devicetree all |
| 31 | endef |
| 32 | define SKIBOOT_INSTALL_DEVICETREE |
| 33 | $(INSTALL) -D -m 644 $(@D)/external/devicetree/*.dtb $(BINARIES_DIR) |
| 34 | endef |
| 35 | endif |
Reza Arbab | 92f08be | 2019-02-20 16:42:09 -0600 | [diff] [blame] | 36 | |
Klaus Heinrich Kiwi | ebab261 | 2020-12-15 10:05:35 -0500 | [diff] [blame] | 37 | # Pass Configure opts as env to not override Skiboot's |
| 38 | # Additionally, Skiboot expects SKIBOOT_VERSION as env |
| 39 | define SKIBOOT_BUILD_CMDS |
| 40 | $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \ |
| 41 | SKIBOOT_VERSION=`cat $(SKIBOOT_VERSION_FILE)` \ |
| 42 | $(MAKE) -C $(@D) $(SKIBOOT_MAKE_OPTS) all |
| 43 | $(SKIBOOT_BUILD_DEVICETREE) |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 44 | endef |
| 45 | |
| 46 | define SKIBOOT_INSTALL_IMAGES_CMDS |
| 47 | $(INSTALL) -D -m 755 $(@D)/skiboot.lid $(BINARIES_DIR) |
Klaus Heinrich Kiwi | ebab261 | 2020-12-15 10:05:35 -0500 | [diff] [blame] | 48 | $(SKIBOOT_INSTALL_DEVICETREE) |
Jeremy Kerr | fb3f016 | 2015-03-27 10:14:50 +0800 | [diff] [blame] | 49 | endef |
| 50 | |
| 51 | $(eval $(generic-package)) |