kumquat-buildroot/package/amlogic-boot-fip/amlogic-boot-fip.mk
Sebastian Weyer 5ca8e5a4a7 package/amlogic-boot-fip: new host package
This tool is needed by some SoCs to sign the bootloader.

See the list of supported SoCs:
https://github.com/LibreELEC/amlogic-boot-fip

The variable BR2_PACKAGE_HOST_AMLOGIC_BOOT_FIP_DEVICE is used to specify
for which device this package needs to be used.

This tool uses pre-compiled binaries in order to sign the bootloader.
These binaries are provided under a proprietary license that prohibits
any redistribution of the resulting images.

A similar tool was tried to be added in the past:
http://patchwork.ozlabs.org/project/buildroot/patch/1533545408-11248-2-git-send-email-narmstrong@baylibre.com/
This time however a license file is present which can be used by
make legal-info. Additionally, acs_tool.pyc was replaced by acs_tool.py
and is therefore not compiled anymore.

Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
[Romain:
  add AMLOGIC_BOOT_FIP_REDISTRIBUTE = NO
  add qstrip for BR2_PACKAGE_HOST_AMLOGIC_BOOT_FIP_DEVICE
  remove build-fip-all.sh copy, not needed
  factorize file copy in HOST_AMLOGIC_BOOT_FIP_INSTALL_CMDS
  update commit log with the github url where we can find the list of supported SoCs.
]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2023-09-30 21:38:48 +02:00

35 lines
1.3 KiB
Makefile

################################################################################
#
# amlogic-boot-fip
#
################################################################################
AMLOGIC_BOOT_FIP_VERSION = e96b6a694380ff07d5a9e4be644ffe254bd18512
AMLOGIC_BOOT_FIP_SITE = $(call github,LibreELEC,amlogic-boot-fip,$(AMLOGIC_BOOT_FIP_VERSION))
AMLOGIC_BOOT_FIP_LICENSE = PROPRIETARY
AMLOGIC_BOOT_FIP_LICENSE_FILES = LICENSE
AMLOGIC_BOOT_FIP_REDISTRIBUTE = NO
AMLOGIC_BOOT_FIP_INSTALL_DIR = $(BINARIES_DIR)/amlogic-boot-fip
AMLOGIC_BOOT_FIP_DEVICE = $(call qstrip,$(BR2_PACKAGE_HOST_AMLOGIC_BOOT_FIP_DEVICE))
AMLOGIC_BOOT_FIP_FILES_TO_INSTALL = build-fip.sh axg.inc g12a.inc gxbb.inc gxl.inc
define HOST_AMLOGIC_BOOT_FIP_INSTALL_CMDS
mkdir -p $(AMLOGIC_BOOT_FIP_INSTALL_DIR)/$(AMLOGIC_BOOT_FIP_DEVICE)
$(foreach f,$(AMLOGIC_BOOT_FIP_FILES_TO_INSTALL),\
$(INSTALL) -D -m 0755 $(@D)/$(f) $(AMLOGIC_BOOT_FIP_INSTALL_DIR)/$(f)
)
cp -rf $(@D)/$(AMLOGIC_BOOT_FIP_DEVICE) $(AMLOGIC_BOOT_FIP_INSTALL_DIR)
endef
# check for empty device string when we're building
ifeq ($(BR2_PACKAGE_HOST_AMLOGIC_BOOT_FIP)$(BR_BUILDING),yy)
ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_AMLOGIC_BOOT_FIP_DEVICE)),)
$(error No device specified for amlogic-boot-fip, please check your BR2_PACKAGE_HOST_AMLOGIC_BOOT_FIP_DEVICE setting)
endif
endif
$(eval $(host-generic-package))