Created
February 6, 2018 06:26
-
-
Save NGenetzky/3c943d3766ba5dc16d0cccad0030e4ea to your computer and use it in GitHub Desktop.
Building with [resin-beaglebone](https://github.com/resin-os/resin-beaglebone).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OPTIONS='' | |
# Options: | |
# -h | --help | |
# Print this message. | |
# -m | --machine | |
OPTIONS+=" --machine beaglebone" | |
# Build a machine supported by this layer. | |
# Default: build all machines supported by this layer. | |
# -k | --continue | |
# Run bitbake with "-k" argument. | |
# From bitbake manual: | |
# Continue as much as possible after an error. While the | |
# target that failed and anything depending on it cannot | |
# be built, as much as possible will be built before | |
# stopping | |
# -c | --compress | |
# Run build with compress variable (RESIN_SDIMG_COMPRESSION) | |
# using xz. | |
# Default: no. | |
OPTIONS+=" --development-image" | |
# Set images to include development tweaks. | |
# Default: no. | |
# -a | --additional-variable | |
# Inject additional local.conf variables. | |
# The format of the arguments need to be VARIABLE=VALUE . | |
# VALUE doesn't support white spaces. | |
# --resinio | |
# Set build configuration for resin-io. | |
# Default: no. | |
# --supervisor-tag | |
# Use a specific supervisor tag. | |
# Default: production. | |
# -r | --remove-build | |
# Run a clean build by removing the build directory before | |
# building. | |
# Build directory name is configurable with -b|--build-name. | |
# Default: no. | |
# -b | --build-name | |
# Set build directory name. | |
# If clean build was selected with -r|--remove-build this | |
# directory will be removed. | |
# Default: build. | |
OPTIONS+=" --shared-downloads /data/yocto-resin/downloads" | |
# Use a custom absolute path for DL_DIR. | |
# Default: don't have a custom path. | |
OPTIONS+=" --shared-sstate /data/yocto-resin/sstate-cache" | |
# --shared-sstate | |
# Use a custom absolute path for SSTATE_DIR. | |
# Default: don't have a custom path. | |
# -l | --log | |
# Log in barys.log. | |
# Default: no. | |
# OPTIONS+=" --dry-run" | |
# -n | --dry-run | |
# Don't run bitbake but only configure build as requested. | |
# Machine is ignored and will need to be modified accordingly | |
# in local.conf file or using MACHINE=yyy in front of bitbake | |
# commands. | |
# Be aware that with this flag the tool will only create and | |
# configure the build directory. You will need to 'source' the | |
# oe-init-build-env script from the poky submodule before being | |
# able to run bitbake commands. | |
# Default: no. | |
# --rm-work | |
# Inherit rm_work in local.conf. | |
# Default: no. | |
# --build-history | |
OPTIONS+=" --build-history" | |
# Enable build history. | |
# Default: no. | |
# -i | --interactive | |
# Run tool in interactive mode. | |
# Default: no. | |
# -v | --version | |
# Print version | |
setup_tmp() | |
{ | |
export TMPDIR='/data/yocto-resin/resin-beaglebone/0/tmp' | |
mkdir -p "${TMPDIR}" | |
ln -sfT "${TMPDIR}" "./build/tmp" | |
} | |
build() | |
{ | |
setup_tmp | |
echo "barys $OPTIONS" | |
./resin-yocto-scripts/build/barys $OPTIONS | |
} | |
build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment