New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mir3 support #597
Mir3 support #597
Conversation
Honour the parent interfaces peerdns option when spawning a virtual DHCPv6 interface in order to avoid pulling in IPv6 DNS servers when the user opted to inhibit peer DNS servers in the configuration. Fixes openwrt#597. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
bd5c7ec
to
50b993a
Compare
I resolved the conflicts again, any help to get it merging? |
finally supported! anybody help this merging? |
@@ -8,7 +8,7 @@ define Device/miwifi-r3 | |||
DTS := MIWIFI-R3 | |||
BLOCKSIZE := 128k | |||
PAGESIZE := 2048 | |||
KERNEL_SIZE := 1472k | |||
KERNEL_SIZE := 1440k |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this KERNEL_SIZE field based on a real limitation in the kernel partition size, or did you put in a hardcoded value based on whatever size your build produced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that
My previous device had this restriction. My new device does not have this restriction
so, maybe it is ok to remove the restriction, more test is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there's a bad block in nand flash? Run dmesg | grep nand
.
FEATURES+=nand usb | ||
CPU_TYPE:=24kc | ||
|
||
DEFAULT_PACKAGES += kmod-rt2800-pci kmod-rt2800-soc kmod-mt76 wpad-mini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you should select kmod-mt76x2 instead of kmod-mt76. That way you leave out kmod-mt7603, which you don't need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, Thank you for reminding
CONFIG_SPI=y | ||
CONFIG_SPI_MASTER=y | ||
# CONFIG_SPI_MT7621 is not set | ||
CONFIG_SPI_RT2880=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to save some more space, you can disable jffs2 as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, for now It is likely that the kernel_size restriction can be removed
I will submit a new commit later...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now it is based on a real limitation in the kernel partition size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure that it works with the changes requested before updating the PR. Might be that I requested something that doesn't work.
Please squash the fixes of "ramips: add Xiaomi Mi Router 3 support" into this commit. It doesn't make sense to keep them as extra commits.
@@ -295,6 +295,9 @@ ramips_board_detect() { | |||
*"MiWiFi Mini") | |||
name="miwifi-mini" | |||
;; | |||
*"Xiaomi Mi Router R3") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop this line and use xiaomi,miwifi-r3
as board name in all files.
}; | ||
}; | ||
|
||
&gpio0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop this node, gpio0 isn't used in your dts file.
status = "okay"; | ||
}; | ||
|
||
&gpio2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop this node, gpio2 isn't used in your dts file.
IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE) | ||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata | ||
DEVICE_TITLE := Xiaomi Mi Router R3 | ||
SUPPORTED_DEVICES += miwifi-r3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can drop the SUPPORTED_DEVICES
|
||
DEVICE_VARS += | ||
|
||
define Device/miwifi-r3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define Device/xiaomi_miwifi-r3
please
SUPPORTED_DEVICES += miwifi-r3 | ||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci uboot-envtools | ||
endef | ||
TARGET_DEVICES += miwifi-r3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TARGET_DEVICES += xiaomi_miwifi-r3
please
&pinctrl { | ||
state_default: pinctrl0 { | ||
gpio { | ||
ralink,group = "i2c", "rgmii1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop the i2c group here. None of the pins of this group (&gpio0 1
, &gpio0 2
) is used in your dts.
}; | ||
}; | ||
|
||
nand { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is
nand: nand@800 {
reg = <0x800 0x100>;
pinctrl-names = "default";
pinctrl-0 = <&nand_pins>;
...
}
Furthermore the whole nand node should be moved to mt7620a.dtsi with status = "disabled"
and only referenced here via
&nand {
status = "okay";
...
};
The nand pinmux should/need to be added to mt7620a.dtsi as well:
nand_pins: nand {
nand {
ralink,group = "nd_sd";
ralink,function = "nand";
};
};
SUPPORTED_DEVICES += miwifi-r3 | ||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci uboot-envtools kmod-mt76x2 | ||
endef | ||
TARGET_DEVICES += miwifi-r3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TARGET_DEVICES += xiaomi_miwifi-r3
please
@@ -28,6 +28,7 @@ all0256n-8M|\ | |||
all5002) | |||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" | |||
;; | |||
miwifi-r3|\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you added u-boot env support for this board? As far as I can see, there is nothing which requires write access to the u-boot env.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is need to revert back to stock firmware.
fw_setenv flag_last_success 0
`
} |
` [ 0.000000] Linux version 4.14.25 (terminator@SC-GAME) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6427+43-ed3860c)) #0 Sat Mar 17 01:03:59 2018 ` I post the boot log here. |
new firmware image not update Error: The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform |
@9000000
The new changes resulted in incompatibility with the old version and the board_name changed |
@ptpt52 18 08:27:16 2018 daemon.notice hostapd: handle_probe_req: send failed |
New fw |
You can fix this `Fri Mar 23 11:58:29 2018 user.warn igmpproxy[2108]: MRT_DEL_MFC; Errno(2): No such file or directory Fri Mar 23 12:02:39 2018 user.warn igmpproxy[2108]: MRT_DEL_MFC; Errno(2): No such file or directory Fri Mar 23 12:06:50 2018 user.warn igmpproxy[2108]: MRT_DEL_MFC; Errno(2): No such file or directory Fri Mar 23 12:10:59 2018 user.warn igmpproxy[2108]: MRT_DEL_MFC; Errno(2): No such file or directory |
- add a new subtarget named mt7620nand - new mt7620-nand driver Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Specification: - CPU: 580 MHz - Flash size: 128 MiB NAND - RAM size: 128 MiB DDR2 - Wireless No1: SoC-integrated: MT7620A 2x2 MIMO 802.11b/g/n (2.4 GHz) - Wireless No2: On-board chip: MT7612E 2x2 MIMO 802.11a/n/ac (5 GHz) - Switch: MT7620 built-in 10/100 switch w/ vlan support - USB: 2.0 x1 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. This is base on the new subtarget mt7620nand Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
@ysc3839 My main concern is the mt7620 nand driver. It looks like copy/paste of the already ugly ralink driver. Beside the code quality, I'm concerned about the licence of the ralink driver. Is it GPL licenced so that we can use/modify the ralink driver? At least within the PR there is no licence header, copyright or similar. The best would be, if the driver goes upstream (linux kernel) or at least the mt7621 nand driver is reused. It might be that the upstream mediatek ARM nand driver can be extended to support the mt7620 nand. Some hours ago @nbd168 committed f95a4aa. I kind of lost the overview about the Mir boards, since they are all named very similar and I fail to see which one f95a4aa targets. In best case the mt7620-nand driver from this PR isn't required any longer. I'm not going to take care of this PR, as @blogic picked the original PR (and hence got this one assigned). It can be assumed that he knows the hardware way better than I do. |
I am trying to do reusing the mt7621 nand driver but fail for my limited understanding. |
+ | ||
+module_platform_driver(mtk_nand_driver); | ||
+ | ||
+MODULE_LICENSE("GPL"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it got lost/was removed intentional with the update to kernel 4.9. That is something I expected to be mentioned in the commit message instead of "new mt7620-nand driver".
It's quite amazing that people are curious why their PRs stuck... Anyway, as said before I'm not the right one for this PR.
My mir3 is all dusty, is this PR still alive? |
@mkresin please re-review thx. |
this PR adds a new subtarget for an out of tree driver that wont ever go upstream and is of abysmal quality. further this driver will break heavily when we move on to the next kernel release. there is no one that will have time to maintain this driver. sorry .... |
Hello. Is support it added now? |
Any news about the support of Xiaomi Mi Router 3? There were 3 PRs:
Linked to: |
Honour the parent interfaces peerdns option when spawning a virtual DHCPv6 interface in order to avoid pulling in IPv6 DNS servers when the user opted to inhibit peer DNS servers in the configuration. Fixes openwrt#597. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
add a new subtarget named mt7620nand
new mt7620-nand driver
add a new device(Xiaomi Mi Router 3) base on this sub target
repost from lede-project/source#1526