make.sh
2.93 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/bin/bash
if [ -z "${FA_PRODUCT}" ]
then
echo ""
echo "Check environment variables..."
echo " $> source ../../env-4.9.4.env"
echo ""
exit 1
fi
DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_defconfig
DEFCONFIG_FILE=${DEFCONFIG_FILE/-/_}
TOOLCHAIN_DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_toolchain_defconfig
TOOLCHAIN_DEFCONFIG_FILE=${TOOLCHAIN_DEFCONFIG_FILE/-/_}
QT4_GST_DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_qt4_gst_defconfig
QT4_GST_DEFCONFIG_FILE=${QT4_GST_DEFCONFIG_FILE/-/_}
QT5_DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_qt5_defconfig
QT5_DEFCONFIG_FILE=${QT5_DEFCONFIG_FILE/-/_}
OUTPUT_DIR=../output-buildroot-2016.08.1
VERSION_DIR="board/falinux/prime_oven/rootfs_overlay/root/."${FA_PRODUCT}
VERSION_FILE=".buildroot_version"
case $1 in
help)
echo ""
echo "[Help]"
echo " ssh-key : generate ssh key"
echo " defconfig : reload config"
echo " toolchain : apply config file for toolchain"
echo " qt4_gst : apply config file for QT4/Gstreamer"
echo " qt5 : apply config file for QT5"
echo " image : generate ramdisk image file"
echo " clean-target : clean target directory"
echo " distclean : delete all non-source files (.config)"
echo " savedefconfig : Save current config to BR2_DEFCONFIG (minimal config)"
echo ""
;;
ssh-key)
board/falinux/common/mk-ssh-key.sh
;;
toolchain)
echo CONFIG: ${TOOLCHAIN_DEFCONFIG_FILE}
make O=${OUTPUT_DIR} ${TOOLCHAIN_DEFCONFIG_FILE}
;;
qt4_gst)
echo CONFIG: ${QT4_GST_DEFCONFIG_FILE}
make O=${OUTPUT_DIR} ${QT4_GST_DEFCONFIG_FILE}
;;
qt5)
echo CONFIG: ${QT5_DEFCONFIG_FILE}
make O=${OUTPUT_DIR} ${QT5_DEFCONFIG_FILE}
;;
defconfig)
echo CONFIG: ${DEFCONFIG_FILE}
make O=${OUTPUT_DIR} ${DEFCONFIG_FILE}
;;
image)
shift
board/falinux/common/generate-image.sh O=${OUTPUT_DIR} $@
;;
clean-target)
rm -Rf ${OUTPUT_DIR}/target
find ${OUTPUT_DIR}/build -name ".stamp_target_installed" -exec rm {} \;
find ${OUTPUT_DIR}/build -name ".stamp_staging_installed" -exec rm {} \;
;;
distclean)
rm -rf ${OUTPUT_DIR}
;;
*)
if [ ! -f ${OUTPUT_DIR}/.config ];
then
echo ""
echo "[Help]"
echo " ssh-key : generate ssh key"
echo " defconfig : reload config"
echo " toolchain : apply config file for toolchain"
echo " qt4_gst : apply config file for QT4/Gstreamer"
echo " qt5 : apply config file for QT5"
echo " image : generate ramdisk image file"
echo " clean-target : clean target directory"
echo " distclean : delete all non-source files (.config)"
echo " savedefconfig : Save current config to BR2_DEFCONFIG (minimal config)"
echo ""
exit
fi
if [ ! -d $VERSION_DIR ]; then
mkdir -p ${VERSION_DIR}
fi
if [ -d ${VERSION_DIR}/${VERSION_FILE} ]; then
rm ${VERSION_DIR}/${VERSION_FILE}
fi
date > ${VERSION_DIR}/${VERSION_FILE}
make -j 4 O=${OUTPUT_DIR} $@
;;
esac