[Gelöst] FW 6.50 für 7490 in Trunk rev. 13490 - keine Auswahlmöglichkeit

Die Box kommt aber nicht hoch. Aber damit würde das post_install zumindest weitermachen...
Willst Du das weiter untersuchen und möchtest Tipps, was man prüfen sollte oder ist das nur eine Feststellung? Bei letzterem spare ich mir die Schreibarbeit ...

Was mit beim anschließenden recover aber aufgefallen ist: Im Recover wurde die Box immer noch mit 06.30 gemeldet, sollte nach post_install und reboot nicht schon 06.50 gemeldet werden?
Das wird m.E. aus "firmware_info" im Urlader-Environment ausgelesen vom Recovery-Programm und dort erst im Rahmen der Abarbeitung der /etc/init.d/S01-head auf den richtigen Wert gesetzt:
Code:
echo firmware_info `/etc/version` >$CONFIG_ENVIRONMENT_PATH/environment
Damit ist die Box also nicht bis zu diesem Punkt gekommen.

Da vorher nicht so sehr viel passiert, würde ich am ehesten auf Probleme beim Mounten des SquashFS-Images aus der yaffs2-Partition tippen ... wenn das klappen sollte, kann es ja nur noch das pivot_root sein, was nicht funktioniert. Danach kommt nur noch "flash_update" (sollte schnell mit "exit 0" wieder verlassen werden) und dann geht schon "/etc/init.d/rc.S" los, was ziemlich am Beginn schon S01-head ausführt. Aber das geht jetzt schon wieder in die Richtung "story telling" ... macht nur Sinn, wenn Du wirklich suchen willst.

EDIT: Wenn Du das aber immer mit Recovery wieder lösen willst, wirst Du der Ursache nur schwer auf den Grund gehen können, jedenfalls dann, wenn beim Recovern immer wieder das gerade installierte (aktive) System überschrieben wird ... wie soll man das dann noch untersuchen können? Daher würde ich dazu raten, von einer Freetz-Installation aus (oder sogar von einer originalen AVM-Firmware aus, da hat man bei 06.50 dann auch die Möglichkeit, das SquashFS4-Image aus dem Update zu mouten und zu untersuchen, das muß nicht zwangsläufig dasselbe sein wie beim Auspacken) das Flashen zu versuchen und wenn der Neustart dann nicht funktioniert, einfach wieder auf die vorherige Version über EVA-FTP mit "linux_fs_start" zurückschalten ... dann bleibt das zu untersuchende System intakt und wird nicht vom Recovery-Programm (bzw. dem Start danach) überschrieben.
 
Zuletzt bearbeitet:
Willst Du das weiter untersuchen und möchtest Tipps, was man prüfen sollte oder ist das nur eine Feststellung? Bei letzterem spare ich mir die Schreibarbeit ...

Ich wäre bereit das weiter zu untersuchen - da die Box eh nur für solche Zwecke da ist stör ich so meine Produktiv-Box nicht.

EDIT: Wenn Du das aber immer mit Recovery wieder lösen willst, wirst Du der Ursache nur schwer auf den Grund gehen können, jedenfalls dann, wenn beim Recovern immer wieder das gerade installierte (aktive) System überschrieben wird ... wie soll man das dann noch untersuchen können? Daher würde ich dazu raten, von einer Freetz-Installation aus (oder sogar von einer originalen AVM-Firmware aus, da hat man bei 06.50 dann auch die Möglichkeit, das SquashFS4-Image aus dem Update zu mouten und zu untersuchen, das muß nicht zwangsläufig dasselbe sein wie beim Auspacken) das Flashen zu versuchen und wenn der Neustart dann nicht funktioniert, einfach wieder auf die vorherige Version über EVA-FTP mit "linux_fs_start" zurückschalten ... dann bleibt das zu untersuchende System intakt und wird nicht vom Recovery-Programm (bzw. dem Start danach) überschrieben.

Ok, ich muss zugeben, dass ich mich (da nie benötigt) nie mit dem 2-Image System beschäftigt habe - das recover war da eher der Weg die Box wieder auf "Bastelzustand" zu bringen. Einfach probieren beim booten abzufangen und entweder 1 oder 0 setzen? Jenachdem welche benutzt wurde?
 
Jenachdem welche benutzt wurde?
Exakt ... 0 steht für "mtd0/mtd1" und 1 für "mtd2/mtd3" (aus OS-Sicht). Den aktuellen Wert ggf. mit "QUOTE GETENV linux_fs_start" abfragen und dann negieren.

Die yaffs2-Partition kannst Du auch von einem "falschen" Kernel aus mounten ... aber an einen Fehler da drin glaube ich nicht. Die wird ja frisch eingerichtet beim Flashen und dann wird der Inhalt der ext2-Partition in filesystem.image dateiweise (richtiger "verzeichnisweise") in das yaffs2-Filesystem kopiert. Eine Datei darin ist die "filesystem_core.squashfs" mit dem eigentlichen rootfs für das System, die kann man nur dann untersuchen (bzw. im gemounteten Zustand untersuchen), wenn der Kernel das FS kennt. Ansonsten noch ein Blick in die /etc/inittab aus dieser yaffs2-Partition, die sollte die Aufrufe von "mount", "pivot_root" und "flash_update" (letzterer ist eigentlich umsonst) vor dem Aufruf von rc.S enthalten.

Eine weitere Modifikation könnte die libc.so aus der uClibc in dieser Wrapper-Partition betreffen, die wird von Freetz auch ersetzt, wenn man nicht "FREETZ_KEEP_AVM_UCLIBC" gesetzt hat ... die ersten Kommandos verwenden natürlich noch die busybox und die Libs aus der yaffs2-Partition. Da tatsächlich zu debuggen, ist ohne serielle Konsole nicht ganz einfach, aber mit ein paar "Markern" kann man eine externe Ablaufverfolgung organisieren - z.B. indem man in das Urlader-Environment schreibt. Da der TFFS-Treiber ja fest einkompiliert ist und nicht erst geladen werden muß, funktionieren Zugriffe dort (auch Schreibzugriffe) auch ohne weitere Vorbereitungen ... wenn man an den Trace-Punkten dann z.B. die Variable "crash" entsprechend setzt, sieht man auch, wie weit der Systemstart kommt, wenn man keine serielle Konsole bestückt hat.

Eine weitere potentielle Stolperstelle bei der 06.50 könnte die Behandlung des /dev-Directories beim Kopieren der originalen Nodes von der AVM-Firmware sein ... da hat sich seit der 06.30 etwas geändert (/dev hat bereits am Beginn von "init" ein devtmpfs dort gemountet). Was Freetz da genau an der Stelle in Abhängigkeit von FREETZ_AVM_HAS_UDEV alles so macht, weiß ich nicht ... ich benutze es halt nicht selbst und kann deshalb auch nicht sagen, ob die Struktur unterhalb von /dev bei einem Freetz-Image für 06.50 stimmt. Das müßte man halt mal mit einem Original-Image vergleichen, was da im ext2 gelandet ist.

Das einzige, was ich ziemlich sicher weiß, ist die Tatsache, daß mit der mksquashfs-Version für Version 4 ein gültiges Dateisystem erzeugt werden kann (das macht modfs ja auch so) ... da es dort keine Unterscheidung zwischen BE und LE geben sollte, dürfte es auch nicht daran liegen, daß ein falsches Format erzeugt wird von Freetz - aber selbst das würde ich noch einmal überprüfen, wenn ich so ein Problem hätte.
 
