diff --git a/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc b/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc index ecbb3255a..d6ae80adf 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc @@ -200,6 +200,8 @@ do_deploy:append() { BOOT_TOOLS = "imx-boot-tools" BOOT_TOOLS:ccmp1 = "u-boot" +FIP_UBOOT_HEADER = "ccmp15-dvk" +FIP_UBOOT_HEADER:ccmp13 = "ccmp13-dvk" do_deploy:append:ccimx8x() { # Move all U-Boot artifacts to the imx-boot-tools folder @@ -233,6 +235,7 @@ do_deploy:append:ccimx8m() { do_deploy:append:ccmp1() { # Deploy u-boot-nodtb.bin and ccmp1x-dvk.dtb, to be packaged in fip binary by tf-a install -d ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${FIP_UBOOT_DTB}-ccmp15-dvk-${FIP_UBOOT_CONFIG}.dtb + install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${FIP_UBOOT_DTB}-${FIP_UBOOT_HEADER}-${FIP_UBOOT_CONFIG}.dtb + install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin } diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt similarity index 100% rename from meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15/install_linux_fw_sd.txt rename to meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_sd.txt diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt similarity index 100% rename from meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15/install_linux_fw_usb.txt rename to meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_usb.txt diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh similarity index 100% rename from meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp15/install_linux_fw_uuu.sh rename to meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp13-dvk/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp13-dvk/boot.txt new file mode 100644 index 000000000..243cc9d4e --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp13-dvk/boot.txt @@ -0,0 +1,81 @@ +# +# U-Boot bootscript for NAND images created by Yocto. +# + +# As the first step in the boot script, check if we are using DualBoot and +# if an upgrade is available. This requires the script to change some variables +# and save them, while the rest of the script changes variables only temporarily +# without saving them. + +# Dual boot update verification +if test "${dualboot}" = "yes"; then + if test "${upgrade_available}" = "1"; then + echo "Update detected; Booting new system in ${active_system} (try ${bootcount})" + else + if test "${active_system}" = "linux_a"; then + echo "Booting from system A" + setenv mtdbootpart ${active_system} + setenv mtdrootfspart ${rootfsvol_a} + setenv rootfsvol ${rootfsvol_a} + else + echo "Booting from system B" + setenv mtdbootpart ${active_system} + setenv mtdrootfspart ${rootfsvol_b} + setenv rootfsvol ${rootfsvol_b} + fi + fi +else + if test "${mtdbootpart}" = "recovery"; then + setenv boot_initrd true + setenv initrd_file uramdisk-recovery.img + else + true + fi +fi + + +# 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 imx6ul-ccimx6ulsbc-id${board_id}.dtb +else + # + # Set device tree filename depending on the hardware variant + # + if test "${module_variant}" = "0x02"; then + setenv fdt_file imx6ul-ccimx6ulsbc-wb.dtb + elif test "${module_variant}" = "0x03"; then + setenv fdt_file imx6ul-ccimx6ulsbc.dtb + elif test "${module_variant}" = "0x04"; then + setenv fdt_file imx6ul-ccimx6ulsbc-wb.dtb + elif test "${module_variant}" = "0x05"; then + setenv fdt_file imx6ul-ccimx6ulsbc.dtb + elif test "${module_variant}" = "0x06"; then + setenv fdt_file imx6ul-ccimx6ulsbc-wb.dtb + elif test "${module_variant}" = "0x07"; then + setenv fdt_file imx6ul-ccimx6ulsbc-wb.dtb + elif test "${module_variant}" = "0x08"; then + setenv fdt_file imx6ul-ccimx6ulsbc-wb.dtb + elif test "${module_variant}" = "0x09"; then + setenv fdt_file imx6ul-ccimx6ulsbc-wb.dtb + elif test "${module_variant}" = "0x0a"; then + setenv fdt_file imx6ul-ccimx6ulsbc.dtb + else + setenv fdt_file imx6ul-ccimx6ulsbc-wb.dtb + fi +fi + +setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs} +dboot linux nand ${mtdbootpart} + + + +# 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