[PATCH] tests: Build correct sandbox configuration on 32bit

Simon Glass sjg at chromium.org
Fri Oct 14 17:56:16 CEST 2022


Hi Michal,

On Thu, 13 Oct 2022 at 14:29, Michal Suchanek <msuchanek at suse.de> wrote:
>
> Currently sandbox configuration defautls to 64bit and there is no
> automation for building 32bit sandbox on 32bit hosts.
>
> cpp does not know about target specification, code needs to be compiled
> to determine integer width.
>
> Add a test program that prints the integer width, and a make target that
> aligns the sandbox configuration with the result.
>
> Signed-off-by: Michal Suchanek <msuchanek at suse.de>
> ---
>
>  Makefile              |  6 ++++++
>  doc/arch/sandbox.rst  | 16 +++++++++++-----
>  test/py/conftest.py   |  1 +
>  tools/Makefile        |  2 ++
>  tools/bits-per-long.c | 14 ++++++++++++++
>  5 files changed, 34 insertions(+), 5 deletions(-)
>  create mode 100644 tools/bits-per-long.c

This needs to be automatic, so that it builds the 32-bit version on
32-bit hosts, 64-bit version on 64-bit hosts.

See here for my attempt. I suspect it just needs your bits_per_long
thing brought in, but in any case I hope it gives you inspiration.

https://patchwork.ozlabs.org/project/uboot/patch/20220123195514.3152022-4-sjg@chromium.org/

Basically we should be able to build sandbox on any platform and it
should just work, without manual configuration.

Regards,
Simon


More information about the U-Boot mailing list