Tizen Ports/Samsung A5
Kernel
- see https://github.com/msm8916-mainline/linux
- config: https://svn.cmeerw.net/src/tizen-ports/config-6.6-msm8916
Firmware
get packages from http://mirror.postmarketos.org/postmarketos/master/aarch64/
- firmware-samsung-a5-wcnss-nv-1-r0.apk
Additional Packages
qrtr
make prefix=/usr DESTDIR=install install
rmtfs
make prefix=/usr DESTDIR=install install
rpmsgexport
make prefix=/usr DESTDIR=install install
- udev rules in /usr/lib/udev/rules.d/55-msm-modem.rules
SUBSYSTEM!="rpmsg", GOTO="qcom_rpmsg_end" # symlink rpmsg endpoints under useful names ATTR{name}=="DATA5_CNTL", SYMLINK+="modem" ATTR{name}=="DATA4", SYMLINK+="modem-at" # open SMD channels when the remoteproc comes up KERNEL!="rpmsg_ctrl[0-9]*", GOTO="qcom_rpmsg_end" ATTRS{rpmsg_name}!="modem|hexagon", GOTO="qcom_rpmsg_end" ACTION=="add", RUN+="/usr/sbin/rpmsgexport /dev/$name DATA5_CNTL" ACTION=="add", RUN+="/usr/sbin/rpmsgexport /dev/$name DATA4" LABEL="qcom_rpmsg_end"
pd-mapper
make prefix=/usr DESTDIR=install install
libqrtr-glib
meson -Dprefix=/usr -Dgtk_doc=false ..
libqmi
meson -Dprefix=/usr -Dgtk_doc=false -Dman=false -Dbash_completion=false -Dmbim_qmux=false -Dudev=false ..
Install device-a5
Note that deviced needs to start after the audio device has been created, so need to add (in /lib/systemd/system/deviced.service)
sed -i -e 's/\(Description=System device daemon\)/\1\nWants=dev-snd-controlC0.device\nAfter=dev-snd-controlC0.device/' \ lib/systemd/system/deviced.service
Install pass-hal-msm8916
Install lbs-plugin-qmi
cmake -DHAL_LIB_DIR=/hal/lib -DFULLVER=0.2.9 -DMAJORVER=0 .. make DESTDIR=`pwd`/../install/ install
also need to run lbs-server as root, see /lib/systemd/system/lbs-server.service
sed -i -e 's/^User=[a-z]*$/User=root/' -e 's/^Group=[a-z]*$/Group=root/' \ lib/systemd/system/lbs-server.service
Install tel-plugin-qmi and tel-plugin-qmihal
cmake .. make DESTDIR=`pwd`/../install/usr/lib install
also need to run telephony-daemon as root, see /lib/systemd/system/telephony-daemon.service
sed -i -e 's/^User=[a-z]*$/User=root/' -e 's/^Group=[a-z]*$/Group=root/' \ lib/systemd/system/telephony-daemon.service
Booting
- Need kernel + dtb (cat'ted together)
fastboot --cmdline "earlycon cma=256M root=/dev/ram0 rw bootmode=ramdisk" \ flash:raw boot Image.gz-dtb ramdisk.img
Hardware specifics
GPIO Keys (in arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi)
- map GPIO key 109 to KEY_MENU
- map i2c-tkey to linux,keycodes = <KEY_PHONE KEY_BACK>;
CPU Frequency Scaling
- replace pass-hal-tm1 with pass-hal-standard
Accelerometer
- /sys/bus/iio/devices/iio:device2
echo 1 >/sys/bus/iio/devices/iio:device2/buffer/in_accel_x_en echo 1 >/sys/bus/iio/devices/iio:device2/buffer/in_accel_y_en echo 1 >/sys/bus/iio/devices/iio:device2/buffer/in_accel_z_en echo 1 >/sys/bus/iio/devices/iio:device2/buffer/in_timestamp_en echo 1 >/sys/bus/iio/devices/iio:device2/buffer/enable echo XXX >/sys/bus/iio/devices/iio:device2/trigger/current_trigger
Modem (manual connect)
qmicli -pd /dev/modem --dms-set-operating-mode=online qmicli -pd /dev/modem --wda-set-data-format=link-layer-protocol='raw-ip',ul-protocol=disabled,dl-protocol=disabled qmicli -pd /dev/modem --wds-bind-data-port=a2-mux-rmnet0 --client-no-release-cid && qmicli -pd /dev/modem --wds-set-ip-family=4 --client-cid 1 --client-no-release-cid && qmicli -pd /dev/modem --wds-start-network="apn='APN',auth=none,ip-type=4" --client-cid 1 --wds-follow-network
qmicli -pd /dev/modem --wds-get-current-settings ifconfig rmnet0 x.x.x.x pointopoint y.y.y.y mtu xxxx route add default gw y.y.y.y