@mrspeccy:
Die Ausgabe der Abarbeitung von /var/post_install dann ggf. hier noch einmal posten, wenn Du das Problem dabei nicht sofort sehen solltest.

Hier ist die Ausgabe auf nach stdout

Code:
./post_install: start
skip deleting language from env
still running:
  PID USER       VSZ STAT COMMAND
    1 root      1296 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [migration/0]
    4 root         0 SW   [ksoftirqd/0]
    5 root         0 SW   [watchdog/0]
    6 root         0 SW   [migration/1]
    7 root         0 SW   [ksoftirqd/1]
    8 root         0 SW   [watchdog/1]
    9 root         0 SW   [yield_w/0]
   10 root         0 SW   [yield_w/1]
   11 root         0 SW   [yield_w/0]
   12 root         0 SW   [yield_w/1]
   13 root         0 SW   [events/0]
   14 root         0 SW   [events/1]
   15 root         0 SW   [khelper]
   18 root         0 SW   [async/mgr]
   34 root         0 SW   [sync_supers]
   35 root         0 SW   [bdi-default]
   37 root         0 SW   [kblockd/0]
   38 root         0 SW   [kblockd/1]
   58 root         0 SW   [kswapd0]
   59 root         0 SWN  [ksmd]
   60 root         0 SW   [aio/0]
   61 root         0 SW   [aio/1]
   75 root         0 SW   [pm_info]
   82 root         0 SWN  [avm_debugd]
  108 root         0 SW   [mtdblockd]
  117 root         0 DW   [ifx_ssc]
  128 root         0 SW   [l2tp]
  132 root         0 SW   [tffsd]
  133 root         0 SW   [avmnet_workqueu]
  134 root         0 SW   [PhyWaspHeartbea]
  140 root         0 SW   [avmnet_timer]
  142 root         0 SW<  [loop0]
  174 root         0 SW   [yaffs-bg-1]
  357 root         0 SW   [cleanup_timer_f]
  433 root         0 SW   [yaffs-bg-1]
  446 root         0 SW   [capi_pipew/0]
  447 root         0 SW   [capi_pipew/1]
  448 root         0 SW   [capi_schedw/0]
  449 root         0 SW   [capi_schedw/1]
  450 root         0 SW   [pcmlink_ctrl]
  453 root         0 SW   [capitransp]
  457 root         0 SW<  [avm_dect_thread]
  780 root      1092 S <  /sbin/udevd --daemon
  785 root      1296 S    {busybox} tail -f /nohup.out
  800 root         0 SW   [khubd]
 1022 root      2380 S    /bin/configd
 1113 root         0 SW   [scsi_eh_0]
 1114 root         0 SW   [usb-storage]
 1153 root      5088 S    dsl_control -i04_00_04_00_0C_01_04_07 -f/var/dsl/dsp
 1163 root      4840 S    dsl_monitor -d
 1282 root      2600 S    avmipcd
 1285 root      3132 S    l2tpv3d
 1292 root     14356 S    /usr/bin/avm/ctlmgr
 1298 root      6764 S    upnpd
 1431 root         0 SW   [autbtex]
 1432 root         0 SW   [pmex_ne]
 1433 root         0 SW   [pmex_fe]
 1440 root      4088 S    multid -d
 1509 root      5152 S    ddnsd
 1516 root      3308 S    upnpdevd
 1526 root      4392 S    wland -B
 1542 root      4352 S    dsld -i -n
 1552 root      5920 S    pbd
 1570 root         0 SW   [wlan_com_tx_thr]
 1607 root      6120 S <  voipd
 1616 root      4612 S    /usr/bin/faxd -a
 1667 root      8688 S    /usr/bin/aha
 1670 root      1092 S <  /sbin/udevd --daemon
 1680 root      1092 S <  /sbin/udevd --daemon
 1690 root      1260 S    hostapd -g /var/run/hostapd/global
 1699 root         0 SW   [tgt_alive_poll_]
 1877 root      1300 S    {busybox} crond -b
 1913 root      1292 S    {busybox} httpd-webcfg -P /var/run/webcfg.pid -p 81 
 1923 root      1272 S    wpa_supplicant -g /var/run/wpa_supplicant/global -D
 1996 root      1304 S    {busybox} syslogd -L -C
 2006 root      1292 S    /sbin/klogd -c 4
 2245 root      1960 S    capiotcp_server -p5031 -m99
 2246 root         0 SW   [ksock tcp worke]
 2247 root         0 SW   [ksock tcp serve]
 2248 root         0 SWN  [dect_uart]
 2476 root      3504 S    usermand
 2496 root      3348 S    contfiltd
 2683 root      1476 S    {callmonitor} /bin/ash /usr/sbin/callmonitor --debug
 2684 root      1292 S    {busybox} logger -t callmonitor -p daemon.info
 2685 root      1292 S    {busybox} logger -t callmonitor -p daemon.debug
 2781 root      1292 S    {busybox} inetd
 2885 ntp        904 S    ntpd -s -f /mod/etc/ntpd.conf
 2886 root       900 S    ntpd -s -f /mod/etc/ntpd.conf
 3355 openvpn   3076 S    openvpn --config /mod/etc/openvpn.conf --writepid /v
 3511 nobody    2716 S    iodined -c -u nobody -t /tmp/iodined -F /var/run/iod
 3566 root      3120 S    /usr/sbin/sshd -p 22 -f /mod/etc/openssh.conf
 3692 root       428 S    xrelayd -D4 -d 0.0.0.0 8443 -r 127.0.0.1 81 -p /tmp/
 4231 root      1296 S    init
