User:Peter242/Gentoo for LinuxCNC
Gentoo for LinuxCNC
- Boot from ISO
gentoo dolvm dosshd
- Extract stage3
tar jxvf stage3-amd64-20141204.tar.bz2
- Configure a mirror
echo 'GENTOO_MIRRORS="ftp://ftp.utexas.edu/pub/gentoo/ http://ftp.utexas.edu/gentoo/"' >> /mnt/gentoo/etc/portage/make.conf
- Mount
mount /dev/<FIXME> /mnt/gentoo swapon /dev/<FIXME> mount -t proc proc /mnt/gentoo/proc mount --rbind /sys /mnt/gentoo/sys mount --make-rslave /mnt/gentoo/sys mount --rbind /dev /mnt/gentoo/dev mount --make-rslave /mnt/gentoo/dev
- Enter system
chroot /mnt/gentoo /bin/bash source /etc/profile
- Improve MAKE
echo 'MAKEOPTS="-j2"' >> /etc/portage/make.conf
- Do initial emerge fix
emerge-webrsync
- Do full emerge fix
## Upgrade all installed packages, dependencies, and deep dependencies that are outdated or have USE flag changes: emerge -uDN --with-bdeps=y @world
- Install LVM2
emerge sys-fs/lvm2
- Enable LVM2 at boot
rc-update add lvm boot
- Install GRUB
emerge sys-boot/grub
- Install Kernel
emerge sys-kernel/rt-sources
- Build Kernel
cd /usr/src/linux make mrproper cat /etc/kernels/kernel-config-x86_64-3.14.25-rt-rt22 > .config cat <<EOF >> /usr/src/linux/.config CONFIG_PREEMPT=y CONFIG_PREEMPT_RT_BASE=y CONFIG_PREEMPT_RT_FULL=y CONFIG_HIGH_RES_TIMERS=y EOF while true;do echo;done | make oldconfig make -j2 bzImage
- Now emerge normal extras
emerge app-editors/vim sys-boot/grub sys-fs/lvm2 sys-kernel/rt-sources emerge app-misc/screen app-portage/gentoolkit sys-block/parted dev-python/pypy net-misc/dhcpcd net-misc/ntp
- Install dependencies for LinuxCNC compile:
emerge tcl dev-libs/libusb dev-libs/libmodbus tk dev-tcltk/bwidget dev-tcltk/tkimg tclx x11-libs/libXinerama
- Need to recompile Python-2.7 to include TK (LinuxCNC seems to only support Python2)
USE="tk" emerge --newuse python:2.7
- Install Boost
- Either run the following as a one-time event
- MAKEOPTS='-j1' USE='python python_targets=python2_7' emerge dev-libs/boost
- Or configure portage to compile boost according to our specifications
- Either run the following as a one-time event
mkdir -p /etc/portage/env/ cat > /etc/portage/env/boost.conf <<EOF MAKEOPTS="-j1" USE="$USE python python_targets=python2_7" EOF cat >> /etc/portage/package.env <<EOF dev-libs/boost boost.conf EOF
- Fixup the boost library
ln -s /usr/lib64/libboost_python-2.7.so.1.55.0 /usr/lib64/libboost_python.so
- Additional dependency installation
emerge x11-libs/libGLw media-libs/glu