Skip to content

Commit

Permalink
package/hss-payload-generator: add host package dependencies
Browse files Browse the repository at this point in the history
Add lib-yaml and lib-elfutils as host dependencies to build the hss
payload generator tool as part of the buildroot build.
By doing this, there's no need of installing libelf-dev and libyaml-elf
as a system dependency.

Signed-off-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
  • Loading branch information
vfalanis authored and ehristev committed Nov 21, 2022
1 parent 00b0a0a commit 56e8a13
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
29 changes: 29 additions & 0 deletions package/hss-payload-generator/add-support-for-host-includes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From e764765cc9ca9ad5965c72829ceb468a4ff58c66 Mon Sep 17 00:00:00 2001
From: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
Date: Wed, 16 Nov 2022 12:28:21 +0000
Subject: [PATCH] fix(hss-payload-generator): add support for additional host
include files

Update the hss-payload-generator makefile to allow passing additional
include paths as an argument when using the make command

Signed-off-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
---
tools/hss-payload-generator/Makefile | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/hss-payload-generator/Makefile b/tools/hss-payload-generator/Makefile
index 74cac4b..6e1efe5 100644
--- a/tools/hss-payload-generator/Makefile
+++ b/tools/hss-payload-generator/Makefile
@@ -54,6 +54,7 @@ CFLAGS= -g3 -ggdb -std=gnu11 -O3 \
INCLUDES=\
-I. \
-I../../include \
+ $(HOST_INCLUDES)

LIBS=\
-lyaml \
--
2.25.1

3 changes: 2 additions & 1 deletion package/hss-payload-generator/hss-payload-generator.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ HSS_PAYLOAD_GENERATOR_INSTALL_STAGING = NO
HSS_PAYLOAD_GENERATOR_INSTALL_TARGET = YES
HSS_PAYLOAD_GENERATOR_LICENSE = MIT
HSS_PAYLOAD_GENERATOR_LICENSE_FILES = LICENSE.md
HOST_HSS_PAYLOAD_GENERATOR_DEPENDENCIES = host-elfutils host-libyaml

ifeq ($(BR2_PACKAGE_MPFS_AMP_EXAMPLES),y)
HOST_HSS_PAYLOAD_GENERATOR_DEPENDENCIES += uboot mpfs_amp_examples
Expand All @@ -17,7 +18,7 @@ HOST_HSS_PAYLOAD_GENERATOR_DEPENDENCIES += uboot
endif

define HOST_HSS_PAYLOAD_GENERATOR_BUILD_CMDS
$(MAKE) -C $(@D)/tools/hss-payload-generator
$(MAKE) -C $(@D)/tools/hss-payload-generator HOST_INCLUDES=-I$(HOST_DIR)/usr/include/ LDFLAGS=$(HOST_LDFLAGS)

cp $(BR2_PACKAGE_HOST_HSS_PAYLOAD_GENERATOR_SRC) $(@D)/tools/hss-payload-generator/src.bin
( \
Expand Down

0 comments on commit 56e8a13

Please sign in to comment.