Problem with installation on FRITZ!Box 3390 (boot initramfs-kernel.bin is ok but check of the key linux_fs_start is not possible)

FYI, I'm relatively new to this stuff. This is the third device I tried to install OpenWRT. (on a DLink Modell and FRITZ!Box 7412 the Insallation was ok) ,but this is my first problem installing openwrt.
I used the manual from https://openwrt.org/toh/avm/fritzbox_3390 The hardware is full supportet from openwrt :slight_smile:

I used the Firmware OpenWrt Install from ttps://downloads.openwrt.org
Then i start with:
./scripts/flashing/eva_ramboot.py 192.168.178.1 /home/xxx/Downloads/fritzbox3390/Firmware\ OpenWrt\ Install/openwrt-22.03.2-lantiq-xrx200-avm_fritz3390-initramfs-kernel.bin

and the Kernel boot fine. I can login via ssh :slight_smile:
In the manual is write, that I must check if the key linux_fs_start is not set to 1 in tffs. with this command: "$ fritz_tffs_nand -d /dev/mtd1 -n linux_fs_start"
But the command "fritz_tffs_nand" is not availible :frowning:

I seach on the complet system, but I can't find it:

`root@(none):/# find / -name *nand*`
/sys/firmware/devicetree/base/fpi@10000000/localbus@0/flash@1/nand-ecc-engine
/sys/firmware/devicetree/base/fpi@10000000/pinmux@e100b10/nand
/sys/firmware/devicetree/base/fpi@10000000/pinmux@e100b10/nand-cs1
/sys/bus/platform/drivers/lantiq,nand-xway
/sys/bus/platform/drivers/gen_nand
/lib/upgrade/nand.sh

I search with: "opkg list|grep nand" , but I don't find it.
So I download fritz-tffs-nand and copy this with scp on the device.

`root@(none):/# ls -al /tmp/fritz-tffs-nand_1_x86_64.ipk`
-rw-r--r--    1 root     root          4730 Jan  1 02:57 /tmp/fritz-tffs-nand_1_x86_64.ipk

Then I install this file with:

`root@(none):/# opkg install /tmp/fritz-tffs-nand_1_x86_64.ipk`
Package luci-lib-base version git-20.232.39649-1f6dc29 has no valid architecture, ignoring.
Package luci-app-opkg version git-22.273.29004-9f6876b has no valid architecture, ignoring.
Package luci-mod-system version git-22.264.46172-b6b7da4 has no valid architecture, ignoring.
Package luci-theme-bootstrap version git-22.288.45147-96ec0cd has no valid architecture, ignoring.
Package luci-app-firewall version git-22.089.67563-7e3c1b4 has no valid architecture, ignoring.
Package luci-ssl version git-20.244.36115-e10f954 has no valid architecture, ignoring.
Package luci-proto-ppp version git-21.158.38888-88b9d84 has no valid architecture, ignoring.
Package luci-mod-admin-full version git-19.253.48496-3f93650 has no valid architecture, ignoring.
Package luci-proto-ipv6 version git-21.148.48881-79947af has no valid architecture, ignoring.
Package ca-bundle version 20211016-1 has no valid architecture, ignoring.
Package luci version git-20.074.84698-ead5e81 has no valid architecture, ignoring.
Package luci-mod-network version git-22.244.54818-b13d8c7 has no valid architecture, ignoring.
Unknown package 'fritz-tffs-nand'.
Collected errors:
 * pkg_hash_fetch_best_installation_candidate: Packages for fritz-tffs-nand found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package fritz-tffs-nand.`

I check the architecture with:

`root@(none):/# opkg print-architecture
arch all 1
arch noarch 1
arch mips_24kc 10

On the website pkgdata/fritz-tffs-nand I check, the Architectures is supportet: :slight_smile:
..., mips_24kc, ..

Why is the manual differing from the actually reality. So, I hope, somebody can help me with a hint.
Here you can find differnt infomations to my device AVM 3390:
Can somebody find with this Informations, if the key linux_fs_start is not set to 1 in tffs ?
When I ignore the check "the key linux_fs_start is not set to 1 in tffs.", can I damage the device, when I execute the "Run sysupgrade to persistently install OpenWrt."? Or is after the next reboot all again ok?

`root@(none):/# df -h`
Filesystem                Size      Used Available Use% Mounted on
tmpfs                    59.0M     13.0M     46.0M  22% /
tmpfs                   512.0K         0    512.0K   0% /dev
tmpfs                    59.0M     36.0K     58.9M   0% /tmp
`root@(none):~# cat /proc/mtd`
dev:    size   erasesize  name
mtd0: 00400000 00020000 "kernel"
mtd1: 07c00000 00020000 "ubi"
mtd2: 00020000 00010000 "urlader"
mtd3: 00010000 00010000 "tffs (1)"
mtd4: 00010000 00010000 "tffs (2)"
root@(none):~# find / -name linux_fs_start
root@(none):~# find / -name tffs
root@(none):~# find / -name *tffs*
root@(none):~# cat /proc/filesystems
nodev	sysfs
nodev	tmpfs
nodev	bdev
nodev	proc
nodev	cgroup
nodev	cgroup2
nodev	cpuset
nodev	debugfs
nodev	sockfs
nodev	bpf
nodev	pipefs
nodev	ramfs
nodev	devpts
	squashfs
