U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] env: Fix compile error for envtools
@ 2026-07-13  8:31 Jacky Cao
  2026-07-13 10:31 ` Peng Fan (OSS)
  0 siblings, 1 reply; 7+ messages in thread
From: Jacky Cao @ 2026-07-13  8:31 UTC (permalink / raw)
  To: u-boot
  Cc: trini, nora.schiffer, Steffen.Doster, alexander.feilke,
	Max.Merchel, peng.fan, Jacky.Cao

Following error happens when build envtools for mx6qsabrelite.

$ make tools envtools
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  tools/printinitialenv
  GENENV  u-boot-initial-env
  COPY    tools/version.h
  HOSTCC  tools/env/crc32.o
  HOSTCC  tools/env/ctype.o
  HOSTCC  tools/env/env_attr.o
  HOSTCC  tools/env/env_flags.o
In file included from ./arch/arm/include/asm/mach-imx/regs-lcdif.h:16,
                 from ./arch/arm/include/asm/arch/imx-regs.h:371,
                 from include/configs/mx6_common.h:21,
                 from include/configs/nitrogen6x.h:13,
                 from include/config.h:3,
                 from include/env.h:12,
                 from tools/env/../../env/flags.c:7,
                 from tools/env/env_flags.c:1:
./arch/arm/include/asm/mach-imx/regs-common.h:51:9: error: unknown type name 'uint8_t'
   51 |         __mxs_reg_8(reg)
      |         ^~~~~~~~~~~

uint8_t type is defined in linux/types.h header file.
The config.h includes regs-common.h that uses uint8_t type,
to fix this, include config.h after linux/types.h in env.h file.

Fixes: 9f1807e57cbb ("env: add env_set_runtime() helper")

Signed-off-by: Jacky Cao <Jacky.Cao@sony.com>
---
 include/env.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/env.h b/include/env.h
index 9b872fb26eb..dcd017fa5e6 100644
--- a/include/env.h
+++ b/include/env.h
@@ -9,10 +9,10 @@
 #ifndef __ENV_H
 #define __ENV_H
 
-#include <config.h>
 #include <compiler.h>
 #include <stdbool.h>
 #include <linux/types.h>
+#include <config.h>
 
 struct environment_s;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-15  5:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13  8:31 [PATCH v1] env: Fix compile error for envtools Jacky Cao
2026-07-13 10:31 ` Peng Fan (OSS)
2026-07-14  1:35   ` Jacky.Cao
2026-07-14  1:53     ` Tom Rini
2026-07-14  3:04       ` Jacky.Cao
2026-07-14 21:38         ` Tom Rini
2026-07-15  5:02           ` Jacky.Cao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox