scripts/kernel-write: group output for devicetree files

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2018-10-03 14:34:08 +02:00
parent 90f4bdabb2
commit d5d561fc73
2 changed files with 6 additions and 3 deletions

View File

@@ -41,9 +41,10 @@ RootCardKernelWriteCallback() {
EvalExAuto "cp $DeployedFile $tmpdir/$KernelImageType" "\nCopy new kernel $KernelImageType..."
# devicetrees
EvalExAuto "rm -f $tmpdir/*.dtb" "\nRemove old devicetrees..."
echo
for dtb in `find ${DeployFileDir} -name "${KernelImageType}*.dtb" -type l`; do
dtbname=`basename $dtb | sed 's:'${KernelImageType}'-::'`
EvalExAuto "cp $dtb $tmpdir/${dtbname}" "\nCopy $dtb -> $tmpdir/${dtbname}..."
EvalExAuto "cp $dtb $tmpdir/${dtbname}" "Copy $dtb -> $tmpdir/${dtbname}..."
done
# unmount boot partition
EvalExAuto "sleep 1 && umount ${DevicePath}1" "\nUnmount boot partition..."

View File

@@ -35,15 +35,17 @@ RootCardKernelWriteCallback() {
EvalExAuto "cp -f $DeployedFile $tmpdir/kernel7.img" "\nCopy new kernel kernel7.img..."
# devicetrees
EvalExAuto "rm -f $tmpdir/*.dtb" "\nRemove old devicetrees..."
echo
for dtb in `find ${DeployFileDir} -name "bcm27*.dtb"`; do
EvalExAuto "cp -f $dtb $tmpdir/" "\nCopy $dtb -> $tmpdir..."
EvalExAuto "cp -f $dtb $tmpdir/" "Copy $dtb -> $tmpdir..."
done
# devicetree overlays
EvalExAuto "rm -f $tmpdir/overlays/*.dtbo" "\nRemove old devicetree-overlays..."
echo
for dtbo in `find ${DeployFileDir} -name "*.dtbo"`; do
bname=`basename $dtbo`
if ! echo "${bname}" | grep -q 'Image-'; then
EvalExAuto "cp -f ${dtbo} $tmpdir/overlays/" "\nCopy $dtbo -> $tmpdir/overlays/..."
EvalExAuto "cp -f ${dtbo} $tmpdir/overlays/" "Copy $dtbo -> $tmpdir/overlays/..."
fi
done
# TODO bootfiles?