-
Notifications
You must be signed in to change notification settings - Fork 36
/
armsoc.sh
134 lines (99 loc) · 3.3 KB
/
armsoc.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/bash
rebuild_armsoc() {
get_board
if [ "$BOARD" = "odroidxu" ]; then
armsoc_err_not_supported
return
fi
if [ "$BOARD" = "odroidc" ]; then
apt-get -y update
apt-get -y dist-upgrade
msgbox "All updates performed. You don't need to run any other updates."
return
fi
do_5422_1504_apt_update
if [ "$DISTRO" = "ubuntu" ]; then
armsoc_rebuild_ubuntu
elif [ "$DISTRO" = "debian" ]; then
armsoc_rebuild_debian
else
armsoc_err_not_supported
fi
}
armsoc_rebuild_ubuntu() {
if [ "$BOARD" = "odroidxu3" ]; then
msgbox "ODROID-XU3 isn't supported yet"
return
fi
root=/tmp/armsoc-update
buildlog=/root/armsoc-update-$DATE.txt
mkdir -p $root
cd $root
# Install dependencies.
apt-get -y build-dep xserver-xorg-video-armsoc
# Download the blobs
dlf builder.mdrjr.net/tools/u3/4412_r5p0_x11.tar.xz "Downloading Mali Binaries" $root/mali.tar.xz
# Download armsoc DDX from github
dlf https://github.com/mdrjr/xf86-video-armsoc/archive/r4p0.zip "Downloading ARMSOC DDX Sources from Github" $root/ddx.zip
echo "Building Mali DDX and Installing Binaries. Please wait"
echo "Saving build logs to $buildlog"
# Unpack
xz -d mali.tar.xz &>> $buildlog
tar xf mali.tar &>> $buildlog
unzip -qq ddx.zip &>> $buildlog
# Build DDX
cd xf86-video-armsoc-r4p0
./autogen.sh --with-drmmode=exynos --prefix=/usr &>> $buildlog
make -j4 &>> $buildlog
make install &>> $buildlog
cd ..
# Install new Binaries
cd mali
cp -aRP lib* /usr/lib
cp -aRP lib* /usr/lib/arm-linux-gnueabihf/mali-egl
ldconfig
cp config/xorg.conf /etc/X11/xorg.conf
sync
msgbox "Mali is now updated. If something fails or isn't working report on the forums with the following file: $buildlog"
}
armsoc_rebuild_debian() {
if [ "$BOARD" = "odroidxu3" ]; then
msgbox "ODROID-XU3 isn't supported yet"
return
fi
root=/tmp/armsoc-update
buildlog=/root/armsoc-update-$DATE.txt
mkdir -p $root
cd $root
echo "Debian requires some extra packages to build. We are installing it.. Please wait."
# debian requires some extra packages to build the DDX. So.. lets install it
apt-get -y build-dep xserver-xorg-video-modesetting xserver-xorg-video-nouveau &>> $buildlog
apt-get -y install build-essential git xz-utils xserver-xorg-dev libudev-dev &>> $buildlog
# Download the blobs
dlf builder.mdrjr.net/tools/u3/4412_r5p0_x11.tar.xz "Downloading Mali Binaries" $root/mali.tar.xz
# Download armsoc DDX from github
dlf https://github.com/mdrjr/xf86-video-armsoc/archive/r4p0.zip "Downloading ARMSOC DDX Sources from Github" $root/ddx.zip
echo "Building Mali DDX and Installing Binaries. Please wait"
echo "Saving build logs to $buildlog"
# Unpack
xz -d mali.tar.xz &>> $buildlog
tar xf mali.tar &>> $buildlog
unzip -qq ddx.zip &>> $buildlog
# Build DDX
cd xf86-video-armsoc-r4p0
./autogen.sh --with-drmmode=exynos --prefix=/usr &>> $buildlog
make -j4 &>> $buildlog
make install &>> $buildlog
cd ..
# Install new Binaries
cd mali
cp -aRP lib* /usr/lib
ldconfig
cp config/xorg.conf /etc/X11/xorg.conf
cd /tmp && rm -fr $root
sync
msgbox "Mali is now updated. If something fails or isn't working report on the forums with the following file: $buildlog"
}
armsoc_err_not_supported() {
msgbox "ARMSOC: Your distro isn't supported. Report this on the forums -> Distro $DISTRO and board $BOARD"
}