From a014ca4c0924ed35a6c104fcd1fc9739a60798ab Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 26 Sep 2014 16:29:22 +0200 Subject: [PATCH] meta-digi: improve mkproject script Some minor enhancements to mkproject script: * Add 'conf-notes' files with DEY specific information. This is shown when you create the project or when you reload the environment in an already created project. * Create a 'dey-setup-environment' script in the project's folder that allows to reload the environment in a new terminal. * Remove the PATH variable tweaking. This was needed in older versions of Yocto, where the PATH kept growing each time you reloaded the environment, but it has been fixed in poky, so there is no need to do the same in our mkproject script. https://jira.digi.com/browse/DEL-1150 Signed-off-by: Javier Viguera --- sdk/config/ccardimx28js/conf-notes.txt | 11 ++++++++ sdk/config/ccimx51js/conf-notes.txt | 11 ++++++++ sdk/config/ccimx53js/conf-notes.txt | 11 ++++++++ sdk/config/ccimx6adpt/conf-notes.txt | 11 ++++++++ sdk/config/ccimx6sbc/conf-notes.txt | 11 ++++++++ sdk/mkproject.sh | 35 ++++++++++++++++++++------ 6 files changed, 83 insertions(+), 7 deletions(-) create mode 100644 sdk/config/ccardimx28js/conf-notes.txt create mode 100644 sdk/config/ccimx51js/conf-notes.txt create mode 100644 sdk/config/ccimx53js/conf-notes.txt create mode 100644 sdk/config/ccimx6adpt/conf-notes.txt create mode 100644 sdk/config/ccimx6sbc/conf-notes.txt diff --git a/sdk/config/ccardimx28js/conf-notes.txt b/sdk/config/ccardimx28js/conf-notes.txt new file mode 100644 index 000000000..b9e4deb0e --- /dev/null +++ b/sdk/config/ccardimx28js/conf-notes.txt @@ -0,0 +1,11 @@ +Digi Embedded Yocto provides two target images: + + * dey-image-minimal: command line busybox-based image + + This image does not support the X11 window system so in order to build + it you need to add the following line to the project's conf/local.conf: + + DISTRO_FEATURES_remove = "x11" + + * dey-image-graphical: graphical X11-based image with SATO theme + diff --git a/sdk/config/ccimx51js/conf-notes.txt b/sdk/config/ccimx51js/conf-notes.txt new file mode 100644 index 000000000..b9e4deb0e --- /dev/null +++ b/sdk/config/ccimx51js/conf-notes.txt @@ -0,0 +1,11 @@ +Digi Embedded Yocto provides two target images: + + * dey-image-minimal: command line busybox-based image + + This image does not support the X11 window system so in order to build + it you need to add the following line to the project's conf/local.conf: + + DISTRO_FEATURES_remove = "x11" + + * dey-image-graphical: graphical X11-based image with SATO theme + diff --git a/sdk/config/ccimx53js/conf-notes.txt b/sdk/config/ccimx53js/conf-notes.txt new file mode 100644 index 000000000..b9e4deb0e --- /dev/null +++ b/sdk/config/ccimx53js/conf-notes.txt @@ -0,0 +1,11 @@ +Digi Embedded Yocto provides two target images: + + * dey-image-minimal: command line busybox-based image + + This image does not support the X11 window system so in order to build + it you need to add the following line to the project's conf/local.conf: + + DISTRO_FEATURES_remove = "x11" + + * dey-image-graphical: graphical X11-based image with SATO theme + diff --git a/sdk/config/ccimx6adpt/conf-notes.txt b/sdk/config/ccimx6adpt/conf-notes.txt new file mode 100644 index 000000000..b9e4deb0e --- /dev/null +++ b/sdk/config/ccimx6adpt/conf-notes.txt @@ -0,0 +1,11 @@ +Digi Embedded Yocto provides two target images: + + * dey-image-minimal: command line busybox-based image + + This image does not support the X11 window system so in order to build + it you need to add the following line to the project's conf/local.conf: + + DISTRO_FEATURES_remove = "x11" + + * dey-image-graphical: graphical X11-based image with SATO theme + diff --git a/sdk/config/ccimx6sbc/conf-notes.txt b/sdk/config/ccimx6sbc/conf-notes.txt new file mode 100644 index 000000000..b9e4deb0e --- /dev/null +++ b/sdk/config/ccimx6sbc/conf-notes.txt @@ -0,0 +1,11 @@ +Digi Embedded Yocto provides two target images: + + * dey-image-minimal: command line busybox-based image + + This image does not support the X11 window system so in order to build + it you need to add the following line to the project's conf/local.conf: + + DISTRO_FEATURES_remove = "x11" + + * dey-image-graphical: graphical X11-based image with SATO theme + diff --git a/sdk/mkproject.sh b/sdk/mkproject.sh index ed135bd92..2b65b9eeb 100755 --- a/sdk/mkproject.sh +++ b/sdk/mkproject.sh @@ -30,6 +30,16 @@ MKP_CONFIGPATH="${MKP_SCRIPTPATH}/sources/meta-digi/sdk/config" # Blacklist platforms (not officially supported in a DEY release) MKP_BLACKLIST_PLATFORMS="" +MKP_SETUP_ENVIRONMENT='#!/bin/bash + +if [ "${BASH_SOURCE}" = "${0}" ]; then + printf "\\n[ERROR]: This script needs to be sourced\\n\\n" +else + cd $(dirname ${BASH_SOURCE}) + . %s/sources/poky/oe-init-build-env . +fi +' + ## Local functions usage() { cat < ${MKP_PROJECTPATH}/dey-setup-environment + chmod +x ${MKP_PROJECTPATH}/dey-setup-environment fi } @@ -137,6 +148,16 @@ else fi # clean-up all variables (so the script can be re-sourced) -unset MKP_AVAILABLE_PLATFORMS MKP_BLACKLIST_PLATFORMS MKP_GREEN MKP_LIST_PLATFORMS \ - MKP_NONE MKP_OLD_PROJECT MKP_PLATFORM MKP_PROJECTPATH MKP_RED MKP_SCRIPTNAME \ - MKP_SCRIPTPATH MKP_VARIANT +unset MKP_AVAILABLE_PLATFORMS \ + MKP_BLACKLIST_PLATFORMS \ + MKP_GREEN \ + MKP_LIST_PLATFORMS \ + MKP_NONE \ + MKP_OLD_PROJECT \ + MKP_PLATFORM \ + MKP_PROJECTPATH \ + MKP_RED \ + MKP_SCRIPTNAME \ + MKP_SCRIPTPATH \ + MKP_SETUP_ENVIRONMENT \ + MKP_VARIANT