summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/files
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/files')
-rw-r--r--yocto-poky/meta/files/common-licenses/ParaTypeFFL-1.344
-rw-r--r--yocto-poky/meta/files/ext-sdk-prepare.py103
-rw-r--r--yocto-poky/meta/files/ext-sdk-prepare.sh20
-rw-r--r--yocto-poky/meta/files/fs-perms.txt3
-rw-r--r--yocto-poky/meta/files/toolchain-shar-extract.sh28
-rw-r--r--yocto-poky/meta/files/toolchain-shar-relocate.sh21
6 files changed, 194 insertions, 25 deletions
diff --git a/yocto-poky/meta/files/common-licenses/ParaTypeFFL-1.3 b/yocto-poky/meta/files/common-licenses/ParaTypeFFL-1.3
new file mode 100644
index 000000000..8357965be
--- /dev/null
+++ b/yocto-poky/meta/files/common-licenses/ParaTypeFFL-1.3
@@ -0,0 +1,44 @@
+ParaType Free Font Licensing Agreement
+
+Copyright (c) 2009, ParaType Ltd. All Rights Reserved.
+
+LICENSING AGREEMENT
+for the fonts with Original Name: PT Sans, PT Serif, PT Mono
+Version 1.3 - January 20, 2012
+
+GRANT OF LICENSE
+ParaType Ltd grants you the right to use, copy, modify the fonts and
+distribute modified and unmodified copies of the fonts by any means,
+including placing on Web servers for free downloading, embedding in
+documents and Web pages, bundling with commercial and non commercial
+products, if it does not conflict with the conditions listed below:
+
+- You may bundle the fonts with commercial software, but you may not
+sell the fonts by themselves. They are free.
+
+- You may distribute the fonts in modified or unmodified versions only
+together with this Licensing Agreement and with above copyright notice.
+You have no right to modify the text of Licensing Agreement. It can be
+placed in a separate text file or inserted into the font file, but it
+must be easily viewed by users.
+
+- You may not distribute modified version of the font under the Original
+name or a combination of Original name with any other words without
+explicit written permission from ParaType.
+
+TERMINATION & TERRITORY
+This license has no limits on time and territory, but it becomes null
+and void if any of the above conditions are not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+PARATYPE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
+ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS
+IN THE FONT SOFTWARE.
+
+ParaType Ltd
diff --git a/yocto-poky/meta/files/ext-sdk-prepare.py b/yocto-poky/meta/files/ext-sdk-prepare.py
new file mode 100644
index 000000000..605e2ebef
--- /dev/null
+++ b/yocto-poky/meta/files/ext-sdk-prepare.py
@@ -0,0 +1,103 @@
+#!/usr/bin/env python
+
+# Prepare the build system within the extensible SDK
+
+import sys
+import os
+import subprocess
+
+def exec_watch(cmd, **options):
+ """Run program with stdout shown on sys.stdout"""
+ if isinstance(cmd, basestring) and not "shell" in options:
+ options["shell"] = True
+
+ process = subprocess.Popen(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **options
+ )
+
+ buf = ''
+ while True:
+ out = process.stdout.read(1)
+ if out:
+ sys.stdout.write(out)
+ sys.stdout.flush()
+ buf += out
+ elif out == '' and process.poll() != None:
+ break
+
+ return process.returncode, buf
+
+def check_unexpected(lines, recipes):
+ """Check for unexpected output lines from dry run"""
+ unexpected = []
+ for line in lines.splitlines():
+ if 'Running task' in line:
+ for recipe in recipes:
+ if recipe in line:
+ break
+ else:
+ line = line.split('Running', 1)[-1]
+ if 'do_rm_work' not in line:
+ unexpected.append(line.rstrip())
+ elif 'Running setscene' in line:
+ unexpected.append(line.rstrip())
+ return unexpected
+
+def main():
+ if len(sys.argv) < 2:
+ sdk_targets = []
+ else:
+ sdk_targets = ' '.join(sys.argv[1:]).split()
+ if not sdk_targets:
+ # Just do a parse so the cache is primed
+ ret, _ = exec_watch('bitbake -p')
+ return ret
+
+ print('Preparing SDK for %s...' % ', '.join(sdk_targets))
+
+ ret, out = exec_watch('bitbake %s --setscene-only' % ' '.join(sdk_targets))
+ if ret:
+ return ret
+
+ targetlist = []
+ for target in sdk_targets:
+ if ':' in target:
+ target = target.split(':')[0]
+ if not target in targetlist:
+ targetlist.append(target)
+
+ recipes = []
+ for target in targetlist:
+ try:
+ out = subprocess.check_output(('bitbake -e %s' % target).split(), stderr=subprocess.STDOUT)
+ for line in out.splitlines():
+ if line.startswith('FILE='):
+ splitval = line.rstrip().split('=')
+ if len(splitval) > 1:
+ recipes.append(splitval[1].strip('"'))
+ break
+ except subprocess.CalledProcessError as e:
+ print('ERROR: Failed to get recipe for target %s:\n%s' % (target, e.output))
+ return 1
+
+ try:
+ out = subprocess.check_output('bitbake %s -n' % ' '.join(sdk_targets), stderr=subprocess.STDOUT, shell=True)
+ unexpected = check_unexpected(out, recipes)
+ except subprocess.CalledProcessError as e:
+ print('ERROR: Failed to execute dry-run:\n%s' % e.output)
+ return 1
+
+ if unexpected:
+ print('ERROR: Unexpected tasks or setscene left over to be executed:')
+ for line in unexpected:
+ print(' ' + line)
+ return 1
+
+if __name__ == "__main__":
+ try:
+ ret = main()
+ except Exception:
+ ret = 1
+ import traceback
+ traceback.print_exc()
+ sys.exit(ret)
diff --git a/yocto-poky/meta/files/ext-sdk-prepare.sh b/yocto-poky/meta/files/ext-sdk-prepare.sh
deleted file mode 100644
index 160c71e97..000000000
--- a/yocto-poky/meta/files/ext-sdk-prepare.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# Prepare the build system within the extensible SDK
-
-target_sdk_dir="$1"
-sdk_targets="$2"
-
-# Avoid actually building images during this phase, but still
-# ensure all dependencies are extracted from sstate
-# This is a hack, to be sure, but we really don't need to do this here
-for sdktarget in $sdk_targets ; do
- bbappend=`recipetool newappend $target_sdk_dir/workspace $sdktarget`
- printf 'python do_rootfs_forcevariable () {\n bb.utils.mkdirhier(d.getVar("IMAGE_ROOTFS", True))\n}\n' > $bbappend
- printf 'python do_bootimg () {\n pass\n}\n' >> $bbappend
- printf 'python do_bootdirectdisk () {\n pass\n}\n' >> $bbappend
- printf 'python do_vmimg () {\n pass\n}\n' >> $bbappend
- printf "Created bbappend %s\n" "$bbappend"
-done
-bitbake $sdk_targets || exit 1
-rm -rf $target_sdk_dir/workspace/appends/*
diff --git a/yocto-poky/meta/files/fs-perms.txt b/yocto-poky/meta/files/fs-perms.txt
index 109cbe553..3d00e862e 100644
--- a/yocto-poky/meta/files/fs-perms.txt
+++ b/yocto-poky/meta/files/fs-perms.txt
@@ -60,6 +60,9 @@ ${localstatedir}/local 0755 root root false - - -
/tmp 01777 root root false - - -
${localstatedir}/volatile/tmp 01777 root root false - - -
+# Set 0700
+${ROOT_HOME} 0700 root root false - - -
+
# Set 755-lsb
/srv 0755 root root false - - -
diff --git a/yocto-poky/meta/files/toolchain-shar-extract.sh b/yocto-poky/meta/files/toolchain-shar-extract.sh
index 35d3c7550..397be1119 100644
--- a/yocto-poky/meta/files/toolchain-shar-extract.sh
+++ b/yocto-poky/meta/files/toolchain-shar-extract.sh
@@ -1,5 +1,11 @@
#!/bin/sh
+[ -z "$ENVCLEANED" ] && exec /usr/bin/env -i ENVCLEANED=1 HOME="$HOME" \
+ http_proxy="$http_proxy" https_proxy="$https_proxy" ftp_proxy="$ftp_proxy" \
+ no_proxy="$no_proxy" all_proxy="$all_proxy" GIT_PROXY_COMMAND="$GIT_PROXY_COMMAND" "$0" "$@"
+[ -f /etc/environment ] && . /etc/environment
+export PATH=`echo "$PATH" | sed -e 's/:\.//' -e 's/::/:/'`
+
INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
@@ -25,14 +31,21 @@ if [ "$INST_ARCH" != "$SDK_ARCH" ]; then
fi
fi
+if ! xz -V > /dev/null 2>&1; then
+ echo "Error: xz is required for installation of this SDK, please install it first"
+ exit 1
+fi
+
DEFAULT_INSTALL_DIR="@SDKPATH@"
SUDO_EXEC=""
+EXTRA_TAR_OPTIONS=""
target_sdk_dir=""
answer=""
relocate=1
savescripts=0
verbose=0
-while getopts ":yd:nDRS" OPT; do
+publish=0
+while getopts ":yd:npDRS" OPT; do
case $OPT in
y)
answer="Y"
@@ -43,6 +56,10 @@ while getopts ":yd:nDRS" OPT; do
n)
prepare_buildsystem="no"
;;
+ p)
+ prepare_buildsystem="no"
+ publish=1
+ ;;
D)
verbose=1
;;
@@ -59,6 +76,7 @@ while getopts ":yd:nDRS" OPT; do
echo " -d <dir> Install the SDK to <dir>"
echo "======== Extensible SDK only options ============"
echo " -n Do not prepare the build system"
+ echo " -p Publish mode (implies -n)"
echo "======== Advanced DEBUGGING ONLY OPTIONS ========"
echo " -S Save relocation scripts"
echo " -R Do not relocate executables"
@@ -99,6 +117,12 @@ else
target_sdk_dir=$(readlink -m "$target_sdk_dir")
fi
+# limit the length for target_sdk_dir, ensure the relocation behaviour in relocate_sdk.py has right result.
+if [ ${#target_sdk_dir} -gt 2048 ]; then
+ echo "Error: The target directory path is too long!!!"
+ exit 1
+fi
+
if [ "$SDK_EXTENSIBLE" = "1" ]; then
# We're going to be running the build system, additional restrictions apply
if echo "$target_sdk_dir" | grep -q '[+\ @$]'; then
@@ -164,7 +188,7 @@ fi
payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
printf "Extracting SDK..."
-tail -n +$payload_offset $0| $SUDO_EXEC tar xj -C $target_sdk_dir --checkpoint=.2500
+tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
echo "done"
printf "Setting it up..."
diff --git a/yocto-poky/meta/files/toolchain-shar-relocate.sh b/yocto-poky/meta/files/toolchain-shar-relocate.sh
index 4ef292717..d4bcf0e55 100644
--- a/yocto-poky/meta/files/toolchain-shar-relocate.sh
+++ b/yocto-poky/meta/files/toolchain-shar-relocate.sh
@@ -13,8 +13,23 @@ if [ x$tdir = x ] ; then
echo "SDK relocate failed, could not create a temporary directory"
exit 1
fi
-echo "#!/bin/bash" > $tdir/relocate_sdk.sh
-echo exec ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files >> $tdir/relocate_sdk.sh
+cat <<EOF >> $tdir/relocate_sdk.sh
+#!/bin/bash
+for py in python python2 python3
+do
+ PYTHON=\`which \${py} 2>/dev/null\`
+ if [ \$? -eq 0 ]; then
+ break;
+ fi
+done
+
+if [ x\${PYTHON} = "x" ]; then
+ echo "SDK could not be relocated. No python found."
+ exit 1
+fi
+\${PYTHON} ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files
+EOF
+
$SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh
$SUDO_EXEC chmod 755 ${env_setup_script%/*}/relocate_sdk.sh
rm -rf $tdir
@@ -32,7 +47,7 @@ for replace in "$target_sdk_dir -maxdepth 1" "$native_sysroot"; do
$SUDO_EXEC find $replace -type f
done | xargs -n100 file | grep ":.*\(ASCII\|script\|source\).*text" | \
awk -F':' '{printf "\"%s\"\n", $1}' | \
- grep -v "$target_sdk_dir/environment-setup-*" | \
+ grep -Ev "$target_sdk_dir/(environment-setup-*|relocate_sdk*|${0##*/})" | \
xargs -n100 $SUDO_EXEC sed -i \
-e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" \
-e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \