intel / lkp-tests

Linux Kernel Performance tests
GNU General Public License v2.0
251 stars 153 forks source link

cross compiler and endianness? #371

Closed joe-lawrence closed 3 months ago

joe-lawrence commented 3 months ago

I'm filing this bug as I have reused the make.cross script for other purposes, but I believe I'm hitting a bug.

To reproduce:

# Create a dummy kernel .config for ppc64le
$ echo -e 'CONFIG_PPC64=y\nCONFIG_CPU_LITTLE_ENDIAN=y\n' > .config

# Run make.cross for powerpc64 little endian
$ COMPILER_INSTALL_PATH=/tmp/0day ./kbuild/make.cross ARCH=powerpc64
Compiler will be installed in /tmp/0day
make: *** No rule to make target 'kernelversion'.  Stop.
Cannot find powerpc64le-linux under https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64 check /tmp/0day-ci-crosstool-files
Please set new URL env variable and rerun
  * crosstool provided by kernel org:
    export URL=https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64
  * crosstool provided by 0-Day CI:
    export URL=https://download.01.org/0day-ci/cross-package
gcc crosstool install failed
Install gcc cross compiler failed
setup_crosstool failed

I believe the problem is that download.01.org provided -endian named tarballs, like x86_64-gcc-13.2.0-nolibc_powerpc64le-linux.tar.xz while cdn.kernel.org does not, only x86_64-gcc-13.2.0-nolibc-powerpc64-linux.tar.xz here.

In the past, I had reused the sbin/make.cross version of the script which pulled from download.01.org. The newer version in kbuild/make.cross pulls from cdn.kernel.org but still contains lots of endian naming.

I'm sure this isn't the intention of the cross-compiler script, but I figured I would the issue in case it occurs in its normal lkp-tests context. LMK if I'm invoking it incorrectly. Thanks.

joe-lawrence commented 3 months ago

Closing this as it may not be considered a "bug". It can be avoided by following the advice to set URL=https://download.01.org/0day-ci/cross-package when running. The default is to use cdn.kernel.org which will hit this problem with endian specific naming, but I'm not sure if this script is intended for stand alone use.