ptpt52 / lede-source

Moved to: https://github.com/ptpt52/openwrt-openwrt
GNU General Public License v2.0
5 stars 5 forks source link

build and flash for miwifi r3 #1

Open ptpt52 opened 6 years ago

ptpt52 commented 6 years ago
  1. make sure get latest code from branch subtarget or master

  2. make menuconfig

    select target 'MediaTek Ralink MIPS' select subtarget 'MT7620 based boards with NAND flash' select target profile 'Xiaomi Mi Router R3' disable 'KERNEL_KALLSYMS' other custom setting as you wish

  3. build

    Flash instructions:

    1. access ssh via https://wiki.openwrt.org/toh/xiaomi/mir3
    2. in ssh: nvram set flag_last_success=1 nvram set boot_wait=on nvram set uart_en=1 nvram commit mtd write lede-ramips-mt7620nand-miwifi-r3-squashfs-kernel1.bin kernel1 mtd write lede-ramips-mt7620nand-miwifi-r3-squashfs-rootfs0.bin rootfs0 reboot

    If you want to revert back to stock fw while on LEDE: insert usb stick (FAT/FAT32) with stock fw renamed to miwifi.bin fw_setenv flag_last_success 0 power off the device hold the reset button and power on the device, keep holding the reset button until yellow led starts blinking.

ptpt52 commented 6 years ago

I suggest you use the subtarget branch, which is clean base on the upstream lede master

the master branch in my code is for my custom build.

nicovell3 commented 6 years ago

As a tip for the following builders, the disable 'KERNEL_KALLSYMS' refers to the option "Global build settings - Kernel build options - Compile the kernel with symbol table information". It took me like 10 minutes to find it.

BTW @ptpt52 thanks very much for your work!

Mighcavots4 commented 6 years ago

@ptpt52 First, Thank for your great work. What is a "subtarget branch" and how can I clone it?

After I flashed the image, the 2.4G was working very bad. I found this patch https://github.com/lede-project/source/blob/9eacb9d7fc0b4c921f8d2ec91a51f10d8c3ae12f/package/kernel/mac80211/patches/621-rt2x00-add-support-for-mt7620.patch It's a bit old, with 2 easily fixed rejects. I wonder way it's not part of the tree, it made the rt2x00, great again.

I just noticed, you also added a patch to the rt2x00 https://github.com/ptpt52/lede-source/commit/eb8ea1988bdc1b9396cf7001716d62102615aac5 Now, I have no idea what fixed it :-)

shootzy commented 6 years ago

@ptpt52 After flash firmware and reboot router is broken. Cant get ip adress, if mannualy set ipv4 192.168.15.2 it still does not work web/ssh .

Router get forever orange led and cant go recovery mode (without fw_setenv flag_last_success 0). I followed the instructions, my .config file https://pastebin.com/y4dnR8P9 and bin's https://file.io/slQLsQ Can you help me?

ptpt52 commented 6 years ago

You need to take a serial to look at what happened or Just try the instructions to revert stock firmware(without fw_setenv flag_last_success 0)

insert usb stick (FAT/FAT32) with stock fw renamed to miwifi.bin power off the device hold the reset button and power on the device, keep holding the reset button until yellow led starts blinking.

shootzy commented 6 years ago

@ptpt52 "Serial" you mean UART console? I tried revert stock, but router does not react at reset button, forever orange led without blinking. And usb flash led dont react. Only wan/lan ports led at least somehow react, but zero incoming packets

shibajee commented 6 years ago

@ptpt52 I compiled ur subtarget branch. I got the kernel1.bin size like 1.3MB. But in ur custom build site https://dev.ptpt52.com/rom/ it's 1.4MB. Why mine is smaller than urs ? I only just disable the "KERNEL_KALLSYMS" and for rest of the things I keep default.

ptpt52 commented 6 years ago

@shibajee my build supports a variety of file system modules, support usb, support for a variety of network protocol module here is my config: https://gist.github.com/ptpt52/2b088784ad0d1261f235932b0de68039

FPeter84 commented 6 years ago

Hello ptpt52! I just compiled and flashed Your firmware for MIR3 with Your config, but what is the default user/password for netcap login? Im unable to reach the device from both serial/ssh/luci side without it, and i did not find any hint about the default user/password... :(

edit: solved via serial console in fail safe mode with mount_root then passwd

ptpt52 commented 6 years ago

@FPeter84 it is root/admin by the way. u can do make menuconfig disable all packages in ptpt52 feeds so that without password

FPeter84 commented 6 years ago

thanks ptpt52, and a hint for others: # the line CONFIG_LUCI_LANG_zh-cn=y ... i found the lang settings via chrome translation function, but life would be easier with default english :)

but of course, thanks for Your efforts!

mydarkthawts commented 6 years ago

Question! I just now git cloned a fresh directory and the menuconfig no longer applies to this instructional... "subtarget 'MT7620 based boards with NAND flash'" no longer exists and it only says "MT7620 based boards"

No other options are available. So far it has also been causing issues with the builds. It is random but they are soft bricking routers.