Tegra/Downstream SW/Gentoo From eMMC

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/ wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2 cd rootfs sudo tar xvfj ../ 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 root:$6$I9Q9AyTL$Z76H7wD8mT9JAyrp/vaYyFwyA5wRVN0tze8pvM.MqScC7BBm2PU7pLL0h5nSxueqUpYAlZTox4Ag2Dp5vchjJ0:14698:0:::::


 * 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

Flashing

 * Use flash.sh to flash the rootfs to eMMC

sudo ./flash.sh -S 8GiB jetson-tk1 mmcblk0p1


 * reboot