summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-12-13 17:11:20 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-12-13 17:11:20 +1100
commite0feba6c3f70d0a0197f20fa4933c4d58251e48e (patch)
tree3af6051537527c49152ce510947f9f8362e452fd /scripts
parent129829e3dc8f58ca92e12cc2846e3ad348dfdd59 (diff)
Add build script for AGL without XDS
This adds the function to build with or without AGL XDS build system. Functionality is updated to work with vscode. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make-agl-xds.sh14
-rwxr-xr-xscripts/make-agl.sh22
2 files changed, 26 insertions, 10 deletions
diff --git a/scripts/make-agl-xds.sh b/scripts/make-agl-xds.sh
new file mode 100755
index 0000000..5cb8048
--- /dev/null
+++ b/scripts/make-agl-xds.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# Get SDK path
+sdk_id=$1 # first arg must be XDS_SDK_ID
+shift 1
+long_sdkpath=$(xds-cli sdks get $sdk_id | grep Path)
+sdkpath=${long_sdkpath:4}
+
+# Build
+/opt/AGL/bin/xds-cli exec --config xds-project.conf -- \
+ CONFIG_AVIRT=m CONFIG_AVIRT_BUILDLOCAL=y \
+ CONFIG_AVIRT_AP_DUMMY=m \
+ CONFIG_AVIRT_AP_LOOPBACK=m \
+ make -C $sdkpath/sysroots/aarch64-agl-linux/usr/src/kernel M=$(pwd) $@
diff --git a/scripts/make-agl.sh b/scripts/make-agl.sh
index 5cb8048..2f88757 100755
--- a/scripts/make-agl.sh
+++ b/scripts/make-agl.sh
@@ -1,14 +1,16 @@
#!/bin/bash
-# Get SDK path
-sdk_id=$1 # first arg must be XDS_SDK_ID
-shift 1
-long_sdkpath=$(xds-cli sdks get $sdk_id | grep Path)
-sdkpath=${long_sdkpath:4}
+SDK_ROOT=/opt/agl-sdk
+SDK_VERSION=6.99.1+snapshot
+SDK_VAR=aarch64
+
+# Source environment
+unset LD_LIBRARY_PATH
+source $SDK_ROOT/$SDK_VERSION-$SDK_VAR/environment-setup-aarch64-agl-linux
# Build
-/opt/AGL/bin/xds-cli exec --config xds-project.conf -- \
- CONFIG_AVIRT=m CONFIG_AVIRT_BUILDLOCAL=y \
- CONFIG_AVIRT_AP_DUMMY=m \
- CONFIG_AVIRT_AP_LOOPBACK=m \
- make -C $sdkpath/sysroots/aarch64-agl-linux/usr/src/kernel M=$(pwd) $@
+LDFLAGS= \
+CONFIG_AVIRT=m CONFIG_AVIRT_BUILDLOCAL=y \
+CONFIG_AVIRT_AP_DUMMY=m \
+CONFIG_AVIRT_AP_LOOPBACK=m \
+make -C $SDK_ROOT/$SDK_VERSION-$SDK_VAR/sysroots/$SDK_VAR-agl-linux/usr/src/kernel M=$(pwd) $@