Linux cross-compilation for ARM architecture

后端 未结 7 1328
你的背包
你的背包 2020-12-07 14:40

I am interested in cross-compiling a Linux kernel for an ARM target on a x86 host. Are there some good practices you recommend? Which is the best cross-compile suite in your

7条回答
  •  Happy的楠姐
    2020-12-07 15:23

    If you're using Gentoo, getting a cross-compiling toolchain is as easy as

    $ emerge crossdev
    $ crossdev -t $ARCH-$VENDOR-$OS-$LIBC

    where ARCH is arm or armeb, VENDOR is unknown or softfloat, OS is linux, and LIBC is gnu or uclibc.

    If all you want is a compiler (and linker) for the kernel, the LIBC part is irrelevant, and you can use -s1/--stage1 to inform crossdev that you only need binutils and gcc.

提交回复
热议问题