Hi, Willy
Here is the powerpc support, includes 32-bit big-endian powerpc, 64-bit little endian and big endian powerpc.
All of them passes run-user with the default powerpc toolchain from Ubuntu 20.04:
$ make run-user DEFCONFIG=tinyconfig XARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- | grep status 165 test(s): 157 passed, 8 skipped, 0 failed => status: warning $ make run-user DEFCONFIG=tinyconfig XARCH=powerpc64 CROSS_COMPILE=powerpc64le-linux-gnu- | grep status 165 test(s): 157 passed, 8 skipped, 0 failed => status: warning $ make run-user DEFCONFIG=tinyconfig XARCH=powerpc64le CROSS_COMPILE=powerpc64le-linux-gnu- | grep status 165 test(s): 157 passed, 8 skipped, 0 failed => status: warning
For the slow 'run' target, I have run with defconfig before, and just verified them via the fast tinyconfig + run with a new patch from next patchset, all of them passes:
165 test(s): 156 passed, 9 skipped, 0 failed => status: warning
Note, the big endian crosstool powerpc64-linux-gcc from https://mirrors.edge.kernel.org/pub/tools/crosstool/ has been used to test both little endian and big endian powerpc64 too, both passed.
Here simply explain what they are:
* tools/nolibc: add support for powerpc tools/nolibc: add support for powerpc64
32-bit & 64-bit powerpc support of nolibc.
* selftests/nolibc: select_null: fix up for big endian powerpc64
fix up a test case for big endian powerpc64.
* selftests/nolibc: add extra config file customize support
add extconfig target to allow enable extra config options via configs/<ARCH>.config
applied suggestion from Thomas to use config files instead of config lines.
* selftests/nolibc: add XARCH and ARCH mapping support
applied suggestions from Willy, use XARCH as the input of our nolibc test, use ARCH as the pure kernel input, at last build the mapping between XARCH and ARCH.
Customize the variables via the input XARCH.
* selftests/nolibc: add test support for powerpc
Require to use extconfig to enable the console options specified in configs/powerpc.config
currently, we should manually run extconfig after defconfig, in next patchset, we will do this automatically.
* selftests/nolibc: add test support for powerpc64le selftests/nolibc: add test support for powerpc64
Very simple, but customize CFLAGS carefully to let them work with powerpc64le-linux-gnu-gcc (from Linux distributions) and powerpc64-linux-gcc (from mirrors.edge.kernel.org)
The next patchset will not be tinyconfig, but some prepare patches, will be sent out soon.
Best regards, Zhangjin ---
Zhangjin Wu (8): tools/nolibc: add support for powerpc tools/nolibc: add support for powerpc64 selftests/nolibc: select_null: fix up for big endian powerpc64 selftests/nolibc: add extra config file customize support selftests/nolibc: add XARCH and ARCH mapping support selftests/nolibc: add test support for powerpc selftests/nolibc: add test support for powerpc64le selftests/nolibc: add test support for powerpc64
tools/include/nolibc/arch-powerpc.h | 170 ++++++++++++++++++ tools/testing/selftests/nolibc/Makefile | 55 ++++-- .../selftests/nolibc/configs/powerpc.config | 3 + tools/testing/selftests/nolibc/nolibc-test.c | 2 +- 4 files changed, 217 insertions(+), 13 deletions(-) create mode 100644 tools/include/nolibc/arch-powerpc.h create mode 100644 tools/testing/selftests/nolibc/configs/powerpc.config