-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·156 lines (140 loc) · 4.42 KB
/
build.sh
File metadata and controls
executable file
·156 lines (140 loc) · 4.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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/bin/bash
ISOFILE=$1
LATESTKERNEL="gpdpocket-20190225-5.0.0-rc7-kernel-files.zip"
LOCALKERNEL="gpdpocket-kernel-files.zip"
KERNELARGS="-l \"*.deb\""
ARGS=""
# Check arguments
for i in "$@" ; do
if [[ $i == "gnome" ]] ; then
echo "Setting gnome monitors..."
GNOME=true
continue
fi
if [[ $i == "unity" ]] ; then
echo "Setting unity environment..."
UNITY=true
continue
fi
if [[ $i == "bionicbeaver" ]] ; then
echo "Setting Bionic Beaver environment..."
BIONICBEAVER=true
continue
fi
if [[ $i == "mainline" ]] ; then
echo "Setting mainline kernel environment..."
KERNELARGS="-u"
MAINLINE=true
continue
fi
if [[ $i == "upgrade" ]] ; then
echo "Upgrade ISO packages..."
ARGS="--upgrade"
continue
fi
done
# Select correct monitors file based on Desktop Environment kind
# GNOME or Desktop Environments on Wayland require a special monitors file
if [ -n "$GNOME" ]; then
echo "Display setting: Gnome"
cp display/monitors_gnome.xml display/monitors.xml
else
echo "Display setting: Xorg-Standard"
cp display/monitors_xorg.xml display/monitors.xml
fi
# Remove old files
./clean.sh
# Looking for kernel packages and download them if required
if [ ! -f linux-image* ]; then
if [ ! -n "$MAINLINE" ]; then
echo "Looking for kernel image..."
if [ ! -f "$LOCALKERNEL" ]; then
if [ ! -f "$LATESTKERNEL" ]; then
echo "Downloading kernel files...."
wget "https://bitbucket.org/simone_nunzi/gpdpocket-kernel/downloads/$LATESTKERNEL"
fi
echo "Extracting latest kernel files..."
unzip -o "$LATESTKERNEL"
else
echo "Extracting custom kernel files..."
unzip -o "$LOCALKERNEL"
fi
fi
fi
# If missing, download latest version of the script that will respin the ISO
if [ ! -f isorespin.sh ]; then
echo "Isorespin script not found. Downloading it..."
wget -O isorespin.sh "https://drive.google.com/uc?export=download&id=0B99O3A0dDe67S053UE8zN3NwM2c"
fi
# Packages that will be installed:
# Font used to scale TTY text to a resonable size during boot/TTY work
installpackages="xfonts-terminus "
# Thermal management stuff and packages
installpackages+="thermald "
installpackages+="tlp "
# Streaming and codecs for correct video encoding/play
installpackages+="va-driver-all "
installpackages+="vainfo "
if [ -n "$BIONICBEAVER" ]; then
installpackages+="libva2 "
else
installpackages+="libva1 "
fi
installpackages+="i965-va-driver "
installpackages+="gstreamer1.0-libav "
installpackages+="gstreamer1.0-vaapi "
# Useful music/video player with large set of codecs
installpackages+="vlc "
# Utilities for traybar rotation indicator and fan handling
installpackages+="python-gi " # Required by traybar rotation indicator
installpackages+="git " # Required by traybar rotation indicator to download repository
installpackages+="python " # Required by traybar rotation indicator & fan script
installpackages+="gir1.2-appindicator3-0.1 " # Required by traybar rotation indicator
# Packages that will be removed:
removepackages="bcmwl-kernel-source " # This may conflict with wifi provided driver and blacklist it
# If Unity is requested, install it and remove other Display Manager to avoid conflicts
if [ -n "$UNITY" ]; then
echo "Display setting: Unity"
installpackages+="unity "
installpackages+="lightdm "
removepackages+="gdm "
removepackages+="gdm3 "
removepackages+="sddm "
fi
chmod +x isorespin.sh
sync
./isorespin.sh $ARGS $KERNELARGS -i $ISOFILE \
-e "$removepackages" \
-p "$installpackages" \
-f display/20-intel.conf \
-f display/30-monitor.conf \
-f display/35-screen.conf \
-f display/40-touch.conf \
-f display/40-trackpoint.conf \
-f display/console-setup \
-f display/monitors.xml \
-f display/adduser.local \
-f display/90-scale \
-f display/90-interface \
-f display/wrapper-display.sh \
-f audio/chtrt5645.conf \
-f audio/HiFi.conf \
-f audio/headphone-jack \
-f audio/headphone-jack.sh \
-f audio/wrapper-audio.sh \
-f fan/gpdfand \
-f fan/gpdfand.conf \
-f fan/gpdfand.py \
-f fan/gpdfand.service \
-f fan/wrapper-fan.sh \
-f network/99-local-bluetooth.rules \
-f network/brcmfmac4356-pcie.txt \
-f network/wrapper-network.sh \
-f power/wrapper-power.sh \
-c wrapper-audio.sh \
-c wrapper-display.sh \
-c wrapper-fan.sh \
-c wrapper-network.sh \
-c wrapper-power.sh \
-g "" \
-g "i915.fastboot=1 i915.semaphores=1 fbcon=rotate:1 gpd-pocket-fan.speed_on_ac=0"