Last active
January 20, 2022 15:24
-
-
Save mickey-happygolucky/2b9671f062de558f3312f7378ed3c240 to your computer and use it in GitHub Desktop.
The helper script to run the bitbake with using CROPS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BUILD_DIR=build | |
usage_exit() { | |
echo "run_crops.sh [-b build] [commands]" | |
echo " -b: a build directory of poky" | |
exit 0 | |
} | |
while getopts b:h OPT | |
do | |
case ${OPT} in | |
b) BUILD_DIR=${OPTARG} | |
;; | |
h) usage_exit | |
;; | |
\?) usage_exit | |
;; | |
esac | |
done | |
shift $((OPTIND - 1)) | |
echo "BUILD_DIR =" "${BUILD_DIR}" | |
cmd="source $(pwd)/poky/oe-init-build-env ${BUILD_DIR}" | |
if [ $# -gt 0 ] ; then | |
cmd="${cmd} && $*" | |
fi | |
docker run --rm -it -v "$(pwd)":"$(pwd)" crops/poky --workdir="$(pwd)" bash -c "${cmd}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment