Skip to content
Snippets Groups Projects
Commit bf007528 authored by schneider's avatar schneider
Browse files

feat(pycardium): Build bootloader compatible multi image

parent 826cfd56
No related branches found
No related tags found
No related merge requests found
Pipeline #569 passed
#!/bin/sh
set -e
echo "build multi image" $1 $2 $3 $4
PYTHON="$1"
BIN1="$2"
BIN2="$3"
BINOUT="$4"
dd if=/dev/zero ibs=1k count=448 | tr "\000" "\377" > "$BINOUT"
dd if="$BIN1" of="$BINOUT" conv=notrunc
dd if="$BIN2" of="$BINOUT" conv=notrunc oflag=append
"$PYTHON" "$(dirname "$0")/crc_patch.py" "$BINOUT"
...@@ -20,3 +20,6 @@ executable( ...@@ -20,3 +20,6 @@ executable(
# build_image.sh # build_image.sh
build_image = [files('./build_image.sh'), python3] build_image = [files('./build_image.sh'), python3]
# build_multi_image.sh
build_multi_image = [files('./build_multi_image.sh'), python3]
...@@ -56,7 +56,7 @@ elf = executable( ...@@ -56,7 +56,7 @@ elf = executable(
], ],
) )
custom_target( epicardium_bin = custom_target(
name + '.bin', name + '.bin',
build_by_default: true, build_by_default: true,
output: name + '.bin', output: name + '.bin',
......
...@@ -63,10 +63,18 @@ elf = executable( ...@@ -63,10 +63,18 @@ elf = executable(
], ],
) )
custom_target( bin = custom_target(
name + '.bin', name + '.bin',
build_by_default: true, build_by_default: true,
output: name + '.bin', output: name + '.bin',
input: elf, input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'], command: [build_image, '@INPUT@', '@OUTPUT0@'],
) )
custom_target(
name + '_epicardium.bin',
build_by_default: true,
output: name + '_epicardium.bin',
input: [epicardium_bin, bin],
command: [build_multi_image, '@INPUT@', '@OUTPUT0@'],
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment