live media

greetings,

Are there any ‘live’ media that can be used to boot from on the tk1 like we do on laptops?
If so, is there a way to tell the tk1 to boot from sd rather than from emmc.

I’m looking for a way to test different flavors to see how they compare with the built in ubuntu but without the hassle of actually installing them.

U-boot can be told to boot other root file systems on SD card or SATA. This is the limit though, no “live” media exists on CD/DVD in part because the boot loader provides many requirements that a regular PC would have in its BIOS…what a PC or laptop has for providing “standard” boot time hardware query services must be hard coded in firmware files and/or boot loader for most embedded systems.

You can come close by using the existing u-boot and kernel and firmware, e.g., copy the rootfs from the other distribution to an SD card and check the options under the L4T “apply_binaries.sh” script (on your host). The “-r or --root path” option lets you put the Jetson-specific binaries on this alternative rootfs. Then, instead of flashing, you add an edited entry to /boot/extlinux/extlinux.conf, plug in your SD card or SATA drive (the edits point to this), and use serial console to select the alternate boot entry.

One of the reasons this may not be perfect at times is because it runs using the kernel and firmware dtb on the original eMMC, but there is a possibility that your alternative rootfs could depend on a feature not in this kernel. The original Jetson kernel can of course be compiled to work with other features in addition to features it ships with, provided those features actually exist in this kernel (e.g., perhaps a wireless driver exists for a very new kernel but not this kernel because that hardware did not exist until recently…the Grinch kernel exists in part because of the need to back port some popular drivers).

Thanks for your detailed explanation. It’s quite clear.
One last question, I tried to put a sdcard in the slot to see if I could mount it like I would on a laptop but I didn’t see it.
What’s the procedure for using sdcard/usb drive as a secondary storage?

The trick is to know the SD card is named /dev/mmcblk1p1 (the internal root partition is mmcblk0p1). Mounting is otherwise just like any other linux.

E.G., if sdcard is formatted ext4:

mkdir /mnt/sdcard
mount -t ext4 /dev/mmcblk1p1 /mnt/sdcard

U-Boot of L4T R21 boot from SD card if it is inserted and there is /boot/extlinux/extlinx.conf on it.
If it couldn’t boot from SD card, then boot from emmc.

If you can use U-Boot console, you can boot from 2nd partition of SD card with this command:

setenv bootpart 2
boot

These are U-Boot environment variables related to how U-Boot boot.
‘boot’ command is equal to ‘run bootcmd’.
And ‘run bootcmd’ execute commands in environment variable ‘bootcmd’.

boot_targets=mmc1 mmc0 usb0 pxe dhcp 
bootcmd=setenv usb_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_usb0=setenv devnum 0; run usb_boot
bootpart=1
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot; fi
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_extlinux=sysboot ${devtype} ${devnum}:${bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf