TD-W8970 v1 crash with no visible errors in logs

Too late. I just went full "myself" and build a extremely minimal image with also some kernel changes. #ohno

Joking aside. Yes I also grabbed the official 17.01.04 and I'm getting ready to do tests. I might try to do a binary search for the commit responsible of this reboot problem

  • trying 17.01.05, if it works it means that the problem is between 05 and 06, if not is between 04 and 05
  • choose a commit between the selected half
  • repeat until I find the commit which makes everything goes bad

It will probably take a lot of time... Worst case: log(commits_num_from_04_to_06) am i right?

Hey a little bit of OT, it might be related to another problem that this router has... but it is just a wild guess. I'll ask this here so I do not create another thread.

I would like to separate eth0 from wlan (no default no bridge), and also have DHCP on eth0 with static-ip based on switch-port not MAC addresses. Everything without using VLAN.

Out of the box OpenWRT create a bridge between eth0 and wlan, putting every client under 192.168.1.X. I'd like to not create the bridge, but instead put every client connecting through WiFi under 192.168.2.X (using available IP range 192.168.2.100 - 192.168.2.200) and selecting fixed IP for the (exposed) port of the switch. The 4 ports on the back of the router corresponds (from left to right) to the internal switch ports 4, 2, 0 and 5, is there a way to assign specific IP to each port? Whatever connects to switch ports 4 has IP 192.168.1.2, port 2 will have IP 192.168.1.3, port 0 will have IP 192.168.1.4 and port 5 will have IP 192.168.1.5.

This is rather strange for me TBH but still I dont think if it's possible. Even if it was possible, you'll need to create VLANs and you'll probably need to create different networks that can be connected to those VLANs but still you can't assign same subnet to different VLANs (AFAIK) and if you assign a static IP to a network that IP will be considered a gateway for the connecting device to that port and device will need an IP address different to that IP but in the same subnet.

This is possible and you just need to go to LAN physical tab and untick the bridge option and then assign a eth0 interface. Create a new interface and do the same with wlan.

Basically no, the switches in a typical all-in-one router work on Layer 2, Ethernet addresses, not IP addresses.

You could subnet down to a /30 so each subnet has an IP for the router, one for a device, and a broadcast address, but that's going to be a maintenance nightmare, as well as destroying any on-link services.

I'm not sure what you're trying to accomplish with that topology. Perhaps explaining your goals would lead to an approach.

Sorry to continue to write on this forum. Btw how can I build my image to be as verbose as possible? I want to know if my image is crashing for reason or is the CPU simply giving up.

Is this an equal error pattern ?

Might be? But I do not use asterisk... Anyway this log-less crashes are extremely annoying.

It has nothing to do with asterisk it self.
It happen when i try to change the owner or rights of large files that are exist from beginning.
Can look in /urs/lib and try to change the rights from bigger files. ?
(try chmod 0777 and change back chmod 0755 )

Define "bigger files"

ls -al /lib/firmware/xcpe_581816_580B11.bin
-rw-r--r--    1 root     root        898952 Mar  9 15:10 /lib/firmware/xcpe_581816_580B11.bin
chmod 0755 /lib/firmware/xcpe_581816_580B11.bin

or

ls -al /usr/lib/libcrypto.so.1.1
-rw-r--r--    1 root     root       1799939 Mar  9 15:10 /usr/lib/libcrypto.so.1.1
chmod /usr/lib/libcrypto.so.1.1

I think it may be related to flash being the source of the problem and if it is the case and flash causes the crash then it's also possible that there may not be any logs since there would be nothing in the system to produce the log.

I just finished an "internal HDD" mod on my router (basically I removed the usb ports, soldered a new one facing inside the router and put a new tiny 4GB usb inside it, with two partitions 2GiB Etx4 and 1,5 GiB SWAP, remaining space left unpartitioned)... Is there a way to offload as much things as possible to USB? Now I only use it for saving logs (so I do not lose them on crashes) and to save crashdumps.

OK. I'm at work now I'll try it as soon I go home (in ~6h).

"Extroot" mounts a "normal" file system as an overlay on top of the typical JFFS-over-ROM system. If you copy "everything" to the top-layer file system, I would think it wouldn't use the flash-based ROM and overlay except at boot, before the second overlay is mounted.

https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

https://openwrt.org/playground/richb/extroot

Did git bisect ever lead you to an idea of what might have changed since early v17?

Planned to do that. RIght now I have too much load form work and university but I'll do it.

Also... Can I run openwrt from USB? Completely from USB? Like flashing a bootloader to the flashchip that does nothing excpet loadinh what inside the first partition it found?

May you elaborate that more? I have a 8MB flashchip and since I also mostly use minimal builds I've never tuched extroot (I even used to remove that feature completely while testing ultra-minimal builds).

"USB" overlay -- if it's here, it reads/writes to this layer, if not, look at the next layer down

Flash-based overlay -- if it's here, it reads this layer, if not, look at the next layer down

Flashed-based ROM -- If it's not here, it's not anywhere

"Deletes" are done by putting a special "mark" on the overlay that effectively says "don't look behind the curtain, this file is gone".

So by copying everything (except /var/ /tmp/) to the top-most layer, the lower layers no longer get accessed.

How xD? I do not thing that I can do mv stuffs /dev/top_layer/ xD

I'd either use tar or rsync of with "exclude" rules for the memory-backed and "special" file systems (like /proc/, /dev/, /sys/) and the mount point, or perhaps cp -rp on /rom/ and /overlay/upper/

I built a new image with a custom /etc/config/fstab that automatically mount as overlay the partition with owrt_overlay as label... and it works :3! Now I have a nice image that even at its first boot do not touch (or at least not so much) the flashchip for writing. Now to avoid even more stuffs I should copy things from /rom/ to /overlay/upper/...

To do it properly without overwriting stuffs that should not be overwritten, my idea is:

  • Get a list of all custom files I modified after the first boot
  • Files modified / created / automatically by OpenWRT are already inside /overlay/upper/ (and thus in the USB)
  • Open the sysupgrade image I built like an archive to get a full list of real/non-special/non-memory-backed files existing in the ROM
  • Merge the lists to get an files to exclude/include lists
  • Manually copy everything

Or there is a fancy (more intelligent) way to do it? Can I do something like dir / -R (print all directory and subdirs starting from /) but excluding special stuffs?

UPDATE:
I'm dumb. looking at /rom/ (and coping from it) make much more sense u.u i should just copy form rom to upper overlay without overwriting already existing files