The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


User:Umeaboy

From Mer Wiki
Jump to: navigation, search
Jfltexx.jpg

Notes for installing Sailfish OS on the Samsung Galaxy S6 Edge SM-G925F LTE (zeroltexx).

Contents

Hardware Support

Template:Device zeroltexx
Legend:  Y  - Working (y=hack),  Y  - HAL works, not hooked up to UI/MW/init yet,  N  - Not working,  ?  - Untested,  N/A  - N/A on device.
Device released Linux
Kernel
Display Touch LED Audio NFC Bluetooth GSM WLAN GPS Camera Fingerprint Sensors Keys Vibra Haptics Power
Mgmt.
RTC
alarms
USB FM Radio
SMS Voice Data Connect Hotspot ALS PS Accel. Gyro. Magne. Vol+/- Home Net. Charge

Status

Things that don't work

There's no zip ready yet.


Things that work

There's no zip yet.

Image Building

useful links

  • lineage-13.0-20170108-UNOFFICIAL-zeroltexx.zip
  • twrp-3.1.1-0-zerolte.img
  • Odin3_v3.12.0.zip
  • heimdall-suite-1.4.2-win32.zip

build notes

The notes below follow the HADK Porting Guide (v1.9.9)

1 OVERVIEW -> Proceed as described;

2 PREREQUISITES -> Proceed as described;

3 PREPARING YOUR DEVICE -> Proceed as described;

4.1 Setting up required environment variables

$HOME/.hadk.env

export MER_ROOT="/home/<user>/mer"
export ANDROID_ROOT="$MER_ROOT/android/droid"
export VENDOR="samsung"
export DEVICE="zeroltexx"
#ARCH conflicts with kernel build
export PORT_ARCH="armv8hl"

Proceed as described;


4.2 Setup the Mer SDK -> Proceed as described;

4.3 Preparing the Mer SDK -> Proceed as described;

4.4 Setting up an Android Build Environment

4.4.1 Downloading and Unpacking Ubuntu Chroot -> Proceed as described;

4.4.2 Entering Ubuntu Chroot -> Proceed as described;

5.1 Checking out CyanogenMod Source

repo init -u git://github.com/mer-hybris/android.git -b hybris-13.0


Proceed as described;


5.2 Device repos

$ANDROID_ROOT/.repo/local_manifests/zeroltexx.xml

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
    <project path="device/samsung/jflte" name="CyanogenMod/android_device_samsung_jfltexx" revision="cm-12.1" />
    <project path="device/samsung/jf-common" name="Cyanogenmod/android_device_samsung_jf-common" revision="cm-12.1" />
    <project path="device/samsung/msm8960-common" name="Cyanogenmod/android_device_samsung_msm8960-common" revision="cm-12.1" />
    <project path="device/samsung/qcom-common" name="Cyanogenmod/android_device_samsung_qcom-common" revision="cm-12.1" />
    <project path="hardware/samsung" name="Cyanogenmod/android_hardware_samsung" revision="cm-12.1" />
    <project path="kernel/samsung/jf" name="Cyanogenmod/android_kernel_samsung_jf" revision="cm-12.1" />
    <project path="rpm" name="wickwire/droid-hal-jfltexx" revision="master" sync-s="true" />
    <project path="hybris/droid-configs" name="wickwire/droid-config-jfltexx" revision="master" sync-s="true" />
    <project path="hybris/droid-hal-version-jfltexx" name="wickwire/droid-hal-version-jfltexx" revision="master" sync-s="true" />
    <project path="mlehtima/audioflingerglue" name="mlehtima/audioflingerglue" revision="master" sync-s="true" />
    <remove-project name="mer-hybris/hybris-boot" />
    <project path="hybris/hybris-boot" name="wickwire/hybris-boot" revision="wickwire-jfltexx" />
</manifest>

Proceed as described;

5.3 Configure Mountpoint Information

