How to build ODROID Kernel on Windows 10 WSL?

Moderators: mdrjr, odroid, meveric

How to build ODROID Kernel on Windows 10 WSL?

Unread postby odroid » Tue Apr 03, 2018 3:58 pm

Windows 10 included the Linux bash support as you know well.
Microsoft calls it Windows Subsystem for Linux(WSL).

Because I can't access my Linux PC these days, I tried it to build the recent ODROID-C2 Kernel 3.16 viewtopic.php?f=140&t=29735.
I installed Ubuntu package from Microsoft Store on my Windows laptop.
Everything was smooth since there are tons of guide on the internet.

But, Microsoft WSL doesn't support 32bit binary compatibility yet while the Linaro ARM cross-toolchain supports only 32bit.
So I had to install qemu and binfmt as a workaround. I referred this great guide.
https://github.com/microsoft/wsl/issues ... -374904520

I followed our instruction of Kernel cross-compiling: https://wiki.odroid.com/odroid-c2/softw ... ing_kernel
I could check the cross compiler. So far so good.
Code: Select all
odroid@lee:~/linux$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/opt/toolchains/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/aarch64-linux-gnu-gcc
Target: aarch64-linux-gnu
Configured with: /cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/src/gcc-linaro-4.9-2014.09/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=aarch64-linux-gnu --prefix=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/install --with-sysroot=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/install/aarch64-linux-gnu/libc --enable-languages=c,c++,fortran --disable-multilib --enable-multiarch --with-arch=armv8-a --with-pkgversion='crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --with-gmp=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-mpfr=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-mpc=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-isl=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-cloog=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-libelf=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --enable-threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-plugin --with-local-prefix=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/install/aarch64-linux-gnu/libc --enable-c99 --enable-long-long
Thread model: posix
gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09)


But it failed to build the Kernel.
Code: Select all
odroid@lee:~/linux$ make Image
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/package.h
  HOSTCC  scripts/basic/fixdep
  CC      kernel/bounds.s
aarch64-linux-gnu-gcc: error trying to exec 'cc1': execvp: No such file or directory
Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:956: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2


I will try to fix the problem by tomorrow.
If I can't solve the issue, I will simply install the Virtual-Box. :evil:
User avatar
odroid
Site Admin
 
Posts: 28622
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Return to General Chat

Who is online

Users browsing this forum: No registered users and 1 guest