blob: 5f3e258d2e5ffe2c9fc008dac5214cd5b34c4482 [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
Reza Arbab92f08be2019-02-20 16:42:09 -060021ifeq ($(BR2_SKIBOOT_DEVICETREE),y)
22SKIBOOT_DEPENDENCIES += host-dtc
23endif
24
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080025SKIBOOT_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
30ifeq ($(BR2_TARGET_SKIBOOT_EMBED_PAYLOAD),y)
31SKIBOOT_MAKE_OPTS += KERNEL="$(BINARIES_DIR)/$(LINUX_IMAGE_NAME)"
32
33ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
Stewart Smith906bdba2015-08-26 16:05:20 +100034SKIBOOT_DEPENDENCIES += linux-rebuild-with-initramfs
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080035else
36SKIBOOT_DEPENDENCIES += linux
37endif
38
39endif
40
41define SKIBOOT_BUILD_CMDS
Stewart Smithbdbcb262015-07-30 18:29:28 +100042 $(TARGET_CONFIGURE_OPTS) SKIBOOT_VERSION=`cat $(SKIBOOT_VERSION_FILE)` \
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080043 $(MAKE) $(SKIBOOT_MAKE_OPTS) -C $(@D) all
Reza Arbab92f08be2019-02-20 16:42:09 -060044
45 $(if $(BR2_SKIBOOT_DEVICETREE), \
46 $(MAKE) -C $(@D)/external/devicetree)
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080047endef
48
49define SKIBOOT_INSTALL_IMAGES_CMDS
50 $(INSTALL) -D -m 755 $(@D)/skiboot.lid $(BINARIES_DIR)
Reza Arbab92f08be2019-02-20 16:42:09 -060051
52 $(if $(BR2_SKIBOOT_DEVICETREE), \
53 $(INSTALL) -D -m 644 \
54 $(@D)/external/devicetree/*.dtb $(BINARIES_DIR))
Jeremy Kerrfb3f0162015-03-27 10:14:50 +080055endef
56
57$(eval $(generic-package))