Skip to content

Commit

Permalink
Merge pull request #70 from kraj/kraj/master
Browse files Browse the repository at this point in the history
Fix envscript for bash and update layers
  • Loading branch information
cbrake committed Aug 30, 2018
2 parents e0487bb + aa9d0f0 commit 7bf2295
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 28 deletions.
55 changes: 31 additions & 24 deletions envsetup.sh
Expand Up @@ -20,7 +20,7 @@
#
if [ -f local.sh ]; then
echo "reading local settings"
source local.sh
. ./local.sh
fi
BUILDHOST_DISTRO=$(egrep -h '^ID=' /etc/*-release | sed 's#^ID=##')

Expand All @@ -33,7 +33,16 @@ BUILDHOST_DISTRO=$(egrep -h '^ID=' /etc/*-release | sed 's#^ID=##')
# so we can create symlinks like
# <machine>-envsetup.sh -> envsetup.sh
# and it will automatically set MACHINE variable
scriptname=${0##*/}

if [ "${0##*/}" = "dash" ]; then
echo "dash shell is not supported"
return
fi

arg0=$0
test -n "$BASH" && arg0=$BASH_SOURCE[0]

scriptname="${arg0##*/}"
mach=${scriptname%-*}
if [ -n "${mach}" -a "${mach}" != "${scriptname}" ]; then
MACHINE=${mach}
Expand Down Expand Up @@ -98,9 +107,7 @@ export OE_BASE
export PATH=${OE_SOURCE_DIR}/openembedded-core/scripts:${OE_SOURCE_DIR}/bitbake/bin:${PATH}
export PATH=${OE_BASE}/tools:${PATH}
# remove duplicate entries from path
# export PATH=`echo $PATH_ | awk -F: '{for (i=1;i<=NF;i++) { if ( !x[$i]++ ) printf("%s:",$i); }}'`
export PATH=$(awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}' <<<$PATH)

export PATH=`echo $PATH | tr ':' '\n' | sort | uniq | tr '\n' ':'`
#--------------------------------------------------------------------------
# Make sure Bitbake doesn't filter out the following variables from our
# environment.
Expand Down Expand Up @@ -141,7 +148,7 @@ fi
#--------------------------------------------------------------------------

if [ -e ${OE_ENV_FILE} ]; then
source ${OE_ENV_FILE}
. ./${OE_ENV_FILE}
fi

if [ x"${BASE_VERSION}" != x"${SCRIPTS_BASE_VERSION}" ]; then
Expand All @@ -154,7 +161,7 @@ elif [ x"${DISTRO_DIRNAME}" != x"${SCRIPTS_DISTRO_DIRNAME}" ]; then
fi

if [ -e ${OE_ENV_FILE} ]; then
source ${OE_ENV_FILE}
. ./${OE_ENV_FILE}
else

