Unverified Commit 96ba94ff authored by taaem's avatar taaem

[onyx] Initial version for the Oneplus X(onyx)

parent 0d012ac2
......@@ -37,7 +37,7 @@ sudo zypper ar http://repo.merproject.org/obs/home:/sledge:/mer/latest_i486/ \
curlfix
+verbose Adding the common repo
sudo zypper ar http://repo.merproject.org/obs/nemo:/devel:/hw:/common/sailfish_latest_armv7hl/ \
common
common
+verbose Refreshing the curlfix repo
sudo zypper ref curlfix
sudo zypper dup --from curlfix
......@@ -83,79 +83,33 @@ repo init -u git://github.com/mer-hybris/android.git -b hybris-12.1
mkdir $ANDROID_ROOT/.repo/local_manifests
+verbose Entering the local_manifests directory
cd $HOME/.repo/local_manifests/
+verbose Creating the x.xml file
touch x.xml
echo -n Putting relevant repos to sync in the fp2.xml file
cat > x.xml <<EOF
+verbose Creating the onyx.xml file
touch onyx.xml
echo -n Putting relevant repos to sync in the onyx.xml file
cat > onyx.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/oneplus/onyx" name="CyanogenMod/android_device_sony_scorpion" revision="cm-12.1" />
<project path="device/oneplus/scorpion_windy" name="CyanogenMod/android_device_sony_scorpion_windy" revision="cm-12.1" />
<project path="device/oneplus/shinano-common" name="CyanogenMod/android_device_sony_shinano-common" revision="cm-12.1" />
<project path="device/oneplus/msm8974-common" name="CyanogenMod/android_device_sony_msm8974-common" revision="cm-12.1" />
<project path="device/oppo/common" name="CyanogenMod/android_device_oppo_common" revision="cm-12.1" />
<project path="external/sony/boringssl-compat" name="CyanogenMod/android_device_qcom_common" revision="cm-12.1" />
<project path="hardware/sony/thermanager" name="CyanogenMod/android_hardware_sony_thermanager" revision="cm-12.1" />
<project path="kernel/oneplus/onyx" name="CyanogenMod/android_kernel_oneplus_onyx" revision="hybris-12.1" />
<project path="vendor/sony/" name="TheMuppets/proprietary_vendor_sony" revision="cm-12.1" />
<project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" revision="ec34d17cd81afd459071e2f6e663b1d65338257e" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="d51a421eb303a7eb4917902cb133a662e71f3916" />
<project name="taaem/android_vendor_oneplus_onyx" path="vendor/oneplus/onyx" remote="github" revision="master" />
<project name="mer-hybris/android_device_oneplus_onyx" path="device/oneplus/onyx" remote="github" revision="master"/>
<project name="mer-hybris/android_kernel_oneplus_onyx" path="kernel/oneplus/msm8974" remote="github" revision="hybris-12.1" />
<project name="mer-hybris/droid-hal-onyx" path="rpm/" revision="master" />
<project name="mer-hybris/droid-config-onyx" path="hybris/droid-configs" revision="master" />
<project name="mer-hybris/droid-hal-version-onyx" path="hybris/droid-hal-version-onyx" revision="master" />
</manifest>
EOF
+verbose Entering $ANDROID_ROOT
cd $ANDROID_ROOT
+verbose Syncing the repos that you added to the scorpion.xml file
repo sync --fetch-submodules
+verbose Resyncing again to make sure that you're fully up-to-date.
+verbose Resyncing again to make sure that you are fully up-to-date.
repo sync --fetch-submodules
cat > /home/$USER/mer/android/droid/hybris/hybris-boot/fixup-mountpoints << EOF
#!/bin/bash
DEVICE=$1
shift
echo "Fixing mount-points for device $DEVICE"
case "$DEVICE" in
"onyx")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/B2B mmcblk0p25 ' \
-e 's block/platform/msm_sdcc.1/by-name/DDR mmcblk0p17 ' \
-e 's block/platform/msm_sdcc.1/by-name/FOTAKernel mmcblk0p16 ' \
-e 's block/platform/msm_sdcc.1/by-name/LTALabel mmcblk0p18 ' \
-e 's block/platform/msm_sdcc.1/by-name/TA mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/aboot mmcblk0p5 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_aboot mmcblk0p11 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_dbi mmcblk0p10 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_rpm mmcblk0p12 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_s1sbl mmcblk0p9 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_sbl1 mmcblk0p8 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_tz mmcblk0p13 ' \
-e 's block/platform/msm_sdcc.1/by-name/apps_log mmcblk0p22 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p14 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p24 ' \
-e 's block/platform/msm_sdcc.1/by-name/dbi mmcblk0p4 ' \
-e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst1 mmcblk0p19 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst2 mmcblk0p20 ' \
-e 's block/platform/msm_sdcc.1/by-name/ramdump mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/rpm mmcblk0p6 ' \
-e 's block/platform/msm_sdcc.1/by-name/s1sbl mmcblk0p3 ' \
-e 's block/platform/msm_sdcc.1/by-name/sbl1 mmcblk0p2 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p23 ' \
-e 's block/platform/msm_sdcc.1/by-name/tz mmcblk0p7 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p26 ' \
"[email protected]" ;;
*)
exit 1
;;
esac
EOF
+verbose Done!
+verbose Running source build/envsetup.sh
source build/envsetup.sh
export USE_CCACHE=1
+verbose Running breakfast for Fairphone 2
+verbose Running breakfast for OnePlus X
breakfast $DEVICE
+verbose Running make to build hybris-hal
make -j4 hybris-hal
......@@ -169,6 +123,17 @@ hybris/mer-kernel-check/mer_verify_kernel_config \
./out/target/product/$DEVICE/obj/KERNEL_OBJ/.config
+verbose Building hybris-boot and hybris-recovery for your device
make hybris-boot && make hybris-recovery
+verbose Building Audioflingerglue
make -j4 libaudioflingerglue miniafservice
make -j4 hybris-hal
+verbose Patching libcameraservice
curl http://pastebin.com/raw/SAdK21Tq -o libcameraservice.patch
cd $ANDROID_ROOT/frameworks/av/
patch -p 1 < $ANDROID_ROOT/libcameraservice.patch
+verbose Building libcameraservice
make libcameraservice
+verbose Building droidmedia
make -j4 libdroidmedia minimediaservice minisfservice
+verbose Exiting the HABUILD_SDK into the Mer SDK
exit
SFE_SB2_TARGET=$MER_ROOT/targets/$VENDOR-$DEVICE-$PORT_ARCH
......@@ -211,9 +176,63 @@ sudo mkdir -p $MER_ROOT/devel
sudo chown -R $USER mer/devel
sb2 -t $VENDOR-$DEVICE-$PORT_ARCH -R -m sdk-install ssu ar common http://repo.merproject.org/obs/nemo:/devel:/hw:/common/sailfish_latest_armv7hl/
cd $ANDROID_ROOT
+verbose Packaging Audioflingerglue
curl http://sprunge.us/OADK -o pack_source_af.sh
curl http://sprunge.us/TEfZ -o audioflingerglue.spec
chmod +x pack_source_af.sh
./pack_source_af.sh
mb2 -s audioflingerglue.spec -t $VENDOR-$DEVICE-armv7hl build
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref
rm out/target/product/$DEVICE/system/bin/miniafservice
rm out/target/product/$DEVICE/system/lib/libaudioflingerglue.so
+verbose Building pulseaudio-modules-glue
mkdir -p $MER_ROOT/devel/mer-hybris
cd $MER_ROOT/devel/mer-hybris
PKG=pulseaudio-modules-droid-glue
git clone https://github.com/mer-hybris/pulseaudio-modules-droid-glue.git
cd $PKG
curl http://pastebin.com/raw/H8U5nSNm -o pulseaudio-modules-droid-glue.patch
patch -p 1 < pulseaudio-modules-droid-glue.patch
mb2 -s rpm/$PKG.spec -t $VENDOR-$DEVICE-armv7hl build
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/*.rpm
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref
+verbose Packaging droidmedia
cd $ANDROID_ROOT
curl http://sprunge.us/WPGA -o pack_source_droidmedia.sh
curl http://sprunge.us/FWOg -o droidmedia.spec
chmod +x pack_source_droidmedia.sh
./pack_source_droidmedia.sh
mb2 -s droidmedia.spec -t $VENDOR-$DEVICE-armv7hl build
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref
rm out/target/product/$DEVICE/system/bin/minimediaservice
rm out/target/product/$DEVICE/system/bin/minisfservice
rm out/target/product/$DEVICE/system/lib/libdroidmedia.so
+verbose Patching build_packages for ffmemless support
curl -O https://gist.githubusercontent.com/taaem/a0b2f4ed2773aa82aafecbb1e8d4f3c9/raw/6fc62551ea002a8989795869c5414fec8a6576b0/0001-build_packages-Add-ffmemless-and-remove-other-vibrat.patch
cd rpm/dhd
patch -p 1 < $ANDROID_ROOT/0001-build_packages-Add-ffmemless-and-remove-other-vibrat.patch
+verbose Running the build_packages script
rpm/dhd/helpers/build_packages.sh
+verbose Press Ctrl C to stop this process if you at some point end up with what looks as a freeze and rerun rpm/dhd/helpers/build_packages.sh
+verbose Building gst-droid
mkdir -p $MER_ROOT/devel/mer-hybris
cd $MER_ROOT/devel/mer-hybris
PKG=gst-droid
git clone https://github.com/sailfishos/$PKG.git -b master
cd $PKG
mb2 -s rpm/$PKG.spec -t $VENDOR-$DEVICE-armv7hl build
mkdir -p $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/
rm -f $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG/*.rpm
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG
createrepo $ANDROID_ROOT/droid-local-repo/$DEVICE
sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref
+verbose Creating a directory called tmp
mkdir -p tmp
HA_REPO="repo --name=adaptation0-$DEVICE[email protected]@"
......@@ -227,4 +246,4 @@ sudo mic create fs --arch $PORT_ARCH \
--record-pkgs=name,url \
--outdir=sfe-$DEVICE-$RELEASE$EXTRA_NAME \
--pack-to=sfe-$DEVICE-$RELEASE$EXTRA_NAME.tar.bz2 \
$ANDROID_ROOT/tmp/[email protected]@[email protected]@.ks
\ No newline at end of file
$ANDROID_ROOT/tmp/[email protected]@-$DEVICE[email protected]@.ks
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment