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>
This commit is contained in:
Sebastian Weyer 2023-05-16 17:53:09 +02:00 committed by Romain Naour
parent 6ea2a27f90
commit 5ca8e5a4a7
5 changed files with 56 additions and 0 deletions

View File

@ -2644,6 +2644,7 @@ N: Sam Voss <sam.voss@gmail.com>
F: package/ripgrep/
N: Sebastian Weyer <sebastian.weyer@smile.fr>
F: package/amlogic-boot-fip/
F: package/nushell/
F: support/testing/tests/package/sample_nu.nu
F: support/testing/tests/package/test_nu.py

View File

@ -3,6 +3,7 @@ menu "Host utilities"
source "package/abootimg/Config.in.host"
source "package/aespipe/Config.in.host"
source "package/agent-proxy/Config.in.host"
source "package/amlogic-boot-fip/Config.in.host"
source "package/android-tools/Config.in.host"
source "package/asn1c/Config.in.host"
source "package/babeltrace2/Config.in.host"

View File

@ -0,0 +1,17 @@
config BR2_PACKAGE_HOST_AMLOGIC_BOOT_FIP
bool "host amlogic-boot-fip"
depends on BR2_HOSTARCH = "x86_64"
help
Firmware Image Pacakge (FIP) sources used to sign Amlogic
u-boot binaries in LibreELEC images
https://github.com/LibreELEC/amlogic-boot-fip
config BR2_PACKAGE_HOST_AMLOGIC_BOOT_FIP_DEVICE
string "fip device"
default "khadas-vim3"
depends on BR2_PACKAGE_HOST_AMLOGIC_BOOT_FIP
help
Device for which you want to use this package.
See the list of supported SoCs:
https://github.com/LibreELEC/amlogic-boot-fip

View File

@ -0,0 +1,3 @@
# Locally calculated
sha256 2cc06bc7d5647fd8c0025181fa42c4a8ef0ed16b918a1fa2060ea83c22e47b20 amlogic-boot-fip-e96b6a694380ff07d5a9e4be644ffe254bd18512.tar.gz
sha256 4255537f71b1cd0d487de0fa2b8eddf1eb96ed96d119507336dde8b3782b86e6 LICENSE

View File

@ -0,0 +1,34 @@
################################################################################
#
# 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))