${CC}gcc --version
arm-linux-gnueabihf-gcc (Linaro GCC 5.5-2017.10) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Setup microSD card

For these instruction we are assuming, DISK=/dev/mmcblk0, lsblk is very useful for determining the device id.

export DISK=/dev/mmcblk0

Erase partition table/labels on microSD card:

sudo dd if=/dev/zero of=${DISK} bs=1M count=10

Install Bootloader:

~/

sudo dd if=./u-boot/u-boot-dtb.imx of=${DISK} seek=2 bs=512

Create Partition Layout:With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.

sudo sfdisk --version
sfdisk from util-linux 2.27.1

sfdisk >= 2.26.x

sudo sfdisk ${DISK} <<-__EOF__
1M,,L,*
__EOF__

sfdisk <= 2.25.x

sudo sfdisk --unit M ${DISK} <<-__EOF__
1,,L,*
__EOF__

Format Partition:With mkfs.ext4 1.43, we need to make sure metadata_csum and 64bit are disabled.
As the version of U-Boot needed for this target CAN NOT correctly handle reading files with these newer ext4 options.