mirror of
https://git.yoctoproject.org/poky
synced 2026-09-12 15:49:36 +02:00
featimage: refactor style
- use bash variable notation without {} where possible
- just to make sure it looks like bash variable not bitbake variable one
- fix indent style in "cat" commands
- replace "! -z" -> "-n"
- make debug info in ramdisk section creation more verbose
(From OE-Core rev: f44bb458884da64356ee188917094b5515d3b159)
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d3b5389e7d
commit
2b5f5e295e
@@ -162,8 +162,8 @@ concat_dtb() {
|
||||
mkdir -p ${DEPLOYDIR}
|
||||
if [ -n "${UBOOT_CONFIG}" ]; then
|
||||
for config in ${UBOOT_MACHINE}; do
|
||||
CONFIG_B_PATH="${config}"
|
||||
cd ${B}/${config}
|
||||
CONFIG_B_PATH="$config"
|
||||
cd ${B}/$config
|
||||
concat_dtb_helper
|
||||
done
|
||||
else
|
||||
@@ -179,8 +179,8 @@ concat_spl_dtb() {
|
||||
mkdir -p ${DEPLOYDIR}
|
||||
if [ -n "${UBOOT_CONFIG}" ]; then
|
||||
for config in ${UBOOT_MACHINE}; do
|
||||
CONFIG_B_PATH="${config}"
|
||||
cd ${B}/${config}
|
||||
CONFIG_B_PATH="$config"
|
||||
cd ${B}/$config
|
||||
concat_spl_dtb_helper
|
||||
done
|
||||
else
|
||||
@@ -231,7 +231,7 @@ do_install:append() {
|
||||
if [ "${PN}" = "${UBOOT_PN}" ]; then
|
||||
if [ -n "${UBOOT_CONFIG}" ]; then
|
||||
for config in ${UBOOT_MACHINE}; do
|
||||
cd ${B}/${config}
|
||||
cd ${B}/$config
|
||||
if [ "${UBOOT_SIGN_ENABLE}" = "1" -o "${UBOOT_FITIMAGE_ENABLE}" = "1" ] && \
|
||||
[ -n "${UBOOT_DTB_BINARY}" ]; then
|
||||
install_helper
|
||||
@@ -286,19 +286,19 @@ addtask uboot_generate_rsa_keys before do_uboot_assemble_fitimage after do_compi
|
||||
# Create a ITS file for the U-boot FIT, for use when
|
||||
# we want to sign it so that the SPL can verify it
|
||||
uboot_fitimage_assemble() {
|
||||
uboot_its="${1}"
|
||||
uboot_nodtb_bin="${2}"
|
||||
uboot_dtb="${3}"
|
||||
uboot_bin="${4}"
|
||||
spl_dtb="${5}"
|
||||
uboot_its="$1"
|
||||
uboot_nodtb_bin="$2"
|
||||
uboot_dtb="$3"
|
||||
uboot_bin="$4"
|
||||
spl_dtb="$5"
|
||||
uboot_csum="${UBOOT_FIT_HASH_ALG}"
|
||||
uboot_sign_algo="${UBOOT_FIT_SIGN_ALG}"
|
||||
uboot_sign_keyname="${SPL_SIGN_KEYNAME}"
|
||||
|
||||
rm -f ${uboot_its} ${uboot_bin}
|
||||
rm -f $uboot_its $uboot_bin
|
||||
|
||||
# First we create the ITS script
|
||||
cat << EOF >> ${uboot_its}
|
||||
cat << EOF >> $uboot_its
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
@@ -308,7 +308,7 @@ uboot_fitimage_assemble() {
|
||||
images {
|
||||
uboot {
|
||||
description = "U-Boot image";
|
||||
data = /incbin/("${uboot_nodtb_bin}");
|
||||
data = /incbin/("$uboot_nodtb_bin");
|
||||
type = "standalone";
|
||||
os = "u-boot";
|
||||
arch = "${UBOOT_ARCH}";
|
||||
@@ -318,34 +318,34 @@ uboot_fitimage_assemble() {
|
||||
EOF
|
||||
|
||||
if [ "${SPL_SIGN_ENABLE}" = "1" ] ; then
|
||||
cat << EOF >> ${uboot_its}
|
||||
cat << EOF >> $uboot_its
|
||||
signature {
|
||||
algo = "${uboot_csum},${uboot_sign_algo}";
|
||||
key-name-hint = "${uboot_sign_keyname}";
|
||||
algo = "$uboot_csum,$uboot_sign_algo";
|
||||
key-name-hint = "$uboot_sign_keyname";
|
||||
};
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat << EOF >> ${uboot_its}
|
||||
cat << EOF >> $uboot_its
|
||||
};
|
||||
fdt {
|
||||
description = "U-Boot FDT";
|
||||
data = /incbin/("${uboot_dtb}");
|
||||
data = /incbin/("$uboot_dtb");
|
||||
type = "flat_dt";
|
||||
arch = "${UBOOT_ARCH}";
|
||||
compression = "none";
|
||||
EOF
|
||||
|
||||
if [ "${SPL_SIGN_ENABLE}" = "1" ] ; then
|
||||
cat << EOF >> ${uboot_its}
|
||||
cat << EOF >> $uboot_its
|
||||
signature {
|
||||
algo = "${uboot_csum},${uboot_sign_algo}";
|
||||
key-name-hint = "${uboot_sign_keyname}";
|
||||
algo = "$uboot_csum,$uboot_sign_algo";
|
||||
key-name-hint = "$uboot_sign_keyname";
|
||||
};
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat << EOF >> ${uboot_its}
|
||||
cat << EOF >> $uboot_its
|
||||
};
|
||||
};
|
||||
|
||||
@@ -365,8 +365,8 @@ EOF
|
||||
#
|
||||
${UBOOT_MKIMAGE} \
|
||||
${@'-D "${SPL_MKIMAGE_DTCOPTS}"' if len('${SPL_MKIMAGE_DTCOPTS}') else ''} \
|
||||
-f ${uboot_its} \
|
||||
${uboot_bin}
|
||||
-f $uboot_its \
|
||||
$uboot_bin
|
||||
|
||||
if [ "${SPL_SIGN_ENABLE}" = "1" ] ; then
|
||||
#
|
||||
@@ -375,8 +375,8 @@ EOF
|
||||
${UBOOT_MKIMAGE_SIGN} \
|
||||
${@'-D "${SPL_MKIMAGE_DTCOPTS}"' if len('${SPL_MKIMAGE_DTCOPTS}') else ''} \
|
||||
-F -k "${SPL_SIGN_KEYDIR}" \
|
||||
-K "${spl_dtb}" \
|
||||
-r ${uboot_bin} \
|
||||
-K "$spl_dtb" \
|
||||
-r $uboot_bin \
|
||||
${SPL_MKIMAGE_SIGN_ARGS}
|
||||
fi
|
||||
|
||||
@@ -408,8 +408,8 @@ 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}
|
||||
uboot_fitimage_assemble ${kernel_uboot_its_name} ${UBOOT_NODTB_BINARY} \
|
||||
${UBOOT_DTB_BINARY} ${kernel_uboot_fitimage_name} \
|
||||
uboot_fitimage_assemble $kernel_uboot_its_name ${UBOOT_NODTB_BINARY} \
|
||||
${UBOOT_DTB_BINARY} $kernel_uboot_fitimage_name \
|
||||
${SPL_DTB_BINARY}
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user