From 66e9d090385018b34db6641755354cb5e73e40b5 Mon Sep 17 00:00:00 2001 From: Thomas Goodwin Date: Tue, 17 Jan 2017 15:29:09 -0500 Subject: [PATCH] Modified the script to search for meta-redhawk-sdr before calling WKS to generate the disk image. This makes it work with the old directory structure and the meta-redhawk-sdr-manifests one. --- contrib/scripts/build-image.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/contrib/scripts/build-image.sh b/contrib/scripts/build-image.sh index 89c58e7..15d7de8 100755 --- a/contrib/scripts/build-image.sh +++ b/contrib/scripts/build-image.sh @@ -25,15 +25,29 @@ echo MACHINE: "${MACHINE:?Need to set to an available machine}" echo BUILD_IMAGE: "${BUILD_IMAGE:?Need to set, e.g., 'redhawk-base-image'}" +META_REDHAWK=`find .. -path ./${PWD##*/} -prune -o -name meta-redhawk-sdr -type d` +echo Meta-REDHAWK-SDR Root found: ${META_REDHAWK} +if ! [[ -n "${META_REDHAWK}" ]]; then + echo "Could not find meta-redhawk-sdr folder beginning at the parent directory." + echo "This will be necessary for calling WKS later." + exit 1 +fi + echo STEP 1 - Starting Bit Bake if ! bitbake ${BUILD_IMAGE}; then echo Bitbake build image failed exit 1 fi +# File system building dependencies +if ! bitbake dosfstools-native mtools-native parted-native; then + echo Failed to install tools for building the SD image. + exit 1 +fi + echo STEP 2 - Building SD Card Image rm -rf images/${MACHINE}/build -if ! wic create ../meta-redhawk-sdr/contrib/wks/sdimage-8G.wks -e ${BUILD_IMAGE} -o images/${MACHINE}; then +if ! wic create ${META_REDHAWK}/contrib/wks/sdimage-8G.wks -e ${BUILD_IMAGE} -o images/${MACHINE}; then echo Bitbake build image to SD Card build failed exit 1 fi