blob: 196a73263ad5da565d93813b7d0d1a4b27953857 [file] [log] [blame]
Stewart Smithb2bcc832015-08-20 13:38:33 +10001################################################################################
2#
3# petitboot
4#
5################################################################################
6
Stewart Smith9c66bc52015-09-11 18:36:22 +10007PETITBOOT_VERSION = 5acb43464206348b7cced9508852fdd2989aea58
8PETITBOOT_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
26ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
27PETITBOOT_CONF_OPTS += --with-ncursesw MENU_LIB=-lmenuw FORM_LIB=-lformw
28endif
29
30PETITBOOT_PRE_CONFIGURE_HOOKS += PETITBOOT_PRE_CONFIGURE_BOOTSTRAP
31
32define PETITBOOT_POST_INSTALL
33 $(INSTALL) -D -m 0755 $(@D)/utils/bb-kexec-reboot \
34 $(TARGET_DIR)/usr/libexec/petitboot
35 $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/petitboot/boot.d
36 $(INSTALL) -D -m 0755 $(@D)/utils/hooks/01-create-default-dtb \
37 $(TARGET_DIR)/etc/petitboot/boot.d/
38 $(INSTALL) -D -m 0755 $(@D)/utils/hooks/20-set-stdout \
39 $(TARGET_DIR)/etc/petitboot/boot.d/
40
41 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/S14silence-console \
42 $(TARGET_DIR)/etc/init.d/
43 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/S15pb-discover \
44 $(TARGET_DIR)/etc/init.d/
45 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/kexec-restart \
46 $(TARGET_DIR)/usr/sbin/
47 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/petitboot-console-ui.rules \
48 $(TARGET_DIR)/etc/udev/rules.d/
49 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/removable-event-poll.rules \
50 $(TARGET_DIR)/etc/udev/rules.d/
Samuel Mendoza-Jonasc775f292015-09-14 13:10:27 +100051 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/63-md-raid-arrays.rules \
52 $(TARGET_DIR)/etc/udev/rules.d/
53 $(INSTALL) -D -m 0755 $(BR2_EXTERNAL)/package/petitboot/65-md-incremental.rules \
54 $(TARGET_DIR)/etc/udev/rules.d/
Stewart Smithb2bcc832015-08-20 13:38:33 +100055
56 ln -sf /usr/sbin/pb-udhcpc \
57 $(TARGET_DIR)/usr/share/udhcpc/default.script.d/
58endef
59
60PETITBOOT_POST_INSTALL_TARGET_HOOKS += PETITBOOT_POST_INSTALL
61
62$(eval $(autotools-package))