8/14/2014 - 12:43 PM



  • binutils - Essential utilities for handling binaries (includes assembler and linker)
  • gcc - The GNU Compiler Collection (the C and C++ compiler)
  • glibc or uclibc or newlib - The system C Library
  • linux-headers - Kernel headers needed by the system C Library
  • gdb - The GNU debugger


crossdev可以编译和安装任意GCC-supported cross toolchain到host主机, 并且安装toolchain文件到target-spcific的目录, 所以不会冲突.

toolchain tuples

  • 所有的toolchain都有一个前缀(think CHOST). 详见: system tuples page
  • GNU config项目给所有已知的系统一个字符串前缀.
  • 规范的格式: machine-vendor-kernel-operating system, ARCH-VENDOR-OS-LIBC许多tuple回来vendor字段, operating system字段的含义也组建扩展到表示userland 和/或 userland ABI.
  • elf表示不用操作系统, 直接运行在硬件.
  • uclinux表示运行在无MMU的硬件上.
  • gnu表示glibc作为系统libc.
  • eabi只在少数嵌入式架构上工作(目前是arm和ppc). 这个表示告诉toolchain生成代码对于较新的Embedded ABI.
  • uclibc字段表示uClibc作为系统libc.
  • crossdev -t help

install a toolchain

  • sudo crossdev -t tuple

install a20 toolchain

  • https://wiki.gentoo.org/wiki/Overlay/Local_overlay
  • mv /etc/portage/package.use /etc/portage/use && mkdir -p /etc/portage/package.use && mv /etc/portage/use /etc/portage/package.use/package.use
  • sudo crossdev -t arm-linux-gnueabihf
  • the point of using a directory is portage will source all files in that directory as if it was a single file. crossdev needs it as a directory to manage a single file it creates. if you later to decide to stop using crossdev, you only need to purge out the created files

emerge world 失败

10:20 aggabee: Akagi201: i'm not 100% sure, but I would try running "crossdev -C arm-linux-gnueabi" to uninstall the cross development toolchain, rerunning the emerge, and then install your cross development toolchain again
10:21 aggabee: Akagi201: as far as I know, the crossdev toolchain shouldn't be updating during a world update
10:22 aggabee: but there might be an update to crossdev and a re-install will help... like i said i'm not 100% sure
10:22 grknight: aggabee: well, you can do --exclude 'cross-arm-linux-gnueabi/*' instead of uninstalling
10:22 grknight: Akagi201: add that to any emerge
10:23 aggabee: grknight: but won't the problem come back next time Akagi201 does a world emerge?
10:24 grknight: aggabee: Akagi201: it will come back, but at least you can update the rest of the system