nima
nima

Reputation: 37

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.

Upvotes: 1

Views: 1630

Answers (1)

Filip Kubicz
Filip Kubicz

Reputation: 498

In Buildroot:

  • the machine on which you build is called host. Buildroot downloads and builds host packages, in order to prepare to cross-compilation.
  • machine on which you are going to run your Embedded Linux is called target.

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.

Upvotes: 1

Related Questions