summaryrefslogtreecommitdiffstats
path: root/meta/classes/uboot-sign.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/uboot-sign.bbclass')
-rw-r--r--meta/classes/uboot-sign.bbclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
index 2da43655aa..6385a06c13 100644
--- a/meta/classes/uboot-sign.bbclass
+++ b/meta/classes/uboot-sign.bbclass
@@ -46,12 +46,12 @@ UBOOT_NODTB_SYMLINK ?= "u-boot-nodtb-${MACHINE}.${UBOOT_SUFFIX}"
46UBOOT_PN = "${@d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'}" 46UBOOT_PN = "${@d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'}"
47 47
48concat_dtb_helper() { 48concat_dtb_helper() {
49 if [ -e ${UBOOT_DTB_BINARY} ]; then 49 if [ -e "${UBOOT_DTB_BINARY}" ]; then
50 ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} 50 ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY}
51 ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_SYMLINK} 51 ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_SYMLINK}
52 fi 52 fi
53 53
54 if [ -f ${UBOOT_NODTB_BINARY} ]; then 54 if [ -f "${UBOOT_NODTB_BINARY}" ]; then
55 install ${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} 55 install ${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}
56 ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_SYMLINK} 56 ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_SYMLINK}
57 ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_BINARY} 57 ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_BINARY}
@@ -67,13 +67,13 @@ concat_dtb_helper() {
67 elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "$deployed_uboot_dtb_binary" ]; then 67 elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "$deployed_uboot_dtb_binary" ]; then
68 cd ${DEPLOYDIR} 68 cd ${DEPLOYDIR}
69 cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${UBOOT_BINARY} > ${UBOOT_IMAGE} 69 cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${UBOOT_BINARY} > ${UBOOT_IMAGE}
70 elif [ -n "${UBOOT_DTB_BINARY}" ]; then 70 else
71 bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available." 71 bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."
72 fi 72 fi
73} 73}
74 74
75concat_dtb() { 75concat_dtb() {
76 if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" ]; then 76 if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" -a -n "${UBOOT_DTB_BINARY}" ]; then
77 mkdir -p ${DEPLOYDIR} 77 mkdir -p ${DEPLOYDIR}
78 if [ -n "${UBOOT_CONFIG}" ]; then 78 if [ -n "${UBOOT_CONFIG}" ]; then
79 for config in ${UBOOT_MACHINE}; do 79 for config in ${UBOOT_MACHINE}; do
@@ -90,19 +90,19 @@ concat_dtb() {
90# Install UBOOT_DTB_BINARY to datadir, so that kernel can use it for 90# Install UBOOT_DTB_BINARY to datadir, so that kernel can use it for
91# signing, and kernel will deploy UBOOT_DTB_BINARY after signs it. 91# signing, and kernel will deploy UBOOT_DTB_BINARY after signs it.
92install_helper() { 92install_helper() {
93 if [ -f ${UBOOT_DTB_BINARY} ]; then 93 if [ -f "${UBOOT_DTB_BINARY}" ]; then
94 install -d ${D}${datadir} 94 install -d ${D}${datadir}
95 # UBOOT_DTB_BINARY is a symlink to UBOOT_DTB_IMAGE, so we 95 # UBOOT_DTB_BINARY is a symlink to UBOOT_DTB_IMAGE, so we
96 # need both of them. 96 # need both of them.
97 install ${UBOOT_DTB_BINARY} ${D}${datadir}/${UBOOT_DTB_IMAGE} 97 install ${UBOOT_DTB_BINARY} ${D}${datadir}/${UBOOT_DTB_IMAGE}
98 ln -sf ${UBOOT_DTB_IMAGE} ${D}${datadir}/${UBOOT_DTB_BINARY} 98 ln -sf ${UBOOT_DTB_IMAGE} ${D}${datadir}/${UBOOT_DTB_BINARY}
99 elif [ -n "${UBOOT_DTB_BINARY}" ]; then 99 else
100 bbwarn "${UBOOT_DTB_BINARY} not found" 100 bbwarn "${UBOOT_DTB_BINARY} not found"
101 fi 101 fi
102} 102}
103 103
104do_install_append() { 104do_install_append() {
105 if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" ]; then 105 if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" -a -n "${UBOOT_DTB_BINARY}" ]; then
106 if [ -n "${UBOOT_CONFIG}" ]; then 106 if [ -n "${UBOOT_CONFIG}" ]; then
107 for config in ${UBOOT_MACHINE}; do 107 for config in ${UBOOT_MACHINE}; do
108 cd ${B}/${config} 108 cd ${B}/${config}