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
bcm53xx: Add initial support for PHICOMM K3 #1156
Conversation
Signed-off-by: Hong Zhang <zong777@gmail.com>
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 would suggest to split this into multiple commit, one just adding the base device and then the others adding the extra features like the bcm4366C0 FW, and the screenctrl tool. The base support for the device looks good, the other parts could be a little bit problematic.
bool "K3" | ||
|
||
config K3_WF_DHD24 | ||
bool "ASUS dhd24" |
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.
Instead of making this a compile time option, I would prefer if you could create 4 opkg packages.
Why is the K3_WF_AC88U seletced as the default?
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.
Create 4 packages named like phicommk3-firmware-ea9500, then require one of theses package in the image makefile? I think I can test all of them and choose the best one to make just one package. What do you say?
define Package/$(PKG_NAME) | ||
SECTION:=utils | ||
CATEGORY:=Utilities | ||
DEPENDS:=@TARGET_bcm53xx_DEVICE_phicomm-k3 +@BUSYBOX_CONFIG_ARPING +@KERNEL_DEVMEM +bash |
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 do not like the dependencies.
In the normal build done by build bot we will probably not have BUSYBOX_CONFIG_ARPING and KERNEL_DEVMEM activated.
I do not know this package in detail, has someone a better solution?
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.
The k3screenctrl is came from @updateing Aka Tian Hao haotia@gmail.com , I will try to contact him for this.
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.
The screen is connected to second serial port on bcm53xx. However setting status to okay in DTS does not suffice in activating the port - we have to change several bits in DMU registers (code in Broadcom SDK and mine). I could not find any way to control the bits in DTS, so I chose to modify that via direct memory access, and thus KERNEL_DEVMEM
.
arping
is not required by k3screenctrl. Probably @Hill-98 knows it better?
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.
He is not a coder either
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.
arping is the device I use to determine if the device connected to the router is online so that it is displayed on the fifth page of the screen. Specific actions: A shell script monitors the DHCP list every minute, then uses arping to test whether these devices can communicate, and if so, the device is online. I know this is a stupid way, I am not a professional developer, if you have a better way to replace it, or use the ping command, and do not need arping.
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.
Associated file: /lib/k3screenctrldevice_online.sh
rm -f /etc/uci-defaults/k3screenctrl | ||
fi | ||
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache | ||
fi |
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.
what are you doing here?
Please explain this in a comment
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.
This part is made by @Hill-98 aka ZhongLuFan lufanzhong@gmail.com , maybe we can refer to the origin work by updateing: https://github.com/updateing/k3screenctrl
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.
This is a stupid code, you can delete it, in fact it is dispensable.
@@ -244,6 +244,13 @@ define Device/linksys-ea9500 | |||
endef | |||
# TARGET_DEVICES += linksys-ea9500 | |||
|
|||
define Device/phicomm-k3 | |||
DEVICE_TITLE := PHICOMM K3 | |||
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) phicommk3-screenctrl phicommk3-firmware |
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.
Probably you should define something like this somewhere:
BRCMFMAC_4366C0 := $(IEEE8021X) kmod-brcmfmac phicommk3-firmware
Then phicommk3-firmware should have a more generic name.
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 can do this part.- -
@hauke How can i split this to two commit, |
@reee the bcm53xx maintainer does not use github. please post the patch to the mailing list if you would like to get it merged. Thanks ! |
适应最新的18.06补丁,大侠放出来啊? |
@reee Hi, could you send this PR to Openwrt's mailing list: git.openwrt.org so that the merged Openwrt would officially support K3 ? |
bcm53xx: Add initial support for PHICOMM K3
Specification:
The router has a small LCD and 3 capactive keys driven by a PIC microcontroller, which is in turn wired to UART1 of main board. The LCD and the keys is supported by the package phicommk3-screenctrl
The phicommk3-firmware package contains binary firmware from other router which is for the wireless chip, If it is not allowed by openwrt , we can drop it.
Flash instruction:
For firmware version: V21.4.31.212、V21.4.33.217、V21.5.37.246, You can flash a special rom made by Tian Hao haotia@gmail.com:lede-bcm53xx-phicomm-k3-squashfs-factory-20170504.bin
Link: https://pan.baidu.com/s/1slKzrFv Password: j1bm
Mirror: https://drive.google.com/open?id=1jBCiIRNCg3cjhEKYCwzOQFeXrT_iABhq
Then flash the rom we made.
For firmware greater than those versions ,say: V21.6.11.58, You have to downgrade the firmware first:
Manually flash this rom: K3_V21.6.11.58P Link Password: ksxp | Mirror
Then flash an old firmware, say K3_V21.5.37.246 Link Password: xmrh | Mirror
Other Flash method can refer to this site: http://omugxug28.bkt.clouddn.com/posts/0101-k3.html
Known Bugs:
The main work is done by Tian Hao haotia@gmail.com
And other works from ZhongLuFan lufanzhong@gmail.com and Leanv@mujj.us
Signed-off-by: Hong Zhang zong777@gmail.com