On 10/14/22 17:56, Simon Glass wrote:
Hi Michal,
On Thu, 13 Oct 2022 at 14:29, Michal Suchanek <msucha...@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 <msucha...@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.
We should be able to test the following:
* 64bit phys_addr_t on ilp32.
* 32bit phys_addr_t on ilp32.
* 64bit phys_addr_t on lp64.
Gitlab CI currently tests:
* 64bit phys_addr_t on lp64.
* 32bit phys_addr_t on lp64.
Best regards
Heinrich
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-...@chromium.org/
Basically we should be able to build sandbox on any platform and it
should just work, without manual configuration.
Regards,
Simon