Jump to content

Samsung Galaxy S9 (samsung-starqltechn)

From postmarketOS Wiki
Revision as of 15:06, 17 March 2023 by Dsankouski (talk | contribs) (U-boot: make wiki user friendly: move starqltechn u-boot technical details to separate page;)
Samsung Galaxy S9 (SM-G9600/
DS)
SM-G9600
SM-G9600
Manufacturer Samsung
Name Galaxy S9 (SM-G9600/
DS)
Codename samsung-starqltechn
Released 2018
Hardware
Chipset Qualcomm Snapdragon 845 (SDM845)
CPU Octa-core (4x 2.8 GHz Kryo 385 Gold & 4x 1.7 GHz Kryo 385 Silver)
GPU Adreno 630
Display 5.8 inch 18.5:9, 2960 x 1440 pixel 568 PPI, capacitive touchscreen, 10 multi-touch points, Super AMOLED, Corning Gorilla Glass 5, glossy: yes
Storage 64 GB
Memory 4 GB
Architecture aarch64
Software
Original software Android
Original version 8
Extended version 10
postmarketOS
Category testing
Pre-built images no
Mainline no
Features
Flashing
Broken
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
No data
Screen
Broken
Touchscreen
No data
Multimedia
3D Acceleration
No data
Audio
No data
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Broken
Bluetooth
No data
GPS
No data
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
No data
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data
U-Boot
Primary Bootloader
Broken
Secondary Bootloader
Works
Mainline
Works
Internal Storage
No data
SD card
No data
USB Host
No data
USB Peripheral
No data
Display
No data
Buttons
Works


Contributors

  • dsankouski

Maintainer(s)

Users owning this device


How to enter flash mode

Installation

Flash boot image from TWRP

adb push $BOOT_IMAGE_PATH /tmp/boot.img && adb -d shell 'dd of=/dev/block/platform/soc/1d84000.ufshc/by-name/boot if=/tmp/boot.img'

Mainline

Mainline kernel can be booted with stock bootloader or u-boot. Logs may be viewed from pstore(ramoops) or simple framebuffer.

Status

  • Green lines - works
  • Blue - in progress
  • Red - backlog

Roadmap

  • boots
  • framebuffer
  • storage, both main and sdcard
  • touchscreen driver (dsankouski)
  • muic driver(max77705), at least detect usb cable
  • assemble firmware package in aports
  • wifi
  • bluetooth
  • display panel driver

Assembling boot image

  • clone mainline sources
  • build kernel. See also Compiling_kernels_with_envkernel.sh
  • append dtb to gzipped kernel image
    • pushd .output/arch/arm64/boot
    • cat Image.gz dts/qcom/sdm845-samsung-starqltechn.dtb > Image.gz-dtb
  • generate initramfs image
  • make android bootimage mkbootimg --base 0x0 --kernel_offset 0x00008000 --ramdisk_offset 0x02000000 --tags_offset 0x01e00000 --pagesize 4096 --second_offset 0x00f00000 --ramdisk "$INITRAMFS" --kernel Image.gz-dtb -o boot.img

Boot

Flash boot image from twrp to boot partition. Reboot to system. Phone will stay on manufacturer logo. Check logs in pstore. If there's only twrp logs in pstore, try to reboot phone with power+volume down one more time.

U-boot

Has support in main tree, can boot PostmarketOS and Android.

See also [u-boot sdm845 docs](https://u-boot.readthedocs.io/en/latest/board/qualcomm/sdm845.html)

Notes

Uart

`/dev/ttyHS8` can be exposed on USB D+D- lines. It's configured in data mover mode by downstream kernel.

Getting logs from pstore

Boot to twrp, and check /sys/fs/pstore folder

Stock bootloader

Loads payload into ram at random physical address for security reason. Initramfs physical load address is 0xa2000000 both for boot image and recovery image

See also

aport MR

u-boot

u-boot sdm845 devices docs

aport fork for SM-G9600

mainline kernel fork for SM-G9600