32225 root      5724 S    sshd: root@pts/0
32324 root      1320 S    -sh
32403 root      1476 S    {callmonitor} /bin/ash /usr/sbin/callmonitor --debug
32404 root      1292 S    {cfg2sh} /bin/ash /usr/bin/cfg2sh ar7 boxusers
32405 root      1288 S    {busybox} sed -rn s/^boxusers_users_(name|password)=
32406 root      1476 S    {callmonitor} /bin/ash /usr/sbin/callmonitor --debug
32407 root      1292 S    {cfg2sh} /bin/ash /usr/bin/cfg2sh ar7 boxusers
32408 root      1296 S    {cfg2sh} /bin/ash /usr/bin/cfg2sh ar7 boxusers
32409 root      1296 S    {cfg2sh} /bin/ash /usr/bin/cfg2sh ar7 boxusers
32412 root      1288 S    {busybox} sed -ne /^boxusers[[:space:]]*{/,/^}/p
32413 root      1292 S    {busybox} sed -ne  /^[[:space:]]*[[:alnum:]][[:alnum
32415 root      1368 S    {decrypt-fritzos} /bin/sh /usr/bin/decrypt-fritzos-c
32443 root         0 SW   [flush-31:0]
32447 root         0 SW   [flush-8:0]
32480 root      1300 S    {post_install} /bin/sh ./post_install
32483 root      4260 R    /cgi-bin/luacgi
32487 root      1296 R    {busybox} ps
Module                  Size  Used by    Tainted: P  
ifx_ppa_mini_qos        4928  0 
ifx_ppa_mini_sessions    85546  0 
ifxmips_ppa_hal_vr9_e5    76175  0 
userman_mod            68964  4 
sch_sfq                 5933  4 
sch_llq                10087  1 
sch_tbf                 5042  1 
atd                   162329  0 
fwd                    14306  1 atd
athlogger               7786  0 
hif_gmac               13148  3 atd,fwd,athlogger
adf                   130044  2 atd,fwd
aae                   119318  3 atd,fwd,hif_gmac
nls_iso8859_1           3289  1 
nls_cp437               4959  1 
kdsldmod             1588145  9 userman_mod
ifxmips_ppa_datapath_vr9_e5   156238  0 
dsl_vr9               303672  2 
mei_vr9               181834  4 ifxmips_ppa_datapath_vr9_e5,dsl_vr9
usb_storage            47720  1 
sd_mod                 35935  2 
scsi_mod              167797  2 usb_storage,sd_mod
xhci                   61748  0 
usbcore               173212  3 usb_storage,xhci
vfat                   12052  1 
fat                    63670  1 vfat
dect_io                12905  0 
avm_dect              277747  1 dect_io
capi_codec            427173  0 
isdn_fbox_fon5        893763  2 
pcmlink               415419  4 avm_dect,capi_codec,isdn_fbox_fon5
Piglet_noemif          51958  0 
rtc_avm                 5880  1 pcmlink
led_modul_Fritz_Box_HW185   105881  4 
Erase mtd partitions 0 and 1 ...
info 0x0
{mtd_info} type 0x4
{mtd_info} size 0x400000
{mtd_info} erasesize 0x20000
{mtd_info} writesize 0x800
{mtd_info} oobsize 0x40
[main] exit error 0
info 0x0
{mtd_info} type 0x4
{mtd_info} size 0x3000000
{mtd_info} erasesize 0x20000
{mtd_info} writesize 0x800
{mtd_info} oobsize 0x40
[main] exit error 0
Copy kernel image...
info 0x0
{mtd_info} type 0x4
{mtd_info} size 0x400000
{mtd_info} erasesize 0x20000
{mtd_info} writesize 0x800
{mtd_info} oobsize 0x40
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] append 115192 Bytes
[main] written 0x20000 Bytes
[main] eof reached
[main] exit error 0
Copy filesystem image ...
filesystem.image: cannot mount squashfs, trying ext2 ...
failed to mount filesystem.image
Setting linux_fs_start skipped due to errors...

Und hier die nach stderr

Code:
killall: run_clock: no process killed
mount: mounting /dev/loop1 on /var/tmp/fs failed: Device or resource busy
BusyBox v1.23.2 (2015-11-26 09:38:52 CET) multi-call binary.

Usage: dd [if=FILE] [of=FILE] [bs=N] [count=N] [skip=N]
	[seek=N]

Copy a file with converting and formatting

	if=FILE		Read from FILE instead of stdin
	of=FILE		Write to FILE instead of stdout
	bs=N		Read and write N bytes at a time
	count=N		Copy only N input blocks
	skip=N		Skip N input blocks
	seek=N		Skip N output blocks

N may be suffixed by c (1), w (2), b (512), kD (1000), k (1024), MD, M, GD, G

umount: can't umount /var/tmp/fs: Invalid argument

Ich blicke da nicht richtig durch. Ist das verwandt mit dem Problem mit vice_pres?
 
Nicht nur verwandt, es ist dasselbe ... das in der Busybox enthaltene dd-Applet wurde ohne Unterstützung für die "conv"-Option erzeugt.
 
Komisch ... Habe mir auch ein Image mit dem aktuellen trunk gebaut (13504) ... Image per freetz geladen => successfull
Aber nach dem reboot startet wieder mein altes 6.30 ?!?

post_install:
Code:
#! /bin/sh
echo $0: start
sleep 1
killall run_clock
if ps | grep -v grep | grep -q telefon ; then killall telefon ; fi
if ps | grep -v grep | grep -q telnetd ; then killall telnetd ; fi
echo skip deleting language from env
echo MODE=update > /dev/avm_power
echo "disable" > /dev/watchdog
echo still running:
ps
lsmod
sleep 1
update_state=good
echo Erase mtd partitions '2' and '3' ...
/sbin/update_kernel -o /dev/mtd2
/sbin/update_kernel -o /dev/mtd3
echo Copy kernel image...
/sbin/update_kernel -i /var/tmp/kernel.image  -o /dev/mtd2
[ $? -ne 0 ] && echo failed with error "$?" && update_state=bad
echo Copy filesystem image ...
mkdir -p /var/tmp/fs
mkdir -p /var/tmp/fs_mtd
mount -t squashfs /var/tmp/filesystem.image /var/tmp/fs
mount -t yaffs2 /dev/mtdblock3 /var/tmp/fs_mtd
var_mount_squashfs=`mount | grep "/var/tmp/fs type squashfs"`
if [ -z "$var_mount_squashfs" ] ; then 
    echo filesystem.image: cannot mount squashfs, trying ext2 ...
    dd if=/var/tmp/filesystem.image of=/var/tmp/fsimage.ext2 bs=256 skip=1 conv=sync
    [ "$?" -eq 0 ] && mount -t ext2 /var/tmp/fsimage.ext2 /var/tmp/fs && rm -f /var/tmp/filesystem.image
    var_mount_ext2=`mount | grep "/var/tmp/fs type ext2"`
    [ -n "$var_mount_ext2" ] && echo filesystem.image: ... mount ext2 done
fi
var_mount_mtd=`mount | grep /dev/mtdblock3`
if [ -z "$var_mount_squashfs" ] && [ -z "$var_mount_ext2" ] ; then echo failed to mount filesystem.image ; update_state=bad; fi
[ -z "$var_mount_mtd" ] && echo failed to mount /dev/mtdblock3 && update_state=bad
if [ "$update_state" = "good" ] ; then
    echo Copy filesystem ...
    cp -R /var/tmp/fs/* /var/tmp/fs_mtd
    [ $? -ne 0 ] && echo failed with error "$?" && update_state=bad
    echo ... Copy filesystem done
fi
if [ "$update_state" = "good" ] ; then
    echo Setting linux_fs_start mirror...
    echo linux_fs_start 1 > /proc/sys/urlader/environment
else
    echo Setting linux_fs_start skipped due to errors...
fi
umount /var/tmp/fs
umount /var/tmp/fs_mtd
rmdir /var/tmp/fs
rmdir /var/tmp/fs_mtd
exit 0

install:
Code:
install: have Kernel 2.6.32.61 - set kversion '2.6.32' and FlashUpdateTool '/lib/modules/2.6.32.61/kernel/drivers/char/flash_update/flash_update.ko'
install: check and install new firmware ...
OEM=
ANNEX=B
testing acceptance for device Fritz_Box_HW185 ...
korrekt install type: mips34_512MB_xilinx_vdsl_dect446_4geth_2ab_isdn_nt_te_pots_2usb_host_wlan11n_27490
device has installtype mips34_512MB_xilinx_vdsl_dect446_4geth_2ab_isdn_nt_te_pots_2usb_host_wlan11n_27490
OK - accept this update for device Fritz_Box_HW185 ...
testing acceptance for device Fritz_Box_HW185 done
curr: 113.06.30  new: xx.06.50
debug: curr: 113.06.30
debug: new: "XX.06.50"
major_currFWver=113
middle_currFWver=6
minor_currFWver=30
middle_newFWver=6
minor_newFWver=50
check Firmware Version: xx.06.50
DEBUG: 6 >= 6
DEBUG: 50 >= 30
Accept Firmware Version: xx.06.50
install: 2.6.32 check files...
read 0x0 MACIG 0x0
File doesn't contain the checksum, adding
[cs_calc_sum] sum 0xe6b0e148
Calculated checksum is E6B0E148
[cs_set_sum] tagged 0
write 0x23de53c4, 0x48e1b0e6 MAGIC 0xc453de23 
Adding failed
chksum for file /var/tmp/filesystem.image ok
size for file /var/tmp/filesystem.image ok
read 0x8ff24569 MACIG 0xc453de23
File already contains the checksum, verifying
[cs_calc_sum] sum 0x8ff24569
Calculated checksum is 8FF24569
Saved checksum is 8FF24569
Checksum validation successful!
chksum for file /var/tmp/kernel.image ok
size for file /var/tmp/kernel.image ok
install: 2.6.32 getting mtds to install...
install: --mtd------------------------------------------------
install: --assert---------------------------------------------
install: --addr+size------------------------------------------
install: kernel_start=0x00000000
install: kernel_size=4194304
install: kernel_image_size=2506248
install: filesystem_start=0x00400000
install: filesystem_size=50331648
install: filesystem_image_size=34324736
install: 2.6.32 writing commands to install...
install: check for old settings ...
set INFO led to blink (modul=7, state=4)

kill services (bei Option AVM-Dienste stoppen):
Code:
cat: can't open '/var/run/delayed_reboot.pid': No such file or directory
rm: can't remove '/var/run/delayed_reboot.pid': No such file or directory
chronyd will be controlled by multid
rmmod: can't unload 'isdn_fbox_fon3': unknown symbol in module, or unknown parameter
killall: checkservices: no process killed

cat: can't open '/var/run/delayed_reboot.pid': No such file or directory
rm: can't remove '/var/run/delayed_reboot.pid': No such file or directory
 
@BenGurion:
Wenn auch Du ein Opfer der fehlenden "conv"-Option beim dd-Applet der Busybox sein solltest (Deine Protokolle enthalten ja das Flashen noch gar nicht), dann war vielleicht der frühere Freetz-Standard bei der Auswahl der Busybox-Optionen im Nachhinein betrachtet suboptimal ... ich weiß aber nicht, was da Standard war und ich schaue jetzt auch nicht nach.

Die einfachste Lösung wäre dann eben das Anpassen der /var/install von AVM - nachdem ja nun schon bei der Suche nach dem dd-Kommando etwas in dieser Datei gepatcht wird, ist das ja auch kein Tabubruch mehr.

Viel spannender ist es ja, warum ein solches System nach dem erfolgreichen Flashen (wie bei vice_pres) nicht starten will ...
 
@PeterPawn
Du meinst die Routine aus Deinem Posting von Seite 2?
Wo finde ich denn diese verfilxte Einstellung im MENUCONFIG???
 
Nein, in dem verlinkten Beitrag ist keine "Anleitung" enthalten ... wenn jemand tatsächlich mit Freetz den zusätzlichen "conv"-Parameter beim "dd" entfernen will (er wird m.E. eben nicht gebraucht, weil da kein Padding erfolgen muß), dann wäre das etwas in dieser Art:
Code:
Index: patches/scripts/090-var_install_fixes.sh
===================================================================
--- patches/scripts/090-var_install_fixes.sh    (revision 13504)
+++ patches/scripts/090-var_install_fixes.sh    (working copy)
@@ -4,3 +4,8 @@
        echo1 "fixing test for dd-tool in /var/install"
        modsed -r 's,(find )[.]( -name dd)( -xdev),\1/bin/\3 -maxdepth 1\2,g' "${var_install_file}"
 fi
+
+if grep -q "bs=256 skip=1 conv=sync" "${var_install_file}" 2>/dev/null; then
+       echo1 "fixing conv=sync option for dd command"
+       modsed -r 's,(bs=256 skip=1) conv=sync,\1,' "${var_install_file}"
+fi
 
Ja, das ist sicherlich die richtige Einstellung ... aber ich gestatte mir trotzdem noch den Hinweis, daß es im Nachhinein nichts mehr hilft, wenn man sie für das neue Image jetzt "richtig" setzt. Bei der Installation eines neuen Freetz-Images kommt die bisher in der Box enthaltene Busybox zum Zuge ... man müßte also erst noch ein "altes" Freetz-Image mit einer Busybox mit "conv"-Option auf die Box bringen, bevor man von einer 06.30-basierten Version auf die 06.50 updaten kann. Da ist dann das Auslassen der Option beim Kopieren sinnvoller, weil es diesen zusätzlichen Schritt nicht erfordert. Diese "conv=sync"-Option wird in der Hilfe folgendermaßen beschrieben:
Code:
sync   pad every input block with NULs to ibs-size; when used with block or unblock, pad with spaces rather than NULs
Es wird also jeder Block der Eingabe, der kleiner als die Blocklänge dort ist ("bs" setzt sowohl "ibs" als auch "obs" auf denselben Wert), mit NUL-Bytes auf die gewünschte Blocklänge bei der Ausgabe (das wäre dann "obs") aufgefüllt. Nachdem da kein Magnetband o.ä. verwendet wird (wo so eine variable Blocklänge tatsächlich vorkommen könnte), betrifft das also maximal den letzten Block einer solchen Kopieraktion, wenn die originale Dateilänge kein Vielfaches der Blocklänge sein sollte. Das ist - nach allem, was ich auf die Schnelle ansehen konnte - aber nicht der Fall ... es wäre aber auch extrem überraschend. So eine "filesystem.image" besteht eben aus einem ext2-Dateisystem-Image und einem vorangestellten Dummy-Header von 256 Byte Länge (der ja genau mit dem dd-Kommando "weggeschnitten" werden soll).

Nun ist es bei ext2 aber das Problem, daß das Dateisystem selbst nur Blocklängen von 1024, 2048 oder 4096 Byte kennt. Wenn AVM also eine Datei "filesystem.image" in die eigene Firmware packt, bei der die Dateilänge inkl. dieses Dummy-Headers ein Vielfaches von 4096 ist:
Code:
~/trunk$ printf 0x%X $(stat -c %s build/original/firmware/var/tmp/filesystem.image)
0x1592000
- die Länge endet auf dreimal Null, ist also durch 2**12 teilbar -, dann kann man nur vermuten, daß damit ein Auffüllen des letzten Blocks auf die korrekte Blocklänge erfolgen soll. Schaut man sich dann ein originales Image an:
Code:
~/trunk$ sudo losetup -o 256 -f --show build/original/firmware/var/tmp/filesystem.image
/dev/loop0
~/trunk$ sudo dumpe2fs /dev/loop0 | grep "Block size"
dumpe2fs 1.42.9 (4-Feb-2014)
Block size:               1024
~/trunk$ sudo losetup -d /dev/loop0
müßte die Datei eigentlich auch nach dem Abschneiden des Dummy-Headers ("bs=256 skip=1" heißt ja, daß da die ersten 256 Byte (= 1 Block) der Eingabedatei zu überspringen sind):
Code:
~/trunk$ hd -n 2048 build/original/firmware/var/tmp/filesystem.image
00000000  73 71 73 68 00 00 00 00  00 00 00 00 00 00 00 00  |sqsh............|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000500  d8 00 00 00 44 56 00 00  00 00 00 00 7f 07 00 00  |....DV..........|
00000510  09 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  |................|
00000520  c8 1c 00 00 c8 1c 00 00  48 00 00 00 00 00 00 00  |........H.......|
00000530  3d d2 66 56 00 00 14 00  53 ef 01 00 00 00 00 00  |=.fV....S.......|
00000540  3d d2 66 56 00 00 00 00  00 00 00 00 00 00 00 00  |=.fV............|
00000550  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000800
eine Dateilänge haben, die in Vielfaches der Blocklänge von 1024 Byte ist. Das hat sie aber mit dem Wert "0x1591F00" nicht (Vielfache von 1024 enden auf 000, 400, 800 oder C00) ... da hilft auch keine "conv=sync"-Option beim "dd". Die bringt also gar nichts und verhindert durch ihr Fehlen bei der Busybox von Freetz (bei der von AVM ist sie wohl dabei, sonst hätte man das dort sicherlich schon eher bemerkt) nur die korrekte Funktion. Wenn man wirklich "auffüllen" will, braucht das einen zweiten "dd"-Aufruf mit einer Blocklänge von 1024, der dann tatsächlich den letzten Block nach den 768 in der Eingabe vorhandenen Bytes mit weiteren 256 Bytes NUL auffüllen würde.

Es schadet also gar nicht, diese Option einfach zu entfernen aus dem Aufruf ...

EDIT: ... und das "gekürzte" Dateisystem-Image braucht auch nicht auf ein Vielfaches irgendeiner "erase size" aufgefüllt zu werden, denn das wird ja gar nicht direkt in den Flash geschrieben, es wird schön Datei für Datei aus dem ext2-Dateisystem in das yaffs2-basierte Dateisystem der Flash-Partition kopiert.
 
Zuletzt bearbeitet:
Kurze Rückmeldung: Ich werd morgen dazu kommen mehr zu testen, dann schau ich mal wie weit ich komme (nicht, dass Peter denkt er hats jetzt umsonst geschrieben :))
 
Hallo,

kurze frage. Ist es möglich, ein funktionierendes 6.5 Image für die 7490 zu bauen. Nutze kaum große Erweiterungen, SNMP, Callmonitor, Syslog.

Danke

Erik
 
@fritzman4u
Sollte theoretisch möglich sein ... Wir sind aber noch am "experimentieren" ^^

@PeterPawn
So werde ich erstmal eine 6.30 bauen und dann auf 6.50 hochschieben ;)
 
@fritzman4u
Sollte theoretisch möglich sein ... Wir sind aber noch am "experimentieren" ^^

Das klingt natürlich spannend :) Theorie ist in der Praxis meistens immer etwas anderes.....
Werde mich am Wochenende mal auch versuchen. Der Weg zurück ist ja auch immer möglich über das Recovery Iamge....
 
Zuletzt bearbeitet:
*HGN* ... Jetzt hatte ich gestern noch ein 6.30er-Image und ein 6.50er-Image auf dem trunk #13505 erstellt, aber die (von Vogi) oben erwähnte conv-Einstellung im MENUCONFIG vergessen.
Da konnte ich natürlich nur die 6.30 erfolgreich flashen - bei der 6.50 wieder das bekannte Bild -> flasht nicht :(

Also heute abend nochmal zwei Images bauen (ich mach das immer gerne nahezu zeitgleich - quasi direkt hintereinander) und dann auf ein Neues :)
 
Also ich hab mal ein 06.30 gebaut mit conv option.

Code:
install: have Kernel 2.6.32.61 - set kversion '2.6.32' and FlashUpdateTool '/lib/modules/2.6.32.61/kernel/drivers/char/flash_update/flash_update.ko'
install: check and install new firmware ...
OEM=
ANNEX=B
testing acceptance for device Fritz_Box_HW185 ...
korrekt install type: mips34_512MB_xilinx_vdsl_dect446_4geth_2ab_isdn_nt_te_pots_2usb_host_wlan11n_27490
device has installtype mips34_512MB_xilinx_vdsl_dect446_4geth_2ab_isdn_nt_te_pots_2usb_host_wlan11n_27490
OK - accept this update for device Fritz_Box_HW185 ...
testing acceptance for device Fritz_Box_HW185 done
curr: 113.06.30  new: xx.06.50
debug: curr: 113.06.30
debug: new: "XX.06.50"
major_currFWver=113
middle_currFWver=6
minor_currFWver=30
middle_newFWver=6
minor_newFWver=50
check Firmware Version: xx.06.50
DEBUG: 6 >= 6
DEBUG: 50 >= 30
Accept Firmware Version: xx.06.50
install: 2.6.32 check files...
read 0x0 MACIG 0x0
File doesn't contain the checksum, adding
[cs_calc_sum] sum 0x2e28f046
Calculated checksum is 2E28F046
[cs_set_sum] tagged 0
write 0x23de53c4, 0x46f0282e MAGIC 0xc453de23 
Adding failed
chksum for file /var/tmp/filesystem.image ok
size for file /var/tmp/filesystem.image ok
read 0x8ff24569 MACIG 0xc453de23
File already contains the checksum, verifying
[cs_calc_sum] sum 0x8ff24569
Calculated checksum is 8FF24569
Saved checksum is 8FF24569
Checksum validation successful!
chksum for file /var/tmp/kernel.image ok
size for file /var/tmp/kernel.image ok
install: 2.6.32 getting mtds to install...
install: --mtd------------------------------------------------
install: --assert---------------------------------------------
install: --addr+size------------------------------------------
install: kernel_start=0x00000000
install: kernel_size=4194304
install: kernel_image_size=2506248
install: filesystem_start=0x00400000
install: filesystem_size=50331648
install: filesystem_image_size=23473408
install: 2.6.32 writing commands to install...
install: check for old settings ...
set INFO led to blink (modul=7, state=4)

Code:
root@fritz:/var/mod/root# sh -x /var/post_install
+ echo /var/post_install: start
/var/post_install: start
+ sleep 1
+ killall run_clock
+ ps
+ grep -v grep
+ grep -q telefon
+ killall telefon
+ grep -q telnetd
+ grep -v grep
+ ps
+ echo skip deleting language from env
skip deleting language from env
+ echo MODE=update
+ echo disable
+ echo still running:
still running:
+ ps
  PID USER       VSZ STAT COMMAND
    1 root      1300 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [migration/0]
    4 root         0 SW   [ksoftirqd/0]
    5 root         0 SW   [watchdog/0]
    6 root         0 SW   [migration/1]
    7 root         0 SW   [ksoftirqd/1]
    8 root         0 SW   [watchdog/1]
    9 root         0 SW   [yield_w/0]
   10 root         0 SW   [yield_w/1]
   11 root         0 SW   [yield_w/0]
   12 root         0 SW   [yield_w/1]
   13 root         0 SW   [events/0]
   14 root         0 SW   [events/1]
   15 root         0 SW   [khelper]
   18 root         0 SW   [async/mgr]
   34 root         0 SW   [sync_supers]
   35 root         0 SW   [bdi-default]
   37 root         0 SW   [kblockd/0]
   38 root         0 SW   [kblockd/1]
   58 root         0 SW   [kswapd0]
   59 root         0 SWN  [ksmd]
   60 root         0 SW   [aio/0]
   61 root         0 SW   [aio/1]
   75 root         0 SW   [pm_info]
   82 root         0 SWN  [avm_debugd]
  108 root         0 SW   [mtdblockd]
  117 root         0 DW   [ifx_ssc]
  128 root         0 SW   [l2tp]
  132 root         0 SW   [tffsd]
  133 root         0 SW   [avmnet_workqueu]
  134 root         0 SW   [PhyWaspHeartbea]
  140 root         0 SW   [avmnet_timer]
  142 root         0 SW<  [loop0]
  174 root         0 SW   [yaffs-bg-1]
  355 root         0 SW   [cleanup_timer_f]
  431 root         0 SW   [yaffs-bg-1]
  444 root         0 SW   [capi_pipew/0]
  445 root         0 SW   [capi_pipew/1]
  446 root         0 SW   [capi_schedw/0]
  447 root         0 DW   [capi_schedw/1]
  448 root         0 SW   [pcmlink_ctrl]
  451 root         0 SW   [capitransp]
  455 root         0 SW<  [avm_dect_thread]
  648 root      1060 S <  /sbin/udevd --daemon
  654 root      1300 S    {busybox} tail -f /nohup.out
  670 root         0 SW   [khubd]
  855 root      2364 S    /bin/configd
  957 root         0 SW   [scsi_eh_0]
  958 root         0 SW   [usb-storage]
 1013 root      5060 S    dsl_control -i10_00_10_40_00_04_01_07 -f/lib/modules/dsp_vr9/vr9-B-dsl.bin -n/etc/dsl/notify/dsl_notify.sh
 1023 root      3904 S    dsl_monitor -d
 1248 root      2600 S    avmipcd
 1256 root      3120 S    l2tpv3d
 1264 root     15048 S    /usr/bin/avm/ctlmgr
 1273 root      8356 S    upnpd
 1343 root         0 SW   [autbtex]
 1344 root         0 SW   [pmex_ne]
 1345 root         0 SW   [pmex_fe]
 1347 root      3984 S    multid
 1371 root      3296 S    upnpdevd
 1382 root      4392 S    wland -B
 1397 root      4292 S    dsld -i -n
 1415 root         0 SW   [wlan_com_tx_thr]
 1424 root      4836 S    pbd
 1453 root      6020 D    telefon a127.0.0.1
 1467 root      5804 S <  voipd
 1520 root      1060 S <  /sbin/udevd --daemon
 1526 root      8668 S    /usr/bin/aha
 1528 root      1060 S <  /sbin/udevd --daemon
 1537 root      1260 S    hostapd -g /var/run/hostapd/global
 1540 root         0 SW   [tgt_alive_poll_]
 1708 root      1296 S    {busybox} httpd-webcfg -P /var/run/webcfg.pid -p 81 -c /mod/etc/webcfg.conf -h /usr/mww/ -r Freetz
 1799 root      1296 S    {busybox} inetd
 1812 root      1272 S    wpa_supplicant -g /var/run/wpa_supplicant/global -D athr
 2195 root      3492 S    usermand
 2197 root      3364 S    contfiltd
 2398 root      1300 S    init
 2822 root       564 S    dropbear -p 22 -0
 3177 root       632 S    dropbear -p 22 -0
 3178 root      1316 S    -sh
 3225 root      1304 S    {busybox} sh -x /var/post_install
 3235 root      1300 R    {busybox} ps
+ lsmod
Module                  Size  Used by    Tainted: P
userman_mod            68964  4
atd                   162329  0
fwd                    14306  1 atd
athlogger               7786  0
hif_gmac               13148  3 atd,fwd,athlogger
adf                   130044  2 atd,fwd
aae                   119318  3 atd,fwd,hif_gmac
nls_iso8859_1           3289  1
nls_cp437               4959  1
kdsldmod             1588145  9 userman_mod
ifxmips_ppa_datapath_vr9_e5   156238  0
dsl_vr9               303672  2
mei_vr9               181834  4 ifxmips_ppa_datapath_vr9_e5,dsl_vr9
usb_storage            47720  1
sd_mod                 35935  2
scsi_mod              167797  2 usb_storage,sd_mod
xhci                   61748  0
usbcore               173212  3 usb_storage,xhci
vfat                   12052  1
fat                    63670  1 vfat
dect_io                12905  0
avm_dect              277747  1 dect_io
capi_codec            427173  0
isdn_fbox_fon5        893763  4
pcmlink               415419  4 avm_dect,capi_codec,isdn_fbox_fon5
Piglet_noemif          51958  0
rtc_avm                 5880  1 pcmlink
led_modul_Fritz_Box_HW185   105881  4
+ sleep 1
+ update_state=good
+ echo Erase mtd partitions 0 and 1 ...
Erase mtd partitions 0 and 1 ...
+ /sbin/update_kernel -o /dev/mtd0
info 0x0
{mtd_info} type 0x4
{mtd_info} size 0x400000
{mtd_info} erasesize 0x20000
{mtd_info} writesize 0x800
{mtd_info} oobsize 0x40
[main] exit error 0
+ /sbin/update_kernel -o /dev/mtd1
info 0x0
{mtd_info} type 0x4
{mtd_info} size 0x3000000
{mtd_info} erasesize 0x20000
{mtd_info} writesize 0x800
{mtd_info} oobsize 0x40
[main] exit error 0
+ echo Copy kernel image...
Copy kernel image...
+ /sbin/update_kernel -i /var/tmp/kernel.image -o /dev/mtd0
info 0x0
{mtd_info} type 0x4
{mtd_info} size 0x400000
{mtd_info} erasesize 0x20000
{mtd_info} writesize 0x800
{mtd_info} oobsize 0x40
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] append 115192 Bytes
[main] written 0x20000 Bytes
[main] eof reached
[main] exit error 0
+ [ 0 -ne 0 ]
+ echo Copy filesystem image ...
Copy filesystem image ...
+ mkdir -p /var/tmp/fs
+ mkdir -p /var/tmp/fs_mtd
+ mount -t squashfs /var/tmp/filesystem.image /var/tmp/fs
mount: mounting /dev/loop1 on /var/tmp/fs failed: Invalid argument
+ mount -t yaffs2 /dev/mtdblock1 /var/tmp/fs_mtd
+ mount
+ grep /var/tmp/fs type squashfs
+ var_mount_squashfs=
+ [ -z  ]
+ echo filesystem.image: cannot mount squashfs, trying ext2 ...
filesystem.image: cannot mount squashfs, trying ext2 ...
+ dd if=/var/tmp/filesystem.image of=/var/tmp/fsimage.ext2 bs=256 skip=1 conv=sync
91692+0 records in
91692+0 records out
+ [ 0 -eq 0 ]
+ mount -t ext2 /var/tmp/fsimage.ext2 /var/tmp/fs
+ rm -f /var/tmp/filesystem.image
+ mount
+ grep /var/tmp/fs type ext2
+ var_mount_ext2=/dev/loop1 on /var/tmp/fs type ext2 (rw,relatime)
+ [ -n /dev/loop1 on /var/tmp/fs type ext2 (rw,relatime) ]
+ echo filesystem.image: ... mount ext2 done
filesystem.image: ... mount ext2 done
+ mount
+ grep /dev/mtdblock1
+ var_mount_mtd=/dev/mtdblock1 on /var/tmp/fs_mtd type yaffs2 (rw,relatime)
+ [ -z  ]
+ [ -z /dev/loop1 on /var/tmp/fs type ext2 (rw,relatime) ]
+ [ -z /dev/mtdblock1 on /var/tmp/fs_mtd type yaffs2 (rw,relatime) ]
+ [ good = good ]
+ echo Copy filesystem ...
Copy filesystem ...
+ cp -R /var/tmp/fs/bin /var/tmp/fs/core /var/tmp/fs/dev /var/tmp/fs/etc /var/tmp/fs/filesystem_core.squashfs /var/tmp/fs/lib /var/tmp/fs/lost+found /var/tmp/fs/proc /var/tmp/fs/sbin /var/tmp/fs/tmp /var/tmp/fs/usr /var/tmp/fs/var /var/tmp/fs_mtd
+ [ 0 -ne 0 ]
+ echo ... Copy filesystem done
... Copy filesystem done
+ [ good = good ]
+ echo Setting linux_fs_start mirror...
Setting linux_fs_start mirror...
+ echo linux_fs_start 0
+ umount /var/tmp/fs
+ umount /var/tmp/fs_mtd
+ rmdir /var/tmp/fs
+ rmdir /var/tmp/fs_mtd
+ exit 0
root@fritz:/var/mod/root#

Reboot Schleife wie vorher auch. Also mit adam2 wieder zurück und die Box bootet. Aber müsste ich nicht jetzt irgendwas sehen wenn ich mtdblock0/1/2 (ich gestehe ich war mir nicht ganz im klaren welche nachdem 1 für mich wundersamerweise leer war obwohl das script ja das cp auf den mountpunkt von mtdblock1 gemacht hat und hab alle 3 probiert) mount mit -t yaffs2? Also mehr als nur lost+found? Mehr gibts nämlich nicht wenn ich die mounte?!


Edit:

Also das ganze nochmal - und diesmal hab ich vor dem reboot geguckt ob mtdblock1 auch wirklich einen Inhalt hat...

Code:
root@fritz:/var/tmp# sh -x /var/post_install
+ echo /var/post_install: start
/var/post_install: start
+ sleep 1
+ killall run_clock
killall: run_clock: no process killed
+ ps
+ grep -v grep
+ grep -q telefon
+ ps
+ grep -q telnetd
+ grep -v grep
+ echo skip deleting language from env
skip deleting language from env
+ echo MODE=update
+ echo disable
+ echo still running:
still running:
+ ps
  PID USER       VSZ STAT COMMAND
    1 root      1300 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [migration/0]
    4 root         0 SW   [ksoftirqd/0]
    5 root         0 SW   [watchdog/0]
    6 root         0 SW   [migration/1]
    7 root         0 SW   [ksoftirqd/1]
    8 root         0 SW   [watchdog/1]
    9 root         0 SW   [yield_w/0]
   10 root         0 SW   [yield_w/1]
   11 root         0 SW   [yield_w/0]
   12 root         0 SW   [yield_w/1]
   13 root         0 SW   [events/0]
   14 root         0 SW   [events/1]
   15 root         0 SW   [khelper]
   18 root         0 SW   [async/mgr]
   34 root         0 SW   [sync_supers]
   35 root         0 SW   [bdi-default]
   37 root         0 SW   [kblockd/0]
   38 root         0 SW   [kblockd/1]
   58 root         0 SW   [kswapd0]
   59 root         0 SWN  [ksmd]
   60 root         0 SW   [aio/0]
   61 root         0 SW   [aio/1]
   75 root         0 SW   [pm_info]
   82 root         0 SWN  [avm_debugd]
  108 root         0 SW   [mtdblockd]
  117 root         0 DW   [ifx_ssc]
  128 root         0 SW   [l2tp]
  132 root         0 SW   [tffsd]
  133 root         0 SW   [avmnet_workqueu]
  134 root         0 SW   [PhyWaspHeartbea]
  140 root         0 SW   [avmnet_timer]
  142 root         0 SW<  [loop0]
  174 root         0 SW   [yaffs-bg-1]
  357 root         0 SW   [cleanup_timer_f]
  433 root         0 SW   [yaffs-bg-1]
  446 root         0 SW   [capi_pipew/0]
  447 root         0 SW   [capi_pipew/1]
  448 root         0 SW   [capi_schedw/0]
  449 root         0 SW   [capi_schedw/1]
  450 root         0 SW   [pcmlink_ctrl]
  453 root         0 SW   [capitransp]
  457 root         0 SW<  [avm_dect_thread]
  655 root      1048 S <  /sbin/udevd --daemon
  656 root      1300 S    {busybox} tail -f /nohup.out
  672 root         0 SW   [khubd]
  847 root      2364 S    /bin/configd
  961 root         0 SW   [scsi_eh_0]
  962 root         0 SW   [usb-storage]
 1012 root      5060 S    dsl_control -i10_00_10_40_00_04_01_07 -f/lib/modules/dsp_vr9/vr9-B-dsl.bin -n/etc/dsl/notify/dsl_notify.sh
 1022 root      3904 S    dsl_monitor -d
 1252 root      2600 S    avmipcd
 1255 root      3120 S    l2tpv3d
 1265 root     15056 S    /usr/bin/avm/ctlmgr
 1280 root      8356 S    upnpd
 1343 root         0 SW   [autbtex]
 1344 root         0 SW   [pmex_ne]
 1345 root         0 SW   [pmex_fe]
 1347 root      3984 S    multid
 1370 root      3296 S    upnpdevd
 1381 root      4392 S    wland -B
 1398 root      4292 S    dsld -i -n
 1415 root         0 SW   [wlan_com_tx_thr]
 1421 root      4836 S    pbd
 1476 root      5804 S <  voipd
 1520 root      1048 S <  /sbin/udevd --daemon
 1526 root      1048 S <  /sbin/udevd --daemon
 1530 root      1260 S    hostapd -g /var/run/hostapd/global
 1531 root      8664 S    /usr/bin/aha
 1538 root         0 SW   [tgt_alive_poll_]
 1712 root      1296 S    {busybox} httpd-webcfg -P /var/run/webcfg.pid -p 81 -c /mod/etc/webcfg.conf -h /usr/mww/ -r Freetz
 1735 root      1272 S    wpa_supplicant -g /var/run/wpa_supplicant/global -D athr
 1834 root      1296 S    {busybox} inetd
 1897 root       564 S    dropbear -p 22 -0
 2061 root      1300 S    init
 2387 root      3492 S    usermand
 2390 root      3364 S    contfiltd
 2511 root       632 S    dropbear -p 22 -0
 2512 root      1324 S    -sh
 2849 root         0 SW   [flush-31:0]
 3035 root      1304 S    {busybox} sh -x /var/post_install
 3044 root      1300 R    {busybox} ps
+ lsmod
Module                  Size  Used by    Tainted: P
userman_mod            68964  4
atd                   162329  0
fwd                    14306  1 atd
athlogger               7786  0
hif_gmac               13148  3 atd,fwd,athlogger
adf                   130044  2 atd,fwd
aae                   119318  3 atd,fwd,hif_gmac
nls_iso8859_1           3289  1
nls_cp437               4959  1
kdsldmod             1588145  9 userman_mod
ifxmips_ppa_datapath_vr9_e5   156238  0
dsl_vr9               303672  2
mei_vr9               181834  4 ifxmips_ppa_datapath_vr9_e5,dsl_vr9
usb_storage            47720  1
sd_mod                 35935  2
scsi_mod              167797  2 usb_storage,sd_mod
xhci                   61748  0
usbcore               173212  3 usb_storage,xhci
vfat                   12052  1
fat                    63670  1 vfat
dect_io                12905  0
avm_dect              277747  1 dect_io
capi_codec            427173  0
isdn_fbox_fon5        893763  1
pcmlink               415419  4 avm_dect,capi_codec,isdn_fbox_fon5
Piglet_noemif          51958  0
rtc_avm                 5880  1 pcmlink
led_modul_Fritz_Box_HW185   105881  2
+ sleep 1
+ update_state=good
+ echo Erase mtd partitions 0 and 1 ...
Erase mtd partitions 0 and 1 ...
+ /sbin/update_kernel -o /dev/mtd0
info 0x0
{mtd_info} type 0x4
{mtd_info} size 0x400000
{mtd_info} erasesize 0x20000
{mtd_info} writesize 0x800
{mtd_info} oobsize 0x40
[main] exit error 0
+ /sbin/update_kernel -o /dev/mtd1
info 0x0
{mtd_info} type 0x4
{mtd_info} size 0x3000000
{mtd_info} erasesize 0x20000
{mtd_info} writesize 0x800
{mtd_info} oobsize 0x40
[main] exit error 0
+ echo Copy kernel image...
Copy kernel image...
+ /sbin/update_kernel -i /var/tmp/kernel.image -o /dev/mtd0
info 0x0
{mtd_info} type 0x4
{mtd_info} size 0x400000
{mtd_info} erasesize 0x20000
{mtd_info} writesize 0x800
{mtd_info} oobsize 0x40
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] written 0x20000 Bytes
[main] append 115192 Bytes
[main] written 0x20000 Bytes
[main] eof reached
[main] exit error 0
+ [ 0 -ne 0 ]
+ echo Copy filesystem image ...
Copy filesystem image ...
+ mkdir -p /var/tmp/fs
+ mkdir -p /var/tmp/fs_mtd
+ mount -t squashfs /var/tmp/filesystem.image /var/tmp/fs
mount: mounting /dev/loop1 on /var/tmp/fs failed: Invalid argument
+ mount -t yaffs2 /dev/mtdblock1 /var/tmp/fs_mtd
+ mount
+ grep /var/tmp/fs type squashfs
+ var_mount_squashfs=
+ [ -z  ]
+ echo filesystem.image: cannot mount squashfs, trying ext2 ...
filesystem.image: cannot mount squashfs, trying ext2 ...
+ dd if=/var/tmp/filesystem.image of=/var/tmp/fsimage.ext2 bs=256 skip=1 conv=sync
91692+0 records in
91692+0 records out
+ [ 0 -eq 0 ]
+ mount -t ext2 /var/tmp/fsimage.ext2 /var/tmp/fs
+ rm -f /var/tmp/filesystem.image
+ mount
+ grep /var/tmp/fs type ext2
+ var_mount_ext2=/dev/loop1 on /var/tmp/fs type ext2 (rw,relatime)
+ [ -n /dev/loop1 on /var/tmp/fs type ext2 (rw,relatime) ]
+ echo filesystem.image: ... mount ext2 done
filesystem.image: ... mount ext2 done
+ mount
+ grep /dev/mtdblock1
+ var_mount_mtd=/dev/mtdblock1 on /var/tmp/fs_mtd type yaffs2 (rw,relatime)
+ [ -z  ]
+ [ -z /dev/loop1 on /var/tmp/fs type ext2 (rw,relatime) ]
+ [ -z /dev/mtdblock1 on /var/tmp/fs_mtd type yaffs2 (rw,relatime) ]
+ [ good = good ]
+ echo Copy filesystem ...
Copy filesystem ...
+ cp -R /var/tmp/fs/bin /var/tmp/fs/core /var/tmp/fs/dev /var/tmp/fs/etc /var/tmp/fs/filesystem_core.squashfs /var/tmp/fs/lib /var/tmp/fs/lost+found /var/tmp/fs/proc /var/tmp/fs/sbin /var/tmp/fs/tmp /var/tmp/fs/usr /var/tmp/fs/var /var/tmp/fs_mtd
+ [ 0 -ne 0 ]
+ echo ... Copy filesystem done
... Copy filesystem done
+ [ good = good ]
+ echo Setting linux_fs_start mirror...
Setting linux_fs_start mirror...
+ echo linux_fs_start 0
+ umount /var/tmp/fs
+ umount /var/tmp/fs_mtd
+ rmdir /var/tmp/fs
+ rmdir /var/tmp/fs_mtd
+ exit 0
root@fritz:/var/tmp# mount -t yaffs2 /dev/mtdblock1 /tmp/mount/
root@fritz:/var/tmp# ls -la mount
drwxr-xr-x    1 root     root          2048 Jan  1 01:29 .
drwxr-x---    8 root     root          1820 Jan  1 01:29 ..
drwx------    1 root     root          2048 Jan  1 01:29 bin
drwx------    1 root     root          2048 Jan  1 01:29 core
drwx------    1 root     root          2048 Jan  1 01:29 dev
drwx------    1 root     root          2048 Jan  1 01:29 etc
-rw-r--r--    1 root     root      19599360 Jan  1 01:29 filesystem_core.squashfs
drwx------    1 root     root          2048 Jan  1 01:29 lib
drwx------    1 root     root          2048 Jan  1 01:30 lost+found
drwx------    1 root     root          2048 Jan  1 01:29 proc
drwx------    1 root     root          2048 Jan  1 01:29 sbin
drwx------    1 root     root          2048 Jan  1 01:29 tmp
drwxr-xr-x    1 root     root          2048 Jan  1 01:29 usr
drwx------    1 root     root          2048 Jan  1 01:29 var
root@fritz:/var/tmp# umount mount
root@fritz:/var/tmp#


Und nach der Reboot-Schleife und adam2 switch siehts so aus:

Code:
root@fritz:/var/mod/root# mount -t yaffs2 /dev/mtdblock1 /tmp/mount/
root@fritz:/var/mod/root# ls -la /tmp/mount
drwxr-xr-x    1 root     root          2048 Jan  1 01:01 .
drwxrwxrwx    8 root     root          1760 Jan  1 01:01 ..
drwx------    1 root     root          2048 Jan  1 01:01 lost+found
root@fritz:/var/mod/root#

Muss ich das verstehen?!?!
 
Zuletzt bearbeitet:
Reboot Schleife wie vorher auch.
Das ist ja nun weniger überraschend ... das Gegenteil hätte meinen Glauben an das Siliziium schwer erschüttert.

Muss ich das verstehen?!?!
Mach mal das "mount" nach der Boot-Schleife mit "ro"-Option ... ein Merkmal von yaffs2 ist es, daß beim Mounten eine Dateisystemstruktur eingerichtet wird, wenn keine gültige gefunden wird - ich weiß aber nicht sicher, ob das "ro" es wirklich verhindern könnte.

Wenn Du den Ablauf noch einmal wiederholst, lösche mal vor dem Reboot aus der /etc/inittab in der neu geschriebenen yaffs2-Partition den Aufruf von /sbin/flash_update ... dort wird eigentlich nur bei Recovery das System aus dem RAM in den Flash kopiert. Aber da wären eben auch Kommandos zum Löschen einer Flash-Partition vorhanden (ist ein Shell-Skript, kann man problemlos analysieren) - ich weiß zwar nicht warum, aber falls eines der dort hinterlegten Kommandos zum Löschen von Partitionen ausgeführt wird, wäre das leere Dateisystem (oder eines mit zerstörten Strukturen) ja auch erklärlich.
 
Ich hab den Aufruf von /sbin/flash_update rausgenommen aus dem frischen yaffs2 und auch mit ro gemountet - es bleibt dabei - das yaffs2 ist nach einem gescheiterten reboot und wechsel per adam2 leer.
 
Zuletzt bearbeitet:
Strange ... ich würde mal das Flashen durchlaufen lassen und dann noch vor dem Reboot "linux_fs_start" wieder auf den ursprünglichen Wert setzen und damit noch einmal das laufende System booten. Ziel wäre es sicherzustellen, daß wirklich erst der versuchte Start mit mtdblock1 als Filesystem die dort vorhandenen Daten zerstört und nicht irgendetwas anderes zuvor. Wenn Du ein normales "reboot" nach dem manuellen Aufruf von "/var/post_install" hinlegst, wird ja glatt noch einmal die /var/post_install abgearbeitet ... nicht daß dabei dann die leere yaffs2-Partition entsteht. Auch die Frage, ob /dev/mtd0ro nun leer ist oder nicht (das wäre ja der Kernel zu dem leeren yaffs2-FS), könnte interessant sein.
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.