-
Notifications
You must be signed in to change notification settings - Fork 16
Led config for Horaco ZX-SG4T2 and Optfocus OFS-XF2GT4 #44
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
base: main
Are you sure you want to change the base?
Conversation
|
@daniel-dona thank you contribution. |
|
Maybe for now you could introduce a define in rtl837x_common.h with a board name (say MACHINE_HORACO_ZX_SG4T2) and then compile the led functions accordingly, plus set e.g. the number of SFP ports. There is no need to solve the issue with the boards at this point once and for all. Maybe introduce a define with MACHINE_DEFAULT_4C_2SFP (C for copper) or MACHINE_DEFAULT_8C_1SFP so that the other devices are still supported. This is how it is done in OpenWRT, just that they have a build system that creates all the images at once. |
|
I am fine with the hardware defines. |
|
I tried this PR with the HiSource K0402WS-V3.0 - and the LEDs are working properly with this config. |
I think that is currently the easiest way - at least we will have all the configs in one place, it can be refactored later. How about generic macro |
My previous comment was before the introduction of the machine.h file with the MACHINE defines and machine.c with the respective configuration structures. So one can now re-use these macro definitions for the LEDs, but in addition it would be really cool to have the LED definitions, or if that does not work, the LED setup in the machine.c file, based on the MACHINE macro being defined. Also, the macro definition in machine.h is not really ideal, as it makes building for the different devices difficult (the file is in git, so git will unnecessarily track that you are compiling for a different machine). The better solution as suggested by @vDorst would be to give the machine as a define to make. |
|
Crap, missed the dates! Somehow I though this is new attempt! Sorry! |
Register values taken from the original firmware, tested on the hardware and work as expected.
What's the plan for managing different hardware versions? Some board definition?