* [PATCH 1/2] sandbox: symlink stickypage.bin into build directory
@ 2022-02-07 7:56 Ahmad Fatoum
2022-02-07 7:56 ` [PATCH 2/2] compiler: fix __attribute__((format(printf, sandbox incompatibility Ahmad Fatoum
2022-02-07 8:09 ` [PATCH 1/2] sandbox: symlink stickypage.bin into build directory Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2022-02-07 7:56 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Sandbox will try to access a stickypage.bin in the same directory if
possible. Instead of relying on users to copy it there, just create a
symlink.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
.gitignore | 1 +
arch/sandbox/Makefile | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/.gitignore b/.gitignore
index d551a610d4c0..0382202bf716 100644
--- a/.gitignore
+++ b/.gitignore
@@ -90,3 +90,4 @@ GTAGS
/allrandom.config
/allyes.config
/compile_commands.json
+/stickypage.bin
diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index 2cf51fa34917..aee6bccc9c14 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -74,6 +74,12 @@ cmd_barebox__ = $(CC) -o $@ $(BAREBOX_LDFLAGS)
common-y += $(BOARD) arch/sandbox/os/ arch/sandbox/lib/
+stickypage.bin:
+ @$(kecho) " LN stickypage.bin"
+ @ln -fs arch/sandbox/board/stickypage.bin stickypage.bin
+
+KBUILD_IMAGE := barebox stickypage.bin
+
common-$(CONFIG_OFTREE) += arch/sandbox/dts/
CLEAN_FILES += $(BOARD)/barebox.lds
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] compiler: fix __attribute__((format(printf, sandbox incompatibility
2022-02-07 7:56 [PATCH 1/2] sandbox: symlink stickypage.bin into build directory Ahmad Fatoum
@ 2022-02-07 7:56 ` Ahmad Fatoum
2022-02-07 8:09 ` [PATCH 1/2] sandbox: symlink stickypage.bin into build directory Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2022-02-07 7:56 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
On sandbox, we define printf to barebox_printf for the non-sandbox
specific parts to avoid clashing with the libc-provided symbol. This is
substituted into the definition of __printf, leading to
test/self/printf.c:37:1: warning: ‘barebox_printf’ is an
unrecognized format function type [-Wformat=]
Avoid this by using the equivalent reserved keyword, which doesn't
clash. While at it, be a little future proof and do the same for scanf
as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/linux/compiler_types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 9a5a6f0e8b17..aa9cbcac7740 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -201,8 +201,8 @@ struct ftrace_likely_data {
#define __pure __attribute__((pure))
#define __aligned(x) __attribute__((aligned(x)))
#define __aligned_largest __attribute__((aligned))
-#define __printf(a, b) __attribute__((format(printf, a, b)))
-#define __scanf(a, b) __attribute__((format(scanf, a, b)))
+#define __printf(a, b) __attribute__((format(__printf__, a, b)))
+#define __scanf(a, b) __attribute__((format(__scanf__, a, b)))
#define __maybe_unused __attribute__((unused))
#define __always_unused __attribute__((unused))
#define __mode(x) __attribute__((mode(x)))
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] sandbox: symlink stickypage.bin into build directory
2022-02-07 7:56 [PATCH 1/2] sandbox: symlink stickypage.bin into build directory Ahmad Fatoum
2022-02-07 7:56 ` [PATCH 2/2] compiler: fix __attribute__((format(printf, sandbox incompatibility Ahmad Fatoum
@ 2022-02-07 8:09 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2022-02-07 8:09 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Mon, Feb 07, 2022 at 08:56:03AM +0100, Ahmad Fatoum wrote:
> Sandbox will try to access a stickypage.bin in the same directory if
> possible. Instead of relying on users to copy it there, just create a
> symlink.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> .gitignore | 1 +
> arch/sandbox/Makefile | 6 ++++++
> 2 files changed, 7 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/.gitignore b/.gitignore
> index d551a610d4c0..0382202bf716 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -90,3 +90,4 @@ GTAGS
> /allrandom.config
> /allyes.config
> /compile_commands.json
> +/stickypage.bin
> diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
> index 2cf51fa34917..aee6bccc9c14 100644
> --- a/arch/sandbox/Makefile
> +++ b/arch/sandbox/Makefile
> @@ -74,6 +74,12 @@ cmd_barebox__ = $(CC) -o $@ $(BAREBOX_LDFLAGS)
>
> common-y += $(BOARD) arch/sandbox/os/ arch/sandbox/lib/
>
> +stickypage.bin:
> + @$(kecho) " LN stickypage.bin"
> + @ln -fs arch/sandbox/board/stickypage.bin stickypage.bin
> +
> +KBUILD_IMAGE := barebox stickypage.bin
> +
> common-$(CONFIG_OFTREE) += arch/sandbox/dts/
>
> CLEAN_FILES += $(BOARD)/barebox.lds
> --
> 2.30.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-07 8:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07 7:56 [PATCH 1/2] sandbox: symlink stickypage.bin into build directory Ahmad Fatoum
2022-02-07 7:56 ` [PATCH 2/2] compiler: fix __attribute__((format(printf, sandbox incompatibility Ahmad Fatoum
2022-02-07 8:09 ` [PATCH 1/2] sandbox: symlink stickypage.bin into build directory Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox