1
|
#!/bin/bash
|
2
|
|
3
|
MAKE="make JOBS=12"
|
4
|
# MAKE="echo"
|
5
|
logfile=build.log
|
6
|
STAGE=""
|
7
|
|
8
|
homedir=/home/mjhammel/src/ximba/raspberrypi3/bld/buildroot-2020.02.4/output/target/home
|
9
|
mydir=${homedir}/mjhammel
|
10
|
sysroot=${mydir}/src/ximba/raspberrypi4/bld/buildroot-2020.02.4.bld/staging/arm-buildroot-linux-gnueabihf/sysroot
|
11
|
|
12
|
hfound=0
|
13
|
mfound=0
|
14
|
sfound=0
|
15
|
|
16
|
log()
|
17
|
{
|
18
|
echo "$1" >> ${logfile}
|
19
|
}
|
20
|
|
21
|
log_start()
|
22
|
{
|
23
|
if [[ -n "${STAGE}" ]]; then
|
24
|
echo "Finished ${STAGE}" >> ${logfile}
|
25
|
fi
|
26
|
echo "Starting $1" >> ${logfile}
|
27
|
STAGE="$1"
|
28
|
}
|
29
|
|
30
|
doQuit()
|
31
|
{
|
32
|
if [[ ${sfound} -eq 1 ]] &&
|
33
|
[[ ${sfound} -eq 1 ]] &&
|
34
|
[[ ${sfound} -eq 1 ]]; then
|
35
|
log "The culprit is in the ${STAGE} build."
|
36
|
exit 0
|
37
|
fi
|
38
|
}
|
39
|
|
40
|
checkDir()
|
41
|
{
|
42
|
if [[ ${hfound} -eq 0 ]] && [[ -d ${homedir} ]]; then
|
43
|
log "${STAGE} created output/target/home directory."
|
44
|
hfound=1
|
45
|
fi
|
46
|
if [[ ${mfound} -eq 0 ]] && [[ -d ${mydir} ]]; then
|
47
|
log "${STAGE} created output/target/home/mjhammel directory."
|
48
|
mfound=1
|
49
|
fi
|
50
|
if [[ ${sfound} -eq 0 ]] && [[ -d ${sysroot} ]]; then
|
51
|
log "${STAGE} created sysroot directory."
|
52
|
sfound=1
|
53
|
fi
|
54
|
doQuit
|
55
|
}
|
56
|
|
57
|
rm -f ${logfile}
|
58
|
# log_start xcc && ${MAKE} xcc && checkDir
|
59
|
# log_start xcc-pkg && ${MAKE} xcc-pkg && checkDir
|
60
|
# log_start rpifw && ${MAKE} rpifw && checkDir
|
61
|
# log_start rpifw-pkg && ${MAKE} rpifw-pkg && checkDir
|
62
|
# log_start kernel && ${MAKE} kernel && checkDir
|
63
|
# log_start kernel-pkg && ${MAKE} kernel-pkg && checkDir
|
64
|
# log_start gles && ${MAKE} gles && checkDir
|
65
|
# log_start gles-pkg && ${MAKE} gles-pkg && checkDir
|
66
|
# log_start busybox && ${MAKE} busybox && checkDir
|
67
|
# log_start busybox-pkg && ${MAKE} busybox-pkg && checkDir
|
68
|
# log_start buildroot && ${MAKE} buildroot && checkDir
|
69
|
# log_start buildroot-pkg && ${MAKE} buildroot-pkg && checkDir
|
70
|
|
71
|
BUILDROOT_SRCDIR=/home/mjhammel/src/ximba/raspberrypi3/src/../bld/buildroot-2020.02.4
|
72
|
BUILDROOT_BLDDIR=/home/mjhammel/src/ximba/raspberrypi3/src/../bld/buildroot-2020.02.4.bld
|
73
|
BUILDROOT_ARCDIR=/home/mjhammel/src/ximba/raspberrypi3/src/../archive/buildroot
|
74
|
BUILDROOT_T=buildroot
|
75
|
|
76
|
log_start buildroot-clobber && ${MAKE} buildroot-clobber && checkDir
|
77
|
log_start buildroot-init && ${MAKE} buildroot-init && checkDir
|
78
|
mkdir -p ${BUILDROOT_BLDDIR}/images ${BUILDROOT_ARCDIR}
|
79
|
log_start buildroot-clobber && ${MAKE} ${BUILDROOT_T}-preconfig && checkDir
|
80
|
log_start buildroot-config && ${MAKE} ${BUILDROOT_T}-config && checkDir
|
81
|
log_start buildroot-oldconfig && pushd ${BUILDROOT_SRCDIR} && ${MAKE} oldconfig && checkDir && popd
|
82
|
log_start buildroot-legal-info && ${MAKE} ${BUILDROOT_T}-legal-info && checkDir
|
83
|
log_start buildroot && pushd ${BUILDROOT_SRCDIR} && \
|
84
|
${MAKE} LD_LIBRARY_PATH= BUSYBOX_CONFIG=${BUILDROOT_SRCDIR}/.busybox_config && checkDir && \
|
85
|
popd
|
86
|
log_start buildroot-rpitools && ${MAKE} ${BUILDROOT_T}-rpitools && checkDir
|