| | |
| | | BOARD=imx6ull |
| | | |
| | | # rootfs should be buildroot or stretch/buster/bullseye for debian system |
| | | ROOTFS=buildroot |
| | | ROOTFS=buster |
| | | |
| | | # linux kernel tarball path and branch |
| | | TAR_PATH=${PRJ_PATH}/../tarball |
| | |
| | | } |
| | | |
| | | function do_image() |
| | | { |
| | | mkdir -p ${MNT_POINT} |
| | | { |
| | | mkdir -p ${MNT_POINT} |
| | | |
| | | generate_image |
| | | generate_image |
| | | |
| | | format_partition |
| | | format_partition |
| | | |
| | | install_sysimg |
| | | install_sysimg |
| | | |
| | | install_rootfs |
| | | install_rootfs |
| | | |
| | | msg_banner " bzip2 compress system image " |
| | | bzip2 ${IMAGE_NAME} |
| | |
| | | function do_root() |
| | | { |
| | | echo "" |
| | | if [[ $1 == "yes" ]] && [ `id -u` != 0 ] ; then |
| | | if [[ $1 == "yes" ]] && [ `id -u` != 0 ] ; then |
| | | echo "ERROR: This action must run as root!" |
| | | echo "" |
| | | exit; |
| | | elif [[ $1 != "yes" ]] && [ `id -u` == 0 ] ; then |
| | | elif [[ $1 != "yes" ]] && [ `id -u` == 0 ] ; then |
| | | echo "ERROR: This action cannot run as root!" |
| | | echo "" |
| | | exit; |
| | | fi |
| | | fi |
| | | } |
| | | |
| | | function do_usage() |
| | |
| | | |
| | | while getopts "bch" OPTNAME |
| | | do |
| | | case "${OPTNAME}" in |
| | | "b") |
| | | case "${OPTNAME}" in |
| | | "b") |
| | | break; |
| | | ;; |
| | | ;; |
| | | |
| | | "c") |
| | | "c") |
| | | do_root "yes" |
| | | do_distclean |
| | | ;; |
| | | ;; |
| | | |
| | | "*") |
| | | do_usage |
| | | ;; |
| | | ;; |
| | | esac |
| | | done |
| | | |
| | | do_root "yes" |
| | | do_root "yes" |
| | | do_image |
| | | |