Jump to content

Samsung Galaxy Note 4 S-LTE (samsung-tre3calte): Difference between revisions

From postmarketOS Wiki
Grimler (talk | contribs)
Link to WIP MR
Grimler (talk | contribs)
Add some more info about mainline obstacles
Line 50: Line 50:


== Mainline ==
== Mainline ==
I (hexagonwin) had done some research about mainlining.
The device on the mainline kernel is the "Samsung TM2" and "Samsung TM2e". The TM2 is the Samsung Tizen reference device, and TM mean Tizen Mobile.
The device is a renamed note 4, and the TM2e is the note 4 edge.
According to krzk (#linux-exynos@libera) the device is an N910 device. The difference between N910 and N916 is only the modem, and the Tm2 mainline ports unsupports modem so it should also work on the n916 (tre3calte). (Also, please check the chat from that day : [Libera https://libera.irclog.whitequark.org/linux-exynos/2021-08-16])
However, the Note 4's OS is running in 32bit mode, but the Exynos 5433 supports 64bit. Plus, the Samsung TM2 is running in 64Bit mode.
While it's unsure if loading a 64bit kernel works on stock samsung bootloader of the note 4 (since I don't have the UART cable) I could see that the crash initramfs hook didn't work.
And the device was just stuck in there.


More things. Although it is quite unknown what was exactly done to Stock S-Boot and how U-Boot was flashed, the Samsung TM2 ran U-Boot, not the Samsung S-Boot. I searched more and found this [https://u-boot.denx.narkive.com/7vv58bTn/patch-0-9-arm-exynos-add-tm2-board-support U-Boot support patch] which didn't actually seem to be merged to the u-boot tree. According to PabloPL (#linux-exynos@libera) the u-boot was flashed onto the "in place of stock kernel" and was loaded by stock s-boot. (I think this means the Android /boot partition?) [https://libera.irclog.whitequark.org/linux-exynos/2021-08-17 Chat link]
The device on the mainline kernel is the "Samsung TM2" and "Samsung TM2e". The TM2 is the Samsung Tizen reference device, and TM mean Tizen Mobile. These devices uses a "special" 64bit version of sboot (or at least the arm trustzone firmware) to be able to boot arm64 kernels. All other phones and tablets with exynos5433 has 32bit sboot, and cannot boot a 64bit kernel. Unfortunately there seem to exist few tm2/tm2e device in the world, and firmware files for them does not seem to be downloadable anywhere. To have any chance to boot an arm64 mainline kernel on tre3calte and other exynos5433 devices we would need to get our hands on these firmware files, or in some other way create 64bit sboot/trustzone firmware for exynos5433.


So, in order to mainline the device, I think these should be done:
See these chat logs for relevant discussions:  


- 1. Copy the samsung-tm2 dts on mainline tree and rename it to tre3calte or treltexx or those note 4 devices.
* [https://freenode.irclog.whitequark.org/linux-exynos/2018-04-25 linux-exynos 2018-04-25]
- 2. Fix the unmerged ancient version of u-boot support patch and rename to note 4 devices, make it work.
* [https://libera.irclog.whitequark.org/linux-exynos/2021-08-16 linux-exynos 2021-08-16]
- 3. Try booting kernel using u-boot instead of s-boot.
 
Tm2 and tm2e uses u-boot rather than Samsungs proprietary variant. There was a patch sent to the u-boot project to add support for it, but it was not accepted in the sent form: [https://u-boot.denx.narkive.com/7vv58bTn/patch-0-9-arm-exynos-add-tm2-board-support U-Boot support patch]. Booting u-boot should, in theory, be possible by flashing it to the BOOT partition, to which android's boot.img is normally flashed.


== UART ==
== UART ==
{{12:44 <Grimler> hexagonwin: uart should be possible with a "standard" micro-usb cable with 619 kOhm between ID and GND pin. I have successfully gotten uart on other exynos5433 devices that way}}
Although I did not test, this may possibly work. You would need the micro usb cable, tear it, and solder the 619 kOhm. Thus you'd need a soldering machine, and a tester device for pin identification.


The [[Serial_debugging#Building_the_cable|serial debugging page]] as well as [https://redmine.replicant.us/projects/replicant/wiki/SamsungSerial Replicant's Wiki] have more information on how to create a cable.
A "standard" [[Serial_debugging#Building_the_cable|serial debugging cable]] with 619 kOhm works for tre3calte (and other exynos5433 devices). The bootloader prints lots of output during boot, but for some reason the kernel is quiet, even if the console parameter is changed. A patch similar to the one [https://forum.xda-developers.com/t/guide-samsung-galaxy-s7-uart.3743895/ found here for Galaxy S7] might be necessary to get any live kernel output.


== See also ==
== See also ==


* [https://gitlab.com/postmarketOS/pmaports/-/merge_requests/2293 WIP MR to add port]
* [https://gitlab.com/postmarketOS/pmaports/-/merge_requests/2293 WIP MR to add port]

Revision as of 10:35, 20 December 2021

Samsung Galaxy Note 4 S-LTE
Note 4 S-LTE
Note 4 S-LTE
Manufacturer Samsung
Name Galaxy Note 4 S-LTE
Codename samsung-tre3calte
Released 2014
Hardware
Chipset Samsung Exynos 5433
CPU CHANGE_ME
GPU CHANGE_ME
Display 2560x1440 AMOLED (Video Mode Panel)
Storage 32GB
Memory 3GB
Architecture armv7
Software
Original software Android Bionic/Linux 4.4.2 (Linux 3.4)
postmarketOS
Category testing
Pre-built images no
Mainline no
postmarketOS kernel 3.10
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
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
Works
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


Contributors

  • HexagonWin

Users owning this device

Installation

Recovery zip install works nicely.

Mainline

The device on the mainline kernel is the "Samsung TM2" and "Samsung TM2e". The TM2 is the Samsung Tizen reference device, and TM mean Tizen Mobile. These devices uses a "special" 64bit version of sboot (or at least the arm trustzone firmware) to be able to boot arm64 kernels. All other phones and tablets with exynos5433 has 32bit sboot, and cannot boot a 64bit kernel. Unfortunately there seem to exist few tm2/tm2e device in the world, and firmware files for them does not seem to be downloadable anywhere. To have any chance to boot an arm64 mainline kernel on tre3calte and other exynos5433 devices we would need to get our hands on these firmware files, or in some other way create 64bit sboot/trustzone firmware for exynos5433.

See these chat logs for relevant discussions:

Tm2 and tm2e uses u-boot rather than Samsungs proprietary variant. There was a patch sent to the u-boot project to add support for it, but it was not accepted in the sent form: U-Boot support patch. Booting u-boot should, in theory, be possible by flashing it to the BOOT partition, to which android's boot.img is normally flashed.

UART

A "standard" serial debugging cable with 619 kOhm works for tre3calte (and other exynos5433 devices). The bootloader prints lots of output during boot, but for some reason the kernel is quiet, even if the console parameter is changed. A patch similar to the one found here for Galaxy S7 might be necessary to get any live kernel output.

See also