Skip to content

Commit

Permalink
Merge pull request #69 from kraj/kraj/master
Browse files Browse the repository at this point in the history
Add layer manipulation commands to envsetup
  • Loading branch information
cbrake committed Aug 29, 2018
2 parents 4547bfc + 7727ccd commit e0487bb
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 15 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Using
This is where all the magic happens. In general, this build system
must be run in a bash shell. To set up the environment, source the following file:

. envsetup.sh
. ./envsetup.sh

This file will create a bunch of functions in the environment
prefixed with oe\_ that can be executed. Type oe\_ <tab><tab>
Expand All @@ -93,13 +93,15 @@ directory specific variables based on the build system location.

### adding a new layer

* git submodule add <git URI> sources/meta-mylayer
* add layer to conf/bblayers.conf
* Adding rocko branch of meta-altera layer to layer mix

oe_add_layer https://github.com/kraj/meta-altera rocko

### removing a new layer

* git rm sources/meta-mylayer
* remove layer from conf/bblayers.conf
* Remove meta-altera

oe_remove_layer meta-altera

### customizing settings

Expand Down
37 changes: 37 additions & 0 deletions envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,43 @@ function oe_search_text() {
cd -
}

function oe_add_layer() {
if test -z $1; then
echo "Usage: oe_add_layer <url> [<branch>]"
return
fi
cd $OE_BASE
if [ -z "$2" ]; then
br="master"
else
br="$2"
fi
n=`echo $1 | awk -F "[/:]" '{ print $NF }'`
if [[ -e sources/$n && ! -e sources/$n/.git ]]; then
echo "'sources/$n' already exists and is not a valid git repo"
return
fi
git submodule add -b $br -f $1 sources/$n
git submodule init sources/$n
bitbake-layers add-layer sources/$n && sed -i -e "s|$OE_BASE|\${TOPDIR}|" conf/bblayers.conf
echo "please commit with - git add conf/bblayers.conf && git commit -s -m'Added module $n'"
}

function oe_remove_layer() {
if test -z $1; then
echo "Usage: oe_remove_layer <layer-name>"
return
fi
cd $OE_BASE
m=sources/$1
bitbake-layers remove-layer $1
git submodule deinit -f $m
git rm -r -f $m
echo "please commit with - git add conf/bblayers.conf && git commit -s -m'Added module $n'"
rm -rf .git/modules/$m
#rm -rf $m
}

function 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
Expand Down
3 changes: 0 additions & 3 deletions imx6ul-var-dart-envsetup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export MACHINE=imx6ul-var-dart
export MACHINE_SHORT=dart

. envsetup.sh

function oe_partition_sd_mx6() {
Expand Down
2 changes: 1 addition & 1 deletion minnowboard-max-envsetup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TODO add MACHINE export
. envsetup.sh

# Minnowboard max functions
function oe_partition_sd_mbm() {
Expand Down
2 changes: 0 additions & 2 deletions overo-envsetup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export MACHINE=overo

. envsetup.sh

function oe_partition_sd() {
Expand Down
1 change: 1 addition & 0 deletions qemuriscv64-envsetup.sh
2 changes: 1 addition & 1 deletion sources/meta-ti
Submodule meta-ti updated from 1f8afb to b98767
2 changes: 1 addition & 1 deletion sources/openembedded-core
Submodule openembedded-core updated 36 files
+16 −6 meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
+8 −0 meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/gdb.sh
+10 −0 meta/classes/cpan.bbclass
+38 −6 meta/classes/kernel-yocto.bbclass
+7 −4 meta/classes/package.bbclass
+1 −1 meta/classes/sstate.bbclass
+2 −1 meta/classes/terminal.bbclass
+1 −1 meta/conf/distro/include/tcmode-default.inc
+1 −1 meta/conf/machine/include/x86-base.inc
+1 −1 meta/conf/machine/qemuarm.conf
+37 −2 meta/lib/oeqa/selftest/cases/package.py
+1 −0 meta/recipes-connectivity/bluez5/bluez5.inc
+43 −0 meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch
+2 −2 meta/recipes-core/busybox/files/mdev-mount.sh
+0 −7 meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
+0 −6 meta/recipes-graphics/cairo/cairo-fpu.inc
+0 −49 meta/recipes-graphics/cairo/cairo.inc
+57 −18 meta/recipes-graphics/cairo/cairo_1.14.12.bb
+150 −0 meta/recipes-kernel/blktrace/blktrace/CVE-2018-10689.patch
+1 −0 meta/recipes-kernel/blktrace/blktrace_git.bb
+1 −1 meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+2 −2 meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+2 −3 meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
+3 −3 meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
+3 −3 meta/recipes-kernel/linux/linux-yocto-rt_4.14.bb
+1 −1 meta/recipes-kernel/linux/linux-yocto-rt_4.15.bb
+43 −0 meta/recipes-kernel/linux/linux-yocto-rt_4.18.bb
+3 −3 meta/recipes-kernel/linux/linux-yocto-tiny_4.12.bb
+3 −3 meta/recipes-kernel/linux/linux-yocto-tiny_4.14.bb
+1 −1 meta/recipes-kernel/linux/linux-yocto-tiny_4.15.bb
+29 −0 meta/recipes-kernel/linux/linux-yocto-tiny_4.18.bb
+10 −10 meta/recipes-kernel/linux/linux-yocto_4.12.bb
+10 −10 meta/recipes-kernel/linux/linux-yocto_4.14.bb
+1 −1 meta/recipes-kernel/linux/linux-yocto_4.15.bb
+48 −0 meta/recipes-kernel/linux/linux-yocto_4.18.bb
+3 −3 meta/recipes-kernel/lttng/lttng-modules_2.10.7.bb

0 comments on commit e0487bb

Please sign in to comment.