-
Notifications
You must be signed in to change notification settings - Fork 57
/
0_Build.sh
executable file
·134 lines (126 loc) · 5.17 KB
/
0_Build.sh
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/bin/sh
#
# https://gist.github.com/widgetii/43188b185f2c2180b994e89c74741fe2
wget http://ffmpeg.org/releases/ffmpeg-4.2.tar.gz
tar xvfz ffmpeg-4.2.tar.gz
cd ffmpeg-4.2
config_full() {
ARCH=arm
CROSS=arm-openwrt-linux-
STAGING_DIR=/mnt/raid/OpenWrt/OpenIPC/staging_dir
PATH=$PATH:/mnt/raid/OpenWrt/OpenIPC/staging_dir/toolchain-arm_arm926ej-s_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin
# Size ~ 2270072
./configure \
--enable-cross-compile --cross-prefix=${CROSS} --arch=arm --target-os=linux \
--disable-iconv --disable-debug --enable-small \
--disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp \
--disable-ffprobe \
--disable-decoders --enable-decoder=aac,h264,pcm_u8 \
--disable-encoders --enable-encoder=aac \
--disable-parsers --enable-parser=aac,h264 \
--disable-demuxers --enable-demuxer=aac,h264 --enable-demuxer=rtp,rtsp,sdp \
--disable-muxers --enable-muxer=flv \
--disable-protocols --enable-protocol=http,rtp,rtsp,rtmp,file \
--disable-filters --enable-filter=anullsrc,aresample \
--disable-bsfs --enable-bsf=aac_adtstoasc \
--disable-indevs --enable-indev=lavfi \
--disable-outdevs
}
config_mini() {
ARCH=arm
CROSS=arm-openwrt-linux-
STAGING_DIR=/mnt/raid/OpenWrt/OpenIPC/staging_dir
PATH=$PATH:/mnt/raid/OpenWrt/OpenIPC/staging_dir/toolchain-arm_arm926ej-s_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin
# Size ~ 2143096
./configure \
--enable-cross-compile --cross-prefix=${CROSS} --arch=arm --target-os=linux \
--disable-iconv --disable-debug --enable-small \
--disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp \
--disable-ffprobe \
--disable-swresample \
--disable-avdevice \
--disable-decoders \
--disable-encoders --enable-decoder=aac,h264 \
--disable-parsers --enable-parser=aac,h264 \
--disable-demuxers --enable-demuxer=rtp,rtsp,sdp \
--disable-muxers --enable-demuxer=aac,h264 --enable-muxer=flv \
--disable-protocols --enable-protocol=http,rtp,rtsp,rtmp,file \
--disable-filters \
--disable-bsfs --enable-bsf=aac_adtstoasc \
--disable-indevs \
--disable-outdevs
}
config_mimi_dbell() {
ARCH=arm
CROSS=arm-openwrt-linux-
STAGING_DIR=/mnt/raid/OpenWrt/OpenIPC/staging_dir
PATH=$PATH:/mnt/raid/OpenWrt/OpenIPC/staging_dir/toolchain-arm_arm926ej-s_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin
# Size ~ ?
./configure \
--enable-cross-compile --cross-prefix=${CROSS} --arch=arm --target-os=linux \
--disable-iconv --disable-debug --enable-small \
--disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp \
--enable-shared --enable-static --enable-pthreads \
--disable-runtime-cpudetect --disable-doc --enable-gpl --enable-version3 \
--disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-mmx --disable-mmxext \
--disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 \
--disable-avx --disable-xop --disable-fma3 --disable-fma4 --disable-avx2 \
--disable-inline-asm --disable-yasm --disable-mips32r2 \
--disable-mipsdspr2 --disable-mipsfpu --disable-dxva2 --disable-lzma --disable-vaapi \
--disable-vdpau --disable-outdevs
# --enable-zlib
}
config_cortex() {
ARCH=arm
CROSS=arm-openwrt-linux-
STAGING_DIR=/mnt/raid/OpenWrt/OpenIPC/staging_dir
PATH=$PATH:/mnt/raid/OpenWrt/OpenIPC/staging_dir/toolchain-arm_cortex-a9_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin
# Size ~ 2143096
./configure \
--enable-cross-compile --cross-prefix=${CROSS} --arch=arm --target-os=linux \
--disable-iconv --disable-debug --enable-small \
--disable-ffprobe \
--disable-swresample \
--disable-avdevice \
--disable-decoders \
--disable-encoders --enable-decoder=aac,h264 \
--disable-parsers --enable-parser=aac,h264 \
--disable-demuxers --enable-demuxer=rtp,rtsp,sdp \
--disable-muxers --enable-demuxer=aac,h264 --enable-muxer=flv \
--disable-protocols --enable-protocol=http,rtp,rtsp,rtmp,file \
--disable-filters \
--disable-bsfs --enable-bsf=aac_adtstoasc \
--disable-indevs \
--disable-outdevs
# --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp \
}
config_mipsel() {
ARCH=mipsel
CROSS=mipsel-openwrt-linux-
STAGING_DIR=/mnt/raid/OpenWrt/chaos_calmer/staging_dir
PATH=$PATH:/mnt/raid/OpenWrt/chaos_calmer/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin
# Size ~ 2143096
./configure \
--enable-cross-compile --cross-prefix=${CROSS} --arch=mipsel --target-os=linux \
--disable-iconv --disable-debug --enable-small \
--disable-ffprobe \
--disable-swresample \
--disable-avdevice \
--disable-decoders \
--disable-encoders --enable-decoder=aac,h264 \
--disable-parsers --enable-parser=aac,h264 \
--disable-demuxers --enable-demuxer=rtp,rtsp,sdp \
--disable-muxers --enable-demuxer=aac,h264 --enable-muxer=flv \
--disable-protocols --enable-protocol=http,rtp,rtsp,rtmp,file \
--disable-filters \
--disable-bsfs --enable-bsf=aac_adtstoasc \
--disable-indevs \
--disable-outdevs
# --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp \
}
#config_full
config_mini
#config_mimi_dbell
#config_cortex
#config_mipsel
make -j$(($(nproc)+1))