nodev	jffs2
nodev	overlay
nodev	mqueue
nodev	ubifs
`root@(none):~# ls -al /dev/`
console    hw_random  mtd0ro     mtd2       mtd3ro     mtdblock0  mtdblock3  port       random     ttyLTQ0    watchdog
full       kmsg       mtd1       mtd2ro     mtd4       mtdblock1  mtdblock4  ptmx       shm/       ubi_ctrl   watchdog0
gptu       mtd0       mtd1ro     mtd3       mtd4ro     mtdblock2  null       pts/       tty        urandom    zero
`root@(none):~# ls -al /dev/mtd*`
crw-------    1 root     root       90,   0 Jan  1 00:00 /dev/mtd0
crw-------    1 root     root       90,   1 Jan  1 00:00 /dev/mtd0ro
crw-------    1 root     root       90,   2 Jan  1 00:00 /dev/mtd1
crw-------    1 root     root       90,   3 Jan  1 00:00 /dev/mtd1ro
crw-------    1 root     root       90,   4 Jan  1 00:00 /dev/mtd2
crw-------    1 root     root       90,   5 Jan  1 00:00 /dev/mtd2ro
crw-------    1 root     root       90,   6 Jan  1 00:00 /dev/mtd3
crw-------    1 root     root       90,   7 Jan  1 00:00 /dev/mtd3ro
crw-------    1 root     root       90,   8 Jan  1 00:00 /dev/mtd4
crw-------    1 root     root       90,   9 Jan  1 00:00 /dev/mtd4ro
brw-------    1 root     root       31,   0 Jan  1 00:00 /dev/mtdblock0
brw-------    1 root     root       31,   1 Jan  1 00:00 /dev/mtdblock1
brw-------    1 root     root       31,   2 Jan  1 00:00 /dev/mtdblock2
brw-------    1 root     root       31,   3 Jan  1 00:00 /dev/mtdblock3
brw-------    1 root     root       31,   4 Jan  1 00:00 /dev/mtdblock4
`root@(none):~# mount`
tmpfs on / type tmpfs (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
`root@(none):~# cat /etc/os-release `
NAME="OpenWrt"
VERSION="22.03.2"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 22.03.2"
VERSION_ID="22.03.2"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r19803-9a599fee93"
OPENWRT_BOARD="lantiq/xrx200"
OPENWRT_ARCH="mips_24kc"
OPENWRT_TAINTS=""
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 22.03.2 r19803-9a599fee93"
`root@(none):/# cat /etc/openwrt_release`
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='22.03.2'
DISTRIB_REVISION='r19803-9a599fee93'
DISTRIB_TARGET='lantiq/xrx200'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='OpenWrt 22.03.2 r19803-9a599fee93'
DISTRIB_TAINTS=''
`root@(none):/# cat cat /proc/cpuinfo`
cat: can't open 'cat': No such file or directory
system type		: xRX200 rev 1.2
machine			: AVM FRITZ!Box 3390
processor		: 0
cpu model		: MIPS 34Kc V5.6
BogoMIPS		: 331.77
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 16
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16 dsp mt
Options implemented	: tlb 4kex 4k_cache 32fpr prefetch mcheck ejtag llsc dc_aliases userlocal vint perf_cntr_intr_bit perf
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VPE			: 0
VCED exceptions		: not available
VCEI exceptions		: not available
processor		: 1
cpu model		: MIPS 34Kc V5.6
BogoMIPS		: 334.23
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 16
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16 dsp mt
Options implemented	: tlb 4kex 4k_cache 32fpr prefetch mcheck ejtag llsc dc_aliases userlocal vint perf_cntr_intr_bit perf
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VPE			: 1
VCED exceptions		: not available
VCEI exceptions		: not available

looks like this command is in a package that must be manually copied and installed.

Same procedure for 7412, but including details, how to enable that command:

where to get the ipk file (the version of package path and firmware file must match)
https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/base/

Hello Pico,
thank you for the fast answer.
With the correct Package opkg_extra/fritz-tffs-nand_1_mips_24kc.ipk so I can install it without errors :slight_smile:

But the command from the manual do not give me a valid answer:

root@(none):~# fritz_tffs_nand -d /dev/mtd0 -a
Warning: block without magic header. Skipping block
... (repeat verry often the same line)
...
ERROR: Parsing blocks from tffs device /dev/mtd1 failed
       Is byte-swapping (-b) required?
root@(none):~# fritz_tffs_nand 
ERROR: No input file (-d <file>) given!
Usage: fritz_tffs_nand [OPTIONS...]

Options:
  -a              list all key value pairs found in the TFFS file/device
  -d <mtd>        inspect the TFFS on mtd device <mtd>
  -h              show this screen
  -l              list all supported keys
  -n <key name>   display the value of the given key
  -o              read OOB information about sector health

What i do false? How can I activate byte-swapping ? The Option -b ist not availible in the fritz_tffs_nand command..

root@(none):~# fritz_tffs_nand -b -d /dev/mtd1 -n linux_fs_start
Warning: block without magic header. Skipping block
...
ERROR: Parsing blocks from tffs device /dev/mtd1 failed
       Is byte-swapping (-b) required?

The same with:

fritz_tffs_nand -d /dev/mtd1 -n linux_fs_start -b
Warning: block without magic header. Skipping block
...
ERROR: Parsing blocks from tffs device /dev/mtd1 failed
       Is byte-swapping (-b) required?

Here you can see my mtd devices:

root@(none):~# ls -al /dev/mtd*
crw-------    1 root     root       90,   0 Jan  1 00:00 /dev/mtd0
crw-------    1 root     root       90,   1 Jan  1 00:00 /dev/mtd0ro
crw-------    1 root     root       90,   2 Jan  1 00:00 /dev/mtd1
crw-------    1 root     root       90,   3 Jan  1 00:00 /dev/mtd1ro
crw-------    1 root     root       90,   4 Jan  1 00:00 /dev/mtd2
crw-------    1 root     root       90,   5 Jan  1 00:00 /dev/mtd2ro
crw-------    1 root     root       90,   6 Jan  1 00:00 /dev/mtd3
crw-------    1 root     root       90,   7 Jan  1 00:00 /dev/mtd3ro
crw-------    1 root     root       90,   8 Jan  1 00:00 /dev/mtd4
crw-------    1 root     root       90,   9 Jan  1 00:00 /dev/mtd4ro
brw-------    1 root     root       31,   0 Jan  1 00:00 /dev/mtdblock0
brw-------    1 root     root       31,   1 Jan  1 00:00 /dev/mtdblock1
brw-------    1 root     root       31,   2 Jan  1 00:00 /dev/mtdblock2
brw-------    1 root     root       31,   3 Jan  1 00:00 /dev/mtdblock3
brw-------    1 root     root       31,   4 Jan  1 00:00 /dev/mtdblock4

Can you give me again please a hint, how can I to find out, how if the key set in tffs?

Thanks

I think the wiki page is wrong for this device. The TFFS partitions are on the small NOR flash, not on the NAND flash. So you need to use fritz_tffs (which should already be installed) instead of fritz_tffs_nand. You also need to use the correct partition, i.e. one of the two TFFS partitions. In the end, one of the following should work:

fritz_tffs -n linux_fs_start -i /dev/mtd3  # using tffs (1)
fritz_tffs -n linux_fs_start -i /dev/mtd4  # using tffs (2)

(It is possible that the linux_fs_start setting doesn't matter anyway. If this device works like the 7362 SL, it would probably work even with linux_fs_start set to 1, only taking a bit longer for the first boot.)

Hello janh,
thank you for the fast answer. :slight_smile:
I hade download the needed file fritz-tffs_1_mips_24kc.ipk and after install with
opkg install /tmp/fritz-tffs_1_mips_24kc.ipk have I research the parameter.

root@(none):~# fritz_tffs -n linux_fs_start -i /dev/mtd3
1
root@(none):~# fritz_tffs -n linux_fs_start -i /dev/mtd4
1
Mhhm, the false value ...:frowning:
Your hint "It is possible that the linux_fs_start setting doesn't matter anyway." was good, so I do the sysupgrade with:

root@(none):~# sysupgrade -n -v /tmp/openwrt-22.03.2-lantiq-xrx200-avm_fritz3390-squashfs-sysupgrade.bin
Fri Jan  2 03:17:05 UTC 1970 upgrade: Commencing upgrade. Closing all shell sessions.
root@(none):~# Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.

After a while the red LED stops blinking and the power LED is green. :slight_smile:
The device is reachable with ping and I can connect via ssh. :slight_smile:

ssh root@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
ED25519 key fingerprint is SHA256:9CtkUQvNtPZtYuaNwb9k9A7yS3hyi6OVSk+WhMH3ADE.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.1' (ED25519) to the list of known hosts.


BusyBox v1.35.0 (2022-10-14 22:44:41 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.2, r19803-9a599fee93
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------

The problem is solved.

Thanks for the fast help.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.