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


Building Sailfish OS for Nexus 5

From Mer Wiki
(Difference between revisions)
Jump to: navigation, search
(Known Issues)
(Known Issues)
Line 56: Line 56:
 
* you will discover that any zypper operation is slow like hell. Cause two repos that shall not be there adaptation0 and xt9. Workaround: remove them:
 
* you will discover that any zypper operation is slow like hell. Cause two repos that shall not be there adaptation0 and xt9. Workaround: remove them:
 
  zypper rr adaptation0 xt9
 
  zypper rr adaptation0 xt9
* wireless hotspot is not working... wip?
+
* wireless hotspot is not working... wip? Workaround use usb tethering
 +
devel-su
 +
echo 1 > /proc/sys/net/ipv4/ip_forward
 +
/sbin/iptables -t nat -A POSTROUTING -o rmnet0 -j MASQUERADE
 +
/sbin/iptables -A FORWARD -i rmnet0 -o rndis0 -m state --state RELATED,ESTABLISHED -j ACCEPT
 +
/sbin/iptables -A FORWARD -i rndis0 -o rmnet0 -j ACCEPT
 +
 
 +
be sure on host the host you have a gateway setup to 192.168.2.1 and a dns eg. 8.8.8.8
 +
 
 
* mp3s do not play (google is your friend here.)
 
* mp3s do not play (google is your friend here.)
 
* the usb-moded package is removed so you will not get the phone connecting via usb as storage. Workaround use telnet or ssh
 
* the usb-moded package is removed so you will not get the phone connecting via usb as storage. Workaround use telnet or ssh
 +
* if any zypper operation pulls usb-moded remove them with
 +
rpm -e usb-moded-0.80-1.11.1.armv7hl
 +
rpm -e usb-moded-defaults-0.80-1.11.1.armv7hl
 +
rpm -e usb-moded-diagnostics-config-0.80-1.11.1.armv7hl
 +
rpm -e usb-moded-developer-mode-0.80-1.11.1.armv7hl
 +
 +
* dmesg spammed by [22592.736003] init: process 'qrngd', pid 12549 exited
 +
cause missing /dev/hw_random Workaround:
 +
create a new udev rule
 +
  /lib/udev/rules.d/999-extra-rules.rules
 +
with content
 +
  KERNEL=="hw_random",NAME="hwrng", SYMLINK+="%k"
 +
then
 +
  udevadm trigger
 +
 +
* dmesg spammed by [36025.727614] init: process 'time_daemon' killing any children in process group
 +
no idea wip?
 +
 +
* boot races caused by funny rules in systemd... Sign: you are stuck with a google logo... Workaround.
 +
add these in the %post of the .ks
 +
 +
sed -i '/post$/a sed -i \"s;WantedBy;RequiredBy;g\"  \/lib\/systemd\/system\/system.mount' $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks
 +
 +
sed -i '/post$/a echo \"RequiredBy=droid-hal-init.service\" >> \/lib\/systemd\/system\/local-fs.target' $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks 
 +
sed -i '/post$/a echo \"[Install]\" >> \/lib\/systemd\/system\/local-fs.target' $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks
  
 
=== Hardware Support ===
 
=== Hardware Support ===

Revision as of 09:36, 24 July 2014

Download the HADK documentation from http://releases.sailfishos.org/sfa-ea/2014-07-18_SailfishOSHardwareAdaptationDevelopmentKit.pdf

This document mentions configurations required to build Sailfish OS for Nexus 5 (hammerhead). HADK should be followed as it is and this document should be referred only to learn about build configurations specific to Nexus 5.

HADK mentions references to CM 10.1 while Nexus 5 is based on CM 11. All the steps carried out in HADK should be in context of CM 11 only.

Contents

Chapter 3

Install CM 11 instead of CM 10.1 on your device and test the functionality as mentioned in HADK.

Chapter 4

