Depend on initramfs-minimal for a bunch of samsung devices to make them flashable again
I checked boot partition and boot.img size for some Samsung devices, 9 out of 12 tested need to depend on postmarketos-initramfs-minimal if we want boot.img to fit in boot partition, so it seems likely that there are more Samsung devices that are currently un-flashable.
Note that it is possible to find boot partition size for Samsung devices without having access to the device. The size can be read from the device PIT, which can often be found in stock firmware zip for the device, in the CSC_*.tar.md5
archive (they are also often shared on XDA or similar).
If you have a PIT you can use heimdall to print partitions and look for Partition Name: BOOT
:
$ heimdall print-pit --file /tmp/TRLTE_EUR_OPEN.pit
[ ... ]
--- Entry #16 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 17
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 274440
Partition Block Count: 34816
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOT
Flash Filename: boot.img
FOTA Filename:
[ ... ]
The partition size is then equal to Partition Block Count*512
if Device Type
is 2 (MMC)
, and Partition Block Count*4096
if Device Type
is 8 (UFS)
.
Apart from devices fixed in this MR I tested:
- samsung-dream
- samsung-gts210lte
- samsung-treltexx
where boot.img is small enough to be flashable.
See also discussions in !5000 (closed).
Merge request reports
Activity
mentioned in merge request !5000 (closed)
By Henrik Grimler on 2024-07-21T07:19:46
mentioned in issue #3040 (closed)
By Henrik Grimler on 2024-07-21T08:50:16
mentioned in merge request !5331 (closed)
By Henrik Grimler on 2024-07-22T10:46:43
added 40 commits
-
d299ebff...801283d9 - 31 commits from branch
postmarketOS:master
- 412ceacf - device-samsung-jflte: depend on postmarketos-initramfs-minimal (MR 5365)
- b84e9784 - device-samsung-herolte: depend on postmarketos-initramfs-minimal (MR 5365)
- f2d5368d - device-samsung-hero2lte: depend on postmarketos-initramfs-minimal (MR 5365)
- 01ea0922 - device-samsung-chagallwifi: depend on postmarketos-initramfs-minimal (MR 5365)
- 98cdee89 - device-samsung-klimtlte: depend on postmarketos-initramfs-minimal (MR 5365)
- 90d2e0b0 - device-samsung-zerofltexx: depend on postmarketos-initramfs-minimal (MR 5365)
- 8cc6b717 - device-samsung-zeroltexx: depend on postmarketos-initramfs-minimal (MR 5365)
- 74761bc6 - device-samsung-n1awifi: depend on postmarketos-initramfs-minimal (MR 5365)
- 075d3065 - device-samsung-v1awifi: depend on postmarketos-initramfs-minimal (MR 5365)
By clayton craft on 2024-07-23T23:19:30
Toggle commit list-
d299ebff...801283d9 - 31 commits from branch
lgtm. thanks a lot of fixing these devices, and I'm sorry if discovering/fixing this was annoying... I'm hopeful that the improvementin !5000 (closed) were worth it long term
By clayton craft on 2024-07-23T23:21:50
Edited by Administratoradded category::device type::fix labels
added device-category::testing label
mentioned in issue pmbootstrap#2431 (closed)
By schröbingus on 2024-08-25T00:22:26