This guide will show you how to debootstrap Debian Buster on imx8mminievk on a SD-card, but will very likely help you on other systems as well. First you need a Linux installation present on the imx8mminievk.
Follow the Getting Started guide to install a Linux System on the board. In short it is done in the following 5 steps:
Now put the board back in eMMC boot mode   and start up the supplied Linux system. All logins are done with root (no password).
Plug in a SD-card and copy the partition table:
sfdisk -d /dev/mmcblk2 | sfdisk /dev/mmcblk1
Copy data from the boot partition:
dd if=/dev/mmcblk2p1 of=/dev/mmcblk1p1 bs=1M
Resize data partition on the target (SD-card):
echo ",+" | sfdisk -N2 /dev/mmcblk1
Create file system and mount it:
mkfs.ext4 /dev/mmcblk1p2 mkdir /mnt/target mount /dev/mmcblk1p2 /mnt/target
To be able to bootstrap the system we need debootstrap and binutils, (1), (2) available on the system. Use ar to extract the data.tar on another computer (or 7zip if you use Windows), copy the tar-files with scp/winscp onto the board and extract with tar -xf. (Because 7zip/windows cant handle symlinks).
Set up symbolic links for debootstrap, ar and libbfd:
ln -s /home/root/usr/sbin/debootstrap /usr/sbin/ ln -s /home/root/usr/share/debootstrap /usr/share/ ln -s /home/root/usr/bin/ar /usr/bin/ ln -s /home/root/usr/lib/aarch64-linux-gnu/libbfd-2.31.1-system.so /usr/lib/
Start the debootstrap:
debootstrap --arch arm64 buster /mnt/target http://ftp.debian.org/debian
Configuring the target:
#copy mtab (will be overwritten later at restart) cp /etc/mtab /mnt/target/etc/mtab #bind virtual file systems mount -o bind /dev /mnt/target/dev mount -o bind /proc /mnt/target/proc mount -o bind /sys /mnt/target/sys #enter target chroot /mnt/target /bin/bash #set up fstab echo UUID=$(blkid /dev/mmcblk1p2 -o value|head -n1) / ext4 defaults,errors=remount-ro 0 1 > /etc/fstab #put hostname in /etc/hosts sed -i "1 a 127.0.0.1 $(cat /etc/hostname)" /etc/hosts #install sudo apt install sudo #remove root login passwd -d root passwd -l root
#add new user adduser debian
addgroup debian sudo
Install more packages (not necessary):
Exit the chroot:
You're now ready to boot your new Debian installation. Put the card in MicroSD boot mode  . And issue a reboot command:
If everything went smoothly you should now see your system start with Debian Buster. It's also possible to debootstrap Ubuntu or other Debian based systems.
Feel free to comment or ask questions.
I'll soon put up a guide how to build the linux kernel from source.
With inspiration from: HOW-TO: Install Debian using debootstrap.
I followed your steps and after switching to SD boot, the board does not do anything. I see no output on the debug console either. If I switch back to the eMMC boot option the loaded linux image boots successfully. I tried twice to create the sd card without error (besides that I had to unmount some auto-mounted partitions to make sfdisk execute without complaint). But no success so far. Do I have to adjust something else?
thank you for the reply. Yes I am. A FAT boot partiation and a ext4
rootFs partition are definitly create. I have been playing with
RaspberryPI-like device which use the same sd card setup
My normal approach for those devices is to format the sd card (low
level) and use Win32 DiskImager to write preconfigured image onto this
card. This worked always so far.
The approach pointed out in your description was new to me (deboostrap)
but the guide was explained good enough for me to step through it.
Although I must admit, that I do not understand every command :smileyhappy:
Meanwhile I have loaded a binary image of another device which is based
on the iMX8 mini and used my standard approach but even with that sd
card the dev board does nothing but lighting the PWR-LED near the USB
power connector. I double checked the boot switches already. So for the
moment I have no idea what else I could do.
For my current research it would be sufficient to have a Debian running
from eMMC. So is it possible to load such an image into eMMC via the
uuu.exe? I would like to install some apt packages from the regular
debian repository online.
Am 08.11.2019 um 10:28 schrieb andreasgustafsson:
Re: debootstrap Debian Buster on imx8mminievk
reply from Andreas Gustafsson
in /i.MX Processors/ - View the full discussion
Well, found out that /lib/firmware, /lib/modules and lib/modules/4.1xxxx/extra folders were not copied to chroot.
1. Copy missing folders containing qca9377 firmware and the kernel module
2. Fix modprobe dependencies: depmod -A
Then wlan0 appears.