Build scripts simplification/cleanup pass #2
cover Build scripts simplification/cleanup pass #2
From: Denys Dmytriyenko <[email protected]>
Second pass at simplification and cleanup of tisdk-build-scripts takes aim at multi-machine build capabilities. Being able to build multiple machines in parallel or sequentially is no longer relevant with the introduction of Jenkins CI build farm.
This is the second and last of the major cleanup passes that preserves known existing use cases and keeps the API compatible. Further changes would require adjusting the way config files are modified and build script gets called from the build farm.
Denys Dmytriyenko (3):
build-oesdk.sh,lib/: remove support for multi-machine builds
configs: cleanup config files due to removed functionality build-oesdk.sh: allow overwriting machine on command line
build-oesdk.sh | 161 ++++++-------------- configs/farm/arago-dunfell-next.txt | 281 +---------------------------------- configs/farm/arago-dunfell.txt | 281 +---------------------------------- configs/farm/arago-master.txt | 281 +---------------------------------- configs/farm/distroless-dunfell.txt | 136 ++--------------- configs/farm/distroless-master.txt | 136 ++--------------- configs/farm/poky-dunfell.txt | 136 ++--------------- configs/farm/poky-master.txt | 136 ++--------------- lib/oesdk/bitbake-test-sdk-image | 107 +++++-------- lib/oesdk/config-build-env | 34 +---- lib/oesdk/machine-specific-functions | 68 --------- 11 files changed, 148 insertions(+), 1609 deletions(-) delete mode 100644 lib/oesdk/machine-specific-functions
Signature · 1 line
2.7.4
PATCH 1/3 build-oesdk.sh,lib/: remove support for multi-machine builds
From: Denys Dmytriyenko <[email protected]>
Remove support for driving multi-machine builds in parallel and serial modes.
Originally, tisdk-build-scripts could take multiple MACHINES and split them into 3 lists - ARMv5 (ARM9), ARMv7 (CORTEX) and ARMv8 (AARCH64). Then, it would split each list further down with up to NUM_*_BUILDS machines into separate buckets and then drive all buckets in parallel, while cycling through individual machines in each bucket sequentially.
With the introduction of scalable multi-node build farms, this functionality hasn't been used for years, so remove it to significantly simplify the code.
Add a check that only a single machine is specified in the MACHINES variable of the config file being processes.
--- build-oesdk.sh | 128 ++++++----------------------------- lib/oesdk/bitbake-test-sdk-image | 107 +++++++++++------------------ lib/oesdk/config-build-env | 34 ++-------- lib/oesdk/machine-specific-functions | 68 ------------------- 4 files changed, 65 insertions(+), 272 deletions(-) delete mode 100644 lib/oesdk/machine-specific-functions
build-oesdk.sh +19 -109
@@ -9,18 +9,6 @@ trap 'test -z "`jobs -p`" || kill `jobs -p` > /dev/null 2>&1; echo "I got a sign source ./lib/oesdk/config-build-env source ./lib/common-functions source ./lib/oesdk/bitbake-test-sdk-image -source ./lib/oesdk/machine-specific-functions - -# This variable holds the architectures that are being built based -# on the machines. -ARCHS="" - -# Variables to hold lists of machines sorted by architecture -ARM9_MACHINES="" -CORTEX_MACHINE="" - -# List of all the dynamically created architecture lists -LISTS="" if [ -z $LOG_DIR ] then
@@ -32,56 +20,6 @@ usage() { exit 0 } -# The purpose of this function is to take an architecture and go through -# all the machines for that architecture and create a dynamic set of lists -# that split the machines up for load balancing. -create_build_lists() { - arch="$1" - eval t_machines="$""$arch""_MACHINES" - eval t_num_builds="$""NUM_""$arch""_BUILDS" - - # Go through the list of machines per architecture and add the machines - # to the list of machines to build in a round robbin fashion. So for - # example if you allow two builds for CORTEX architecture then the - # following lists will be created and populated: - # CORTEX_1 = mach1 mach3 mach5 - # CORTEX_2 = mach2 mach4 - # NOTE: If this is a build with an existing build directory then - # there will be a check as to whether or not a machine has - # already been built in a particular directory. If so it - # will be added to the list for that directory to make the - # build shorter. Any other machines will be load balanced on - # top of the existing machines. - counter=0 - for m in $t_machines - do - # Check if machine is already built in a build directory and if so - # Add it to that list. - list=`find ./build-* -maxdepth 1 -name "machines" | xargs grep -H $m` - if [ "$?" == "0" ] - then - # We have found a match, so now get the list name - list=`echo $list | cut -d: -f1 | xargs dirname | cut -d- -f2` - else - counter=`expr $counter + 1` - list="$arch""_$counter" - fi - eval $list="$""$list,$m" - - # Go ahead and add the list to a raw list of all the lists. We will - # sort this for unique values later. - LISTS="$LISTS""\n""$list" - if [ "$counter" == "$t_num_builds" ] - then - counter="0" - fi - done - - # Sort the list of architecture lists for unique values - LISTS=`echo -e $LISTS | sort | uniq` -} - - ############### # Main Script # ###############
@@ -118,20 +56,28 @@ fi check_mandatory_inputs $MANDATORY_INPUTS +if [ `echo $MACHINES | wc -w` != 1 ] +then + echo "Only a single machine must be specified" + exit 1 +fi + # Clean the build if the CLEAN Flags are set if [ "$CLEAN_ALL" == "true" ] then echo "Removing $BUILD_ROOT" rm -rf $BUILD_ROOT -elif [ "$CLEAN_BUILD" == "true" ] -then - echo "Removing $BUILD_ROOT/build-*/arago-tmp-*" - rm -rf $BUILD_ROOT/build-*/arago-tmp-* -fi -if [ "$CLEAN_SSTATE" == "true" ] -then - echo "Removing $BUILD_ROOT/build-*/sstate-cache" - rm -rf $BUILD_ROOT/build-*/sstate-cache +else + if [ "$CLEAN_BUILD" == "true" ] + then + echo "Removing $BUILD_ROOT/build/arago-tmp-*" + rm -rf $BUILD_ROOT/build/arago-tmp-* + fi + if [ "$CLEAN_SSTATE" == "true" ] + then + echo "Removing $BUILD_ROOT/build/sstate-cache" + rm -rf $BUILD_ROOT/build/sstate-cache + fi fi # Make the directory structure leading up to BUILD_ROOT. BUILD_ROOT will
@@ -155,44 +101,8 @@ rm -rf $LOG_DIR/* # The rest of this script will assume we are running from BUILD_ROOT cd $BUILD_ROOT -# Configure the basic build root. The individual build directories will -# be configured later -log $general_log configure_build_root - -# Parse the list of machines to sort them into the <ARCH>_MACHINES lists -# and create the list of architectures being built. -parse_machines - -# Create the set of "lists" of machines to build. These are the load-balanced -# lists that will be run through as parallel builds in the build process. -create_build_lists "CORTEX" -create_build_lists "ARM9" -create_build_lists "AARCH64" - -# Go through the list of "lists" and configure the individual build -# directories for each one -for l in $LISTS -do - # This will also set the local.conf and setenv values - log $general_log config_build_dir $l & -done - -# Wait for the configurations to finish before starting the builds -wait - -# Remove the original "build" directory to prevent confusion and force -# regenerating it on each update -rm -rf "$BUILD_ROOT/build" - -# Go through the list of "lists" and kick off parallel build and test processes -for l in $LISTS -do - # Start the SDK build bitbake process -# eval bitbake_sdk_images \$"$l" & - bitbake_sdk_images $l & -done +log $general_log config_build_dir -# Wait for all build and test processes to finish -wait +bitbake_sdk_images echo "Build Finished"
lib/oesdk/bitbake-test-sdk-image +40 -67
138 lines not on this page · raw message
lib/oesdk/config-build-env +6 -28
@@ -47,8 +47,8 @@ checkout_layer_scripts() { else # This looks to be a git repo. Hopefully it is the right one :) cd $BUILD_ROOT - # In case we have changed the location of our build scripts - # we should change our git url towards it. + # In case we have changed the location of our build scripts + # we should change our git url towards it. mygit='git remote get-url origin' if [ "$mygit" != "$TI_SDK_OELAYER_SETUP" ]; then echo "$TI_SDK_OELAYER_SETUP Mismatch in git URL: $mygit vs $TI_SDK_OELAYER_SETUP. Force resetting the origin!"
@@ -60,40 +60,18 @@ checkout_layer_scripts() { fi } -# Run the oe-layertool-setup.sh script to checkout/update the git repositories -# based on the configuration setting. -# - The config file used is the one from the CONFIG_FILE variable in the -# build script config file. -configure_build_root() { - ./oe-layertool-setup.sh -r -f ${CONFIG_FILE} -} - # This function will create the build directory a given build list with # the following features: -# 1. A "machines" file containing the list of machines this directory -# is configured to build for -# 2. Modify the conf/local.conf to point to the following: +# 1. Modify the conf/local.conf to point to the following: # - DL_DIR = DL_DIR # - SSTATE_DIR = BUILD_ROOT/sstate-cache # - TMPDIR = BUILD_ROOT/<build dir>/arago-tmp # - DEPLOY_DIR = BUILD_ROOT/<build dir>/deploy -# 3. Modify the conf/setenv file to point to the following: +# 2. Modify the conf/setenv file to point to the following: # - BUILDDIR=BUILD_ROOT/<build dir> config_build_dir() { - list="$1" - - # Print the list of machines in each build list for the log - eval t_machines=\$$list - t_machines=`echo $t_machines | sed 's/,/ /g'` - log $general_log echo "Machines in $list = $t_machines" - - build_dir="build-$list" - - # Copy the template "build" directory to the list specific name - cp -rf build $build_dir - - # Write the list of machines for future builds - echo "$t_machines" > $build_dir/machines + ./oe-layertool-setup.sh -r -f ${CONFIG_FILE} + build_dir="build" # Change directory into build_dir/conf to make life easier here. # Change back when done.
lib/oesdk/machine-specific-functions deleted +0 -68
68 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 2/3 configs: cleanup config files due to removed functionality
In reply to Denys DmytriyenkoFrom: Denys Dmytriyenko <[email protected]>
With the removal of multi-machine builds, testing, packaging and publishing functionality, corresponding settings in the config files can be removed as well.
--- configs/farm/arago-dunfell-next.txt | 281 +----------------------------------- configs/farm/arago-dunfell.txt | 281 +----------------------------------- configs/farm/arago-master.txt | 281 +----------------------------------- configs/farm/distroless-dunfell.txt | 136 ++--------------- configs/farm/distroless-master.txt | 136 ++--------------- configs/farm/poky-dunfell.txt | 136 ++--------------- configs/farm/poky-master.txt | 136 ++--------------- 7 files changed, 60 insertions(+), 1327 deletions(-)
configs/farm/arago-dunfell-next.txt +8 -273
@@ -2,43 +2,17 @@ # Core TISDK configuration file # ################################################################################ -# This variable contains the list of variables found in this congif file -# that MUST be set to a value. Failure to set these variables could -# lead to corruption of the host system or the build script not -# executing properly -MANDATORY_INPUTS="MACHINES NUM_ARM9_BUILDS NUM_CORTEX_BUILDS NUM_AARCH64_BUILDS BUILD_ID SCRIPTS_ROOT BUILD_ROOT TEST_ROOT PACKAGE_ROOT DEPLOY_ROOT FS_FILTER SDK_FILTER FS_IMAGE_TYPE SDK_IMAGE_TYPE NFS_ROOT CONFIG_FILE LOG_DIR TISDK_VERSION INSTALLER_PREFIX" +# This variable contains the list of variables found in this config file +# that MUST be set to a value +MANDATORY_INPUTS="MACHINES BUILD_ID SCRIPTS_ROOT BUILD_ROOT DEPLOY_ROOT CONFIG_FILE LOG_DIR TISDK_VERSION" -# This variable holds the SDK version you are building. This will be picked -# up in the installer name if you choose to package an installer. You can -# also use this in the CONFIG_FILE name below. +# This variable holds the SDK version you are building TISDK_VERSION="live" -# This variable contains the list of machines to build an SDK for +# This variable contains the machine name to build for MACHINES="" -# These variables indicate the maximum number of parallel builds that can be -# done for each architecture. Some things to note are: -# 1. You should add these values together to get the maximum number of -# parallel builds. If this is too many for your system then reduce the -# numbers. -# 2. The machines will be built spread over the parallel builds and load -# balancing is handled automatically -# 3. If there are no machines of a particular architectur then nothing will -# be built for that architecture -# 4. In the case of just a couple of machines it may be faster to do only -# one build building both serially rather than two parallel builds -# depending on your system resources -NUM_ARM9_BUILDS="1" -NUM_CORTEX_BUILDS="1" -NUM_AARCH64_BUILDS="1" - -# These variables contain the location of the bin directory where the toolchain -# for each architecture is installed. -TOOLCHAIN_ROOT_ARM9="" -TOOLCHAIN_ROOT_CORTEX="" -TOOLCHAIN_ROOT_AARCH64="" - -# SECDEV variables for CAT and AUTO +# SECDEV variables for CAT, AUTO and K3 TI_SECURE_DEV_PKG_CAT="/opt/secdev-cat" TI_SECURE_DEV_PKG_AUTO="/opt/secdev-auto" TI_SECURE_DEV_PKG_K3="/opt/secdev-k3"
@@ -56,58 +30,12 @@ SCRIPTS_ROOT="$PWD" # checked out and the tmp build diretories for each architecture will be # created using the oe-layertool-setup.sh script from the repo at: # git clone git://arago-project.org/git/projects/oe-layersetup.git -# This will be created using the -# - These directories will look like: -# - BUILD_ROOT/sources -# - BUILD_ROOT/arm9-1/arago-tmp -# - BUILD_ROOT/cortex-1/arago-tmp -# - BUILD_ROOT/cortex-2/arago-tmp BUILD_ROOT="$SCRIPTS_ROOT/farm-arago-dunfell-next-build" -# This variable points to the base location where files will be extracted for -# testing purposes. This should not be confused with the NFS root which -# will be configured below. -# This variable should always be declared AFTER the BUILD_ROOT variable. -# The build scripts will create subdirectories such as: -# - TEST_ROOT/am335x-evm-test -# You can usually just take the default value -TEST_ROOT="$BUILD_ROOT/testing" - -# This variable points to the directory where files will be placed to allow -# for final packaging. -# This variable should always be declared AFTER the BUILD_ROOT variable -# You can usually just take the default value -PACKAGE_ROOT="$BUILD_ROOT/packaging" - # This variable points to the base location where the SDK files will # be deployed. This is essentially the final staging directory DEPLOY_ROOT="$BUILD_ROOT/deploy/$TISDK_VERSION" -# This variable contains the "filter" string to look for inside of the -# SDK to select which file system to test. Currently only testing of -# one file system is supported. -FS_FILTER="tisdk-*rootfs-" - -# This variable indicates the type of FS images being generated. By default -# this is tar.gz images. This should match what you set in your recipes -FS_IMAGE_TYPE="tar.xz" - -# This variable contains the "filter" string to look for inside of the -# OE build directory to find the SDK image. Since the image name can -# vary based on the recipe settings this string will account for that. -SDK_FILTER="tisdk-core-bundle-" - -# This variable indicates the type of SDK images being generated. By default -# this is tar.gz images. This should match what you set in your recipes -SDK_IMAGE_TYPE="tar.xz" - -# This variable points to an NFS share which has been pre-configured. The -# target testing will be done by creating a subdirectory in this NFS_ROOT -# for each machine to boot the target board. -# This directory should be configured to allow writing by the jenkins user -# at a minimum, although allowing writing by anyone is simple. -NFS_ROOT="/home/jenkins/nfs-root" - # This variable points to the location where the sources will be checked out # using the oe-layertool-setup.sh script from the following repository: # git clone git://arago-project.org/git/projects/oe-layersetup.git
@@ -120,7 +48,7 @@ CLEAN_BUILD="true" # This variable indicates whether we should clean shared state (sstate) CLEAN_SSTATE="true" -# This variable means that we should clean not only build build directories, +# This variable means that we should clean not only build directories, # but also the sources as well and do a fully clean build. CLEAN_ALL="false"
@@ -129,14 +57,9 @@ CLEAN_ALL="false" CONFIG_FILE="${BUILD_ROOT}/configs/arago-dunfell-next-config.txt" # This directory will contain the log files for the various parts of the build. -# This includes: -# 1. Overall build process log (i.e. which machines are in which build dir) -# 2. Build logs for individual machines -# 3. Test logs for individual machines -# 4. Packaging logs for individual machines LOG_DIR="${BUILD_ROOT}/logs" -# Setting this variable to "true" will enable logging stdout and stderr of the +# Setting this variable to "true" will enable logging stdout and stderr of the # bitbake command to the appropriate machine's build_log.txt. BUILD_LOG_VERBOSE="true"
@@ -153,194 +76,6 @@ SOURCE_MIRROR_URL="http://lcpd.itg.ti.com/sources/" # of the source repos. BB_GENERATE_MIRROR_TARBALLS="1" -# This shortcuts the entire testing and packaging portion of the code -# and exits right after build step is done -EXIT_AFTER_BUILD="true" - -# This variable points to an optional location where additional installer -# content can be placed to be packaged inside of any image recipe that -# inherits the tisdk-image class. It is expected that the directory -# structure should match the structure as you want it placed in the SDK. -# If you are not building an SDK image with external components then this -# is not required. -INSTALLER_EXTRAS_ROOT="/home/jenkins/extra-files/installer_content" - -# This variable points to the directory with the test scripts you want to -# run. The entire directory will be copied to make removing the test scripts -# easier during cleanup. -# NOTE: The assumption is that this directory contains at least the -# following files: -# - opentest.sh // This is called by opentest framework -# - S90-fake-pointercal // This fakes pointer calibration -# - nightly-test.sh // This is called by opentest.sh and does -# machine specific testing -# NOTE: Since the scripts will be copied to TEST_SCRIPTS_TGT -# the opentest.sh script should call the scripts in the new directory. -TEST_SCRIPTS="$SCRIPTS_ROOT/test-scripts" - -# This variable points to the directory within the target filesystem that -# the scripts directory in TEST_SCRIPTS will be copied as. -TEST_SCRIPTS_TGT="home/root/test-scripts" - -# This variable may be used to specify the exact network interface used to -# communicate with the OpenTest Framework (e.g. eth1), instead of guessing it. -# Useful on multi-homed machines with multiple interfaces, when guessing -# between eth0 and eth1 is not possible. Leave empty for default behavior. -TEST_LOCAL_IFACE="eth1" - -# This variable contains the tarball name for the opentest CLI which is -# required to do target side testing. -OPENTEST_CLI="$SCRIPTS_ROOT/linux-devtest.tgz" - -# Pre-configured conf/site_info.xml file for OpenTest client -OPENTEST_CONF_SITE_INFO="$SCRIPTS_ROOT/site_info.xml" - -# This variable specifies the IP address of the TEE to be used with OpenTest -# Defaults to 128.247.105.11 if not set -OPENTEST_TEE_IP="none" - -# This variable specifies the hardware capabilities to be used with OpenTest -# Capabilities are separated by underscores, some excamples are here: -# http://arago-project.org/wiki/index.php/Opentest-CheatSheet -# Defaults to "linux" if not set -# Limit the board selection to official TI GT farm, avoiding personal boards -OPENTEST_HW_CAP="linux_tigt_farm" - -# Determine whether SPL/UART and U-boot binaries are passed to OpenTest for -# testing. Otherwise uses existing bootloaders on the board (SD, NAND, etc) -OPENTEST_BOOTLOADERS="false" - -# Specify the number of attempts to boot the target (default is 1) -OPENTEST_BOOT_ATTEMPTS="3" - -# Specify timeout in seconds for boot to finish (default is 150 sec) -OPENTEST_BOOT_TIMEOUT="300" - -# This variable will allow control over whether to perform build testing or -# skip it. This should usually be set to true but may be changed for -# prototyping. -RUN_BUILD_TESTS="false" - -# This variable points to the STAF installation location which is used -# during the build test steps to call into the OpenTest Framework. This -# default value is the default value from the STAF installer -STAF_ROOT="/usr/local/staf" - -# This variable indicates whether to continue the build process for a machine -# even when the build testing fails. This can be useful in the case of -# the test system being down to allow the full packaging of the SDK to -# continue. -SKIP_TEST_FAILURES="false" - -# This variable indicates whether to productize the build by packaging -# it into an installer and web content. This will require that -# InstallBuilder be installed on your host system and that you have -# and project file created to package it. If not then you can use -# the simple SDK tarball that was created during the build as your -# SDK. -PRODUCTIZE_SDK="false" - # This variable contains the command(s) that bitbake should run. Each command # should be seperated by a semicolon. BITBAKE_COMMAND="ti-rtos-metadata ; -k tisdk-core-bundle tisdk-tiny-image ti-world" - -# This variable controls whether the build configuration included at the bottom -# of the results file includes comments or not. The default is "false" to filter -# comments out. -RESULTS_CONFIG_COMMENTS="false" - -################################################################################ -# The following variables only need to be set if PRODUCTIZE_SDK is true. -# If not you do not need to set these variables. If you do want to -# publish an SDK you will need access to other tools such as webgen that -# are not available outside of TI. -################################################################################ - -# This points to the location where the InstallBuilder application has -# been extracted. -INSTALL_BUILDER="/home/jenkins/installbuilder" - -# This variable points to the root diretory where the installer content will be -# staged to build the installer. -INSTALLER_ROOT="$BUILD_ROOT/installer" - -# This variable will point to the InstallBuilder file used to build the SDK -# installer -INSTALL_BUILDER_PROJECT="$SCRIPTS_ROOT/installer-files/tisdk.xml" - -# This variable will provide the prefix for the installer filename and default -# installation directory. -# NOTE: This prefix should match the installer filename given in the webgen.mak -# -# Installer name will have the form: -# - ${INSTALLER_PREFIX}-${MACHINE}-${TISDK_VERSION}-Linux-x86-Install.bin -# Installation directory will have the form: -# - ${INSTALLER_PREFIX}-${MACHINE}-${TISDK_VERSION} -INSTALLER_PREFIX="ti-sdk" - -# This variable points to a directory where additional SD card content -# is located. In general this directory should have a structure like -# - <machine>/boot - holds extra boot partition content -# - <machine>/start_here - holds the extra start_here partition content -# Many times you will want to use symlinks here to save space, so the -# build scripts will use the -L option to copy the linked file instead of -# the symlink. -SD_CARD_CONTENT="/home/jenkins/extra-files/sd_content" - -# This variable determines whether the uImage and dtb files should be placed in -# the boot partition tarball or not. For newer kernel and u-boot combinations -# the uImage and dtb files are kept in the rootfs partition and placing it in -# the boot partition will cause confusion. -PACKAGE_BOOT_KERNEL_FILES="false" - -# This variable points to the directory where the webgen tool has been -# Installed. -WEBGEN_ROOT="/home/jenkins/webgen" - -# This variable points to the location where additional webgen/webpage files -# are located. Many times you will want to use symlinks here to save space -# so the build scripts will use the -L option to copy the linked file instead -# of the symlink. -WEB_EXTRAS_ROOT="/home/jenkins/extra-files/web_content" - -# This variable points to the root location where the publish SDK data is -# stored. This data is the webgen.mak files required to build the SDK -# ti.com style web pages. -# The general assumption is that the directory structure looks like: -# - WEBGEN_MAK_ROOT/<machine>/webgen.mak -WEBGEN_MAK_ROOT="$SCRIPTS_ROOT/publish-sdk-data/coresdk/$TISDK_VERSION" - -# This variable enables the source downloads in "DL_DIR" to be tar'd and copied -# to the webgen exports directory. Setting this variable to "1" will override -# the "BB_GENERATE_MIRROR_TARBALLS" configuration with a value of "1". -EXPORT_ARAGO_SRC="0" - -# This variable specifies whether or not to copy the build contents to -# a remote web hosting server. -COPY_TO_WEB="false" - -# This variable specifies whether or not to copy the deploy contents to a -# remote web hosting server. These are unprocessed intermediate artifacts, -# such as images, IPK feeds etc, so may not be distributed publicly as is. -COPY_DEPLOY_TO_WEB="false" - -# This variable specifies whether or not to copy the "golden" contents to a -# remote web hosting server. These are images that passed run-time tests. -COPY_GOLDEN_TO_WEB="false" - -# This variable points to the user@webhost:<basepath> location where the -# deploy contents should be placed. This is best done if you have done a -# key exchange between these systems so that your SCP command will not ask -# for a password. -WEB_HOST="" - -# This variable determines whether the DEPLOY_ROOT will be cleaned after -# the remote copy. The reason for this is that if the files already exist -# on the remote system there is no need to keep them on the local system. -CLEAN_AFTER_COPY="true" - -# This variable determines if the results directory should be copied before -# the deploy directory is cleaned. If this value is set then the results -# will be copied to the given directory. If not then they will not be -# copied and will be cleaned if CLEAN_AFTER_COPY is true. -BACKUP_RESULTS=""
configs/farm/arago-dunfell.txt +8 -273
324 lines not on this page · raw message
configs/farm/arago-master.txt +8 -273
324 lines not on this page · raw message
configs/farm/distroless-dunfell.txt +9 -127
178 lines not on this page · raw message
configs/farm/distroless-master.txt +9 -127
178 lines not on this page · raw message
configs/farm/poky-dunfell.txt +9 -127
178 lines not on this page · raw message
configs/farm/poky-master.txt +9 -127
178 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 3/3 build-oesdk.sh: allow overwriting machine on command line
In reply to Denys DmytriyenkoFrom: Denys Dmytriyenko <[email protected]>
Allow passing a different machine on the command line overwriting what was originally specified in the config file.
Cleanup parameter checks and add usage banner with available options.
--- build-oesdk.sh | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-)
build-oesdk.sh +23 -10
@@ -16,7 +16,13 @@ then fi usage() { - echo "write something" + echo -n "Usage: " + echo -n `basename $0` + echo " [-h] [-s] [-m machine] -f config" + echo " -f config Config file to use for the build" + echo " -m machine Build for machine instead of what set in config" + echo " -s Skip all repositories checkouts" + echo " -h This help screen" exit 0 }
@@ -24,27 +30,34 @@ usage() { # Main Script # ############### -# Do not allow calling this script without passing the config file option -if [ "$*" = "" ] -then - log $error_log echo "You must specify at least one option on the command line" - log $error_log usage - exit 1 -fi - # Parse input options -while getopts :f:h:s arg +while getopts :f:m:hs arg do case $arg in f ) inputfile="$OPTARG";; + m ) machine="$OPTARG";; s ) skipcheckout="true";; h ) usage;; esac done +# Do not allow calling this script without passing the config file option +if [ "$inputfile" = "" ] +then + log $error_log echo "You must specify a config file to use" + log $error_log usage + exit 1 +fi + # Parse the input config file to set the required build variables parse_config_file $inputfile +if [ "$machine" != "" ] +then + echo "Machine $machine was specified as a parameter on the command line" + MACHINES=$machine +fi + # Verify that the MANDATORY_INPUTS have been set. We know there are some # values that absolutely need to be set or else you will end up # trashing your host configuration.
Signature · 1 line
2.7.4