Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# $1 is one of r15 or r16
# define magic strings
# to map a toolchain to a revision
MAGIC="y22-ext-wp85"
R15_MAGIC="/opt/swi/r15"
R15_BUILD_MAGIC="/$MAGIC/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi"
R16_MAGIC="/opt/swi/r16"
# check/remove old symlink
# TODO supress any error that may happen here
# or even check if it exists first
sudo rm -rf /opt/swi/$MAGIC
if [ "$1" == "R15" ]; then
sudo ln -s $R15_BUILD_MAGIC /opt/swi/$MAGIC
export PATH=$PATH:$R15_BUILD_MAGIC
cd $R15_BUILD_MAGIC
sudo chown -R $USER .
ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- make scripts
sudo chown -R root .
else
sudo ln -s $R16_MAGIC /opt/swi/$MAGIC
fi
# setup legato environment
cd legato
source ./bin/configlegatoenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.