Blame view

buildroot/buildroot-2016.08.1/make.sh 2.95 KB
6b13f685e   김민수   BSP 최초 추가
1
2
3
4
  #!/bin/bash
  
  if [ -z "${FA_PRODUCT}" ]
  then
539f334ab   장형기   buildroot 수정
5
6
7
8
9
      echo ""
      echo "Check environment variables..."
      echo "  $> source ../../env-4.9.4.env"
      echo ""
      exit 1
6b13f685e   김민수   BSP 최초 추가
10
  fi
6b13f685e   김민수   BSP 최초 추가
11
12
  DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_defconfig
  DEFCONFIG_FILE=${DEFCONFIG_FILE/-/_}
2a3257134   김민수   네이밍 정리
13
14
  TOOLCHAIN_DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_toolchain_defconfig
  TOOLCHAIN_DEFCONFIG_FILE=${TOOLCHAIN_DEFCONFIG_FILE/-/_}
6b13f685e   김민수   BSP 최초 추가
15
539f334ab   장형기   buildroot 수정
16
17
  QT4_GST_DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_qt4_gst_defconfig
  QT4_GST_DEFCONFIG_FILE=${QT4_GST_DEFCONFIG_FILE/-/_}
e8476a804   장형기   imx6s_prime_oven_...
18
19
  QT5_DEFCONFIG_FILE=${FA_CHIPSET}_${FA_PRODUCT}_qt5_defconfig
  QT5_DEFCONFIG_FILE=${QT4_GST_DEFCONFIG_FILE/-/_}
539f334ab   장형기   buildroot 수정
20
6b13f685e   김민수   BSP 최초 추가
21
  OUTPUT_DIR=../output-buildroot-2016.08.1
539f334ab   장형기   buildroot 수정
22
23
24
  
  VERSION_DIR="board/falinux/prime_oven/rootfs_overlay/root/."${FA_PRODUCT}
  VERSION_FILE=".buildroot_version"
6b13f685e   김민수   BSP 최초 추가
25
26
27
  
  case $1 in
  	help)
539f334ab   장형기   buildroot 수정
28
29
30
31
32
33
  		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"
e8476a804   장형기   imx6s_prime_oven_...
34
  		echo " qt5           : apply config file for QT5"		
539f334ab   장형기   buildroot 수정
35
36
37
38
39
  		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 ""
6b13f685e   김민수   BSP 최초 추가
40
41
  		;;
  	ssh-key)
274fcaab6   김민수   파일 이름 수정
42
  		board/falinux/common/mk-ssh-key.sh
6b13f685e   김민수   BSP 최초 추가
43
  		;;
2a3257134   김민수   네이밍 정리
44
45
46
  	toolchain)
                  echo CONFIG: ${TOOLCHAIN_DEFCONFIG_FILE}
  		make O=${OUTPUT_DIR} ${TOOLCHAIN_DEFCONFIG_FILE}
6b13f685e   김민수   BSP 최초 추가
47
  		;;
539f334ab   장형기   buildroot 수정
48
49
50
51
  	qt4_gst)
                  echo CONFIG: ${QT4_GST_DEFCONFIG_FILE}
  		make O=${OUTPUT_DIR} ${QT4_GST_DEFCONFIG_FILE}
  		;;
e8476a804   장형기   imx6s_prime_oven_...
52
53
54
  	qt5)
                  echo CONFIG: ${QT5_DEFCONFIG_FILE}
  		make O=${OUTPUT_DIR} ${QT5_DEFCONFIG_FILE}
539f334ab   장형기   buildroot 수정
55
  		;;
6b13f685e   김민수   BSP 최초 추가
56
57
58
59
60
61
62
63
64
65
66
67
68
  	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 {} \;
  		;;
539f334ab   장형기   buildroot 수정
69
70
71
  	distclean)
  		rm -rf ${OUTPUT_DIR}
  		;;
6b13f685e   김민수   BSP 최초 추가
72
  	*)
539f334ab   장형기   buildroot 수정
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
  		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_gst       : apply config file for QT5/Gstreamer"		
  		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} $@
6b13f685e   김민수   BSP 최초 추가
101
102
  		;;
  esac