mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 02:24:18 +00:00

Instead of stringizing the paths to binary files, add them as string defines on the command line (e.g. -DFOO=\"BAR\" instead of -DFOO=BAR). This prevents macros from being expanded inside the string value itself. For example, -DFOO=/path/with-linux-in-it would have been expanded to "/path/with-1-in-it" because `linux=1` is one of the standard GCC defines. Change-Id: I7b65df3c9930faed4f1aff75ad726982ae3671e6 Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
22 lines
586 B
C
22 lines
586 B
C
/*
|
|
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
/* convoluted way to make sure that the define is pasted just the right way */
|
|
#define INCBIN(file, sym, sec) \
|
|
__asm__( \
|
|
".section " sec "\n" \
|
|
".global " sym "\n" \
|
|
".type " sym ", %object\n" \
|
|
".align 4\n" \
|
|
sym ":\n" \
|
|
".incbin \"" file "\"\n" \
|
|
".size " sym ", .-" sym "\n" \
|
|
".global " sym "_end\n" \
|
|
sym "_end:\n" \
|
|
)
|
|
|
|
INCBIN(RK3399M0FW, "rk3399m0_bin", ".sram.incbin");
|
|
INCBIN(RK3399M0PMUFW, "rk3399m0pmu_bin", ".pmusram.incbin");
|