# # U-Boot bootscript for EMMC/SD images created by Yocto. # # Back up environment variables setenv ORIG_extra_bootargs ${extra_bootargs} # # Set device tree filename depending on the board ID (if defined) # if test -n "${board_id}"; then setenv fdt_file imx6qp-ccimx6qpsbc-id${board_id}.dtb else # # Set device tree filename depending on the hardware variant # if test "${module_variant}" = "0x01"; then setenv fdt_file imx6qp-ccimx6qpsbc-wb.dtb elif test "${module_variant}" = "0x02"; then setenv fdt_file imx6qp-ccimx6qpsbc-wb.dtb elif test "${module_variant}" = "0x03"; then setenv fdt_file imx6qp-ccimx6qpsbc.dtb else setenv fdt_file imx6qp-ccimx6qpsbc-wb.dtb fi fi # Get the UUID of the configured boot partition. part uuid mmc ${mmcbootdev}:${mmcpart} bootpart # Check the boot source. if test "${bootpart}" = "${part1_uuid}"; then # We are booting from the eMMC using 'linux'. true elif test "${bootpart}" = "${part2_uuid}"; then # We are booting from the eMMC using 'recovery'. setenv boot_initrd true setenv initrd_file uramdisk-recovery.img else # We are booting from the SD card. setenv mmcroot /dev/mmcblk${mmcbootdev}p2 fi setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs} dboot linux mmc ${mmcbootdev}:${mmcpart} # We only get here in case of an error on the dboot command. # Undo changes to environment variables setenv extra_bootargs ${ORIG_extra_bootargs} setenv ORIG_extra_bootargs