* [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
* RE: [PATCH v1] env: Fix compile error for envtools
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
0 siblings, 1 reply; 7+ messages in thread
From: Peng Fan (OSS) @ 2026-07-13 10:31 UTC (permalink / raw)
To: Jacky Cao, u-boot@lists.denx.de
Cc: trini@konsulko.com, nora.schiffer@ew.tq-group.com,
Steffen.Doster@tq-group.com, alexander.feilke@ew.tq-group.com,
Max.Merchel@ew.tq-group.com
> Subject: [PATCH v1] env: Fix compile error for envtools
>
> 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'
"#include <linux/types.h>" was already in
arch/arm/include/asm/mach-imx/regs-common.h
Are u using an old tree?
Regards
Peng.
> 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 [flat|nested] 7+ messages in thread
* RE: [PATCH v1] env: Fix compile error for envtools
2026-07-13 10:31 ` Peng Fan (OSS)
@ 2026-07-14 1:35 ` Jacky.Cao
2026-07-14 1:53 ` Tom Rini
0 siblings, 1 reply; 7+ messages in thread
From: Jacky.Cao @ 2026-07-14 1:35 UTC (permalink / raw)
To: Peng Fan (OSS), u-boot@lists.denx.de
Cc: trini@konsulko.com, nora.schiffer@ew.tq-group.com,
Steffen.Doster@tq-group.com, alexander.feilke@ew.tq-group.com,
Max.Merchel@ew.tq-group.com, Jacky.Cao@sony.com
>> 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'
>
>"#include <linux/types.h>" was already in
>arch/arm/include/asm/mach-imx/regs-common.h
>
>Are u using an old tree?
I use master branch of OSS u-boot repo and meet the issue with
below commands:
make mx6qsabrelite_defconfig
make -j8
make tools envtools
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] env: Fix compile error for envtools
2026-07-14 1:35 ` Jacky.Cao
@ 2026-07-14 1:53 ` Tom Rini
2026-07-14 3:04 ` Jacky.Cao
0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2026-07-14 1:53 UTC (permalink / raw)
To: Jacky.Cao@sony.com
Cc: Peng Fan (OSS), u-boot@lists.denx.de,
nora.schiffer@ew.tq-group.com, Steffen.Doster@tq-group.com,
alexander.feilke@ew.tq-group.com, Max.Merchel@ew.tq-group.com
[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]
On Tue, Jul 14, 2026 at 01:35:42AM +0000, Jacky.Cao@sony.com wrote:
> >> 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'
> >
> >"#include <linux/types.h>" was already in
> >arch/arm/include/asm/mach-imx/regs-common.h
> >
> >Are u using an old tree?
>
> I use master branch of OSS u-boot repo and meet the issue with
> below commands:
>
> make mx6qsabrelite_defconfig
> make -j8
> make tools envtools
What host distribution are you building on? And, <config.h> *must* come
first in the include list, for it to function correctly.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v1] env: Fix compile error for envtools
2026-07-14 1:53 ` Tom Rini
@ 2026-07-14 3:04 ` Jacky.Cao
2026-07-14 21:38 ` Tom Rini
0 siblings, 1 reply; 7+ messages in thread
From: Jacky.Cao @ 2026-07-14 3:04 UTC (permalink / raw)
To: Tom Rini
Cc: Peng Fan (OSS), u-boot@lists.denx.de,
nora.schiffer@ew.tq-group.com, Steffen.Doster@tq-group.com,
alexander.feilke@ew.tq-group.com, Max.Merchel@ew.tq-group.com,
Jacky.Cao@sony.com
> > I use master branch of OSS u-boot repo and meet the issue with below
> > commands:
> >
> > make mx6qsabrelite_defconfig
> > make -j8
> > make tools envtools
>
> What host distribution are you building on? And, <config.h> *must* come first
> in the include list, for it to function correctly.
Host OS is Ubuntu 22.04.3 LTS.
Toolchain is Arm GNU Toolchain 11.3.Rel1(arm-none-linux-gnueabihf-).
Also tried Ubuntu 24.04.4 LTS and Arm GNU Toolchain 15.3.Rel1,
the issue still happens.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] env: Fix compile error for envtools
2026-07-14 3:04 ` Jacky.Cao
@ 2026-07-14 21:38 ` Tom Rini
2026-07-15 5:02 ` Jacky.Cao
0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2026-07-14 21:38 UTC (permalink / raw)
To: Jacky.Cao@sony.com
Cc: Peng Fan (OSS), u-boot@lists.denx.de,
nora.schiffer@ew.tq-group.com, Steffen.Doster@tq-group.com,
alexander.feilke@ew.tq-group.com, Max.Merchel@ew.tq-group.com
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
On Tue, Jul 14, 2026 at 03:04:42AM +0000, Jacky.Cao@sony.com wrote:
> > > I use master branch of OSS u-boot repo and meet the issue with below
> > > commands:
> > >
> > > make mx6qsabrelite_defconfig
> > > make -j8
> > > make tools envtools
> >
> > What host distribution are you building on? And, <config.h> *must* come first
> > in the include list, for it to function correctly.
>
> Host OS is Ubuntu 22.04.3 LTS.
> Toolchain is Arm GNU Toolchain 11.3.Rel1(arm-none-linux-gnueabihf-).
> Also tried Ubuntu 24.04.4 LTS and Arm GNU Toolchain 15.3.Rel1,
> the issue still happens.
So, are you on an ARM host too? You aren't specifying where you are /
aren't using the ARM toolchain in the above. Thanks.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v1] env: Fix compile error for envtools
2026-07-14 21:38 ` Tom Rini
@ 2026-07-15 5:02 ` Jacky.Cao
0 siblings, 0 replies; 7+ messages in thread
From: Jacky.Cao @ 2026-07-15 5:02 UTC (permalink / raw)
To: Tom Rini
Cc: Peng Fan (OSS), u-boot@lists.denx.de,
nora.schiffer@ew.tq-group.com, Steffen.Doster@tq-group.com,
alexander.feilke@ew.tq-group.com, Max.Merchel@ew.tq-group.com,
Jacky.Cao@sony.com
>> Host OS is Ubuntu 22.04.3 LTS.
>> Toolchain is Arm GNU Toolchain 11.3.Rel1(arm-none-linux-gnueabihf-).
>> Also tried Ubuntu 24.04.4 LTS and Arm GNU Toolchain 15.3.Rel1, the
>> issue still happens.
>
>So, are you on an ARM host too? You aren't specifying where you are / aren't using the ARM toolchain in the above. Thanks.
Sorry for not explaining it clearly.
Host machine is x86_64 Ubuntu 22.04.3 LTS.
Using arm-none-linux-gnueabihf-gcc 11.3.Rel1 as a cross compiler to build u-boot and envtools for imx6 target.
I also tested on x86_64 Ubuntu 24.04.4 LTS with Arm GNU Toolchain 15.3.Rel1, and the issue still occurs.
^ permalink raw reply [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