FreeBSD Ports
From RTEMSWiki
There is support in the FreeBSD Ports collection for the RTEMS development tools. This page describes how to use the ports collection.
Questions
- RTEMS maintains RPMs and separate toolchains for each active branch and the CVS head. Does Ports do this?
- These are the vanilla latest autotools and sometimes there are patches associated with the RTEMS ones. Why don't the FreeBSD ports have RTEMS autotools?
Contents |
Install Support for Ports Collection
Install the cvsup utility for synching to the FreeBSD CVS repo.
Packages can also be installed with the /usr/sbin/sysinstall utility under Configure/Packages/. As root:
fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/devel/cvsup-without-gui-16.1h_3.tbz pkg_add ./cvsup-without-gui-16.1h_3.tbz
Start with a template cvsup ports collection configuration file. The default host must be changed to a real mirror such as cvsup2.freebsd.org (the line which begins *default host=CHANGE_THIS.FreeBSD.org)
cp /usr/share/examples/cvsup/ports-supfile /etc vi /etc/ports-supfile
Grab the up to date ports collection. A snapshot > May 12, 2008 is required. Use a different mirror if the "Rejected by server" message appears This may take a while on a slow network connection, especially if /usr/ports was not installed previously.
/usr/local/bin/cvsup /etc/ports-supfile
Build the RTEMS GNU Toolchain
This will install gcc-4.2.3, newlib-1.15.0, gdb-6.7.1 with the RTEMS 4.9 patches applied. arm, i386, i960, m68k, mips, powerpc, sh, and sparc architectures are also supported with FreeBSD ports. The following builds the arm toolset.
cd /usr/ports/devel/arm-rtems-gcc make install (use default options CXX, OBJC) cd /usr/ports/devel/arm-rtems-gdb make install
Install Autotools
NOTE: dependencies such as perl will be installed by these ports.
cd /usr/ports/devel/autoconf261 make install cd /usr/ports/devel/automake110 make install
Things To Watch Out For
BASH Not Being Installed
Mark Fullmer reports running into a bug where if your login shell is zsh and bash is not installed the configure script will not emit the last few lines shown below that indicate that a BSP is available.
target architecture: arm. available BSPs: rtl22xx. 'gmake all' will build the following BSPs: rtl22xx. other BSPs can be built with 'gmake RTEMS_BSP="bsp1 bsp2 ..."'
Later, it will not compile the BSP code in the build process. The workaround is to install bash from ports before trying to build RTEMS.
