Samsung Galaxy Express SGH-I437 (samsung-expressatt)

== Contributors ==
LogicalErzor
== Maintainer(s) ==
LogicalErzor
== Users owning this device ==
== How to install ==
Start powered off. From there, hold the button, button, and button. Once the phone buzzes, release the button.
There is also a way to enter Odin download mode without the 3 button combo (link). Instead of the resistor in this schematic being 150k or 619k, make it around 300k (which you could easily do with two 150k or 619k resistors). Will be useful if accidentally soft bricking device.
Once in odin mode, flash lk2nd onto the device: https://github.com/msm8916-mainline/lk2nd;
currently you will have to build lk2nd and have to modify the bundle.dts where the other msm8960 devices exist just so the buttons work (Changes have been - or will soon be - submitted in a PR. Once it's merged, you don't have to do anything).
Once lk2nd is built (or downloaded once the PR has been merged), simply do:
 heimdall flash --BOOT lk2nd-msm8960.img
Building and flashing pmOS:
faster mainline builds... envkernel.sh doesn't behave nice, so this is 3 separate commands. this basically tells us what configs we are missing in our device.config file in linux-next so that we can add it
 pmbootstrap -y zap -a && \
 cd ~/linux/ && \
 source ../pmbootstrap/helpers/envkernel.sh
 pmbootstrap checksum device-samsung-expressatt linux-next && \
 pmbootstrap kconfig edit linux-next --arch armv7 && \
 sudo cp ~/pmaports/cache_git/pmaports/device/testing/linux-next/config-generic-trailblazer.armv7 ~/linux/arch/arm/configs/expressatt_defconfig && \
 make expressatt_defconfig && \
 make -j 20 && \
 pmbootstrap build --envkernel linux-next && \
 deactivate
 sudo cp ~/linux/.output/.config .config && \
 make LLVM=1 ARCH=arm -j $(nproc) savedefconfig && \
 sudo cp ~/linux/defconfig ~/pmaports/cache_git/pmaports/device/testing/linux-next/defconfig && \
 echo "=======================================" && \
 while IFS= read -r line; do grep -Fxq "$line" ~/linux/arch/arm/configs/qcom_defconfig ~/pmaports/cache_git/pmaports/device/testing/linux-next/*.config || echo "$line"; done < ~/pmaports/cache_git/pmaports/device/testing/linux-next/defconfig && \
 echo "=======================================" && \
 sudo rm ~/linux/.output/.config ~/linux/.config ~/linux/defconfig && \
 pmbootstrap build --force device-samsung-expressatt && \
 pmbootstrap initfs hook_add debug-shell && \
 yes | pmbootstrap install && \
 pmbootstrap export && \
 cd /tmp/postmarketOS-export/ && \
 fastboot flash userdata samsung-expressatt.img
Finally remove the battery, plug it back in and watch the UART logs! The device doesn't boot to console yet, but close to it. Seems like configs are missing so I'm working to add them back in.
== Mainlining blocker ==
main problem here is pastebin.com/qGbfFGUt
small rw’s are fine, but big ones hang the system: pastebin.com/Tkx7Bw0q
dont know how to debug the mmc here
== UART ==
i have UART working. some links:
# https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_S4_Plus_(MSM8960)#UART
# https://wiki.postmarketos.org/wiki/Serial_debugging/Cable_schematics#Raspberry_Pi
# https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/master/device/testing/device-samsung-expressatt
# https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/master/device/testing/linux-postmarketos-qcom-msm8960
## https://gitlab.postmarketos.org/postmarketOS/pmaports/-/blob/master/device/testing/linux-postmarketos-qcom-msm8960/config-postmarketos-qcom-msm8960.armv7#L488
# https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
== Useful Links (?) ==
* https://www.infineon.com/dgdl/Infineon-CYUSB301X_CYUSB201X_EZ-USB_FX3_SUPERSPEED_USB_CONTROLLER-DataSheet-v01_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0eca1e7442aa
* https://arxiv.org/abs/1707.05082
* https://www.infineon.com/dgdl/Infineon-CY7C65223D-32LTXI-DataSheet-v01_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0eea2d36730a
* https://www.infineon.com/dgdl/Infineon-CYUSB301X_CYUSB201X_EZ-USB_FX3_SUPERSPEED_USB_CONTROLLER-DataSheet-v21_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0eca1e7442aa
* https://www.infineon.com/dgdl/Infineon-CYUSBS236_User_Guide-UserManual-v01_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0ef8d1be0e5a
== See also ==
* GSMArena
* 
* 
* MSM8960 Mainlining