Attempting to add support for a cheap Chinese router I had lying around, the Wise Tiger RT-8501. It comes pre-loaded with a modified snapshot of OpenWRT, which I'm trying to replace with a full-featured build. I'll update this post with progress.
Current Problem: Kernel panic when booting initramfs image from TFTP
The DTS file is mostly copied from mt7620a_dlink_dir-510l.dts due to the similarities between the two devices. I could use another set of eyes on the flash portion; if I had to guess where the problem was coming from, I'd guess there.
My second guess would be the fact that I've directly edited the flash memory chip with a CH341A USB Programmer. The boot delay parameter originally had no number defined for it, preventing me from attempting a boot from TFTP. I changed a . to 5, and now it exhibits some unusual behavior (throwing additional errors on startup, going into a kernel panic after a poweroff command) but still works fine when booted normally. I could try reverting those changes, but then I'd have to figure out how to get access to U-Boot by other means.
My final guess would be that the initramfs image isn't being successfully transferred over TFTP or loaded at all and I'm totally misinterpreting this output.
we need a full kernel log... I cannot tell where in the boot process it is failing. It is possible that the kernel is too large to decompress so you have to load an uncompressed or gzip compressed image
if you have serial access then you probably have u-boot access, but they don't tell you this in the console
for example if you are selecting option 2 to load an image over TFTP, options 3 and 4 and 5 may exist but are not printed on screen
edit: the flash node with the partitions has no effect when booting initramfs from TFTP
boot delay is probably not required to interrupt boot. what you have to do is hold whatever key you need to hold while powering the board
also you should have replaced '.' with '5.'
the period (0x20 in hex) denotes the end of the variable, so you might now have a uboot environment variable that is mashed up with another one and might look like this
bootdelay=5stderr=serial
edit: however, the uboot environment is probably not being used anymore, because it is protected by a checksum. When you change a value, a new checksum must be written at the start of the partition. I recommend you put it back if you have a copy of the original uboot environment
Goes to show I should think a little harder before trying clever solutions like directly editing memory. I was basing my process off the techniques applied in this thread.
I got past the kernel panic issue, which I think was actually the result of incorrectly-configured TFTP settings. Now I've got a working initramfs image, but attempting to load and write a squashfs image just causes a reboot with no apparent changes. Here are the full boot logs including the U-Boot portion.
Probably it's not safe to rely on the bootloader to write to flash for you...
ideally, you should be able to get TFTP server started by holding reset while powering on...
last resort, test as much as you can on initramfs then do a sysupgrade from the initramfs image, adding LuCI to the build helps
before doing the sysupgrade you should use LuCI to copy all MTD partitions just in case
you can try to add uboot-env support for the board as well by editing this file
package/boot/uboot-envtools/files/ramips
you also have to add uboot-envtools to DEVICE_PACKAGES in the makefile
then you can make sure the uboot env is clean by overwriting it with the correct values (make sure you have a copy of it first)
in openwrt the commands are fw_printenv fw_setenv
be aware that fw_setenv will write to flash right away, compared to uboot which uses an extra command for committing to flash saveenv
again make sure you have a copy first
syntax is like this for each variable fw_setenv bootdelay 5
however at the end you should find a way to upgrade this without serial console, so that other users can easily replicate the process
Well, onto the next problem: when using the initramfs image, I can't get it to connect to my network or communicate with my PC via direct ethernet connection.
My network settings should be correct, but I could be missing something. I've got my home network's main router (a TP-Link Archer C2 running stock firmware) connected to LAN port 4 of the device, and my laptop connected to LAN port 2.
Decided to try the mt7620 evaluation board initramfs image for the hell of it, and the device connects to everything just fine from there. Got LuCI installed and running. I'm guessing I should compare boot logs or see what packages might be missing from my firmware, but I only did this a few minutes ago so I haven't had time yet.
I started out with the DTS and profile being more or less copied from another similar device with a few small modifications. I compared it to the DTS and profile for the eval board, and made some more changes to my files to bring my entries closer in line with the eval board's. Same results. I'll take another look soon.
Is there anything else it could be? Something that was included in the eval board firmware image when it was built? The installed packages seem to be almost identical on both images (based on opkg list-installed), but I don't know if there are other differences located elsewhere that might have an impact.
Hi! i have the same router and i was looking to flash an openwrt based firmware, because i dont trust the one that came stock.
I think these routers original brand is Phicomm (as seen on the power adapter) and the model is K2. Though the firmware that comes with Phicomm's routers is different but the hardware is pretty much the same.
I watched this video of a guy installing openwrt in a Phicomm k2 router via Breed. @WiredLuddite have you figured it out how to flash OpenWrt in this Wise Tiger router? if not could you please resume this project.