Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
51
package/boot/arm-trusted-firmware-tools/Makefile
Normal file
51
package/boot/arm-trusted-firmware-tools/Makefile
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
# Copyright 2021 Daniel Golle
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=arm-trusted-firmware-tools
|
||||
PKG_VERSION:=2.9
|
||||
PKG_RELEASE:=1
|
||||
PKG_HASH:=76a66a1de0c01aeb83dfc7b72b51173fe62c6e51d6fca17cc562393117bed08b
|
||||
|
||||
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||
PKG_HOST_ONLY:=1
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/trusted-firmware-a-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/trusted-firmware-a.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/arm-trusted-firmware-tools
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
TITLE:=ARM Trusted Firmware tools
|
||||
URL:=https://www.trustedfirmware.org
|
||||
BUILDONLY:=1
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
$(MAKE) -C \
|
||||
$(HOST_BUILD_DIR)/tools/fiptool \
|
||||
CPPFLAGS="$(HOST_CFLAGS)" \
|
||||
LDFLAGS="$(HOST_LDFLAGS)"
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/fiptool/fiptool $(STAGING_DIR_HOST)/bin/
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/sptool/sptool.py $(STAGING_DIR_HOST)/bin/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/bin/fiptool
|
||||
rm -f $(STAGING_DIR_HOST)/bin/sptool.py $(STAGING_DIR_HOST)/bin/sptool
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-tools))
|
||||
$(eval $(call HostBuild))
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/tools/fiptool/Makefile
|
||||
+++ b/tools/fiptool/Makefile
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
${PROJECT}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
- ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS}
|
||||
+ ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS} $(LDFLAGS)
|
||||
@${ECHO_BLANK_LINE}
|
||||
@echo "Built $@ successfully"
|
||||
@${ECHO_BLANK_LINE}
|
||||
@@ -0,0 +1,21 @@
|
||||
--- a/tools/fiptool/fiptool.c
|
||||
+++ b/tools/fiptool/fiptool.c
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
-
|
||||
+#define _DARWIN_C_SOURCE
|
||||
#ifndef _MSC_VER
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
@@ -18,6 +18,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+#define uuid_t fiptool_uuid_t
|
||||
|
||||
#include "fiptool.h"
|
||||
#include "tbbr_config.h"
|
||||
Reference in New Issue
Block a user