Debian Net-Installer

Hint

NetInstaller installation does no longer work with the current kernel and Debian bullseye.

Note

This guide is just conceptual, to give you an idea how it will work. If you need help feel free to contact support@karo-electronics.de.

Before you start

Connect the power to your Developtment Kit and establish a terminal connection.

Boot the board into U-Boot.

Running Debian Net-Installer

Ramdisk, kernel, devicetree

There are three files you will need to start the net-install:

  • The kernel, e.g. Image

  • The devicetree, e.g. imx8mm-tx8m-1610-mipi-mb.dtb

  • The initram file, e.g. uInitrd (can be obtained from debian net-installer)

Set up a TFTP server and put these three files inside the TFTP servers root directory to access them via TFTP in U-Boot.

Note

Usually you have to convert the initram .img files inside the netinstall archive to fit U-Boot. This is explained at Converting ramdisk .img file for U-Boot. It’s not guaranteed that other versions or systems will work with our module.

Configuring U-Boot

You should now be inside the U-Boot terminal.

Note

When you copy multiple lines of the commands, this might work, but U-Boot can also “swollow” some characters. To avoid this, just copy every single line and run it. You might use an editor to prepare the commands to your needs.

  1. Setting addresses for loading netboot:

setenv kernel_addr_r 0x40480000
setenv fdt_addr_r 0x43000000
setenv ramdisk_addr_r 0x50000000
  1. Loading kernel, ramdisk and dtb:

dhcp
tftpboot ${kernel_addr_r} <nfs-ip>:<subdir>/Image
tftpboot ${fdt_addr_r} <nfs-ip>:<subdir>/imx8mm-tx8m-1610-mipi-mb.dtb
tftpboot ${ramdisk_addr_r} <nfs-ip>:<subdir>/uInitrd

Booting the Installer

Boot the net installer by typing:

booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}

You will be guided through the installation. Make sure to:

  • Install only headless debian with default settings

  • Partition manual with following settings:

|p1,256mb,ext4,mount=/boot
|p2,512mb,swap
|p3,all-space,ext4,mount=/

After installation you will be warned, that there’s no bootloader. This is okay for us, so just keep in mind at which device the installation is and hit [Enter]. The system should boot you back into U-Boot.

Booting your Installation

  1. Set bootargs to boot from eMMC partition:

setenv bootargs 'console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 root=/dev/mmcblk0p3 rootwait rw'
  1. Load kernel and dtb again:

dhcp
tftpboot ${loadaddr} <nfs-ip>:<subdir>/Image
tftpboot ${fdt_addr} <nfs-ip>:<subdir>/imx8mm-tx8m-1610-mipi-mb.dtb
  1. Boot:

booti ${loadaddr} - ${fdt_addr}

Your installation should boot, just login.

Kernel and devicetree into eMMC

  1. Install NFS client and mount your nfs-share:

apt install nfs-common
mount {nfs-ip}:/tftpboot /mnt
  1. Copy kernel and dtb into /boot

cp /mnt/Image /boot/
cp /mnt/imx8mm-tx8m-1610-mipi-mb.dtb /boot/
  1. Reboot your system and fit the U-Boot environment to read kernel and devicetree from emmc to boot.

Installing Desktop

If you wish to install a desktop environment you can have a look at Manual Desktop installation.