mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-27 07:23:30 +08:00
support/scripts: add generic genimage script
This script is a wrapper for the genimage tool used by most boards. The board postimage script can now call this script instead of invoking genimage command themselves. Signed-off-by: Etienne Phelip <etienne.phelip@savoirfairelinux.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
5d05319c1b
commit
c9062dcdf6
27
support/scripts/genimage.sh
Executable file
27
support/scripts/genimage.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
die() {
|
||||
echo "Error: $@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
|
||||
while getopts c: OPT ; do
|
||||
case "${OPT}" in
|
||||
c) GENIMAGE_CFG="${OPTARG}";;
|
||||
:) die "option '${OPTARG}' expects a mandatory argument\n";;
|
||||
\?) die "unknown option '${OPTARG}'\n";;
|
||||
esac
|
||||
done
|
||||
|
||||
[ -n "${GENIMAGE_CFG}" ] || die "Missing argument"
|
||||
|
||||
rm -rf "${GENIMAGE_TMP}"
|
||||
|
||||
genimage \
|
||||
--rootpath "${TARGET_DIR}" \
|
||||
--tmppath "${GENIMAGE_TMP}" \
|
||||
--inputpath "${BINARIES_DIR}" \
|
||||
--outputpath "${BINARIES_DIR}" \
|
||||
--config "${GENIMAGE_CFG}"
|
Loading…
Reference in New Issue
Block a user