OS installation using Petitboot and USB OTG

Petitboot

Petitboot is a platform-independent bootloader based on the Linux kexec warm reboot mechanism. Petitboot supports loading kernel, initrd, and device tree files from any Linux mountable filesystem, plus can it can load files from the network using the FTP, SFTP, TFTP, NFS, HTTP, and HTTPS protocols.

Thread to port Petitboot into ODROID-N2

Version check

To check your Petitboot version, toggle the boot mode switch to SPI boot mode and turn on the ODROID-N2.

odroid_n2_spi_switch.jpg

petitboot.jpg

If your Petitboot version is lower than dev.20191127, please refer to How to Recover or Upgrade for steps to preform a petitboot upgrade.

OS installation

This configuration will allow for OS installation directly to the memory (eMMC or uSD) on the ODROID-N2 from a PC over USB to the N2’s OTG port.


pc_to_odroid_n2_emmc_real.jpg

Select Exit to shell.

petitboot_exit_to_shell.jpg

List all storage device nodes with a name starting with “mmc”.

ls /dev/mmc*

Set the storage device on the ODROID-N2 as a mass storage device using ‘ums’ (USB Mass Storage mode). This allows the ODROID-N2 and OTG to act as a memory card reader.

ODROID-N2 and OTG act like a memory card reader.

ums <the device node of storage>

petitboot_ums.jpg

Wait for memory detection on your PC.

When the memory is detected, the host PC recognizes your N2 as a USB card reader.

Therefore, to flash OS image into memory, refer to OS installation guide, except for some that use a memory card reader.

When done, press Ctrl + Alt + Delete, and boot the installed OS. See the OS section below.

OS Booting

  1. Power off ODROID
  2. Toggle the boot mode switch to MMC boot mode
  3. Power on ODROID
  1. Power off ODROID
  2. Toggle the boot mode switch to SPI boot mode
  3. Power on ODROID
  4. Select 'Rescan devices'
  5. Select boot partition

Set autoboot

  1. Select 'Rescan devices'
  2. Select 'System configuration'
    1. Set 'Autoboot' (*) Enabled
    2. Set 'Boot Order'
      1. Clear
      2. Add Device
    3. Set 'Timeout' (10 seconds or more recommended)
    4. OK
  3. Press Ctrl + Alt + Delete

petitboot_autoboot_setup.jpg