# This shell script used to setup ok335x build envrionment
|
#
|
# 1. U-boot, Linux kernel and root file system all compiled or generated by this crosstool.
|
# 2. This crsootool is built in i386, running on x86-64 depends on lib32
|
# 3. Install mkimage and mkfs.ubifs tools
|
|
if [ `id -u` != 0 ] ; then
|
echo ""
|
echo "ERROR: This shell script must be excuted as root or by sudo"
|
echo ""
|
exit 1;
|
fi
|
CROSSTOOL_PATH=/opt/crosstool
|
|
echo "apt-get update ..."
|
#apt-get update > /dev/null 2>&1
|
apt-get install -y lib32z1 lib32ncurses5
|
|
mkimage -V > /dev/null 2>&1
|
if [ $? != 0 ] ; then
|
apt-get install -y u-boot-tools
|
fi
|
|
mkfs.ubifs -V > /dev/null 2>&1
|
if [ $? != 0 ] ; then
|
apt-get install -y mtd-utils
|
fi
|
|
if [ ! -d ${CROSSTOOL_PATH}/cortex-a7 ] ; then
|
mkdir -p ${CROSSTOOL_PATH}
|
tar -xJf gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz -C ${CROSSTOOL_PATH}
|
mv ${CROSSTOOL_PATH}/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi/ ${CROSSTOOL_PATH}/cortex-a7
|
fi
|
|
|
# QT build will install to this path
|
mkdir -p /apps && chmod 777 /apps
|