-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.sh
More file actions
executable file
·77 lines (60 loc) · 1.91 KB
/
compile.sh
File metadata and controls
executable file
·77 lines (60 loc) · 1.91 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
#!/bin/bash
echo "Creating/Cleaning binary-folder..."
mkdir bin
rm bin/*.*
echo "Compiling openssh-server..."
cd openssh-portable
autoreconf
./configure --host=arm-linux CC=/usr/bin/arm-linux-gnueabi-gcc AR=/usr/bin/arm-linux-gnueabi-ar --with-libs --without-openssl --disable-etc-default-login --with-privsep-user=root
make
cd ..
cp openssh-portable/sshd bin/
cp openssh-portable/ssh-keygen bin/
echo "Compiling libvncserver..."
cd libvncserver
rm -r build
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../files/libvncserver_toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=/tmp/armv5_libs \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DZLIB_INCLUDE_DIR=/usr/include/ \
-DZLIB_LIBRARY=/usr/lib/arm-linux-gnueabi/libz.a \
-DCMAKE_C_FLAGS="-march=armv5t" \
-DCMAKE_EXE_LINKER_FLAGS="-static -L/usr/lib/arm-linux-gnueabi"
cmake --build .
make install
cd ..
cd ..
echo "Comping framebuffer-vncserver..."
cd framebuffer-vncserver
rm -r build
mkdir -p build && cd build
VNC_LIB_ROOT=/tmp/armv5_libs
ZLIB_LIB_PATH=/usr/lib/arm-linux-gnueabi
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=../../files/framebuffer-vncserver.cmake \
-DCMAKE_INSTALL_PREFIX={$VNC_LIB_ROOT} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="-march=armv5t -O2 -I${VNC_LIB_ROOT}/include -I/usr/include" \
-DCMAKE_PREFIX_PATH="${VNC_LIB_ROOT}" \
-DCMAKE_FIND_ROOT_PATH="${VNC_LIB_ROOT}" \
-DCMAKE_EXE_LINKER_FLAGS="-static -L${VNC_LIB_ROOT}/lib -L${ZLIB_LIB_PATH} -lvncserver -lpthread -ldl"
make
cd ..
cd ..
cp framebuffer-vncserver/build/framebuffer-vncserver bin/
echo "Compiling fbDOOM..."
cd fbDOOM/fbdoom
ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- make
cd ../..
cp fbDOOM/fbdoom/fbdoom bin/
echo "Compiling InfoNes..."
# applying fix for i.MX25 framebuffer
cp files/InfoNES_System_Linux.cpp arm-NES-linux/linux/
cd arm-NES-linux/linux
make CC=arm-linux-gnueabi-gcc
cd ../../
cp arm-NES-linux/linux/InfoNES bin/
echo "Done."