diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/boot.txt index 5dedaa36d..fe794d0c6 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/boot.txt @@ -2,28 +2,10 @@ # 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 +# 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 @@ -90,6 +72,31 @@ else setenv mmcroot /dev/mmcblk${mmcbootdev}p2 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 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 + setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs} dboot linux mmc ${mmcbootdev}:${mmcpart} diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/boot.txt index 12b927abd..a88f10150 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/boot.txt @@ -2,56 +2,10 @@ # 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 ${soc_family}-ccimx6sbc-id${board_id}.dtb -else - # - # Set device tree filename depending on the hardware variant - # - if test "${module_variant}" = "0x02"; then - setenv fdt_file imx6q-ccimx6sbc-wb.dtb - elif test "${module_variant}" = "0x03"; then - setenv fdt_file imx6q-ccimx6sbc-wb.dtb - elif test "${module_variant}" = "0x04"; then - setenv fdt_file imx6q-ccimx6sbc-wb.dtb - elif test "${module_variant}" = "0x05"; then - setenv fdt_file imx6q-ccimx6sbc-w.dtb - elif test "${module_variant}" = "0x06"; then - setenv fdt_file imx6q-ccimx6sbc-wb.dtb - elif test "${module_variant}" = "0x08"; then - setenv fdt_file imx6q-ccimx6sbc.dtb - elif test "${module_variant}" = "0x0a"; then - setenv fdt_file imx6dl-ccimx6sbc-w.dtb - elif test "${module_variant}" = "0x0b"; then - setenv fdt_file imx6dl-ccimx6sbc-wb.dtb - elif test "${module_variant}" = "0x0c"; then - setenv fdt_file imx6dl-ccimx6sbc.dtb - elif test "${module_variant}" = "0x0e"; then - setenv fdt_file imx6q-ccimx6sbc.dtb - elif test "${module_variant}" = "0x0f"; then - setenv fdt_file imx6q-ccimx6sbc.dtb - elif test "${module_variant}" = "0x11"; then - setenv fdt_file imx6q-ccimx6sbc-wb.dtb - elif test "${module_variant}" = "0x12"; then - setenv fdt_file imx6q-ccimx6sbc-wb.dtb - elif test "${module_variant}" = "0x13"; then - setenv fdt_file imx6dl-ccimx6sbc-wb.dtb - elif test "${module_variant}" = "0x14"; then - setenv fdt_file imx6q-ccimx6sbc.dtb - elif test "${module_variant}" = "0x15"; then - setenv fdt_file imx6dl-ccimx6sbc.dtb - elif test "${module_variant}" = "0x16"; then - setenv fdt_file imx6q-ccimx6sbc-wb.dtb - else - setenv fdt_file imx6q-ccimx6sbc-wb.dtb - fi -fi +# 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 @@ -118,6 +72,59 @@ else setenv mmcroot /dev/mmcblk${mmcbootdev}p2 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 ${soc_family}-ccimx6sbc-id${board_id}.dtb +else + # + # Set device tree filename depending on the hardware variant + # + if test "${module_variant}" = "0x02"; then + setenv fdt_file imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x03"; then + setenv fdt_file imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x04"; then + setenv fdt_file imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x05"; then + setenv fdt_file imx6q-ccimx6sbc-w.dtb + elif test "${module_variant}" = "0x06"; then + setenv fdt_file imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x08"; then + setenv fdt_file imx6q-ccimx6sbc.dtb + elif test "${module_variant}" = "0x0a"; then + setenv fdt_file imx6dl-ccimx6sbc-w.dtb + elif test "${module_variant}" = "0x0b"; then + setenv fdt_file imx6dl-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x0c"; then + setenv fdt_file imx6dl-ccimx6sbc.dtb + elif test "${module_variant}" = "0x0e"; then + setenv fdt_file imx6q-ccimx6sbc.dtb + elif test "${module_variant}" = "0x0f"; then + setenv fdt_file imx6q-ccimx6sbc.dtb + elif test "${module_variant}" = "0x11"; then + setenv fdt_file imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x12"; then + setenv fdt_file imx6q-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x13"; then + setenv fdt_file imx6dl-ccimx6sbc-wb.dtb + elif test "${module_variant}" = "0x14"; then + setenv fdt_file imx6q-ccimx6sbc.dtb + elif test "${module_variant}" = "0x15"; then + setenv fdt_file imx6dl-ccimx6sbc.dtb + elif test "${module_variant}" = "0x16"; then + setenv fdt_file imx6q-ccimx6sbc-wb.dtb + else + setenv fdt_file imx6q-ccimx6sbc-wb.dtb + fi +fi + setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs} dboot linux mmc ${mmcbootdev}:${mmcpart} diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/boot.txt index 9d931bd24..9b45affa5 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/boot.txt @@ -2,40 +2,10 @@ # U-Boot bootscript for NAND 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 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 +# 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 @@ -81,6 +51,43 @@ 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} diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/boot.txt index fab05eb51..3fe58e274 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/boot.txt @@ -2,40 +2,10 @@ # U-Boot bootscript for NAND 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 imx6ul-ccimx6ulstarter-id${board_id}.dtb -else - # - # Set device tree filename depending on the hardware variant - # - if test "${module_variant}" = "0x02"; then - setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb - elif test "${module_variant}" = "0x03"; then - setenv fdt_file imx6ul-ccimx6ulstarter.dtb - elif test "${module_variant}" = "0x04"; then - setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb - elif test "${module_variant}" = "0x05"; then - setenv fdt_file imx6ul-ccimx6ulstarter.dtb - elif test "${module_variant}" = "0x06"; then - setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb - elif test "${module_variant}" = "0x07"; then - setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb - elif test "${module_variant}" = "0x08"; then - setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb - elif test "${module_variant}" = "0x09"; then - setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb - elif test "${module_variant}" = "0x0a"; then - setenv fdt_file imx6ul-ccimx6ulstarter.dtb - else - setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb - fi -fi +# 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 @@ -81,6 +51,43 @@ 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-ccimx6ulstarter-id${board_id}.dtb +else + # + # Set device tree filename depending on the hardware variant + # + if test "${module_variant}" = "0x02"; then + setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb + elif test "${module_variant}" = "0x03"; then + setenv fdt_file imx6ul-ccimx6ulstarter.dtb + elif test "${module_variant}" = "0x04"; then + setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb + elif test "${module_variant}" = "0x05"; then + setenv fdt_file imx6ul-ccimx6ulstarter.dtb + elif test "${module_variant}" = "0x06"; then + setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb + elif test "${module_variant}" = "0x07"; then + setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb + elif test "${module_variant}" = "0x08"; then + setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb + elif test "${module_variant}" = "0x09"; then + setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb + elif test "${module_variant}" = "0x0a"; then + setenv fdt_file imx6ul-ccimx6ulstarter.dtb + else + setenv fdt_file imx6ul-ccimx6ulstarter-wb.dtb + fi +fi + setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs} dboot linux nand ${mtdbootpart} diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mm-dvk/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mm-dvk/boot.txt index 1513df9e9..121b71e07 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mm-dvk/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mm-dvk/boot.txt @@ -2,44 +2,10 @@ # U-Boot bootscript for EMMC/SD images created by Yocto. # -# Back up environment variables -setenv ORIG_overlays ${overlays} -setenv ORIG_extra_bootargs ${extra_bootargs} - -# Set SOC type to "imx8mm" if not already defined by U-Boot -if test ! -n "${soc_type}"; then - setenv soc_type "imx8mm" -fi - -# Reset overlays when using dualboot mode, because we need to -# save the environment in case of an installation fall back. -if test "${dual_boot}" = "yes"; then - if test -n "${overlays}"; then - setenv overlays - fi -fi - -# -# Determine overlays to apply depending on the hardware capabilities -# described by the HWID, SOM version, and carrier board version. -# -if test -n "${module_ram}"; then - setexpr som_hv ${hwid_2} \& 38 - setexpr som_hv ${som_hv} / 8 - - setexpr module_has_wifi ${hwid_2} \& 10000 - setexpr module_has_wifi ${module_has_wifi} / 10000 - setexpr module_has_bt ${hwid_2} \& 20000 - setexpr module_has_bt ${module_has_bt} / 20000 - - if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then - setenv overlays _ov_som_bt_ccimx8m.dtbo,${overlays} - fi - - if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then - setenv overlays _ov_som_wifi_ccimx8m.dtbo,${overlays} - fi -fi +# 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 @@ -106,6 +72,39 @@ else setenv mmcroot /dev/mmcblk${mmcbootdev}p2 fi fi + + +# Back up environment variables +setenv ORIG_overlays ${overlays} +setenv ORIG_extra_bootargs ${extra_bootargs} + +# Set SOC type to "imx8mm" if not already defined by U-Boot +if test ! -n "${soc_type}"; then + setenv soc_type "imx8mm" +fi + +# +# Determine overlays to apply depending on the hardware capabilities +# described by the HWID, SOM version, and carrier board version. +# +if test -n "${module_ram}"; then + setexpr som_hv ${hwid_2} \& 38 + setexpr som_hv ${som_hv} / 8 + + setexpr module_has_wifi ${hwid_2} \& 10000 + setexpr module_has_wifi ${module_has_wifi} / 10000 + setexpr module_has_bt ${hwid_2} \& 20000 + setexpr module_has_bt ${module_has_bt} / 20000 + + if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then + setenv overlays _ov_som_bt_ccimx8m.dtbo,${overlays} + fi + + if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then + setenv overlays _ov_som_wifi_ccimx8m.dtbo,${overlays} + fi +fi + setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs} dboot linux mmc ${mmcbootdev}:${mmcpart} diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt index 7b7df5917..f39b8cfc5 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt @@ -2,53 +2,10 @@ # U-Boot bootscript for EMMC/SD images created by Yocto. # -# Back up environment variables -setenv ORIG_overlays ${overlays} -setenv ORIG_extra_bootargs ${extra_bootargs} - -# Set SOC type to "imx8mn" if not already defined by U-Boot -if test ! -n "${soc_type}"; then - setenv soc_type "imx8mn" -fi - -# Reset overlays when using dualboot mode, because we need to -# save the environment in case of an installation fall back. -if test "${dual_boot}" = "yes"; then - if test -n "${overlays}"; then - setenv overlays - fi -fi - -# -# Determine overlays to apply depending on the hardware capabilities -# described by the HWID, SOM version, and carrier board version. -# -if test -n "${module_ram}"; then - setexpr som_hv ${hwid_2} \& 38 - setexpr som_hv ${som_hv} / 8 - - setexpr module_has_wifi ${hwid_2} \& 10000 - setexpr module_has_wifi ${module_has_wifi} / 10000 - setexpr module_has_bt ${hwid_2} \& 20000 - setexpr module_has_bt ${module_has_bt} / 20000 - - if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then - setenv overlays _ov_som_bt_ccimx8m.dtbo,${overlays} - fi - - if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then - setenv overlays _ov_som_wifi_ccimx8m.dtbo,${overlays} - fi - - if test "${som_hv}" = "1"; then - setenv overlays _ov_som_v1_ccimx8mn.dtbo,${overlays} - fi -fi - -# Apply DVK v1-v2 overlay if the board version is < 3 -if test "${board_version}" -lt "3"; then - setenv overlays _ov_board_v1-v2_ccimx8mn-dvk.dtbo,${overlays} -fi +# 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 @@ -68,7 +25,7 @@ if test "${dualboot}" = "yes"; then else part number mmc ${mmcbootdev} linux_a pi setenv mmcpart ${pi} - # Save the partition index on variable rootfs_b_index + # Save the partition index on variable rootfs_a_index part number mmc ${mmcbootdev} rootfs_a rootfs_a_index # Save the rootfs_a UUID into mmcroot_a part uuid mmc ${mmcbootdev}:${rootfs_a_index} mmcroot_a @@ -115,6 +72,48 @@ else setenv mmcroot /dev/mmcblk${mmcbootdev}p2 fi fi + + +# Back up environment variables +setenv ORIG_overlays ${overlays} +setenv ORIG_extra_bootargs ${extra_bootargs} + +# Set SOC type to "imx8mn" if not already defined by U-Boot +if test ! -n "${soc_type}"; then + setenv soc_type "imx8mn" +fi + +# +# Determine overlays to apply depending on the hardware capabilities +# described by the HWID, SOM version, and carrier board version. +# +if test -n "${module_ram}"; then + setexpr som_hv ${hwid_2} \& 38 + setexpr som_hv ${som_hv} / 8 + + setexpr module_has_wifi ${hwid_2} \& 10000 + setexpr module_has_wifi ${module_has_wifi} / 10000 + setexpr module_has_bt ${hwid_2} \& 20000 + setexpr module_has_bt ${module_has_bt} / 20000 + + if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then + setenv overlays _ov_som_bt_ccimx8m.dtbo,${overlays} + fi + + if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then + setenv overlays _ov_som_wifi_ccimx8m.dtbo,${overlays} + fi + + if test "${som_hv}" = "1"; then + setenv overlays _ov_som_v1_ccimx8mn.dtbo,${overlays} + fi +fi + +# Apply DVK v1-v2 overlay if the board version is < 3 +if test "${board_version}" -lt "3"; then + setenv overlays _ov_board_v1-v2_ccimx8mn-dvk.dtbo,${overlays} +fi + setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs} dboot linux mmc ${mmcbootdev}:${mmcpart} diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt index b99b3378b..836310230 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt @@ -2,56 +2,10 @@ # U-Boot bootscript for EMMC/SD images created by Yocto. # -# Back up environment variables -setenv ORIG_overlays ${overlays} -setenv ORIG_extra_bootargs ${extra_bootargs} - -# Set SOC type to "imx8qxp" if not already defined by U-Boot -if test ! -n "${soc_type}"; then - setenv soc_type "imx8qxp" -fi - -# Reset overlays when using dualboot mode, because we need to -# save the environment in case of an installation fall back. -if test "${dual_boot}" = "yes"; then - if test -n "${overlays}"; then - setenv overlays - fi -fi - -# -# Determine overlays to apply depending on the hardware capabilities -# described by the HWID, SOM version, and carrier board version. -# -if test -n "${module_ram}"; then - setexpr module_has_wifi ${hwid_3} \& 1 - setexpr module_has_bt ${hwid_3} \& 2 - setexpr module_has_bt ${module_has_bt} / 2 - - if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then - setenv overlays _ov_som_bt_ccimx8x.dtbo,${overlays} - fi - - if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then - setenv overlays _ov_som_wifi_ccimx8x.dtbo,${overlays} - fi -else - # - # Set overlays depending on the hardware variant - # - if test "${module_variant}" = "0x01"; then - setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} - elif test "${module_variant}" = "0x02"; then - setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} - elif test "${module_variant}" = "0x04"; then - setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} - fi -fi - -# Apply QXP overlay if the SOC type is "imx8qxp" -if test "${soc_type}" = "imx8qxp"; then - setenv overlays _ov_som_quad_ccimx8x.dtbo,${overlays} -fi +# 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 @@ -118,6 +72,51 @@ else setenv mmcroot /dev/mmcblk${mmcbootdev}p2 fi fi + + +# Back up environment variables +setenv ORIG_overlays ${overlays} +setenv ORIG_extra_bootargs ${extra_bootargs} + +# Set SOC type to "imx8qxp" if not already defined by U-Boot +if test ! -n "${soc_type}"; then + setenv soc_type "imx8qxp" +fi + +# +# Determine overlays to apply depending on the hardware capabilities +# described by the HWID, SOM version, and carrier board version. +# +if test -n "${module_ram}"; then + setexpr module_has_wifi ${hwid_3} \& 1 + setexpr module_has_bt ${hwid_3} \& 2 + setexpr module_has_bt ${module_has_bt} / 2 + + if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then + setenv overlays _ov_som_bt_ccimx8x.dtbo,${overlays} + fi + + if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then + setenv overlays _ov_som_wifi_ccimx8x.dtbo,${overlays} + fi +else + # + # Set overlays depending on the hardware variant + # + if test "${module_variant}" = "0x01"; then + setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} + elif test "${module_variant}" = "0x02"; then + setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} + elif test "${module_variant}" = "0x04"; then + setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} + fi +fi + +# Apply QXP overlay if the SOC type is "imx8qxp" +if test "${soc_type}" = "imx8qxp"; then + setenv overlays _ov_som_quad_ccimx8x.dtbo,${overlays} +fi + setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs} dboot linux mmc ${mmcbootdev}:${mmcpart} diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt index 759308337..0a6968ea1 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt @@ -2,61 +2,10 @@ # U-Boot bootscript for EMMC/SD images created by Yocto. # -# Back up environment variables -setenv ORIG_overlays ${overlays} -setenv ORIG_extra_bootargs ${extra_bootargs} - -# Set SOC type to "imx8qxp" if not already defined by U-Boot -if test ! -n "${soc_type}"; then - setenv soc_type "imx8qxp" -fi - -# Reset overlays when using dualboot mode, because we need to -# save the environment in case of an installation fall back. -if test "${dual_boot}" = "yes"; then - if test -n "${overlays}"; then - setenv overlays - fi -fi - -# -# Determine overlays to apply depending on the hardware capabilities -# described by the HWID, SOM version, and carrier board version. -# -if test -n "${module_ram}"; then - setexpr module_has_wifi ${hwid_3} \& 1 - setexpr module_has_bt ${hwid_3} \& 2 - setexpr module_has_bt ${module_has_bt} / 2 - - if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then - setenv overlays _ov_som_bt_ccimx8x.dtbo,${overlays} - fi - - if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then - setenv overlays _ov_som_wifi_ccimx8x.dtbo,${overlays} - fi -else - # - # Set overlays depending on the hardware variant - # - if test "${module_variant}" = "0x01"; then - setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} - elif test "${module_variant}" = "0x02"; then - setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} - elif test "${module_variant}" = "0x04"; then - setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} - fi -fi - -# Apply QXP overlay if the SOC type is "imx8qxp" -if test "${soc_type}" = "imx8qxp"; then - setenv overlays _ov_som_quad_ccimx8x.dtbo,${overlays} -fi - -# Apply SBCv3 overlay if the board_version is 3 or lesser -if test "${board_version}" -le "3"; then - setenv overlays _ov_board_v1-v3_ccimx8x-sbc-pro.dtbo,${overlays} -fi +# 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 @@ -123,6 +72,56 @@ else setenv mmcroot /dev/mmcblk${mmcbootdev}p2 fi fi + + +# Back up environment variables +setenv ORIG_overlays ${overlays} +setenv ORIG_extra_bootargs ${extra_bootargs} + +# Set SOC type to "imx8qxp" if not already defined by U-Boot +if test ! -n "${soc_type}"; then + setenv soc_type "imx8qxp" +fi + +# +# Determine overlays to apply depending on the hardware capabilities +# described by the HWID, SOM version, and carrier board version. +# +if test -n "${module_ram}"; then + setexpr module_has_wifi ${hwid_3} \& 1 + setexpr module_has_bt ${hwid_3} \& 2 + setexpr module_has_bt ${module_has_bt} / 2 + + if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then + setenv overlays _ov_som_bt_ccimx8x.dtbo,${overlays} + fi + + if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then + setenv overlays _ov_som_wifi_ccimx8x.dtbo,${overlays} + fi +else + # + # Set overlays depending on the hardware variant + # + if test "${module_variant}" = "0x01"; then + setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} + elif test "${module_variant}" = "0x02"; then + setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} + elif test "${module_variant}" = "0x04"; then + setenv overlays _ov_som_bt_ccimx8x.dtbo,_ov_som_wifi_ccimx8x.dtbo,${overlays} + fi +fi + +# Apply QXP overlay if the SOC type is "imx8qxp" +if test "${soc_type}" = "imx8qxp"; then + setenv overlays _ov_som_quad_ccimx8x.dtbo,${overlays} +fi + +# Apply SBCv3 overlay if the board_version is 3 or lesser +if test "${board_version}" -le "3"; then + setenv overlays _ov_board_v1-v3_ccimx8x-sbc-pro.dtbo,${overlays} +fi + setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs} dboot linux mmc ${mmcbootdev}:${mmcpart}