Just wanted to share my attempt to run Debian on the TX1 board. Here it goes:
- I intended to use the net installer which comes as a handy initrd. For the latest release as of this post, it is Jessie and its aarch64 version can be found here:
So next step is finding a way to start the kernel with initrd. The only way I found to do this is to modify the existing method of booting, i.e. through the sysboot u-boot command (bootz failed as described here https://devtalk.nvidia.com/default/topic/915758/jetson-tx1/bootz-command-on-tegratx1-not-working/). The sysboot command is not very clearly documented, or at least I couldn’t find enough info about it, so it was by looking in u-boot source to find this configuration should actually boot:
LABEL primary MENU LABEL debian_net LINUX /boot/Image FDT /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb INITRD /boot/debian/initrd.gz APPEND console=tty0 console=ttyS0,115200n8
Adding this boot entry one has now a chance to select desired boot mode. Right, the downloaded initrd.gz has to be placed on the emmc (path: /boot/debian/initrd.gz).
- Installer menu appears, but soon enough one sees, any useful network interface is missing. An a net installer without net is wrong combination. This was the point I found eth0 has something to do with USB controller, which in turn has something to do with loading a firmware file called “tegra21x_xusb_firmware”. But in the description of how to configure the rootfs of L4T documentation, there is a script called “apply_binaries.sh” which can be applied to an existing rootfs. And why not to the initrd too :)
2.1. So the initrd is unpacked:
Steps according to http://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-img/
# inflate the file gzip -dk initrd.gz mkdir tmp2 cd tmp2/ cpio -id < ../initrd # the expanded rootfs is in /work/tegraTX1/debian/tmp2/ # add binaries to it sudo LDK_ROOTFS_DIR=/work/tegraTX1/debian/tmp2/ ./apply_binaries.sh
NOTE: the script adds many not needed for the moment files that make the image big, but for the purposes of illustration this suffices.
2.2. Repack the initrd
# in tmp2/ find . | cpio --create --format='newc' > ../initrd_mod cd ../ gzip initrd_mod # the file initrd_mod.gz is the final result
- Replace the initrd.gz file and start over. This operation is easy to do with exporting the contents of emmc as a usb storage while in u-boot. Command goes like this:
ums 0 mmc 0
When finished Control^C in the u-boot console.
After starting finally the eth0 appeared:
lqqqqqqqqqqqqqqqqqqqqqu [!!] Configure the network tqqqqqqqqqqqqqqqqqqqqqqk x x x Your system has multiple network interfaces. Choose the one to use as x x the primary network interface during the installation. If possible, x x the first connected network interface found has been selected. x x x x Primary network interface: x x x x dummy0: Unknown interface x x eth0: Ethernet x x ip6tnl0: Unknown interface x x rmnetctl: Unknown interface x x tunl0: Unknown interface x x usb0: USB net x x x x <Go Back> x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
- Install as desired