KevinMX / openwrt-phicomm-k2p-build

OpenWrt/LEDE build config and prebuilt images for Phicomm K2P wireless router.
GNU General Public License v3.0
83 stars 42 forks source link

install OpenWrt firmware #6

Closed VicePolice closed 4 years ago

VicePolice commented 4 years ago

After installing of your firmware i cant change it to different OpenWrt release except yours updates. Event main fork OpenWrt can not be installed. But your firmware can be installed from the main OpenWrt fork. Can you help me back to main OpenWrt firmware?

I always get the same error "The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform. "

KevinMX commented 4 years ago

Try breed or opboot. You might want to search it on www.right.com.cn, or just google it. And don't forget to make backups :)

VicePolice commented 4 years ago

I tryed to install breed ))) Whats why i began to try change firmware ))). I can not get access to wright breed. mdt can not get access to u-boot partition. And I can not install mtd-rw, get some errors about kernel.

VicePolice commented 4 years ago

www.right.com.cn is super site but i cant get access due to miss of Alipay in our country.

KevinMX commented 4 years ago

Did you use this breed? Push the following file to /tmp on your router, https://breed.hackpascal.net/breed-mt7621-phicomm-k2p.bin and then try mtd -r write /tmp/breed-mt7621-phicomm-k2p.bin Bootloader If any error occurs, show me the output.

VicePolice commented 4 years ago

root@OpenWrt:/tmp# wget-ssl --no-check-certificate https://breed.hackpascal.net/ breed-mt7621-phicomm-k2p.bin Password: Unable to locally verify the issuer's authority. HTTP request sent, awaiting response... 200 OK Length: 106485 (104K) [application/octet-stream] Saving to: 'breed-mt7621-phicomm-k2p.bin'

breed-mt7621-phicom 100%[===================>] 103.99K 178KB/s in 0.6s

2020-01-16 18:43:38 (178 KB/s) - 'breed-mt7621-phicomm-k2p.bin' saved [106485/106485]

root@OpenWrt:/tmp# cat /proc/mtd dev: size erasesize name mtd0: 00030000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00010000 00010000 "factory" mtd3: 00050000 00010000 "permanent_config" mtd4: 00f60000 00010000 "firmware" mtd5: 001ebcd2 00010000 "kernel" mtd6: 00d7432e 00010000 "rootfs" mtd7: 00120000 00010000 "rootfs_data" root@OpenWrt:/tmp# mtd -r write /tmp/breed-mt7621-phicomm-k2p.bin Bootloader Could not open mtd device: Bootloader Can't open device for writing! root@OpenWrt:/tmp#

KevinMX commented 4 years ago

I see the issue. According to this blog:

root@K2P:/tmp# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01000000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00050000 00010000 "permanent_config"
mtd5: 00f60000 00010000 "firmware"
mtd6: 00c48b96 00010000 "rootfs"
mtd7: 00200000 00010000 "rootfs_data"

Above is the partition layout at stock, which slightly different from the one on openwrt. So you should use mtd -r write /tmp/breed-mt7621-phicomm-k2p.bin u-boot instead. After flashing, disconnect power, hold reset button and connect to power, hold the button for a few seconds until the LED flashes red and blue.

VicePolice commented 4 years ago

i have tried it root@OpenWrt:/tmp# mtd -r write /tmp/breed-mt7621-phicomm-k2p.bin u-boot Could not open mtd device: u-boot Can't open device for writing!

VicePolice commented 4 years ago

As far I understand i need to install kmod-mtd-rw. But I allays get error

opkg install kmod-mtd-rw Installing kmod-mtd-rw (4.14.162+git-20160214-1) to root... Downloading http://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/kmod-mtd-rw_4.14.162%2bgit-20160214-1_mipsel_24kc.ipk Collected errors:

KevinMX commented 4 years ago

You might need to compile that kmod into the firmware. Or try this: openwrt-ramips-mt7621-phicomm_k2p-squashfs-sysupgrade.bin.zip kmod.zip

VicePolice commented 4 years ago

Thanks a lot. You are the genius.