# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
# Note: currently, Konsole support only works for KDE 3.x due to the way
# newer Konsole versions behave
-OE_TERMINAL = "screen"
+OE_TERMINAL ?= "screen"
# By default disable interactive patch resolution (tasks will just fail instead):
-PATCHRESOLVE = "noop"
+PATCHRESOLVE ?= "noop"
#
# Disk Space Monitoring during the build
# this doesn't mean anything to you.
CONF_VERSION = "1"
+#
+# Interactive shell configuration
+#
+# Under certain circumstances the system may need input from you and to do this it
+# can launch an interactive shell. It needs to do this since the build is
+# multithreaded and needs to be able to handle the case where more than one parallel
+# process may require the user's attention. The default is iterate over the available
+# terminal types to find one that works.
+#
+# Examples of the occasions this may happen are when resolving patches which cannot
+# be applied, to use the devshell or the kernel menuconfig
+#
+# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
+# Note: currently, Konsole support only works for KDE 3.x due to the way
+# newer Konsole versions behave
+OE_TERMINAL = "gnome"
+# By default disable interactive patch resolution (tasks will just fail instead):
+PATCHRESOLVE = "noop"
+
#################################################
# remove work files when build succeeds
ycheck || return 1
pkg=${1:-$YOCTO_LAST_PKG}
- [[ -z "pkg" ]] && { echo "Usage: ytmp <pkg>" >&2; return 1; }
+ [[ -z "pkg" ]] && { echo "Usage: ybb <pkg>" >&2; return 1; }
ycd $pkg bb
}
ycheck || return 1
pkg=${1:-$YOCTO_LAST_PKG}
- [[ -z "pkg" ]] && { echo "Usage: ytmp <pkg>" >&2; return 1; }
+ [[ -z "pkg" ]] && { echo "Usage: ysrc <pkg>" >&2; return 1; }
ycd $pkg src
}
ycheck || return 1
pkg=${1:-$YOCTO_LAST_PKG}
- [[ -z "pkg" ]] && { echo "Usage: ytmp <pkg>" >&2; return 1; }
+ [[ -z "pkg" ]] && { echo "Usage: ydep <pkg>" >&2; return 1; }
+
+ pushd $YOCTO_BUILDDIR >/dev/null || return
bitbake -g -u depexp $pkg &
+ popd >/dev/null
+}
+
+function yshell () {
+ ycheck || return 1
+
+ pkg=${1:-$YOCTO_LAST_PKG}
+ [[ -z "pkg" ]] && { echo "Usage: yshell <pkg>" >&2; return 1; }
+ pushd $YOCTO_BUILDDIR >/dev/null || return
+ bitbake -c devshell $pkg
+ popd >/dev/null
+}
+
+function bbake() {
+ ycheck || return 1
+ pushd $YOCTO_BUILDDIR >/dev/null || return
+ bitbake "$@"
+ popd >/dev/null
}
+
function yed() {
ycheck || return 1
popd >/dev/null
}
+function yreport() {
+ ycheck || return 1
+
+ pushd $YOCTO_BUILDDIR >/dev/null || return
+
+ workdir=$(ls -d tmp-* 2>/dev/null)
+ [[ -z "$workdir" ]] && { echo "Unable to find work dir"; return 1; }
+
+ pushd $workdir/stamps >/dev/null || return 2
+
+ echo "Architecture;Package;Version;State"
+ for arch in $(ls -d * 2>/dev/null); do
+ pushd $arch >/dev/null || return 3
+ for pkg in $(ls -d * 2>/dev/null); do
+ data=$(ls -tr $pkg | grep -v ".sigdata." | tail -1 | awk '{ x=$0; gsub(/\.do_.+$/,"",x); y=substr($0,length(x)+5); gsub(/\..+$/,"",y); printf("%s;%s",x,y); }')
+
+ ver=$(cut -f1 -d';' <<<$data)
+ step=$(cut -f2 -d';' <<<$data)
+
+ state=$(egrep "^$step:" <<EOF
+:UNKNOWN
+fetch:FAIL
+unpack:FAIL
+patch:FAIL
+configure:FAIL
+compile:FAIL
+build :FAIL
+populate_lic:FAIL
+populate_sysroot:FAIL
+populate_sysroot_setscene:FAIL
+packagedata:OK
+packagedata_setscene:OK
+package_setscene:OK
+package_write:OK
+package_write_rpm:OK
+package_write_rpm_setscene:OK
+EOF
+)
+ state=$(cut -f2 -d':' <<<$state)
+
+ echo "$arch;$pkg;$ver;$step;$state"
+ done
+ popd >/dev/null
+ done
+
+ popd >/dev/null
+ popd >/dev/null
+}
+
if [[ "$PS1" ]]; then
echo "Sourced ~/.yoctorc"
fi