$ANDROID_ROOT/hybris/hybris-boot/fixup-mountpoints should already have this additional block - so, nothing to do here:

    "jfltexx")
       sed -i \
            -e 's block/platform/msm_sdcc.1/by-name/aboot mmcblk0p6 ' \
            -e 's block/platform/msm_sdcc.1/by-name/apnhlos mmcblk0p1 ' \
            -e 's block/platform/msm_sdcc.1/by-name/backup mmcblk0p23 ' \
            -e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p20 ' \
            -e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p18 ' \
            -e 's block/platform/msm_sdcc.1/by-name/carrier mmcblk0p28 ' \
            -e 's block/platform/msm_sdcc.1/by-name/efs mmcblk0p10 ' \
            -e 's block/platform/msm_sdcc.1/by-name/fota mmcblk0p22 ' \
            -e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p24 ' \
            -e 's block/platform/msm_sdcc.1/by-name/hidden mmcblk0p27 ' \
            -e 's block/platform/msm_sdcc.1/by-name/m9kefs1 mmcblk0p13 ' \
            -e 's block/platform/msm_sdcc.1/by-name/m9kefs2 mmcblk0p14 ' \
            -e 's block/platform/msm_sdcc.1/by-name/m9kefs3 mmcblk0p15 ' \
            -e 's block/platform/msm_sdcc.1/by-name/mdm mmcblk0p2 ' \
            -e 's block/platform/msm_sdcc.1/by-name/modemst1 mmcblk0p11 ' \
            -e 's block/platform/msm_sdcc.1/by-name/modemst2 mmcblk0p12 ' \
            -e 's block/platform/msm_sdcc.1/by-name/pad mmcblk0p9 ' \
            -e 's block/platform/msm_sdcc.1/by-name/param mmcblk0p19 ' \
            -e 's block/platform/msm_sdcc.1/by-name/persdata mmcblk0p26 ' \
            -e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p17 ' \
            -e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p21 ' \
            -e 's block/platform/msm_sdcc.1/by-name/rpm mmcblk0p7 ' \
            -e 's block/platform/msm_sdcc.1/by-name/sbl1 mmcblk0p3 ' \
            -e 's block/platform/msm_sdcc.1/by-name/sbl2 mmcblk0p4 ' \
            -e 's block/platform/msm_sdcc.1/by-name/sbl3 mmcblk0p5 ' \
            -e 's block/platform/msm_sdcc.1/by-name/ssd mmcblk0p25 ' \
            -e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p16 ' \
            -e 's block/platform/msm_sdcc.1/by-name/tz mmcblk0p8 ' \
            -e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p29 ' \
            "$@"
        ;;


5.4 Building Relevant Bits of CyanogenMod

using defconfig from: arch/arm/configs/cyanogen_jf_defconfig

Before executing make -j4 hybris-hal, perform actions from http://piratepad.net/hadk-faq lines 66-114 in order to get GSM calls working:

cd $ANDROID_ROOT
cd /external/sonivox
git checkout 047330f1c245bcb3641856a6adabfc344d6e3c36
cd $ANDROID_ROOT
cd frameworks/av
git checkout 25be9ac20db51044e1b09ca67906355e4f328d48
cd ~/mer/android/droid/kernel/samsung/jf

(check that the active branch is jfltexx)

make libaudioflingerglue miniafservice

those packages should build ok, and then do

make hybris-hal

and then do

hybris/mer-kernel-check/mer_verify_kernel_config ./out/target/product/$DEVICE/obj/KERNEL_OBJ/.config | egrep -e 'ERROR|WARNING'
WARNING: CONFIG_SCHEDSTATS is invalid
WARNING: CONFIG_SCHED_DEBUG is invalid
WARNING: CONFIG_WATCHDOG_NOWAYOUT is invalid


those 3 warnings only and no errors should be ok


6 SETTING UP SCRATCHBOX2 TARGET -> Proceed as described;


7.1 Creating Repositories for a New Device -> the files for this part should already be available from the local_manifest, nothing to do

7.2.1 Building the droid-hal-device packages:

add the following repo to the merSDK:

ssu ar testing http://repo.merproject.org/obs/home:/mal:/testing/sailfishos_latest_armv7hl/
zypper ref and then zypper dup --from testing

Proceed as described;

Important note: if the process hangs at ngfd-plugin-droid-vibrator, abort the script and manually build the package:

PKG=ngfd-plugin-droid-vibrator
cd ~/mer/devel/mer-hybris/$PKG
mb2 -s rpm/ngfd-plugin-droid-vibrator.spec -t samsung-zeroltexx-armv7hl build
mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG
sb2 -t $VENDOR-$DEVICE-armv8hl -R -msdk-install zypper ref

then resume build_packages.sh

When done, continue with http://piratepad.net/hadk-faq, follow the steps between lines 79-114:

(for the load-module part, check out 14.8 PulseAudio Droid Modules in the HADK Porting Guide)

cd $ANDROID_ROOT

(create the two files below)

pack_source_af.sh

fold=audioflingerglue-0.0.1
rm -rf $fold
mkdir $fold

mkdir -p $fold/out/target/product/${DEVICE}/system/lib
mkdir -p $fold/out/target/product/${DEVICE}/system/bin
mkdir -p $fold/external/audioflingerglue

