aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2018-01-17 22:48:59 +0100
committerAnders Roxell <anders.roxell@linaro.org>2018-01-18 17:11:04 +0100
commit84cac484980c35e9fcd0678fcf657ace00326640 (patch)
tree3e75f5af909648425e3b4b233d97a8baa57325dc
parentcc46be033f909c56ed2e1490a27968c373a99e2c (diff)
kernel: configure the artifact dir
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
-rw-r--r--README.md5
-rwxr-xr-xbuild-kernel8
-rwxr-xr-xdeploy-kernel7
3 files changed, 17 insertions, 3 deletions
diff --git a/README.md b/README.md
index 5cc4867..fe1eba0 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,10 @@
# setup symlinks
$ ./install.sh
+# Setup the artifact dir. if not creating an .ragnar.rc file
+# the artifact dir will be in ${HOME}/ragnar-artifacts
+$ echo 'TOP="${HOME}/src/kernel"' > ${HOME}/.ragnar.rc
+
# Supported HWs today:
- hikey
@@ -35,5 +39,4 @@ http://snapshots.linaro.org/openembedded/lkft/morty/
# Deploy with deploy-kernel
example:
-$ cd <path>/kernel
$ deploy-kernel -i <ip> -m hikey
diff --git a/build-kernel b/build-kernel
index 52b4e9f..39676f8 100755
--- a/build-kernel
+++ b/build-kernel
@@ -2,8 +2,14 @@
set -e
+if [[ -f ${HOME}/.ragnar.rc ]]; then
+ source ${HOME}/.ragnar.rc
+else
+ TOP=${TOP:-"${HOME}/ragnar-artifacts"}
+fi
+mkdir -p ${TOP}
+
NUM_CPUS=${NUM_CPUS:-"$(getconf _NPROCESSORS_ONLN)"}
-TOP=${TOP:-$(dirname $(pwd))}
FIT_NAME="kernel kernel_dtb"
KDIR=${KDIR:-$(pwd)}
diff --git a/deploy-kernel b/deploy-kernel
index 6fc1944..c63fd7c 100755
--- a/deploy-kernel
+++ b/deploy-kernel
@@ -4,7 +4,12 @@ set -e
ROOTDIR=$(dirname $(readlink -f $(type -p $0)))
-TOP=${TOP:-$(pwd)}
+if [[ -f ${HOME}/.ragnar.rc ]]; then
+ source ${HOME}/.ragnar.rc
+else
+ TOP=${TOP:-"${HOME}/ragnar-artifacts"}
+fi
+
cd ${TOP}
SSH_USER=root
reboot=0