recovery: add new bootscript for the recovery image
Signed-off-by: David Escalona <david.escalona@digi.com>
This commit is contained in:
parent
1496d740d7
commit
a7ab3e7fa5
|
|
@ -0,0 +1,49 @@
|
|||
#
|
||||
# U-Boot bootscript for EMMC/SD images created by Yocto.
|
||||
#
|
||||
|
||||
#
|
||||
# Set device tree filename depending on the board ID (if defined)
|
||||
#
|
||||
if test -n "${board_id}"; then
|
||||
setenv fdt_file uImage-${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 uImage-imx6q-ccimx6sbc-wb.dtb
|
||||
elif test "${module_variant}" = "0x03"; then
|
||||
setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb
|
||||
elif test "${module_variant}" = "0x04"; then
|
||||
setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb
|
||||
elif test "${module_variant}" = "0x05"; then
|
||||
setenv fdt_file uImage-imx6q-ccimx6sbc-w.dtb
|
||||
elif test "${module_variant}" = "0x06"; then
|
||||
setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb
|
||||
elif test "${module_variant}" = "0x08"; then
|
||||
setenv fdt_file uImage-imx6q-ccimx6sbc.dtb
|
||||
elif test "${module_variant}" = "0x0a"; then
|
||||
setenv fdt_file uImage-imx6dl-ccimx6sbc-w.dtb
|
||||
elif test "${module_variant}" = "0x0b"; then
|
||||
setenv fdt_file uImage-imx6dl-ccimx6sbc-wb.dtb
|
||||
elif test "${module_variant}" = "0x0c"; then
|
||||
setenv fdt_file uImage-imx6dl-ccimx6sbc.dtb
|
||||
elif test "${module_variant}" = "0x0e"; then
|
||||
setenv fdt_file uImage-imx6q-ccimx6sbc.dtb
|
||||
elif test "${module_variant}" = "0x0f"; then
|
||||
setenv fdt_file uImage-imx6q-ccimx6sbc.dtb
|
||||
elif test "${module_variant}" = "0x11"; then
|
||||
setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb
|
||||
elif test "${module_variant}" = "0x12"; then
|
||||
setenv fdt_file uImage-imx6q-ccimx6sbc-wb.dtb
|
||||
elif test "${module_variant}" = "0x13"; then
|
||||
setenv fdt_file uImage-imx6dl-ccimx6sbc-wb.dtb
|
||||
else
|
||||
echo "------ Using default fdt_file"
|
||||
fi
|
||||
fi
|
||||
|
||||
setenv boot_initrd true
|
||||
setenv initrd_file uramdisk-recovery.img
|
||||
dboot linux mmc ${mmcbootdev}:${mmcpart}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# U-Boot bootscript for NAND images created by Yocto.
|
||||
#
|
||||
|
||||
#
|
||||
# Set device tree filename depending on the board ID (if defined)
|
||||
#
|
||||
if test -n "${board_id}"; then
|
||||
setenv fdt_file zImage-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 zImage-imx6ul-ccimx6ulsbc-wb.dtb
|
||||
elif test "${module_variant}" = "0x03"; then
|
||||
setenv fdt_file zImage-imx6ul-ccimx6ulsbc.dtb
|
||||
else
|
||||
echo "------ Using default fdt_file: $fdt_file"
|
||||
fi
|
||||
fi
|
||||
|
||||
setenv boot_initrd true
|
||||
setenv initrd_file uramdisk-recovery.img
|
||||
dboot linux nand ${mtdbootpart}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# U-Boot bootscript for NAND images created by Yocto.
|
||||
#
|
||||
|
||||
#
|
||||
# Set device tree filename depending on the board ID (if defined)
|
||||
#
|
||||
if test -n "${board_id}"; then
|
||||
setenv fdt_file zImage-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 zImage-imx6ul-ccimx6ulstarter-wb.dtb
|
||||
elif test "${module_variant}" = "0x03"; then
|
||||
setenv fdt_file zImage-imx6ul-ccimx6ulstarter.dtb
|
||||
else
|
||||
echo "------ Using default fdt_file: $fdt_file"
|
||||
fi
|
||||
fi
|
||||
|
||||
setenv boot_initrd true
|
||||
setenv initrd_file uramdisk-recovery.img
|
||||
dboot linux nand ${mtdbootpart}
|
||||
|
|
@ -24,6 +24,7 @@ SRC_URI = " \
|
|||
SRC_URI_append = " \
|
||||
file://boot.txt \
|
||||
file://install_linux_fw_sd.txt \
|
||||
file://recovery.txt \
|
||||
"
|
||||
|
||||
LOCALVERSION ?= ""
|
||||
|
|
@ -150,12 +151,24 @@ do_deploy_append() {
|
|||
TMP_BOOTSCR="$(mktemp ${WORKDIR}/bootscr.XXXXXX)"
|
||||
sed -e "${TF_BOOTSCRIPT_SEDFILTER}" ${WORKDIR}/boot.txt > ${TMP_BOOTSCR}
|
||||
mkimage -T script -n bootscript -C none -d ${TMP_BOOTSCR} ${DEPLOYDIR}/boot.scr
|
||||
|
||||
# Recovery boot script for DEY images
|
||||
mkimage -T script -n bootscript -C none -d ${WORKDIR}/recovery.txt ${DEPLOYDIR}/recovery.scr
|
||||
|
||||
# Sign the scripts
|
||||
if [ "${TRUSTFENCE_SIGN}" = "1" ]; then
|
||||
export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}"
|
||||
[ -n "${TRUSTFENCE_KEY_INDEX}" ] && export CONFIG_KEY_INDEX="${TRUSTFENCE_KEY_INDEX}"
|
||||
[ -n "${TRUSTFENCE_DEK_PATH}" ] && [ "${TRUSTFENCE_DEK_PATH}" != "0" ] && export CONFIG_DEK_PATH="${TRUSTFENCE_DEK_PATH}"
|
||||
"${STAGING_BINDIR_NATIVE}/trustfence-sign-kernel.sh" -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/boot.scr" "${DEPLOYDIR}/boot-signed.scr"
|
||||
mv ${DEPLOYDIR}/boot-signed.scr ${DEPLOYDIR}/boot.scr
|
||||
|
||||
# Sign boot script
|
||||
TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/bootscr-signed.XXXXXX)"
|
||||
trustfence-sign-kernel.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/boot.scr" "${TMP_SIGNED_BOOTSCR}"
|
||||
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/boot.scr"
|
||||
|
||||
# Sign recovery script
|
||||
trustfence-sign-kernel.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/recovery.scr" "${TMP_SIGNED_BOOTSCR}"
|
||||
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/recovery.scr"
|
||||
fi
|
||||
rm -f ${TMP_BOOTSCR}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue