Tegra/Downstream SW/Gentoo From eMMC

From eLinux.org
Jump to: navigation, search

This explains how to run Gentoo from eMMC. Basically a Gentoo stage3 Tarball can be used instead of the Nvidia L4T rootfs. This tutorial uses the Kernel provided by Nvidia.

Setting up rootfs

  • Download the L4T driver package from Nvidia.
mkdir -p ~/jetson
cd ~/jetson
wget https://developer.nvidia.com/sites/default/files/akamai/mobile/files/L4T/Tegra124_Linux_R19.3.0_armhf.tbz2
tar xvfj Tegra124_Linux_R19.3.0_armhf.tbz2
cd Linux_for_tegra
  • Download stage3 tarball and portage
wget http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3-armv7a_hardfp/ <lastest stage 3>
wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2
cd rootfs
sudo tar xvfj ../<stage 3 tarball name>
cd usr
sudo tar xvfj ../../portage-latest.tar.bz2
cd ../..
  • Install Kernel and drivers (make sure you are in the Linux_for_Tegra directory)
sudo ./apply_binaries.sh
  • Set root password to "gentoo"
sudo $EDITOR rootfs/etc/shadow
  • Set up serial console so we can login via serial console.
sudo $EDITOR rootfs/etc/inittab
s0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt100


  • Use flash.sh to flash the rootfs to eMMC
sudo ./flash.sh -S 8GiB jetson-tk1 mmcblk0p1
  • reboot


  • The nvidia specific upstart scripts in /etc/init will not be executed by OpenRC. These need manual porting to OpenRC
  • It is probably a good idea to move the portage directories to an external drive to avoid wearing off the internal eMMC when building packages
  • Don't use revdep-rebuild (from gentoolkit), as the additional libraries from Nvidia will confuse it