-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathyocto_build.sh
More file actions
executable file
·19 lines (18 loc) · 1.29 KB
/
yocto_build.sh
File metadata and controls
executable file
·19 lines (18 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# optionally takes path to yocto sdk environment file
# get this manually from https://s3-eu-west-1.amazonaws.com/linn-artifacts-private/yocto_core4_sdk/0.1.35/linn-fb-glibc-x86_64-linn-image-core-cortexa9t2hf-neon-linn-imx6dl-toolchain-5.15-kirkstone.sh (VPN required)
# if DS (or another waf-based repo) is also checked out and set up, this could be ../ds/dependencies/Linux-armhf/yocto_core4_sdk/environment-setup-cortexa9t2hf-neon-poky-linux-gnueabi
if [ -z $1 ]; then
YOCTO_SDK_ENV=/work/bryant/Git/ds/dependencies/aarch64-scarthgap-linux/yocto_core5_sdk/environment-setup-armv8a-poky-linux
else
YOCTO_SDK_ENV=$1
fi
echo "sourcing $YOCTO_SDK_ENV"
source $YOCTO_SDK_ENV
# Yocto env appends essential build flags to CC/CXX environment variables;
# our makefiles doesn't use CC to determine compiler since we do some more complex stuff to deal with building under other OSes.
# just strip out these flags and place in the CFLAGS variable since this is still used
_CC=$(python -c 'import os; print(" ".join(os.getenv("CC").split(" ")[1:]))')
_CXX=$(python -c 'import os; print(" ".join(os.getenv("CXX").split(" ")[1:]))')
make clean
CFLAGS="$_CC" CXXFLAGS="$_CXX" LDFLAGS="--sysroot=$SDKTARGETSYSROOT" openhome_system="linux" openhome_architecture="aarch64" openhome_distro="scarthgap" make uset4=yes