summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hemp <christian.hemp@posteo.de>2018-09-07 14:00:04 +0200
committerStefan Müller-Klieser <s.mueller-klieser@phytec.de>2018-09-07 17:27:17 +0200
commit2502a55ff74f46b791c8ae36eb4a8a15f9b0ed06 (patch)
treecb5ca1a04535c7ef7a67bcf44011231c53cc3dbe
parent6762b51d9fe9c8d79938d1052c8d84a542e90a66 (diff)
downloadmeta-phytec-2502a55ff74f46b791c8ae36eb4a8a15f9b0ed06.tar.bz2
meta-phytec-2502a55ff74f46b791c8ae36eb4a8a15f9b0ed06.zip
scripts: fsl-setup-release: update to new version
With NXP release imx-4.9.88-2.0.0_ga they provide a new version of the fsl-setup-release.sh script. We have to update to this version otherwise the BSP build fails. Signed-off-by: Christian Hemp <christian.hemp@posteo.de> Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
-rw-r--r--scripts/fsl-setup-release.sh102
1 files changed, 40 insertions, 62 deletions
diff --git a/scripts/fsl-setup-release.sh b/scripts/fsl-setup-release.sh
index 39ef059..e79534b 100644
--- a/scripts/fsl-setup-release.sh
+++ b/scripts/fsl-setup-release.sh
@@ -1,8 +1,9 @@
#!/bin/sh
#
-# FSL Build Enviroment Setup Script
+# i.MX Yocto Project Build Environment Setup Script
#
-# Copyright (C) 2011-2015 Freescale Semiconductor
+# Copyright (C) 2011-2016 Freescale Semiconductor
+# Copyright 2017 NXP
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-. sources/meta-fsl-bsp-release/imx/tools/utils.sh
+. sources/meta-fsl-bsp-release/imx/tools/setup-utils.sh
CWD=`pwd`
PROGNAME="setup-environment"
@@ -32,10 +33,9 @@ exit_message ()
usage()
{
echo -e "\nUsage: source fsl-setup-release.sh
- Optional parameters: [-b build-dir] [-e back-end] [-h]"
+ Optional parameters: [-b build-dir] [-h]"
echo "
* [-b build-dir]: Build directory, if unspecified script uses 'build' as output directory
- * [-e back-end]: Options are 'fb', 'dfb', 'x11, 'wayland'
* [-h]: help
"
}
@@ -44,7 +44,7 @@ echo "
clean_up()
{
- unset CWD BUILD_DIR BACKEND FSLDISTRO
+ unset CWD BUILD_DIR FSLDISTRO
unset fsl_setup_help fsl_setup_error fsl_setup_flag
unset usage clean_up
unset ARM_DIR META_FSL_BSP_RELEASE
@@ -61,82 +61,60 @@ do
b) BUILD_DIR="$OPTARG";
echo -e "\n Build directory is " $BUILD_DIR
;;
- e)
- # Determine what distro needs to be used.
- BACKEND="$OPTARG"
- if [ "$BACKEND" = "fb" ]; then
- if [ -z "$DISTRO" ]; then
- FSLDISTRO='fsl-imx-fb'
- echo -e "\n Using FB backend with FB DIST_FEATURES to override poky X11 DIST FEATURES"
- elif [ ! "$DISTRO" = "fsl-imx-fb" ]; then
- echo -e "\n DISTRO specified conflicts with -e. Please use just one or the other."
- fsl_setup_error='true'
- fi
-
- elif [ "$BACKEND" = "dfb" ]; then
- if [ -z "$DISTRO" ]; then
- FSLDISTRO='fsl-imx-dfb'
- echo -e "\n Using DirectFB backend with DirectFB DIST_FEATURES to override poky X11 DIST FEATURES"
- elif [ ! "$DISTRO" = "fsl-imx-dfb" ]; then
- echo -e "\n DISTRO specified conflicts with -e. Please use just one or the other."
- fsl_setup_error='true'
- fi
-
- elif [ "$BACKEND" = "wayland" ]; then
- if [ -z "$DISTRO" ]; then
- FSLDISTRO='fsl-imx-wayland'
- echo -e "\n Using Wayland backend."
- elif [ ! "$DISTRO" = "fsl-imx-wayland" ]; then
- echo -e "\n DISTRO specified conflicts with -e. Please use just one or the other."
- fsl_setup_error='true'
- fi
-
- elif [ "$BACKEND" = "x11" ]; then
- if [ -z "$DISTRO" ]; then
- FSLDISTRO='fsl-imx-x11'
- echo -e "\n Using X11 backend with poky DIST_FEATURES"
- elif [ ! "$DISTRO" = "fsl-imx-x11" ]; then
- echo -e "\n DISTRO specified conflicts with -e. Please use just one or the other."
- fsl_setup_error='true'
- fi
-
- else
- echo -e "\n Invalid backend specified with -e. Use fb, dfb, wayland, or x11"
- fsl_setup_error='true'
- fi
- ;;
h) fsl_setup_help='true';
;;
- ?) fsl_setup_error='true';
+ \?) fsl_setup_error='true';
;;
esac
done
+shift $((OPTIND-1))
+if [ $# -ne 0 ]; then
+ fsl_setup_error=true
+ echo -e "Invalid command line ending: '$@'"
+fi
+OPTIND=$OLD_OPTIND
+if test $fsl_setup_help; then
+ usage && clean_up && return 1
+elif test $fsl_setup_error; then
+ clean_up && return 1
+fi
if [ -z "$DISTRO" ]; then
if [ -z "$FSLDISTRO" ]; then
- FSLDISTRO='fsl-imx-x11'
+ FSLDISTRO='fsl-imx-xwayland'
fi
else
FSLDISTRO="$DISTRO"
fi
-OPTIND=$OLD_OPTIND
-
-# check the "-h" and other not supported options
-if test $fsl_setup_error || test $fsl_setup_help; then
- usage && clean_up && return 1
-fi
-
-if [ -z "$BUILD_DIR" -o "$BUILD_DIR" == "." ]; then
+if [ -z "$BUILD_DIR" ]; then
BUILD_DIR='build'
fi
if [ -z "$MACHINE" ]; then
echo setting to default machine
- MACHINE='imx6qsabresd'
+ MACHINE='imx6qpsabresd'
fi
+case $MACHINE in
+imx8*)
+ case $DISTRO in
+ *wayland)
+ : ok
+ ;;
+ *)
+ echo -e "\n ERROR - Only Wayland distros are supported for i.MX 8 or i.MX 8M"
+ echo -e "\n"
+ return 1
+ ;;
+ esac
+ ;;
+*)
+ : ok
+ ;;
+esac
+
# copy new EULA into community so setup uses latest i.MX EULA
cp sources/meta-fsl-bsp-release/imx/EULA.txt sources/meta-freescale/EULA
@@ -175,7 +153,7 @@ fi
META_FSL_BSP_RELEASE="${CWD}/sources/meta-fsl-bsp-release/imx/meta-bsp"
echo "" >> $BUILD_DIR/conf/bblayers.conf
-echo "# Freescale Yocto Project Release layers" >> $BUILD_DIR/conf/bblayers.conf
+echo "# i.MX Yocto Project Release layers" >> $BUILD_DIR/conf/bblayers.conf
hook_in_layer meta-fsl-bsp-release/imx/meta-bsp
hook_in_layer meta-fsl-bsp-release/imx/meta-sdk