#--------------------------------------------------------------------------
Expand Down Expand Up @@ -196,18 +203,18 @@ fi # if -e ${OE_ENV_FILE}
###############################################################################
# UPDATE_ALL() - Make sure everything is up to date
###############################################################################
function oe_update_all() {
oe_update_all() {
git submodule update
}

function oe_update_all_submodules_to_master() {
oe_update_all_submodules_to_master() {
git submodule foreach "git checkout master && git pull"
}

###############################################################################
# CLEAN_OE() - Delete TMPDIR
###############################################################################
function oe_clean() {
oe_clean() {
echo "Cleaning ${OE_BUILD_TMPDIR}"
rm -rf ${OE_BUILD_TMPDIR}
}
Expand All @@ -216,7 +223,7 @@ function oe_clean() {
# OE_CONFIG() - Configure OE for a target
# machine is first parameter
###############################################################################
function oe_setup() {
oe_setup() {
git submodule init
git submodule update

Expand All @@ -225,7 +232,7 @@ function oe_setup() {
###############################################################################
# CONFIG_SVN_PROXY() - Configure subversion proxy information
###############################################################################
function oe_config_svn_proxy() {
oe_config_svn_proxy() {
if [ ! -f ${SVN_CONFIG_DIR}/servers ]; then
mkdir -p ${SVN_CONFIG_DIR}
cat >>${SVN_CONFIG_DIR}/servers <<_EOF
Expand All @@ -239,7 +246,7 @@ _EOF
###############################################################################
# CONFIG_GIT_PROXY() - Configure GIT proxy information
###############################################################################
function oe_config_git_proxy() {
oe_config_git_proxy() {
if [ ! -f ${GIT_CONFIG_DIR}/git-proxy.sh ]; then
mkdir -p ${GIT_CONFIG_DIR}
cat >${GIT_CONFIG_DIR}/git-proxy.sh <<_EOF
Expand All @@ -254,7 +261,7 @@ _EOF
fi
}

function oe_feed_server() {
oe_feed_server() {
SAVEDPWD=$PWD
cd $OE_BASE
bitbake package-index
Expand All @@ -263,7 +270,7 @@ function oe_feed_server() {
cd $SAVEDPWD
}

function oe_setup_feed_server() {
oe_setup_feed_server() {
# set TARGET_IP in local.sh
# set HOST_IP in local.sh if different
if [ -n "${HOST_IP}" ]; then
Expand All @@ -277,7 +284,7 @@ function oe_setup_feed_server() {
fi
}

function oe_search_file() {
oe_search_file() {
if [ -z $1 ]; then
echo "Usage: oe_search_file filename"
return
Expand All @@ -287,7 +294,7 @@ function oe_search_file() {
cd -
}

function oe_search_text() {
oe_search_text() {
if test -z $1; then
echo "Usage: oe_search_text searchtext"
return
Expand All @@ -297,7 +304,7 @@ function oe_search_text() {
cd -
}

function oe_add_layer() {
oe_add_layer() {
if test -z $1; then
echo "Usage: oe_add_layer <url> [<branch>]"
return
Expand All @@ -319,7 +326,7 @@ function oe_add_layer() {
echo "please commit with - git add conf/bblayers.conf && git commit -s -m'Added module $n'"
}

function oe_remove_layer() {
oe_remove_layer() {
if test -z $1; then
echo "Usage: oe_remove_layer <layer-name>"
return
Expand All @@ -334,13 +341,13 @@ function oe_remove_layer() {
#rm -rf $m
}

function oe_console() {
oe_console() {
# requires serial->usb device be mapped to /dev/ttyUSB_<machine name>
# see http://bec-systems.com/site/1004/perisistent-device-names-usb-serial-ports
screen /dev/ttyUSB_${MACHINE} 115200
}

function oe_build_all() {
oe_build_all() {
# build images for all routinely tested platforms
MACHINES="beagleboard beaglebone overo wandboard-dual imx6ul-var-dart"
for m in $MACHINES; do
Expand All @@ -353,7 +360,7 @@ function oe_build_all() {
done
}

function oe_clean_sstate() {
oe_clean_sstate() {
$OE_BASE/sources/openembedded-core/scripts/sstate-cache-management.sh -d -y --cache-dir=$OE_BASE/build/sstate-cache
}

Expand All @@ -363,7 +370,7 @@ function oe_clean_sstate() {
# it will get set in container, which is not what you want.
# local.sh is a good place to set DOCKER_REPO

function dkr() {
dkr() {
CMD="$1"

if [ -z "$CMD" ]; then
Expand All @@ -382,7 +389,7 @@ function dkr() {
${DOCKER_REPO} /bin/bash -c "cd $(pwd) && . envsetup.sh && $CMD $2 $3 $4 $5 $6 $7 $8"
}

function bitbake() {
bitbake() {
if [ -z $DOCKER_REPO ]; then
${OE_BASE}/sources/bitbake/bin/bitbake $@
else
Expand Down
2 changes: 1 addition & 1 deletion sources/bitbake
Submodule bitbake updated 1 files
+2 −2 lib/bb/tests/fetch.py
2 changes: 1 addition & 1 deletion sources/meta-intel
Submodule meta-intel updated from 5e8e52 to 4d5fcb
2 changes: 1 addition & 1 deletion sources/meta-ti
Submodule meta-ti updated from b98767 to 471e02
2 changes: 1 addition & 1 deletion sources/openembedded-core
Submodule openembedded-core updated 23 files
+32 −0 meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
+34 −0 meta/recipes-connectivity/bind/bind/0001-named-lwresd-V-and-start-log-hide-build-options.patch
+2 −0 meta/recipes-connectivity/bind/bind_9.11.4.bb
+20 −0 meta/recipes-devtools/ruby/ruby_2.5.1.bb
+47 −0 meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch
+1 −0 meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+81 −0 meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch
+1 −0 meta/recipes-extended/ltp/ltp_20180515.bb
+32 −0 meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch
+11 −18 meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.0.bb
+1 −3 meta/recipes-kernel/kmod/kmod_git.bb
+33 −0 meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.dpatch
+1 −0 meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
+5 −10 meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+0 −66 meta/recipes-multimedia/pulseaudio/pulseaudio/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch
+0 −70 meta/recipes-multimedia/pulseaudio/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch
+2 −4 meta/recipes-multimedia/pulseaudio/pulseaudio_12.2.bb
+56 −0 meta/recipes-support/libcroco/libcroco/CVE-2017-7960.patch
+2 −0 meta/recipes-support/libcroco/libcroco_0.6.12.bb
+40 −0 meta/recipes-support/libexif/libexif/CVE-2017-7544.patch
+2 −1 meta/recipes-support/libexif/libexif_0.6.21.bb
+3 −1 meta/recipes-support/nss/nss_3.38.bb
+3 −3 scripts/lib/wic/plugins/source/isoimage-isohybrid.py

0 comments on commit 7bf2295

Please sign in to comment.