It no problem to use script.
What you need is the common basic knowledge.
Because from the "FB: ucmd mmc partconf ${sd_dev} ${sd_ack} 1 0", know about you have no any knowledge about emmc and sd card as you don't know about the wic.
Here is the script to flash the sdcard. uuu uuu.sd.auto to use it.
uuu.sd.auto
uuu_version 1.2.39
# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
SDP: boot -f imx-boot-imx8mmevk-sd.bin-flash_evk
# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f imx-boot-imx8mmevk-sd.bin-flash_evk
# These commands will be run when use SPL and will be skipped if no spl
# SDPU will be deprecated. please use SDPV instead of SDPU
# {
SDPU: delay 1000
SDPU: write -f imx-boot-imx8mmevk-sd.bin-flash_evk -offset 0x57c00
SDPU: jump
# }
# These commands will be run when use SPL and will be skipped if no spl
# if (SPL support SDPV)
# {
SDPV: delay 1000
SDPV: write -f imx-boot-imx8mmevk-sd.bin-flash_evk -skipspl
SDPV: jump
# }
FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_sd}
FB: ucmd mmc dev ${emmc_sd}
FB: flash -raw2sparse all imx-image-multimedia-imx8mmevk.wic
FB: done
