Skip to content

Commit

Permalink
Update make-release.sh
Browse files Browse the repository at this point in the history
Generate binaries for AFCv3.1 and AFCv4.0, including support for
RTM-8SFP and RTM-LAMP.
  • Loading branch information
augustofg committed Jul 23, 2024
1 parent 3bb1fac commit d1cba43
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions scripts/make-release.sh
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
#!/bin/sh

openmmc_root=$(realpath ..)
afc_v3.1_build_dir="${openmmc_root}/build/releases/afcv3.1"
afc_v4_build_dir="${openmmc_root}/build/releases/afcv4"
afc_v3_1_build_dir="${openmmc_root}/build/releases/afcv3.1"
afc_v4_build_dir="${openmmc_root}/build/releases/afcv4.0"
bin_dir="${openmmc_root}/build/releases/binaries"
tag=$(git describe --tags)

set -e

rm -rf "${openmmc_root}/build/releases/"
mkdir -p "$bin_dir"
mkdir -p "$afc_v3.1_build_dir"
mkdir -p "$afc_v3_1_build_dir"
mkdir -p "$afc_v4_build_dir"

cd "$afc_v3.1_build_dir"
cmake "$openmmc_root" -DBOARD=afc -DVERSION=3.1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISABLE_WATCHDOG=OFF
cd "$afc_v3_1_build_dir"
cmake "$openmmc_root" -DBOARD=afc -DVERSION=3.1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISABLE_WATCHDOG=OFF -DBOARD_RTM=8sfp
make

cd "$afc_v4_build_dir"
cmake "$openmmc_root" -DBOARD=afc -DVERSION=4.0 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISABLE_WATCHDOG=OFF
cmake "$openmmc_root" -DBOARD=afc -DVERSION=4.0 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISABLE_WATCHDOG=OFF -DBOARD_RTM=lamp
make

cp "${afc_v3.1_build_dir}/out/openMMC.elf" "${bin_dir}/openMMC-afcv3.1-${tag}.elf"
cp "${afc_v3.1_build_dir}/out/openMMC.bin" "${bin_dir}/openMMC-afcv3.1-${tag}.bin"
cp "${afc_v3.1_build_dir}/out/openMMC.hpm" "${bin_dir}/openMMC-afcv3.1-${tag}.hpm"
cp "${afc_v3_1_build_dir}/out/openMMC.elf" "${bin_dir}/openMMC-afcv3.1-8sfp-${tag}.elf"
cp "${afc_v3_1_build_dir}/out/openMMC.bin" "${bin_dir}/openMMC-afcv3.1-8sfp-${tag}.bin"
[[ -e "${afc_v3_1_build_dir}/out/openMMC.hpm" ]] && cp "${afc_v3_1_build_dir}/out/openMMC.hpm" "${bin_dir}/openMMC-afcv3.1-8sfp-${tag}.hpm"

cp "${afc_v3.1_build_dir}/out/newboot.elf" "${bin_dir}/newboot-afcv3.1-${tag}.elf"
cp "${afc_v3.1_build_dir}/out/newboot.bin" "${bin_dir}/newboot-afcv3.1-${tag}.bin"
cp "${afc_v3.1_build_dir}/out/newboot.hpm" "${bin_dir}/newboot-afcv3.1-${tag}.hpm"
cp "${afc_v3_1_build_dir}/out/newboot.elf" "${bin_dir}/newboot-afcv3.1-${tag}.elf"
cp "${afc_v3_1_build_dir}/out/newboot.bin" "${bin_dir}/newboot-afcv3.1-${tag}.bin"
[[ -e "${afc_v3_1_build_dir}/out/newboot.hpm" ]] && cp "${afc_v3_1_build_dir}/out/newboot.hpm" "${bin_dir}/newboot-afcv3.1-${tag}.hpm"

cp "${afc_v4_build_dir}/out/openMMC.elf" "${bin_dir}/openMMC-afcv4-${tag}.elf"
cp "${afc_v4_build_dir}/out/openMMC.bin" "${bin_dir}/openMMC-afcv4-${tag}.bin"
cp "${afc_v4_build_dir}/out/openMMC.hpm" "${bin_dir}/openMMC-afcv4-${tag}.hpm"
cp "${afc_v4_build_dir}/out/openMMC.elf" "${bin_dir}/openMMC-afcv4.0-lamp-${tag}.elf"
cp "${afc_v4_build_dir}/out/openMMC.bin" "${bin_dir}/openMMC-afcv4.0-lamp-${tag}.bin"
[[ -e "${afc_v4_build_dir}/out/openMMC.hpm" ]] && cp "${afc_v4_build_dir}/out/openMMC.hpm" "${bin_dir}/openMMC-afcv4.0-lamp-${tag}.hpm"

cp "${afc_v4_build_dir}/out/newboot.elf" "${bin_dir}/newboot-afcv4-${tag}.elf"
cp "${afc_v4_build_dir}/out/newboot.bin" "${bin_dir}/newboot-afcv4-${tag}.bin"
cp "${afc_v4_build_dir}/out/newboot.hpm" "${bin_dir}/newboot-afcv4-${tag}.hpm"
cp "${afc_v4_build_dir}/out/newboot.elf" "${bin_dir}/newboot-afcv4.0-${tag}.elf"
cp "${afc_v4_build_dir}/out/newboot.bin" "${bin_dir}/newboot-afcv4.0-${tag}.bin"
[[ -e "${afc_v4_build_dir}/out/newboot.hpm" ]] && cp "${afc_v4_build_dir}/out/newboot.hpm" "${bin_dir}/newboot-afcv4.0-${tag}.hpm"

cd "${bin_dir}"
sha256sum * > SHA256SUMS

0 comments on commit d1cba43

Please sign in to comment.