-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmd_builder.sh
More file actions
executable file
·103 lines (91 loc) · 1.42 KB
/
md_builder.sh
File metadata and controls
executable file
·103 lines (91 loc) · 1.42 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
#!/bin/bash
##########################
#
# sourcing configs/${DEVICE}.conf
#
##########################
#
# configure:
# download:
# toolchain
# kernel
# extras
# unpack:
# toolchain
# kernel
# extras
#
##########################
#
# clean
# options: kernel media
# eval ${DEVICE_CODE}_CLEAN
#
##########################
#
# build
# options: kernel media
# eval ${DEVICE_CODE}_BUILD
#
##########################
TOP_MDB_DIR=`pwd`
device_flag=0
configure_flag=0
clean_flag=0
build_flag=0
while getopts ":d:ibB:cC:gG:" o; do
case "${o}" in
d)
echo "Device: ${OPTARG}"
device_flag=1
DEVICE=${OPTARG}
;;
i)
echo "initialize"
;;
g)
echo "configure"
configure_flag=1
;;
G)
echo "configure ${OPTARG}"
configure_flag=1
;;
c)
echo "clean"
clean_flag=1
;;
C)
echo "clean ${OPTARG}"
clean_flag=1
;;
b)
echo "build"
build_flag=1
;;
B)
echo "build ${OPTARG}"
build_flag=1
;;
h|*)
echo "supported devices:"
for i in `ls configs/*.conf | sort` ; do
echo -e "\t`basename ${i/.conf/}`"
done
exit 0
esac
done
if [ ! -f "configs/${DEVICE}.conf" ] ; then
echo "Device ${DEVICE} not found"
exit 254
fi
source configs/${DEVICE}.conf
eval ${PACKAGE_CODE}_ENVIRONMENT
if [ $configure_flag -eq 1 ] ; then
eval ${PACKAGE_CODE}_KERNEL_CONFIGURE
eval ${PACKAGE_CODE}_MEDIA_CONFIGURE
fi
if [ $build_flag -eq 1 ] ; then
eval ${PACKAGE_CODE}_KERNEL_BUILD
eval ${PACKAGE_CODE}_MEDIA_BUILD
fi