modification de la classe uboot-sign pour générer le MLO et FIT Image même sans signature

This commit is contained in:
2023-05-31 08:55:35 +00:00
parent da8a0e9dc2
commit b8c8646eb3

View File

@@ -157,6 +157,7 @@ concat_dtb_helper() {
}
concat_spl_dtb_helper() {
bbplain "SCLE: concat_spl_dtb_helper"
# We only deploy symlinks to the u-boot-spl.dtb,as the KERNEL_PN will
# be responsible for deploying the real file
if [ -e "${SPL_DIR}/${SPL_DTB_BINARY}" ] ; then
@@ -194,7 +195,9 @@ concat_dtb() {
}
concat_spl_dtb() {
if [ "${SPL_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" -a -n "${SPL_DTB_BINARY}" ]; then
bbplain "concat_spl_dtb"
#if [ "${SPL_SIGN_ENABLE}" = "1" -a "${PN}" = "${UBOOT_PN}" -a -n "${SPL_DTB_BINARY}" ]; then
if [ "${PN}" = "${UBOOT_PN}" -a -n "${SPL_DTB_BINARY}" ]; then
mkdir -p ${DEPLOYDIR}
if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
@@ -316,6 +319,7 @@ uboot_fitimage_assemble() {
rm -f $uboot_its $uboot_bin
bbplain "SCLE: uboot_its: $uboot_its"
# First we create the ITS script
cat << EOF >> $uboot_its
/dts-v1/;
@@ -406,6 +410,10 @@ do_uboot_assemble_fitimage() {
# support the scenario where UBOOT_SIGN_ENABLE is placing the Kernel fitImage's
# pubkey in the u-boot.dtb file, so that we can use it when building the U-Boot
# fitImage itself.
bbplain "SCLE: do_uboot_assemble_fitimage"
bbplain "SCLE: SPL_DTB_BINARY: ${SPL_DTB_BINARY}"
bbplain "SCLE: PN: ${PN}"
bbplain "SCLE: KERNEL_PN: ${KERNEL_PN}"
if [ "${UBOOT_FITIMAGE_ENABLE}" = "1" ] && \
[ -n "${SPL_DTB_BINARY}" -a "${PN}" = "${KERNEL_PN}" ] ; then
if [ "${UBOOT_SIGN_ENABLE}" != "1" ]; then
@@ -427,6 +435,7 @@ do_uboot_assemble_fitimage() {
kernel_uboot_fitimage_name=`basename ${STAGING_DATADIR}/u-boot-fitImage-*`
kernel_uboot_its_name=`basename ${STAGING_DATADIR}/u-boot-its-*`
cd ${B}
bbplain "SCLE: call uboot_fitimage_assemble"
uboot_fitimage_assemble $kernel_uboot_its_name ${UBOOT_NODTB_BINARY} \
${UBOOT_DTB_BINARY} $kernel_uboot_fitimage_name \
${SPL_DTB_BINARY}
@@ -458,7 +467,11 @@ do_deploy:prepend:pn-${UBOOT_PN}() {
ln -sf ${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS_SYMLINK}
fi
if [ "${SPL_SIGN_ENABLE}" = "1" -a -n "${SPL_DTB_BINARY}" ] ; then
bbplain "SCLE: do_deploy prepend"
bbplain "SCLE: ${SPL_DTB_BINARY}"
#if [ "${SPL_SIGN_ENABLE}" = "1" -a -n "${SPL_DTB_BINARY}" ] ; then
if [ -n "${SPL_DTB_BINARY}" ] ; then
bbplain "SCLE: call concat_spl_dtb"
concat_spl_dtb
fi