forked from arm64-builder/vince-sfos-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-rpm.sh
50 lines (35 loc) · 1.35 KB
/
build-rpm.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
#!/bin/bash
set -x
source /home/mersdk/work/ci/ci/hadk.env
export ANDROID_ROOT=/home/mersdk/work/ci/ci/hadk_14.1
sudo chown -R mersdk:mersdk $ANDROID_ROOT
cd $ANDROID_ROOT
cd ~/.scratchbox2
cp -R SailfishOS-*-$PORT_ARCH $VENDOR-$DEVICE-$PORT_ARCH
cd $VENDOR-$DEVICE-$PORT_ARCH
pwd
sudo ls -ltrh
sed -i "s/SailfishOS-$SAILFISH_VERSION/$VENDOR-$DEVICE/g" sb2.config
sudo ln -s /srv/mer/targets/SailfishOS-$SAILFISH_VERSION-$PORT_ARCH /srv/mer/targets/$VENDOR-$DEVICE-$PORT_ARCH
sudo ls -ltrh /srv/mer/targets/
sudo ln -s /srv/mer/toolings/SailfishOS-$SAILFISH_VERSION /srv/mer/toolings/$VENDOR-$DEVICE
sudo ls -ltrh /srv/mer/toolings/
# 3.3.0.16 hack
sudo zypper in -y kmod ccache
#sb2 -t $VENDOR-$DEVICE-$PORT_ARCH -m sdk-install -R chmod 777 /boot
sdk-assistant list
cd $ANDROID_ROOT
sed -i '/CONFIG_NETFILTER_XT_MATCH_QTAGUID/d' hybris/mer-kernel-check/mer_verify_kernel_config
sb2 -t $VENDOR-$DEVICE-$PORT_ARCH -m sdk-install -R zypper in -y ccache
cd $ANDROID_ROOT
cp /home/mersdk/work/ci/ci/helpers/build_packages.sh rpm/dhd/helpers/
chmod +x rpm/dhd/helpers/build_packages.sh
cd $ANDROID_ROOT
sudo mkdir -p /proc/sys/fs/binfmt_misc/
sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
rpm/dhd/helpers/build_packages.sh
if [ "$?" -ne 0 ];then
# if failed, retry once
rpm/dhd/helpers/build_packages.sh
cat $ANDROID_ROOT/droid-hal-mido.log
fi