#!/bin/bash # Prefer using buildroot host tools for compatible. HOST_DIR="$RK_SDK_DIR/buildroot/output/latest/host" if [ -d "$HOST_DIR" ]; then export PATH=$HOST_DIR/usr/sbin:$HOST_DIR/usr/bin:$HOST_DIR/sbin:$HOST_DIR/bin:$PATH echo "Using host tools in $HOST_DIR (except for mke2fs)" else "$(dirname "$(realpath "$0")")/check-mkimage.sh" fi fatal() { echo -e "FATAL: " $@ exit 1 } usage() { echo ${@:-"Wrong argumants"} echo "Usage: $0 [options] " echo "Options:" echo "-t, --type Filesystem type (default is: ext4)" echo "-s, --size Filesystem size (default is: auto)" echo "-l, --label