blob: 6b7d6aac15f2f37bd25a276d489f1230061fcc42 [file] [log] [blame]
Jeremy Kerrfb3f0162015-03-27 10:14:50 +08001################################################################################
2#
3# skiboot
4#
5################################################################################
6
Stewart Smith1168cb42015-10-27 10:44:33 +11007SKIBOOT_VERSION = $(call qstrip,$(BR2_SKIBOOT_VERSION))
8
Reza Arbab9e1c47b2018-11-21 21:07:56 -06009ifeq ($(BR2_SKIBOOT_CUSTOM_GIT),y)
10SKIBOOT_SITE = $(call qstrip,$(BR2_SKIBOOT_CUSTOM_REPO_URL))
11SKIBOOT_SITE_METHOD = git
12else
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080013SKIBOOT_SITE = $(call github,open-power,skiboot,$(SKIBOOT_VERSION))
Reza Arbab9e1c47b2018-11-21 21:07:56 -060014endif
15
Stewart Smith1866e612016-07-28 09:50:28 +100016SKIBOOT_LICENSE = Apache-2.0
Stewart Smithb16ba5b2017-01-10 12:55:55 +110017SKIBOOT_LICENSE_FILES = LICENCE
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080018SKIBOOT_INSTALL_IMAGES = YES
19SKIBOOT_INSTALL_TARGET = NO
20
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080021
Klaus Heinrich Kiwibdfc1ac2020-12-11 07:27:58 -050022ifeq ($(BR2_PACKAGE_SKIBOOT_EMBED_PAYLOAD),y)
23SKIBOOT_MAKE_OPTS += KERNEL=$(BINARIES_DIR)/$(LINUX_IMAGE_NAME)
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080024SKIBOOT_DEPENDENCIES += linux
25endif
26
Klaus Heinrich Kiwiebab2612020-12-15 10:05:35 -050027ifeq ($(BR2_SKIBOOT_DEVICETREE),y)
28SKIBOOT_DEPENDENCIES += host-dtc
29define SKIBOOT_BUILD_DEVICETREE
30 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/external/devicetree all
31endef
32define SKIBOOT_INSTALL_DEVICETREE
33 $(INSTALL) -D -m 644 $(@D)/external/devicetree/*.dtb $(BINARIES_DIR)
34endef
35endif
Reza Arbab92f08be2019-02-20 16:42:09 -060036
Klaus Heinrich Kiwiebab2612020-12-15 10:05:35 -050037# Pass Configure opts as env to not override Skiboot's
38# Additionally, Skiboot expects SKIBOOT_VERSION as env
39define 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 Kerrfb3f0162015-03-27 10:14:50 +080044endef
45
46define SKIBOOT_INSTALL_IMAGES_CMDS
47 $(INSTALL) -D -m 755 $(@D)/skiboot.lid $(BINARIES_DIR)
Klaus Heinrich Kiwiebab2612020-12-15 10:05:35 -050048 $(SKIBOOT_INSTALL_DEVICETREE)
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080049endef
50
51$(eval $(generic-package))