blob: 2262986a4d28dd95248e318806dae1d3364ff328 [file] [log] [blame]
Stewart Smithb2bcc832015-08-20 13:38:33 +10001################################################################################
2#
3# petitboot
4#
5################################################################################
6
Jeremy Kerr79dbdd72015-09-30 13:33:28 +08007PETITBOOT_VERSION = d171258160f7ed4756531f51e66fb116753bc990
Stewart Smith9c66bc52015-09-11 18:36:22 +10008PETITBOOT_SITE = git://github.com/open-power/petitboot.git
9PETITBOOT_DEPENDENCIES = ncurses udev host-bison host-flex lvm2
Stewart Smithb2bcc832015-08-20 13:38:33 +100010PETITBOOT_LICENSE = GPLv2
11PETITBOOT_LICENSE_FILES = COPYING
12
13PETITBOOT_AUTORECONF = YES
14PETITBOOT_AUTORECONF_OPTS = -i
15PETITBOOT_GETTEXTIZE = YES
16PETITBOOT_CONF_OPTS += --with-ncurses --without-twin-x11 --without-twin-fbdev \
17 --localstatedir=/var \
18 HOST_PROG_KEXEC=/usr/sbin/kexec \
19 HOST_PROG_SHUTDOWN=/usr/libexec/petitboot/bb-kexec-reboot \
20 $(if $(BR2_PACKAGE_BUSYBOX),--with-tftp=busybox)
21
22ifdef PETITBOOT_DEBUG
23PETITBOOT_CONF_OPTS += --enable-debug
24endif
25
Sam Mendoza-Jonasaf7c2712016-02-10 10:27:25 +110026ifeq ($(BR2_PACKAGE_PETITBOOT_MTD),y)
27PETITBOOT_CONF_OPTS += --enable-mtd
28PETITBOOT_DEPENDENCIES += libflash
29PETITBOOT_CPPFLAGS += -I$(STAGING_DIR)
30PETITBOOT_LDFLAGS += -L$(STAGING_DIR)
31endif
32
Stewart Smithb2bcc832015-08-20 13:38:33 +100033ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
34PETITBOOT_CONF_OPTS += --with-ncursesw MENU_LIB=-lmenuw FORM_LIB=-lformw
35endif
36
37PETITBOOT_PRE_CONFIGURE_HOOKS += PETITBOOT_PRE_CONFIGURE_BOOTSTRAP
38
39define PETITBOOT_POST_INSTALL
40 $(INSTALL) -D -m 0755 $(@D)/utils/bb-kexec-reboot \
41 $(TARGET_DIR)/usr/libexec/petitboot
42 $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/petitboot/boot.d
43 $(INSTALL) -D -m 0755 $(@D)/utils/hooks/01-create-default-dtb \
44 $(TARGET_DIR)/etc/petitboot/boot.d/
45 $(INSTALL) -D -m 0755 $(@D)/utils/hooks/20-set-stdout \
46 $(TARGET_DIR)/etc/petitboot/boot.d/
Jeremy Kerr1e45f7e2015-11-02 16:24:45 +080047 $(INSTALL) -D -m 0755 $(@D)/utils/hooks/90-sort-dtb \
48 $(TARGET_DIR)/etc/petitboot/boot.d/
Stewart Smithb2bcc832015-08-20 13:38:33 +100049
50 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/S14silence-console \
51 $(TARGET_DIR)/etc/init.d/
52 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/S15pb-discover \
53 $(TARGET_DIR)/etc/init.d/
54 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/kexec-restart \
55 $(TARGET_DIR)/usr/sbin/
56 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/petitboot-console-ui.rules \
57 $(TARGET_DIR)/etc/udev/rules.d/
58 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/removable-event-poll.rules \
59 $(TARGET_DIR)/etc/udev/rules.d/
Samuel Mendoza-Jonasc775f292015-09-14 13:10:27 +100060 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/63-md-raid-arrays.rules \
61 $(TARGET_DIR)/etc/udev/rules.d/
62 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/65-md-incremental.rules \
63 $(TARGET_DIR)/etc/udev/rules.d/
Stewart Smithb2bcc832015-08-20 13:38:33 +100064
65 ln -sf /usr/sbin/pb-udhcpc \
66 $(TARGET_DIR)/usr/share/udhcpc/default.script.d/
Jeremy Kerrd7af67c2015-09-24 15:02:03 +100067
Jeremy Kerr51ba5722015-09-30 13:31:23 +080068 $(MAKE) -C $(@D)/po DESTDIR=$(TARGET_DIR) install
Stewart Smithb2bcc832015-08-20 13:38:33 +100069endef
70
71PETITBOOT_POST_INSTALL_TARGET_HOOKS += PETITBOOT_POST_INSTALL
72
73$(eval $(autotools-package))