cat <<EOF > $HOME/.hadk.env
export MER_ROOT="[insert value of your choosing]"
export ANDROID_ROOT="$MER_ROOT/android/droid"
export VENDOR="lge"
export DEVICE="hammerhead"
EOF
cat <<'EOF' >> $HOME/.mersdkubu.profile
function hadk() { source $HOME/.hadk.env${1:+.$1}; echo "Env setup for $DEVICE"; }
export PS1="HABUILD_SDK [\${DEVICE}] $PS1"
hadk
EOF
cat <<'EOF' >> $HOME/.mersdk.profile
function hadk() { source $HOME/.hadk.env${1:+.$1}; echo "Env setup for $DEVICE"; }
hadk
EOF

Chapter 5

hadk
sudo mkdir -p $ANDROID_ROOT
sudo chown -R $USER $ANDROID_ROOT
cd $ANDROID_ROOT
repo init -u git://github.com/mer-hybris/android.git -b hybris-11.0
repo sync

Known Issues

  • dhcp assigns wrong ip address to host and it has to be fixed manually to be able to telnet to 2323 :
ifconfig -a and look for the interface name through which Nexus 5 is connected to host
sudo ifconfig <interface_name> 192.168.2.10 broadcast 192.168.2.255
  • Lipstick crashes at startup if debugfs is mounted
    • TMP!workaround into your .ks %post section:
rm -f /lib/systemd/system/sysinit.target.wants/sys-kernel-debug.mount
  • Lipstick crashes if qt5-qtsensors-plugin-sensorfw package is installed.
    • Workaround: zypper rm qt5-qtsensors-plugin-sensorfw
  • the two issues above can be worked-around by the following changes in the .ks file :
sed -i "/post$/a rm -f \/lib\/systemd\/system\/sysinit.target.wants\/sys-kernel-debug.mount"  $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks
sed -i "/post$/a rm -f \/usr\/lib\/qt5\/plugins\/sensors\/libqtsensors_sensorfw.so"  $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks  
  • Qt5 QPA hwcomposer plugin does not handle virtual displays correctly and causes UI to tear frequently.
  • droid-hal-init is sometimes started before /system is mounted and causes problems with property service.
  • Correct time is not shown on booting.
  • you will discover that any zypper operation is slow like hell. Cause two repos that shall not be there adaptation0 and xt9. Workaround: remove them:
zypper rr adaptation0 xt9
  • wireless hotspot is not working... wip? Workaround use usb tethering
devel-su
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o rmnet0 -j MASQUERADE
/sbin/iptables -A FORWARD -i rmnet0 -o rndis0 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i rndis0 -o rmnet0 -j ACCEPT

be sure on host the host you have a gateway setup to 192.168.2.1 and a dns eg. 8.8.8.8

  • mp3s do not play (google is your friend here.)
  • the usb-moded package is removed so you will not get the phone connecting via usb as storage. Workaround use telnet or ssh
  • if any zypper operation pulls usb-moded remove them with
rpm -e usb-moded-0.80-1.11.1.armv7hl
rpm -e usb-moded-defaults-0.80-1.11.1.armv7hl
rpm -e usb-moded-diagnostics-config-0.80-1.11.1.armv7hl
rpm -e usb-moded-developer-mode-0.80-1.11.1.armv7hl
  • dmesg spammed by [22592.736003] init: process 'qrngd', pid 12549 exited

cause missing /dev/hw_random Workaround: create a new udev rule

 /lib/udev/rules.d/999-extra-rules.rules

with content

 KERNEL=="hw_random",NAME="hwrng", SYMLINK+="%k"

then

 udevadm trigger
  • dmesg spammed by [36025.727614] init: process 'time_daemon' killing any children in process group

no idea wip?

  • boot races caused by funny rules in systemd... Sign: you are stuck with a google logo... Workaround.

add these in the %post of the .ks

sed -i '/post$/a sed -i \"s;WantedBy;RequiredBy;g\" \/lib\/systemd\/system\/system.mount' $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks

sed -i '/post$/a echo \"RequiredBy=droid-hal-init.service\" >> \/lib\/systemd\/system\/local-fs.target' $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks  
sed -i '/post$/a echo \"[Install]\" >> \/lib\/systemd\/system\/local-fs.target' $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks

Hardware Support

For current status of hardware support refer to https://wiki.merproject.org/wiki/Adaptations/libhybris

Help

If you need any help join us on #sailfishos-porters on irc.freenode.net

Personal tools