cp ./out/target/product/${DEVICE}/system/lib/libaudioflingerglue.so $fold/out/target/product/${DEVICE}/system/lib/
cp ./out/target/product/${DEVICE}/system/bin/miniafservice $fold/out/target/product/${DEVICE}/system/bin/
cp ./external/audioflingerglue/*.h $fold/external/audioflingerglue/
cp ./external/audioflingerglue/hybris.c $fold/external/audioflingerglue/

tar -cjvf ${fold}.tgz $fold

audioflingerglue.spec

%define strip /bin/true
%define __requires_exclude  ^.*$
%define __find_requires     %{nil}
%global debug_package       %{nil}
%define __provides_exclude_from ^.*$
%define device_rpm_architecture_string armv7hl
%define _target_cpu %{device_rpm_architecture_string}

Name:          audioflingerglue
Summary:       Android AudioFlinger glue library
Version:       0.0.1
Release:       1
Group:         System/Libraries
License:       ASL 2.0
#BuildRequires: ubu-trusty
#BuildRequires: sudo-for-abuild
#BuildRequires: droid-bin-src-full
Source0:       %{name}-%{version}.tgz
AutoReqProv:   no

%description
%{summary}

%package       devel
Summary:       audioflingerglue development headers
Group:         System/Libraries
Requires:      audioflingerglue = %{version}-%{release}
BuildArch:     noarch

%description   devel
%{summary}

%prep

%if %{?device_rpm_architecture_string:0}%{!?device_rpm_architecture_string:1}
echo "device_rpm_architecture_string is not defined"
exit -1
%endif

%setup

#sudo chown -R abuild:abuild /home/abuild/src/droid/
#mv /home/abuild/src/droid/* .
#mkdir -p external
#pushd external
#tar -zxf %SOURCE0
#mv audioflingerglue* audioflingerglue
#popd
%build
pwd
ls 
tar -xvf %name-%version.tgz
%install

mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/lib/
mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/bin/
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/audioflingerglue/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/audioflingerglue/
pushd %name-%version
cp out/target/product/*/system/lib/libaudioflingerglue.so \
    $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/lib/

cp out/target/product/*/system/bin/miniafservice \
    $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/bin/

cp external/audioflingerglue/audioflingerglue.h $RPM_BUILD_ROOT/%{_includedir}/audioflingerglue/
cp external/audioflingerglue/hybris.c $RPM_BUILD_ROOT/%{_datadir}/audioflingerglue/

popd
%files
%defattr(-,root,root,-)
%{_libexecdir}/droid-hybris/system/lib/libaudioflingerglue.so
%{_libexecdir}/droid-hybris/system/bin/miniafservice

%files devel
%defattr(-,root,root,-)
%{_includedir}/audioflingerglue/*.h
%{_datadir}/audioflingerglue/hybris.c 

7.2.2 Troubleshoot errors from build_packages.sh -> Shouldn't be anything to do here;

8.1 Additional Packages for Hardware Adaptation -> Shouldn't be anything to do here;

8.2 Creating and Configuring the Kickstart File:

Proceed as described - and then add mal- repo to tmp/$KS (watch out for any typos):

HA_REPO="repo --name=adaptation0-$DEVICE-@RELEASE@"
KS="Jolla-@RELEASE@-$DEVICE-@ARCH@.ks"

##### older lines, kept for posterity and because sed is cool ##### 
#sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|" $ANDROID_ROOT/hybris/droid-configs/installroot/usr/share/kickstarts/$KS > \
tmp/$KS
#repo --name=testing2 --baseurl=http://repo.merproject.org/obs/home:/mal:/testing2/sailfishos_latest_armv7hl
#repo --name=common --baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl
#sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|;s|^repo --name=jolla-@RELEASE@.*|& \nrepo --name=testing2 \
--baseurl=http://repo.merproject.org/obs/home:/mal:/testing2/sailfishos_latest_armv7hl\nrepo --name=common \
--baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl|" \
$ANDROID_ROOT/hybris/droid-configs/installroot/usr/share/kickstarts/$KS > tmp/$KS
##### older lines, kept for posterity and because sed is cool #####

sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|;s|^repo --name=jolla-@RELEASE@.*|& \nrepo --name=common \
--baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl|" \
$ANDROID_ROOT/hybris/droid-configs/installroot/usr/share/kickstarts/$KS > tmp/$KS

8.3.1 Making local repo aware of patterns -> Proceed as described;

8.4 Building the Image with MIC

cd $ANDROID_ROOT
hybris/droid-configs/droid-configs-device/helpers/process_patterns.sh

Proceed as described;

RELEASE=2.0.1.11
EXTRA_NAME=-wickwire-005-devel
sudo mic create fs --arch $PORT_ARCH --tokenmap=ARCH:$PORT_ARCH,RELEASE:$RELEASE,EXTRA_NAME:$EXTRA_NAME --record-pkgs=name,url \
--outdir=sfe-$DEVICE-$RELEASE$EXTRA_NAME --pack-to=sfe-$DEVICE-$RELEASE$EXTRA_NAME.tar.bz2 $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks

Installation

Requirements for installation

Installation steps

  • Install Android base zip by following instructions: CyanogenMod jfltexx Page
  • Install the Sailfish OS zip on top of that Android base
  • Reboot

Report bugs

  • Software-related bugs (Sailfish OS): first search in https://together.jolla.com. If not found, add your question and tag with "porting"
  • App bugs (e.g. an app doesn't scale well on different screens): contact its developer
  • Problems which depend on hardware: search existing http://bit.ly/port-bugs; add new http://bit.ly/port-new-bug
  • Please do not contact Jolla Care, Jolla Developer Care or phone's maker (e.g. LG, OnePlus, Google), as this is the Sailfish OS community's build for other phones
  • For hot discussions about bleeding edge issues, welcome to this xda thread :)
Personal tools