mipscross-compilingbuildrootmips64

buildroot,how to set the host platform architecture


I want to build a cross compile toolchain by buildroot, the build platform architecture is x86, the host platform architecture is mips, and the target platform architecture is mips64, so how should i configure the buildroot? I can't find configuration options related to the host architecture.

I use Buildroot 2021.05.


Solution

  • In Buildroot:

    So if your target is MIPS, you should select this as target architecture and start the build. Buildroot will be able to figure out the toolchain needed and properly build your Embedded Linux image for the target (kernel, bootloader, rootfs).

    This answer may help if you are building for MIPS: Cross compiling for MIPS router from x86

    You can also build a minimal image using an existing defconfig: For example:

    cd buildroot
    make qemu_mips64r6_malta && make
    

    which will create an image for QEMU with MIPS 64-bit architecture for Malta board.

    I guess your confusion comes from the fact that you have 2 target CPUs that need to run Linux, and you call them host & target. But in buildroot terms, host is the build machine, and target is the embedded board/CPU. You don't need to change host/build machine architecture.