Dropping macOS and Windows host tool builds and support in U-Boot
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (fw_printenv / fw_getenv, a few others) to run on macOS or Windows, natively.
I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit 8fbcc0e0e839a8e25f636c76e59311033d3817b5
Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100
boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/
But longer term, unless people say they need and use these tools, I'm inclined to remove them from CI and remove this workaround, for the v2026.04 release.
Signature · 1 line
Tom
Quoted 2 lines
Date: Tue, 2 Dec 2025 12:24:03 -0600
From: Tom Rini <[email protected]>
Hi Tom,
Quoted 29 lines
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>
Quoted 7 lines
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/
Are you sure about this?
The code in boot/image-fdt.c is part of U-Boot itself, not the host tools. As such it should be irrelevant whether the host OS provides memalign() or not; U-Boot provides its own implementation.
OpenBSD doesn't have memalign() either. But I can still build the targets I care about on OpenBSD.
Or is this about sandbox? Did sandbox ever work on macOS?
Quoted 9 lines
But longer term, unless people say they need and use these tools, I'm inclined to remove them from CI and remove this workaround, for the v2026.04 release.
Signature · 3 lines
Tom [2:application/pgp-signature Show Save:signature.asc (228B)]
Quoted 42 lines · Mark Kettenis
Quoted 2 lines
Date: Tue, 2 Dec 2025 12:24:03 -0600
From: Tom Rini <[email protected]>Hi Tom,
Quoted 29 lines
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Quoted 7 lines
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/
Quoted 5 lines
Are you sure about this?
The code in
boot/image-fdt.cis part of U-Boot itself, not the host tools. As such it should be irrelevant whether the host OS providesmemalign()or not; U-Boot provides its own implementation.
We use parts of this code as-is (and some other less obvious files) when building host tools.
Quoted 4 lines
OpenBSD doesn't have
memalign()either. But I can still build the targets I care about on OpenBSD.Or is this about sandbox? Did sandbox ever work on macOS?
It's about "tools-only" build target, but also I suspect that if you try the next branch right now it'll also fail and we'll need to figure something out.
Signature · 1 line
Tom
Quoted 55 lines
Date: Tue, 2 Dec 2025 12:52:22 -0600
From: Tom Rini <[email protected]>Quoted 42 lines · Mark Kettenis
Quoted 2 lines
Date: Tue, 2 Dec 2025 12:24:03 -0600
From: Tom Rini <[email protected]>Hi Tom,
Quoted 29 lines
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Quoted 7 lines
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/Quoted 5 lines
Are you sure about this?
The code in
boot/image-fdt.cis part of U-Boot itself, not the host tools. As such it should be irrelevant whether the host OS providesmemalign()or not; U-Boot provides its own implementation.We use parts of this code as-is (and some other less obvious files) when building host tools.
Quoted 8 lines
Quoted 4 lines
OpenBSD doesn't have
memalign()either. But I can still build the targets I care about on OpenBSD.Or is this about sandbox? Did sandbox ever work on macOS?
It's about "tools-only" build target, but also I suspect that if you try the next branch right now it'll also fail and we'll need to figure something out.
Ah, it is only on the next branch. Yes
In file included from tools/generated/boot/image-fit.c:1:
In file included from ./tools/../boot/image-fit.c:38:
include/malloc.h:824:20: error: conflicting types for 'sbrk'
824 | extern Void_t* sbrk(ptrdiff_t);
| ^
/usr/include/unistd.h:449:7: note: previous declaration is here
449 | void *sbrk(int);
| ^1 error generated.
Which points out another issue with sharing code between U-Boot itself and the host tools this way.
Quoted 74 lines · Mark Kettenis
Quoted 55 lines
Date: Tue, 2 Dec 2025 12:52:22 -0600
From: Tom Rini <[email protected]>Quoted 42 lines · Mark Kettenis
Quoted 2 lines
Date: Tue, 2 Dec 2025 12:24:03 -0600
From: Tom Rini <[email protected]>Hi Tom,
Quoted 29 lines
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Quoted 7 lines
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/Quoted 5 lines
Are you sure about this?
The code in
boot/image-fdt.cis part of U-Boot itself, not the host tools. As such it should be irrelevant whether the host OS providesmemalign()or not; U-Boot provides its own implementation.We use parts of this code as-is (and some other less obvious files) when building host tools.
Quoted 8 lines
Quoted 4 lines
OpenBSD doesn't have
memalign()either. But I can still build the targets I care about on OpenBSD.Or is this about sandbox? Did sandbox ever work on macOS?
It's about "tools-only" build target, but also I suspect that if you try the next branch right now it'll also fail and we'll need to figure something out.
Ah, it is only on the next branch. Yes
In file included from
tools/generated/boot/image-fit.c:1:
In file included from./tools/../boot/image-fit.c:38:
include/malloc.h:824:20: error: conflicting types for 'sbrk'824 | extern Void_t* sbrk(ptrdiff_t); | ^ /usr/include/unistd.h:449:7: note: previous declaration is here 449 | void *sbrk(int); | ^
Quoted 4 lines
1 error generated.
Which points out another issue with sharing code between U-Boot itself and the host tools this way.
Yes, it does. We only kinda-sorta made out OK before this change, and now it's really exposing a few problems. I'd be more inclined to worry about renaming include/malloc.h to include/u-boot/malloc.h (and in turn using <malloc.h> for USE_HOSTCC and <u-boot/malloc.h> normally) to support *BSD than I would be just for macOS / Windows as I do know there are *BSD users out there, along with yourself of course.
Signature · 1 line
Tom
Am 2. Dezember 2025 20:46:21 MEZ schrieb Mark Kettenis <[email protected]>:
Quoted 52 lines
Quoted 52 lines
Date: Tue, 2 Dec 2025 12:52:22 -0600
From: Tom Rini <[email protected]>Quoted 47 lines · Mark Kettenis
Quoted 2 lines
Date: Tue, 2 Dec 2025 12:24:03 -0600
From: Tom Rini <[email protected]>Hi Tom,
Quoted 29 lines
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Quoted 7 lines
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/Are you sure about this?
The code in
boot/image-fdt.cis part of U-Boot itself, not the host tools. As such it should be irrelevant whether the host OS providesmemalign()or not; U-Boot provides its own implementation.
Quoted 5 lines
Quoted 5 lines
We use parts of this code as-is (and some other less obvious files) when building host tools.
Quoted 2 lines
OpenBSD doesn't have
memalign()either. But I can still build the targets I care about on OpenBSD.
We require C11 for building U-Boot. C11 defines function aligned_alloc(). If we add that function in our U-Boot library we can rid of the #ifdef in Tom's patch.
Best regards
Heinrich
Quoted 21 lines
Quoted 6 lines
Quoted 2 lines
Or is this about sandbox? Did sandbox ever work on macOS?
It's about "tools-only" build target, but also I suspect that if you try the next branch right now it'll also fail and we'll need to figure something out.
Ah, it is only on the next branch. Yes
In file included from
tools/generated/boot/image-fit.c:1:
In file included from./tools/../boot/image-fit.c:38:
include/malloc.h:824:20: error: conflicting types for 'sbrk'824 | extern Void_t* sbrk(ptrdiff_t); | ^
/usr/include/unistd.h:449:7: note: previous declaration is here
449 | void *sbrk(int);
| ^
1 error generated.Which points out another issue with sharing code between U-Boot itself and the host tools this way.
Quoted 53 lines · Heinrich Schuchardt
Am 2. Dezember 2025 20:46:21 MEZ schrieb Mark Kettenis <[email protected]>:
Quoted 52 lines
Quoted 52 lines
Date: Tue, 2 Dec 2025 12:52:22 -0600
From: Tom Rini <[email protected]>Quoted 47 lines · Mark Kettenis
Quoted 2 lines
Date: Tue, 2 Dec 2025 12:24:03 -0600
From: Tom Rini <[email protected]>Hi Tom,
Quoted 29 lines
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Quoted 7 lines
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/Are you sure about this?
The code in
boot/image-fdt.cis part of U-Boot itself, not the host tools. As such it should be irrelevant whether the host OS providesmemalign()or not; U-Boot provides its own implementation.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
We use parts of this code as-is (and some other less obvious files) when building host tools.
Quoted 2 lines
OpenBSD doesn't have
memalign()either. But I can still build the targets I care about on OpenBSD.We require C11 for building U-Boot. C11 defines function
aligned_alloc(). If we add that function in our U-Boot library we can rid of the #ifdef in Tom's patch.
If we don't run in to link issues on the host side (a thing I hit a few times when trying alternatives here) then we can, for this file, just define aligned_alloc to memalign as they share syntax. I should have seen that when browsing man pages. I'll give that a try soon for everything, but Mark can you try a quick change there and see if it works on OpenBSD? Thanks everyone!
Signature · 1 line
Tom
Quoted 56 lines
Date: Tue, 02 Dec 2025 21:01:26 +0100
From: Heinrich Schuchardt <[email protected]>Am 2. Dezember 2025 20:46:21 MEZ schrieb Mark Kettenis <[email protected]>:
Quoted 52 lines
Quoted 52 lines
Date: Tue, 2 Dec 2025 12:52:22 -0600
From: Tom Rini <[email protected]>Quoted 47 lines · Mark Kettenis
Quoted 2 lines
Date: Tue, 2 Dec 2025 12:24:03 -0600
From: Tom Rini <[email protected]>Hi Tom,
Quoted 29 lines
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Quoted 7 lines
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/Are you sure about this?
The code in
boot/image-fdt.cis part of U-Boot itself, not the host tools. As such it should be irrelevant whether the host OS providesmemalign()or not; U-Boot provides its own implementation.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
We use parts of this code as-is (and some other less obvious files) when building host tools.
Quoted 2 lines
OpenBSD doesn't have
memalign()either. But I can still build the targets I care about on OpenBSD.We require C11 for building U-Boot. C11 defines function
aligned_alloc(). If we add that function in our U-Boot library we can rid of the #ifdef in Tom's patch.
That should work for OpenBSD. And almost certainly for the other BSDs as well.
Quoted 23 lines
Quoted 21 lines
Quoted 6 lines
Quoted 2 lines
Or is this about sandbox? Did sandbox ever work on macOS?
It's about "tools-only" build target, but also I suspect that if you try the next branch right now it'll also fail and we'll need to figure something out.
Ah, it is only on the next branch. Yes
In file included from
tools/generated/boot/image-fit.c:1:
In file included from./tools/../boot/image-fit.c:38:
include/malloc.h:824:20: error: conflicting types for 'sbrk'824 | extern Void_t* sbrk(ptrdiff_t); | ^
/usr/include/unistd.h:449:7: note: previous declaration is here
449 | void *sbrk(int);
| ^
1 error generated.Which points out another issue with sharing code between U-Boot itself and the host tools this way.
Hi Tom,
Quoted 53 lines · Tom Rini
Quoted 42 lines · Mark Kettenis
Quoted 2 lines
Date: Tue, 2 Dec 2025 12:24:03 -0600
From: Tom Rini <[email protected]>Hi Tom,
Quoted 29 lines
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Quoted 7 lines
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/Quoted 5 lines
Are you sure about this?
The code in
boot/image-fdt.cis part of U-Boot itself, not the host tools. As such it should be irrelevant whether the host OS providesmemalign()or not; U-Boot provides its own implementation.We use parts of this code as-is (and some other less obvious files) when building host tools.
Quoted 8 lines
Quoted 4 lines
OpenBSD doesn't have
memalign()either. But I can still build the targets I care about on OpenBSD.Or is this about sandbox? Did sandbox ever work on macOS?
It's about "tools-only" build target, but also I suspect that if you try the next branch right now it'll also fail and we'll need to figure something out.
If you are interested I would be happy to come up with an alternative.
Regards,
Simon
Quoted 59 lines · Simon Glass
Hi Tom,
Quoted 56 lines · Tom Rini
Quoted 42 lines · Mark Kettenis
Quoted 2 lines
Date: Tue, 2 Dec 2025 12:24:03 -0600
From: Tom Rini <[email protected]>Hi Tom,
Quoted 29 lines
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Quoted 7 lines
Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/Quoted 5 lines
Are you sure about this?
The code in
boot/image-fdt.cis part of U-Boot itself, not the host tools. As such it should be irrelevant whether the host OS providesmemalign()or not; U-Boot provides its own implementation.We use parts of this code as-is (and some other less obvious files) when building host tools.
Quoted 3 lines
OpenBSD doesn't have
memalign()either. But I can still build the targets I care about on OpenBSD.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Or is this about sandbox? Did sandbox ever work on macOS?
It's about "tools-only" build target, but also I suspect that if you try the next branch right now it'll also fail and we'll need to figure something out.
If you are interested I would be happy to come up with an alternative.
I'm not particularly interested in seeing what Claude comes up with, no.
Signature · 1 line
Tom
Quoted 37 lines · Tom Rini
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/
Quoted 3 lines
But longer term, unless people say they need and use these tools, I'm inclined to remove them from CI and remove this workaround, for the v2026.04 release.
We have solved this specific problem without a large work-around. However, the more general question remains. Does anyone use these tools on Windows / macOS?
Signature · 1 line
Tom
Hi Tom,
Quoted 40 lines · Tom Rini
Quoted 37 lines · Tom Rini
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/
Quoted 7 lines
Quoted 3 lines
But longer term, unless people say they need and use these tools, I'm inclined to remove them from CI and remove this workaround, for the v2026.04 release.
We have solved this specific problem without a large work-around. However, the more general question remains. Does anyone use these tools on Windows / macOS?
There are a lot of Mac users, at least.
For Windows, mkimage is used by the EDK2 people (Universal Payload). It might be some years before they switch to Linux. Even if Microsoft decides to switch out their kernel, I suspect the 'power shell' will still remain.
Regards,
Simon
Quoted 48 lines · Simon Glass
Hi Tom,
Quoted 44 lines · Tom Rini
Quoted 40 lines · Tom Rini
Hey all,
I am wondering if at this point in time, anyone still builds our host tools (
fw_printenv/fw_getenv, a few others) to run on macOS or Windows, natively.I ask for two reasons. The first of which is that a reason we still have to support Azure (despite its slowness) for CI is it's where we have macOS and Windows hosts. But at this point in time there's so many ways to have Linux userspace running on Windows or macOS that I don't know that there's any value to these builds.
The second reason is more macOS specific and is that with:
commit
8fbcc0e0e839a8e25f636c76e59311033d3817b5Author: Marek Vasut <[email protected]> Date: Thu Nov 13 12:54:51 2025 +0100boot: Assure FDT is always at 8-byte aligned address
The fitImage may contain FDT at 4-byte aligned address, because alignment of DT tags is 4 bytes. However, libfdt and also Linux expects DT to be at 8-byte aligned address. Make sure that the DTs embedded in fitImages are always used from 8-byte aligned addresses. In case the DT is decompressed, make sure the target buffer is 8-byte aligned. In case the DT is only loaded, make sure the target buffer is 8-byte aligned too.
Signed-off-by Marek Vasut <[email protected]>Which does things we must do, we now don't build on macOS. Why? As best I can tell (and for a general purpose OS, is a good call), memalign(..) doesn't exist and you need to use
posix_memalign, a not drop-in replacement. We could spend some time reworking the code here for that, but for now I've instead gone with this workaround so that CI can continue:
https://lore.kernel.org/u-boot/[email protected]/But longer term, unless people say they need and use these tools, I'm inclined to remove them from CI and remove this workaround, for the v2026.04 release.
Quoted 5 lines
Quoted 3 lines
We have solved this specific problem without a large work-around. However, the more general question remains. Does anyone use these tools on Windows / macOS?
There are a lot of Mac users, at least.
Where do you get that data? Are they a lot of Mac users building natively on MacOS or in Linux on Mac.
MacOS 26 adds support for native containers running Linux, I think that this is likely the better way for us to support those tools on Mac.
Quoted 4 lines
For Windows, mkimage is used by the EDK2 people (Universal Payload). It might be some years before they switch to Linux. Even if Microsoft decides to switch out their kernel, I suspect the 'power shell' will still remain.
How is mkimage used by EDK2 and in what way is it used on Windows, can you provide a link to documentation?
Windows has WSL2, which has been around longer than the Mac equivalent.
Can you explain the value that native build support brings over supporting Linux in those subsystems on those OSes?
Peter