aboutsummaryrefslogtreecommitdiffstats
path: root/src/linux/main.c
Commit message (Collapse)AuthorAgeFilesLines
* linux: Don't use absolute paths for includeMichael 'ASAP' Weinrich2024-04-031-1/+1
| | | | | | | | Not all systems (i.e. Nix) repect the standard Linux filesystem hierarchy, instead relative paths should be used and allowing GCC to rely on it's builtin search paths. Signed-off-by: Michael 'ASAP' Weinrich <michael@a5ap.net>
* linux: Lock Memory and Increase Priority (#6131)Dr. Matthew Swabey2023-03-271-2/+9
| | | | | | | | | | | | | | | | | Realtime programming best practice is to lock realtime code memory to prevent paging which will lead to unbounded latencies. The Linux MCU process has well bounded memory and small RAM footprint so locking the entire process' RAM has no downsides and will improve behavior when the system comes under memory pressure. (See bootlin training and Linux Foundation documentation linked below.) RT process priority ranges from 0-99 (although POSIX only requires 32), boost MCU process priority to half the max/2 to improve robustness when the system comes under pressure from other RT Kernel or user processes. Reference links: bootlin: https://bootlin.com/doc/training/preempt-rt/preempt-rt-slides.pdf Linux Foundation: https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/application_base#howto_build_a_simple_rt_application Signed-off-by: Matthew Swabey <matthew@swabey.org>
* linux: add -I attribute for user defined socket pathsStefan Dej2023-01-171-3/+7
| | | | Signed-off-by: Stefan Dej <meteyou@gmail.com>
* command: Always pass a string to the DECL_CONSTANT() macroKevin O'Connor2019-03-171-1/+1
| | | | | | | | Make it clear that the name of the constant being defined is a string. When the value being defined is also a string, use a new DECL_CONSTANT_STR() macro. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Fix typo causing config_reset to not fully restartKevin O'Connor2017-10-151-1/+1
| | | | | | A typo in the code caused the wrong config_reset code to be run. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Open watchdog device after consoleKevin O'Connor2017-10-151-7/+5
| | | | | | | | Only open the watchdog device after the console has been opened. The machine should not reboot in the unlikely event the console can't be opened. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Initial support for running Klipper in a Linux real-time processKevin O'Connor2017-09-201-0/+99
Add support for compiling the Klipper micro-controller code as a real-time process capable of running on standard Linux systems. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>