make.sh
1.28 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
#!/bin/bash
if [ -z "${FA_PRODUCT}" ]
then
echo Check environment variables...
exit 1
fi
DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_defconfig
DEFCONFIG_FILE=${DEFCONFIG_FILE/-/_}
BOOTSTRAP_DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_bootstrap_defconfig
BOOTSTRAP_DEFCONFIG_FILE=${BOOTSTRAP_DEFCONFIG_FILE/-/_}
OUTPUT_DIR=../output-buildroot-2016.08.1
if [ ! -f ${OUTPUT_DIR}/.config ]
then
echo ${DEFCONFIG_FILE}...
make O=${OUTPUT_DIR} ${DEFCONFIG_FILE}
fi
case $1 in
help)
echo "ssh-key : generate ssh key"
echo "defconfig : reload config"
echo "bootstrap : apply config file for toolchain"
echo "image : generate ramdisk image file"
echo "clean-target : clean target directory"
;;
ssh-key)
board/falinux/common/mk-ssh-key.sh.sh
;;
bootstrap)
echo CONFIG: ${BOOTSTRAP_DEFCONFIG_FILE}
make O=${OUTPUT_DIR} ${BOOTSTRAP_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 {} \;
;;
*)
make O=${OUTPUT_DIR} $@
;;
esac