Skip to content

Commit

Permalink
support: scripts: fixed problem with FIT image build only using last dtb
Browse files Browse the repository at this point in the history
Signed-off-by: Joacim Zetterling <[email protected]>
  • Loading branch information
joazet committed Mar 26, 2024
1 parent 5b24e15 commit c9cb59c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions support/scripts/fitimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,18 @@ truncate -s %4k $kernel $dtbs

for dtb in $dtbs; do
name=$(basename $(dirname $dtb) | cut -d "-" -f1)
fullname=$(basename $(dirname $dtb))
filename=$(basename ${dtb}).${dtbcomp}

case ${dtbcomp} in
"gzip")
gzip -c -9 ${dtb} > ${workdir}/boot/$(basename ${dtb}).${dtbcomp}
gzip -c -9 ${dtb} > ${workdir}/boot/$fullname/$filename
;;
"xz")
xz --check=crc32 -c ${dtb} > ${workdir}/boot/$(basename ${dtb}).${dtbcomp}
xz --check=crc32 -c ${dtb} > ${workdir}/boot/$fullname/$filename
;;
"zstd")
zstd -19 --stdout ${dtb} > ${workdir}/boot/$(basename ${dtb}).${dtbcomp}
zstd -19 --stdout ${dtb} > ${workdir}/boot/$fullname/$filename
;;
"none")
;;
Expand All @@ -113,7 +115,7 @@ for dtb in $dtbs; do
type = "flat_dt";
arch = "$arch";
compression = "$dtbcomp";
data = /incbin/("${workdir}/boot/$(basename ${dtb}).${dtbcomp}");
data = /incbin/("${workdir}/boot/$fullname/$filename");
hash {
algo = "sha256";
};
Expand Down

0 comments on commit c9cb59c

Please sign in to comment.