From 9150e5e0f26a1f2908d8ab95c2f82e3ccad423dc Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Wed, 1 Jul 2015 10:31:49 -0700 Subject: [PATCH] cbfs: define libpayload_init_default_cbfs_media weakly To allow a payload to define its own libpayload_init_default_cbfs_media, default implementation needs to be defined weakly. BUG=none BRANCH=tot TEST=dumped a cbfs file from depthcharge cli on jerry Change-Id: Ice73ae5a63dfd49e79c0eeb92d4eade016d61c39 Signed-off-by: Patrick Georgi Original-Commit-Id: 1f308177fffb0d525fdb50f8d024568bb9025352 Original-Change-Id: I4721139aea3169c62c10a2a26582bd9277e4cb83 Original-Signed-off-by: Daisuke Nojiri Original-Reviewed-on: https://chromium-review.googlesource.com/283061 Original-Reviewed-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/10783 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/libpayload/arch/arm/dummy_media.c | 3 ++- payloads/libpayload/arch/arm64/dummy_media.c | 3 ++- payloads/libpayload/arch/mips/dummy_media.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/payloads/libpayload/arch/arm/dummy_media.c b/payloads/libpayload/arch/arm/dummy_media.c index 7926976422..c67344f2eb 100644 --- a/payloads/libpayload/arch/arm/dummy_media.c +++ b/payloads/libpayload/arch/arm/dummy_media.c @@ -36,7 +36,8 @@ int libpayload_init_default_cbfs_media(struct cbfs_media *media); -int libpayload_init_default_cbfs_media(struct cbfs_media *media) +__attribute__((weak)) int libpayload_init_default_cbfs_media( + struct cbfs_media *media) { return -1; } diff --git a/payloads/libpayload/arch/arm64/dummy_media.c b/payloads/libpayload/arch/arm64/dummy_media.c index 7926976422..c67344f2eb 100644 --- a/payloads/libpayload/arch/arm64/dummy_media.c +++ b/payloads/libpayload/arch/arm64/dummy_media.c @@ -36,7 +36,8 @@ int libpayload_init_default_cbfs_media(struct cbfs_media *media); -int libpayload_init_default_cbfs_media(struct cbfs_media *media) +__attribute__((weak)) int libpayload_init_default_cbfs_media( + struct cbfs_media *media) { return -1; } diff --git a/payloads/libpayload/arch/mips/dummy_media.c b/payloads/libpayload/arch/mips/dummy_media.c index 539773dd8e..112d7feec8 100644 --- a/payloads/libpayload/arch/mips/dummy_media.c +++ b/payloads/libpayload/arch/mips/dummy_media.c @@ -35,7 +35,8 @@ int libpayload_init_default_cbfs_media(struct cbfs_media *media); -int libpayload_init_default_cbfs_media(struct cbfs_media *media) +__attribute__((weak)) int libpayload_init_default_cbfs_media( + struct cbfs_media *media) { return -1; }