1: # ELWIX project setup
2: #
3: # (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
4: # by Michael Pounov <misho@elwix.org>
5: #
6: # $Id: rc.elwix.i386,v 1.3.2.3 2017/06/15 22:16:10 misho Exp $
7: #
8: ELWIX_IS_CONFIGURED="YES"
9:
10: VERSION="2.6_x86"
11: PLATFORM="elwix"
12: TIMEZONE="Europe/Sofia"
13: BUILD_DATE=`date "+%Y-%m-%d"`
14:
15: TARGET="i386"
16: TARGET_ARCH="i386"
17: TARGET_BUILD="${TARGET_ARCH}-${PLATFORM}-freebsd"
18: PARALLEL_BUILD="-j2"
19:
20: CURDIR=$(pwd)
21: CFGDIR="${CURDIR}/config"
22:
23: SRCCONF="${CFGDIR}/src_${TARGET}.conf"
24: MAKECONF="${CFGDIR}/make_${TARGET}.conf"
25:
26: PREDIR=".."
27:
28: # Dont change TOPDIR!!!
29: TOPDIR="${CURDIR}/build/${VERSION}"
30: #
31: BSDSRC="/home/fbsd_work.src/src"
32: ADDSRC="/home/misho/work/embedaddon"
33:
34: REL="${TOPDIR}/release"
35: DEST="${TOPDIR}/destdir"
36: OBJS="${TOPDIR}/obj"
37: ADIR="${TOPDIR}/arch"
38:
39: WORLD="${ADIR}/${TARGET_ARCH}/world"
40: KERN="${ADIR}/${TARGET_ARCH}/kernel"
41: KERN_ROOTFS="${ADIR}/${TARGET_ARCH}/kernel.rootfs"
42: KERN_NFS="${ADIR}/${TARGET_ARCH}/kernel.nfs"
43: PKG="${ADIR}/${TARGET_ARCH}/pkg"
44: AIT="${ADIR}/${TARGET_ARCH}"
45: BSDOBJ="${OBJS}/${TARGET_ARCH}"
46: BSDTOOLS="${BSDSRC}/tools/tools"
47: PKGDIR="${WORLD}/elwix/pkg"
48: CROSSTOOLDIR="${BSDOBJ}/${BSDSRC}/tmp"
49:
50: ### Compile depended tools for uboot and etc ...
51: COMPILE_DEPTOOLS="YES"
52:
53: ### Kernel
54: BSDKERNCONF="${BSDSRC}/sys/${TARGET}/conf"
55: KERNDEVHINTS="${BSDKERNCONF}/GENERIC.hints"
56:
57: KERNHINT="ELWIX_i386.hints"
58:
59: KERNEL="${KERN}/boot/kernel/kernel"
60: KERNCONF="ELWIX_i386"
61:
62: KERNEL_ROOTFS="${KERN_ROOTFS}/boot/kernel/kernel"
63: KERNCONF_ROOTFS="ELWIX_i386_ROOTFS"
64:
65: KERNEL_NFS="${KERN_NFS}/boot/kernel/kernel"
66: KERNCONF_NFS="ELWIX_i386_NFS"
67:
68: ### Rootfs
69: ROOTFS_MKDIR="${ADIR}/${TARGET_ARCH}/elwix"
70: ROOTFS_CONF="elwix_firmware.conf"
71:
72: ROOTFS="${DEST}/rootfs"
73: ROOTFS_ETC="${CFGDIR}/etc/rootfs"
74: ELWIX_ROOTFS="${CFGDIR}/elwix_rootfs.conf"
75:
76: ROOTFS_KERN="kernel_rootfs.gz"
77:
78: ROOTFS_IMG="rootfs.img"
79: ROOTFS_SIZE="9600k"
80:
81: ### tools Firmware
82: LOCALFS_IMG="elwix-pkg.frm"
83:
84: ### 3th party
85: ROMFS_USR2="${DEST}/romfs.pkg"
86: ROMFS_IMG2="elwix-firmware2.sys"
87: #ROMFS_SIZE2="40m"
88:
89: ### RomFS Firmware
90: ROMFS="${DEST}/romfs"
91: ELWIX_ROMFS="${CFGDIR}/elwix_romfs.conf"
92:
93: ROMFS_USR="${ROMFS}/usr"
94: ROMFS_IMG="elwix-firmware.sys"
95: #ROMFS_SIZE="38m"
96:
97: ### Base Firmware
98: BASEFS="${DEST}/base"
99: ELWIX_BASEFS="${CFGDIR}/elwix_base.conf"
100:
101: BASE_FS="${DEST}/base.fs"
102: BASE_ETC="${CFGDIR}/etc/default"
103: BASE_OS="ELWIX-${VERSION}_base_64mb_${TARGET_ARCH}_${BUILD_DATE}.tar.gz"
104:
105: ### FS Image
106: FS="${DEST}/elwix.fs"
107: FS_ETC="${CFGDIR}/etc/default"
108: OS="ELWIX-${VERSION}_rootfs_64mb_${TARGET_ARCH}_${BUILD_DATE}.tar.gz"
109:
110: FS_EXT="${DEST}/elwix_ext.fs"
111: FS_EXT_ETC="${CFGDIR}/etc/default"
112: OS_EXT="ELWIX-${VERSION}_rootfsext_128mb_${TARGET_ARCH}_${BUILD_DATE}.tar.gz"
113:
114: ### Make OS Image
115: IMG_SIZE=62592
116: IMG_SIZE128=125100
117:
118: CFG_NAND_SIZE=262144
119:
120: IMGNAME="${REL}/ELWIX-${VERSION}_${TARGET_ARCH}"
121:
122: ### Cross
123: CBUILD="${DEST}/cross_build.sh"
124: CGBUILD="${DEST}/cross_gbuild.sh"
125: CEXEC="${DEST}/cross_exec.sh"
126: CENV="${DEST}/cross_env.sh"
127:
128: CROSS_FT_ATH="${BSDTOOLS}/ath"
129: CROSS_FT_IPW="${BSDTOOLS}/ipw"
130: CROSS_FT_IWI="${BSDTOOLS}/iwi"
131: CROSS_FT_MWL="${BSDTOOLS}/mwl"
132: CROSS_FT_NET80211="${BSDTOOLS}/net80211"
133: CROSS_FT_VIMAGE="${BSDTOOLS}/vimage"
134: CROSS_FT_WTAP="${BSDTOOLS}/wtap"
135: CROSS_FT_CXGB="${BSDTOOLS}/cxgbtool"
136: CROSS_FT_IFINFO="${BSDTOOLS}/ifinfo"
137: CROSS_FT_MCTEST="${BSDTOOLS}/mctest"
138: CROSS_FT_NETMAP="${BSDTOOLS}/netmap"
139: CROSS_FT_NETBLAST="${BSDTOOLS}/netrate/netblast"
140: CROSS_FT_NETRCV="${BSDTOOLS}/netrate/netreceive"
141: CROSS_FT_NETSND="${BSDTOOLS}/netrate/netsend"
142:
143: #CROSS_AXL="../gpl/axl"
144: #AXL_CFG="./configure --disable-py-axl --prefix=${WORLD}/usr/local --build=${TARGET_BUILD}"
145: ##AXL_LIB="${CROSS_AXL}/src/.libs/libaxl.so.*"
146: ##AXL_LIB_NS="${CROSS_AXL}/ns/.libs/libaxl-ns.so.*"
147: ##AXL_LIB_BABEL="${CROSS_AXL}/babel/.libs/libaxl-babel.so.*"
148:
149: CROSS_ELWIX="../libelwix"
150: ELWIX_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
151: #ELWIX_LIB_ELWIX="${CROSS_ELWIX}/lib/libelwix.so"
152:
153: CROSS_AITIO="../libaitio"
154: AITIO_CFG="./configure --enable-aio --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
155: #ELWIX_LIB_AITIO="${CROSS_AITIO}/lib/libaitio.so"
156:
157: CROSS_AITCFG="../libaitcfg"
158: AITCFG_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
159: #ELWIX_LIB_AITCFG="${CROSS_AITCFG}/lib/libaitcfg.so"
160:
161: CROSS_AITRPC="../libaitrpc"
162: AITRPC_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
163: #ELWIX_LIB_AITRPC="${CROSS_AITRPC}/lib/libaitrpc.so"
164:
165: CROSS_AITSCHED="../libaitsched"
166: AITSCHED_CFG="./configure --enable-aio --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
167: #ELWIX_LIB_AITSCHED="${CROSS_AITSCHED}/lib/libaitsched.so"
168:
169: CROSS_AITWWW="../libaitwww"
170: AITWWW_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
171: #ELWIX_LIB_AITWWW="${CROSS_AITWWW}/lib/libaitwww.so"
172:
173: CROSS_AITPELCO="../libaitpelco"
174: AITPELCO_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
175: #ELWIX_LIB_AITPELCO="${CROSS_AITPELCO}/lib/libaitpelco.so"
176:
177: CROSS_AITSYNC="../libaitsync"
178: AITSYNC_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
179: #ELWIX_LIB_AITSYNC="${CROSS_AITSYNC}/lib/libaitsync.so"
180:
181: CROSS_AITCLI="../libaitcli"
182: AITCLI_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
183: #ELWIX_LIB_AITCLI="${CROSS_AITCLI}/lib/libaitcli.so"
184:
185: CROSS_AITMQTT="../libaitmqtt"
186: AITMQTT_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
187: #ELWIX_LIB_AITMQTT="${CROSS_AITMQTT}/lib/libaitmqtt.so"
188:
189: CROSS_EMBEDTOOLS="../embedtools"
190: EMBEDTOOLS_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
191:
192: CROSS_ANSH="../ansh"
193: ANSH_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
194:
195: CROSS_MQTT="../mqtt"
196: MQTT_CFG="./configure --with-sqlite3dir=${WORLD}/usr/local --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
197:
198: CROSS_WIFINATOR="../wifinator"
199: WIFINATOR_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
200:
201: CROSS_TFTPD="../tftpd"
202: TFTPD_CFG="./configure --prefix=${WORLD}/usr/local --host=${TARGET_BUILD}"
203:
204: #####
205: [ -r ${CFGDIR}/rc.subr ] && . ${CFGDIR}/rc.subr
206: #####
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>