Although this is a "boot loader", it really is a tool that should be part of an image that acts as the bootloader. Thus, it is not in the bootloader menu. A UI is required and can be provided by ncurses, X11 or fbdev. Only ncurses is supported for now. The other two use libtwin which isn't part of Buildroot for now. Adapted from https://github.com/glevand/petitboot--buildroot Updated to work with m68k architecture rather than just PlayStation3 (focused on qemu-system-m68k virt machine) Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Thomas Huth <huth@tuxfamily.org> [Arnout: - Add missing arch and toolchain dependencies. - Remove nonexistent BR2_PACKAGE_NCURSES_TARGET_* selects. - Swap kexec/kexec-lite priority. - Add hash for license file. - Use version without v for VERSION. - Remove unnecessary --localstatedir=/var. - Add --disable-busybox. - Remove --enable-debug. - Remove --with-ncursesw and explicit libraries. - Add explicit arguments for all configure options. - Always select busybox tftp. - Add optional dependency on dtc. - Move dtc-specific options under a single condition. - Minor cleanups (whitespace, comments, ...). ] Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
61 lines
1.9 KiB
Makefile
61 lines
1.9 KiB
Makefile
################################################################################
|
|
#
|
|
# petitboot
|
|
#
|
|
################################################################################
|
|
|
|
PETITBOOT_VERSION = 1.13
|
|
PETITBOOT_SOURCE = petitboot-v$(PETITBOOT_VERSION).tar.gz
|
|
PETITBOOT_SITE = https://github.com/open-power/petitboot/releases/download/v$(PETITBOOT_VERSION)
|
|
PETITBOOT_DEPENDENCIES = elfutils ncurses udev host-bison host-flex lvm2
|
|
PETITBOOT_LICENSE = GPL-2.0
|
|
PETITBOOT_LICENSE_FILES = COPYING
|
|
|
|
PETITBOOT_CONF_OPTS = \
|
|
--enable-crypt \
|
|
--enable-platform-auto \
|
|
--disable-mtd \
|
|
--with-ncurses \
|
|
--without-signed-boot \
|
|
--without-twin-fbdev \
|
|
--without-twin-x11 \
|
|
$(if $(BR2_PACKAGE_BUSYBOX),--enable-busybox,--disable-busybox) \
|
|
HOST_PROG_KEXEC=/usr/sbin/kexec \
|
|
HOST_PROG_SHUTDOWN=/usr/sbin/kexec-restart
|
|
|
|
# HPA and Busybox tftp are supported. HPA tftp is part of Buildroot's tftpd
|
|
# package.
|
|
ifeq ($(BR2_PACKAGE_TFTPD),y)
|
|
PETITBOOT_CONF_OPTS += --with-tftp=hpa
|
|
else ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
|
PETITBOOT_CONF_OPTS += --with-tftp=busybox
|
|
else
|
|
# This actually means "autodetect", there's no way to really disable.
|
|
PETITBOOT_CONF_OPTS += --without-tftp
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_DTC),y)
|
|
PETITBOOT_DEPENDENCIES += dtc
|
|
PETITBOOT_CONF_OPTS += --with-fdt
|
|
define PETITBOOT_POST_INSTALL_DTB
|
|
$(INSTALL) -D -m 0755 $(@D)/utils/hooks/30-dtb-updates \
|
|
$(TARGET_DIR)/etc/petitboot/boot.d/30-dtb-updates
|
|
endef
|
|
PETITBOOT_POST_INSTALL_TARGET_HOOKS += PETITBOOT_POST_INSTALL_DTB
|
|
else
|
|
PETITBOOT_CONF_OPTS += --without-fdt
|
|
endif
|
|
|
|
define PETITBOOT_POST_INSTALL
|
|
$(INSTALL) -D -m 0755 $(@D)/utils/bb-kexec-reboot \
|
|
$(TARGET_DIR)/usr/libexec/petitboot/bb-kexec-reboot
|
|
$(INSTALL) -D -m 0755 $(@D)/utils/hooks/01-create-default-dtb \
|
|
$(TARGET_DIR)/etc/petitboot/boot.d/01-create-default-dtb
|
|
$(INSTALL) -D -m 0755 $(@D)/utils/hooks/90-sort-dtb \
|
|
$(TARGET_DIR)/etc/petitboot/boot.d/90-sort-dtb
|
|
endef
|
|
|
|
PETITBOOT_POST_INSTALL_TARGET_HOOKS += PETITBOOT_POST_INSTALL
|
|
|
|
$(eval $(autotools-package))
|