All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Alexandru Gagniuc <mr.nuke.me@gmail.com>,
	Andre Przywara <andre.przywara@arm.com>,
	Artem Lapkin <email2tema@gmail.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Karl Beldan <karl.beldan+oss@gmail.com>,
	Naoki Hayama <naoki.hayama@lineo.co.jp>,
	Samuel Holland <samuel@sholland.org>,
	Tim Harvey <tharvey@gateworks.com>
Subject: [PATCH] lz4: Use a private header for U-Boot
Date: Sat,  9 Oct 2021 09:28:21 -0600	[thread overview]
Message-ID: <20211009152821.3487717-1-sjg@chromium.org> (raw)

At present U-Boot has a header file called lz4.h for its own use. If the
host has its own lz4 header file installed (e.g. from the 'liblz4-dev'
package) then host builds will use that instead.

Move the U-Boot file into its own directory, as is done with various
other headers with the same problem.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Here is the azure build

https://dev.azure.com/simon0972/u-boot/_build/results?buildId=9&view=results

 cmd/unlz4.c                | 2 +-
 common/image.c             | 2 +-
 include/{ => u-boot}/lz4.h | 0
 lib/lz4_wrapper.c          | 2 +-
 test/compression.c         | 2 +-
 5 files changed, 4 insertions(+), 4 deletions(-)
 rename include/{ => u-boot}/lz4.h (100%)

diff --git a/cmd/unlz4.c b/cmd/unlz4.c
index 323ab467173..5f20838e899 100644
--- a/cmd/unlz4.c
+++ b/cmd/unlz4.c
@@ -7,7 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
-#include <lz4.h>
+#include <u-boot/lz4.h>
 
 static int do_unlz4(struct cmd_tbl *cmdtp, int flag, int argc,
 		    char *const argv[])
diff --git a/common/image.c b/common/image.c
index 5b77113bea3..3fa60b58279 100644
--- a/common/image.c
+++ b/common/image.c
@@ -61,7 +61,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #include <display_options.h>
 #include <gzip.h>
 #include <image.h>
-#include <lz4.h>
 #include <imximage.h>
 #include <relocate.h>
 #include <linux/lzo.h>
@@ -71,6 +70,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #include <lzma/LzmaDec.h>
 #include <lzma/LzmaTools.h>
 #include <u-boot/crc.h>
+#include <u-boot/lz4.h>
 
 static const table_entry_t uimage_arch[] = {
 	{	IH_ARCH_INVALID,	"invalid",	"Invalid ARCH",	},
diff --git a/include/lz4.h b/include/u-boot/lz4.h
similarity index 100%
rename from include/lz4.h
rename to include/u-boot/lz4.h
diff --git a/lib/lz4_wrapper.c b/lib/lz4_wrapper.c
index cdbcd05bd43..ebcb5c09a22 100644
--- a/lib/lz4_wrapper.c
+++ b/lib/lz4_wrapper.c
@@ -6,10 +6,10 @@
 #include <common.h>
 #include <compiler.h>
 #include <image.h>
-#include <lz4.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <asm/unaligned.h>
+#include <u-boot/lz4.h>
 
 static u16 LZ4_readLE16(const void *src)
 {
diff --git a/test/compression.c b/test/compression.c
index 4cd1be564f3..26d3c80fb5a 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -9,11 +9,11 @@
 #include <gzip.h>
 #include <image.h>
 #include <log.h>
-#include <lz4.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <asm/io.h>
 
+#include <u-boot/lz4.h>
 #include <u-boot/zlib.h>
 #include <bzlib.h>
 
-- 
2.33.0.882.g93a45727a2-goog


             reply	other threads:[~2021-10-09 15:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 15:28 Simon Glass [this message]
2021-10-09 18:57 ` [PATCH] lz4: Use a private header for U-Boot Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211009152821.3487717-1-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=andre.przywara@arm.com \
    --cc=email2tema@gmail.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=karl.beldan+oss@gmail.com \
    --cc=mr.nuke.me@gmail.com \
    --cc=naoki.hayama@lineo.co.jp \
    --cc=samuel@sholland.org \
    --cc=tharvey@gateworks.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.