1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# developers version
DEPENDS += "linux-xlnx"
inherit elphel-misc elphel-scp
do_unpack(){
if [ -d ${S} ]; then
rm -rf ${S}
fi
ln -sf ${VPATH} ${S}
if [ -d ${VPATH}/sysroots ]; then
rm -rf ${VPATH}/sysroots
fi
# old:
#ln -sf ${TOPDIR}/tmp/sysroots ${VPATH}/sysroots
# new:
ln -sf ${WORKDIR}/recipe-sysroot ${VPATH}/sysroots
if [ -d ${VPATH}/bitbake-logs ]; then
rm -rf ${VPATH}/bitbake-logs
fi
ln -sf ${WORKDIR}/temp ${VPATH}/bitbake-logs
if [ -d ${VPATH}/image ]; then
rm -rf ${VPATH}/image
fi
ln -sf ${WORKDIR}/image ${VPATH}/image
}
ELPHEL393_USERADD = "eval ${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir}/pseudo useradd --root ${STAGING_DIR_HOST}"
ELPHEL393_INSTALL = "install"
ELPHEL393_MKNOD = "mknod"
INITSTRING ??= "somescript.sh"
REMOTE_NETMASK ??= "255.255.255.0"
REMOTE_GATEWAY ??= "192.168.0.15"
EXTRA_OEMAKE = " \
INSTALL=${ELPHEL393_INSTALL} \
MKNOD=${ELPHEL393_MKNOD} \
DESTDIR=${D} \
ELPHEL_KERNEL_DIR=${STAGING_KERNEL_DIR} \
STAGING_KERNEL_DIR=${STAGING_KERNEL_DIR} \
STAGING_DIR_HOST=${STAGING_DIR_HOST} \
USERADD='${ELPHEL393_USERADD}' \
REMOTE_USER=${REMOTE_USER} \
REMOTE_IP=${REMOTE_IP} \
REMOTE_NETMASK=${REMOTE_NETMASK} \
REMOTE_GATEWAY=${REMOTE_GATEWAY} \
SRCREV=${SRCREV} \
VERSION='${PE}.${PV}.${PR}' \
INITSTRING='${INITSTRING}' \
"
do_compile_prepend() {
echo "SRCREV is ${SRCREV}"
if [ ! -f Makefile ]; then
echo "Nothing to compile (missing a Makefile)"
exit 1
fi
}
do_install_append() {
oe_runmake ${EXTRA_OEMAKE} install
install -d ${D}/etc/elphel393/packages
TMPNAME=`basename ${VPATH}`
echo "${PE}.${PV}.${PR}" > ${D}/etc/elphel393/packages/${BPN}
#make archive
tar -czvf ${WORKDIR}/image.tar.gz -C ${WORKDIR}/image .
}
# Always start from compile
# link1: http://www.crashcourse.ca/wiki/index.php/BitBake_task_flags
#do_compile[nostamp]="1"