PeterPawn / YourFritz

dynamic package management for AVM routers
GNU General Public License v2.0
219 stars 63 forks source link

BM und AVM FRITZ! Smart Home Gateway #58

Open SaMMy-lacht opened 1 year ago

SaMMy-lacht commented 1 year ago
root@fritz:/var/mod/root# bootslotctl get_active
0
root@fritz:/var/mod/root# bootmanager debug verbose
yf_bootmanager version = 0.8.6-202301141521
>>>>>>>>>> device configuration from EVA loader <<<<<<<<<<
>>>>>>>>>> debug output of bootmanager script <<<<<<<<<<
system type = IPQ5018
model = AVM FRITZ! Smart Home Gateway 1
chipset manufacturer = qcom
compatible = IPQ5018
system selector = 0
system is switched = false
device branding = avm
device branding is changeable = false
current branding = avm
system in inactive slot is installed = true
>>>>>>>>>>>>>>>>>>>> running system <<<<<<<<<<<<<<<<<<<<
active filesystem = /dev/mtdblock5
active system version = 265.07.54-106830
active system date = 21.06.2023, 17:38:46 Uhr (epoch: 1687361926)
active system modification date = 06.07.2023, 21:15:26 Uhr (epoch: 1688670926)
active system modification source = Freetz-NG
brandings supported on active system = avm avme
branding used by active system = avm (immutable)
>>>>>>>>>>>>>>>>>> alternative system <<<<<<<<<<<<<<<<<<
inactive filesystem = /dev/mtdblock6
inactive filesystem mounted on /var/tmp/9812_1688672372/alt_root
inactive system version = 265.07.54-106830
inactive system date = 21.06.2023, 17:38:46 Uhr (epoch: 1687361926)
inactive system modification date = 06.07.2023, 14:58:17 Uhr (epoch: 1688648297)
inactive system modification source = Freetz-NG
brandings supported on inactive system = avm avme
branding used by inactive system = avm (immutable)
inactive filesystem dismounted
root@fritz:/var/mod/root# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00700000 00020000 "fit0"
mtd1: 00540000 00020000 "urlader"
mtd2: 00800000 00020000 "nand-tffs"
mtd3: 00700000 00020000 "fit1"
mtd4: 064c0000 00020000 "ubi"
mtd5: 01e08000 0001f000 "filesystem"
mtd6: 01e08000 0001f000 "reserved-filesystem"
mtd7: 022a2000 0001f000 "avm_update"
root@fritz:/var/mod/root# ls -l /dev/disk/by-partlabel/
lrwxrwxrwx    1 root     root            12 Jan  1  1970 avm_filesys_0 -> ../../ubi0_0
lrwxrwxrwx    1 root     root            12 Jan  1  1970 avm_filesys_1 -> ../../ubi0_1
lrwxrwxrwx    1 root     root            12 Jan  1  1970 avm_update -> ../../ubi0_2
root@fritz:/var/mod/root# cd /var
root@fritz:/var# wget https://raw.githubusercontent.com/PeterPawn/YourFritz/freetz-ng-test/fit_tools/fit-findfs.sh
Connecting to raw.githubusercontent.com (185.199.111.133:443)
wget: note: TLS certificate validation not implemented
saving to 'fit-findfs.sh'
fit-findfs.sh        100% |*****************************************************************************************************************************************************************************************************************************| 16883  0:00:00 ETA
'fit-findfs.sh' saved
root@fritz:/var# time sh fit-findfs.sh /dev/dev/mtdblock5
device node not found
Invalid magic value (0x00000000) found at offset 0x00.
Command exited with non-zero status 1
real    0m 0.11s
user    0m 0.02s
sys 0m 0.04s
root@fritz:/var# time sh fit-findfs.sh /dev/dev/mtdblock6
device node not found
Invalid magic value (0x00000000) found at offset 0x00.
Command exited with non-zero status 1
real    0m 0.06s
user    0m 0.00s
sys 0m 0.02s
root@fritz:/var# 
PeterPawn commented 1 year ago

Der Anzeige der Partitionen nach zu urteilen, müßten ja mtd0 und mtd3 jeweils FIT-Images enthalten - wobei die Dateisysteme dann ja offenbar wieder in (gesonderten) UBI-Partitionen stehen (mtd5 bzw. mtd6).

Das scheint also irgendein Mischmasch zu sein (vielleicht sind in den FIT-Partitionen auch nur jeweils die Kernel-Images enthalten) und man muß sich die Abläufe bei der Installation der Firmware in diesem Modell erst einmal gründlich ansehen, um sie auch zu verstehen.

Ich vermute aber mal, die Umschaltung zwischen den Partitionen wird dennoch funktionieren ... wenn nicht irgendeine Fehlerbedingung den Abbruch bewirkt. Eine Änderung des Brandings dürfte bei diesem Modell ohnehin nicht sinnvoll/erforderlich sein.

Dennoch danke für die bereitgestellten Informationen ... irgendwann werden die bestimmt auch mal benötigt, falls ich den BM anpassen sollte.

BTW ... bei den Aufrufen von fit-findfs.sh scheinen mir die angegebenen Pfade zu den Partitionen auch dann nicht zu stimmen, wenn man die falschen Nummern (5+6 vs. 0+3) berücksichtigt - da dürfte jeweils ein /dev zuviel in der Angabe sein.