From 6db046c19d4b137ca458dcf8bb2c8a3f86dc5675 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Mon, 4 Apr 2016 16:28:50 -0500 Subject: [PATCH 1/4] rust-llvm: combine do_install_append() There were two different do_install_append()'s and they didn't check for errors so this improves that situation. --- recipes-devtools/rust/rust-llvm.inc | 10 +++++----- recipes-devtools/rust/rust-llvm_1.10.0.bb | 6 ------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/recipes-devtools/rust/rust-llvm.inc b/recipes-devtools/rust/rust-llvm.inc index 3c94492..201b1d0 100644 --- a/recipes-devtools/rust/rust-llvm.inc +++ b/recipes-devtools/rust/rust-llvm.inc @@ -33,11 +33,11 @@ do_install_append () { # Remove the debug info (>2 GB) as part of normal operation rm -rf ${D}${bindir}/.debug - cd ${D}${bindir} - ln -s *-llc llc - for i in *-llvm-*; do - link=$(echo $i | sed -e 's/.*-llvm-\(.*\)/\1/') - ln -sf $i llvm-$link + cd ${D}${bindir} || bbfatal "failed to cd ${D}${bindir}" + for i in *-llvm-* *-llc *-lli *-FileCheck; do + link=$(echo $i | sed -e "s/${TARGET_SYS}-\(.*\)/\1/") + [ -e "${i}" ] || bbfatal "no such file to symlink to ${i}" + ln -sf "$i" "${link}" || bbfatal "failed to symlink ${link} to ${i}" done } diff --git a/recipes-devtools/rust/rust-llvm_1.10.0.bb b/recipes-devtools/rust/rust-llvm_1.10.0.bb index 36a8212..6405153 100644 --- a/recipes-devtools/rust/rust-llvm_1.10.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.10.0.bb @@ -2,9 +2,3 @@ require rust-llvm.inc SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db" SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869" - -do_install_append () { - cd "${B}" - install -d "${D}${bindir}" - install -m755 "Release/bin/FileCheck" "${D}${bindir}" -} From 101e818ec57185c42a8d8ad3114886269b05634f Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Wed, 2 Nov 2016 08:59:13 -0500 Subject: [PATCH 2/4] fetch: ensure we default to a Yocto branch Instead of a funky git error let's default to the master branch and let the user know that we made that choice for them. --- scripts/fetch.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/fetch.sh b/scripts/fetch.sh index 4a54df3..b428261 100755 --- a/scripts/fetch.sh +++ b/scripts/fetch.sh @@ -1,16 +1,23 @@ #!/bin/bash -x +# default repo +if [[ $# -lt 1 ]]; then + echo "No Yocto branch specified, defaulting to master" + echo "To change this pass a Yocto branch name as an argument to this script" +fi +branch=${1-master} + # the repos we want to check out, must setup variables below # NOTE: poky must remain first REPOS="poky metaoe" POKY_URI="git://git.yoctoproject.org/poky.git" POKY_PATH="poky" -POKY_REV="${POKY_REV-refs/remotes/origin/$1}" +POKY_REV="${POKY_REV-refs/remotes/origin/${branch}}" METAOE_URI="git://git.openembedded.org/meta-openembedded.git" METAOE_PATH="poky/meta-openembedded" -METAOE_REV="${METAOE_REV-refs/remotes/origin/$1}" +METAOE_REV="${METAOE_REV-refs/remotes/origin/${branch}}" METARUST_URI="." METARUST_PATH="poky/meta-rust" From ea040ab01d88f833ede038ff2ba1d7d4b57872cd Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Wed, 2 Nov 2016 11:15:38 -0500 Subject: [PATCH 3/4] build: make the default machine x86_64 --- conf/local.conf.sample | 2 +- scripts/build.sh | 2 +- scripts/containerize.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/local.conf.sample b/conf/local.conf.sample index 08e6e7e..3429110 100644 --- a/conf/local.conf.sample +++ b/conf/local.conf.sample @@ -35,7 +35,7 @@ #MACHINE ?= "edgerouter" # # This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "qemux86" +MACHINE ??= "qemux86-64" # # Where to place downloads diff --git a/scripts/build.sh b/scripts/build.sh index 7c40381..cfff7c1 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,7 +1,7 @@ #!/bin/bash # Grab the MACHINE from the environment; otherwise, set it to a sane default -export MACHINE="${MACHINE-qemux86}" +export MACHINE="${MACHINE-qemux86-64}" # What to build BUILD_TARGETS="\ diff --git a/scripts/containerize.sh b/scripts/containerize.sh index c9ac0db..499378b 100755 --- a/scripts/containerize.sh +++ b/scripts/containerize.sh @@ -43,7 +43,7 @@ exec docker run \ -e BUILD_UID=${my_uid} \ -e BUILD_GID=${my_gid} \ -e TEMPLATECONF=meta-rust/conf \ - -e MACHINE=${MACHINE:-qemux86} \ + -e MACHINE=${MACHINE:-qemux86-64} \ ${SSH_AUTH_SOCK:+-e SSH_AUTH_SOCK="/tmp/ssh-agent/${SSH_AUTH_NAME}"} \ -v ${HOME}/.ssh:/var/build/.ssh \ -v "${PWD}":/var/build:rw \ From 8f809476c02598c6177275ed996299aca0981a9c Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Thu, 3 Nov 2016 10:41:04 -0500 Subject: [PATCH 4/4] add build/ and poky/ to ignore Since we have some helper scripts to build poky in the top level here for testing then we should ignore build/ and poky/ --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0d20b64..5d84268 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *.pyc +build/ +poky/