Hello Jon.
Under platformconfig -> architecture -> toolchain you have:
(${PTXCONF_GNU_TARGET}-) compiler prefix
(${PTXCONF_COMPILER_PREFIX}) compiler prefix (kernel)
(${PTXCONF_COMPILER_PREFIX}) compiler prefix (bootloader)
Ptxdist allows you to set different compiler prefixes.
Normally this is just the gnu target prefix for all of the build bits.
You'll also need the softlink to the toolchain. Much like the normal
toolchain softlink.
lrwxrwxrwx 1 christianm christianm 82 aug 18 12:14
selected_toolchain ->
/home/christianm/ptxdist/bin/../x-tools/x86_64-secplatform-linux-gnu/bin
lrwxrwxrwx 1 christianm christianm 82 aug 18 12:14
selected_toolchain_kernel ->
/home/christianm/ptxdist/bin/../x-tools/x86_64-secplatform-linux-gnu/bin
But I don't understand why the need to split the builds would arise.
You're bulding a 32-bit x86 userspace for all ptxdist cares. The kernel
is just a blob. Some issues might arise from building x86 on x86, build
env leaks tend to go less noticed and sometime produce more obscure
errors. The build is against the libc and headers.
Your kernel won't care much. It will run on x86_64 and needs to have
ia32 emulation support if you need pure 32-bit binaries. Ptxdist can
build that just fine.
You will need a cross toolchain with a ia32 libc and all userspace
binaries will need to target the same.
I usually use crosstool-ng to produce such odd or specific target
toolchains. I have not tried to produce a toolchain that targets 32-bit
x86 in a while.
Hope this helps somewhat.
Christian
On 8/26/25 6:11 PM, Jon Bird via ptxdist wrote:
> Hello,
>
>
>
> I’m looking for some ideas on how to sensibly go about setting up a
> PTXdist project that requires the kernel to be build using a different
> toolchain. Specifically, the userland component needs to be 32-bit x86
> running on a 64-bit kernel. I can achieve this via a roundabout route of
> building the kernel outside of PTXdist completely, then having a
> dedicated package which copies across the modules onto the rootfs. As an
> approach that’s fine & is probably the path of least resistance however
> ideally, I’d like to then prevent PTXdist from building the kernel
> itself (currently does it for 32-bit) because that’s just a bit
> pointless. Initially tried just de-selecting the Linux kernel from the
> platformconfig menu however that throws an error immediately:
>
>
>
> ptxdist: error: ptxdist-2022.11.0/rules/pre/kernel.make:
> PTXCONF_KERNEL_VERSION is undefined or empty
>
> ptxdist: error: ptxdist-2022.11.0/rules/kernel-checks.make:
> PTXCONF_KERNEL_VERSION is empty
>
> ptxdist: error: ptxdist-2022.11.0/rules/kernel-checks.make: please run
> ptxdist platformconfig and activate the kernel
>
>
>
> The other option of course is whether there is any means of specifying a
> different toolchain for the kernel build, I note there is a “compiler
> prefix (kernel)” option in the platformconfig but that just yields the
> first part of the compiler executable, rather than a complete path to
> where the 64-bit toolchain lives.
>
>
>
> Thanks,
>
>
>
> Jon.
>
> This message and/or attachments may include information subject to
> General Dynamics Corporate and General Dynamics Mission Systems Security
> and/or IT policies and is intended to be accessed only by authorized
> recipients. Use, storage and transmission are governed by General
> Dynamics and its policies. Contractual restrictions apply to third
> parties. Recipients should refer to the applicable policies or contract
> to determine proper handling. Unauthorized review, use, disclosure or
> distribution is prohibited. If you are not an intended recipient, please
> contact the sender and destroy all copies of the original message.
>