# ELWIX project setup
#
# (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
# by Michael Pounov <misho@elwix.org>
#
# $Id: rc.elwix.i386,v 1.1.2.4 2014/05/26 23:06:47 misho Exp $
#
ELWIX_IS_CONFIGURED="YES"
VERSION="2.2_x86"
PLATFORM="elwix"
TIMEZONE="Europe/Sofia"
BUILD_DATE=`date "+%Y-%m-%d"`
TARGET="i386"
TARGET_ARCH="i386"
TARGET_BUILD="${TARGET_ARCH}-${PLATFORM}-freebsd"
PARALLEL_BUILD="-j2"
CURDIR=$(pwd)
CFGDIR="${CURDIR}/config"
SRCCONF="${CFGDIR}/src_${TARGET}.conf"
MAKECONF="${CFGDIR}/make_${TARGET}.conf"
PREDIR=".."
# Dont change TOPDIR!!!
TOPDIR="${CURDIR}/build/${VERSION}"
#
BSDSRC="/home/fbsd_work.src/src"
PKGSRC="/home/pkgsrc"
ADDSRC="/home/misho/work/embedaddon"
REL="${TOPDIR}/release"
DEST="${TOPDIR}/destdir"
OBJS="${TOPDIR}/obj"
ADIR="${TOPDIR}/arch"
WORLD="${ADIR}/${TARGET_ARCH}/world"
KERN="${ADIR}/${TARGET_ARCH}/kernel"
KERN_ROOTFS="${ADIR}/${TARGET_ARCH}/kernel.rootfs"
KERN_NFS="${ADIR}/${TARGET_ARCH}/kernel.nfs"
PKG="${ADIR}/${TARGET_ARCH}/pkg"
AIT="${ADIR}/${TARGET_ARCH}"
BSDOBJ="${OBJS}/${TARGET_ARCH}"
BSDTOOLS="${BSDSRC}/tools/tools"
PKGDIR="${WORLD}/elwix/pkg"
CROSSTOOLDIR="${BSDOBJ}/${BSDSRC}/tmp"
### Kernel
BSDKERNCONF="${BSDSRC}/sys/${TARGET}/conf"
KERNDEVHINTS="${BSDKERNCONF}/GENERIC.hints"
KERNHINT="ELWIX_i386.hints"
KERNEL="${KERN}/boot/kernel/kernel"
KERNCONF="ELWIX_i386"
KERNEL_ROOTFS="${KERN_ROOTFS}/boot/kernel/kernel"
KERNCONF_ROOTFS="ELWIX_i386_ROOTFS"
KERNEL_NFS="${KERN_NFS}/boot/kernel/kernel"
KERNCONF_NFS="ELWIX_i386_NFS"
### Rootfs
ROOTFS_MKDIR="${ADIR}/${TARGET_ARCH}/elwix"
ROOTFS_CONF="elwix_firmware.conf"
ROOTFS="${DEST}/rootfs"
ROOTFS_ETC="${CFGDIR}/etc/rootfs"
ELWIX_ROOTFS="${CFGDIR}/elwix_rootfs.conf"
ROOTFS_KERN="kernel_rootfs.gz"
ROOTFS_IMG="rootfs.img"
ROOTFS_SIZE="9000k"
### tools Firmware
LOCALFS_IMG="elwix-pkg.frm"
### 3th party
ROMFS_USR2="${DEST}/romfs.pkg"
ROMFS_IMG2="elwix-firmware2.sys"
#ROMFS_SIZE2="40m"
### RomFS Firmware
ROMFS="${DEST}/romfs"
ELWIX_ROMFS="${CFGDIR}/elwix_romfs.conf"
ROMFS_USR="${ROMFS}/usr"
ROMFS_IMG="elwix-firmware.sys"
#ROMFS_SIZE="38m"
### Base Firmware
BASEFS="${DEST}/base"
ELWIX_BASEFS="${CFGDIR}/elwix_base.conf"
BASE_FS="${DEST}/base.fs"
BASE_ETC="${CFGDIR}/etc/default"
BASE_OS="ELWIX-${VERSION}_base_64mb_${TARGET_ARCH}_${BUILD_DATE}.tar.gz"
### FS Image
FS="${DEST}/elwix.fs"
FS_ETC="${CFGDIR}/etc/default"
OS="ELWIX-${VERSION}_64mb_${TARGET_ARCH}_${BUILD_DATE}.tar.gz"
FS_EXT="${DEST}/elwix_ext.fs"
FS_EXT_ETC="${CFGDIR}/etc/default"
OS_EXT="ELWIX-${VERSION}_ext_128mb_${TARGET_ARCH}_${BUILD_DATE}.tar.gz"
### Make OS Image
IMG_SIZE=62592
IMG_SIZE128=125100
IMGNAME="${REL}/ELWIX-${VERSION}_${TARGET_ARCH}"
### Cross
CBUILD="${DEST}/cross_build.sh"
CGBUILD="${DEST}/cross_gbuild.sh"
CEXEC="${DEST}/cross_exec.sh"
CENV="${DEST}/cross_env.sh"
CROSS_FT_ATH="${BSDTOOLS}/ath"
CROSS_FT_IPW="${BSDTOOLS}/ipw"
CROSS_FT_IWI="${BSDTOOLS}/iwi"
CROSS_FT_MWL="${BSDTOOLS}/mwl"
CROSS_FT_NET80211="${BSDTOOLS}/net80211"
CROSS_FT_VIMAGE="${BSDTOOLS}/vimage"
CROSS_FT_WTAP="${BSDTOOLS}/wtap"
#CROSS_AXL="../gpl/axl"
#AXL_CFG="./configure --disable-py-axl --prefix=${WORLD}/usr/local --build=${TARGET_BUILD}"
##AXL_LIB="${CROSS_AXL}/src/.libs/libaxl.so.*"
##AXL_LIB_NS="${CROSS_AXL}/ns/.libs/libaxl-ns.so.*"
##AXL_LIB_BABEL="${CROSS_AXL}/babel/.libs/libaxl-babel.so.*"
CROSS_ELWIX="../libelwix"
ELWIX_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_ELWIX="${CROSS_ELWIX}/lib/libelwix.so"
CROSS_AITIO="../libaitio"
AITIO_CFG="./configure --enable-aio --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_AITIO="${CROSS_AITIO}/lib/libaitio.so"
CROSS_AITCFG="../libaitcfg"
AITCFG_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_AITCFG="${CROSS_AITCFG}/lib/libaitcfg.so"
CROSS_AITRPC="../libaitrpc"
AITRPC_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_AITRPC="${CROSS_AITRPC}/lib/libaitrpc.so"
CROSS_AITSCHED="../libaitsched"
AITSCHED_CFG="./configure --enable-aio --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_AITSCHED="${CROSS_AITSCHED}/lib/libaitsched.so"
CROSS_AITWWW="../libaitwww"
AITWWW_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_AITWWW="${CROSS_AITWWW}/lib/libaitwww.so"
CROSS_AITPELCO="../libaitpelco"
AITPELCO_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_AITPELCO="${CROSS_AITPELCO}/lib/libaitpelco.so"
CROSS_AITSYNC="../libaitsync"
AITSYNC_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_AITSYNC="${CROSS_AITSYNC}/lib/libaitsync.so"
CROSS_AITCLI="../libaitcli"
AITCLI_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_AITCLI="${CROSS_AITCLI}/lib/libaitcli.so"
CROSS_AITMQTT="../libaitmqtt"
AITMQTT_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#ELWIX_LIB_AITMQTT="${CROSS_AITMQTT}/lib/libaitmqtt.so"
CROSS_EMBEDTOOLS="../embedtools"
EMBEDTOOLS_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
CROSS_ANSH="../ansh"
ANSH_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
CROSS_MQTT="../mqtt"
MQTT_CFG="./configure --with-sqlite3dir=${WORLD}/usr/local --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
CROSS_WIFINATOR="../wifinator"
WIFINATOR_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
CROSS_TFTPD="../tftpd"
TFTPD_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
#####
[ -r ${CFGDIR}/rc.subr ] && . ${CFGDIR}/rc.subr
#####
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>