There's a security bulletin for Jinja2 v2.10 (CVE-2019-10906). This
wont impact Klipper, but best to upgrade the package requirements to
avoid getting security alerts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Place all of the host software python requirements into a config file.
This makes it easier to update the python requirements without having
to update several installation scripts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Instead of waiting one second after entering bootloader mode, wait for
the device file to reappear. This should make the flashing more
resilient to slight timing difference in the OS.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Avoid transmitting lists of message ids for commands and responses -
gzip doesn't do a good job of compressing them.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Default to running dfu-util via sudo as most machines will not have
the user setup with permissions to access the raw usb device.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a script to help flash Klipper over USB. This tool can instruct
Klipper to enter into bootloader mode and it can help track changes in
device name during that transition.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
These two options don't provide any value and it is causing confustion
with some users. Remove the buttons.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The gitdir previously could be absent and produce a version of "" in
spite of checks for it. Fixed.
Parent directories with shlex-interpreted characters in their names
could be misinterpreted. Removed shlex parsing.
Packagers may want to remove the git history to slim down the package
size, so add an option for using a file 'version' in the klippy
directory to set version without using git.
Signed-Off-By: Lucas Fink <software@lfcode.ca>
Now that there is a local copy of bossac in the lib directory, there's
no reason to require a system version of it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Dockerfile: Add a basic reference Dockerfile
This is a sample of how to get Klipper running in Docker, because of the
virtual serial port, the user will have to modify things to include
something to send the GCode. I have included a link to my repo which has
OctoPrint up and running as an example.
Signed-off-by: Trent Davis <tgh@sillyfrog.com>
No need to include all the test preparation in the verbose output - as
that can make the output more confusing.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The purpose of this PR is to add an installation script to klipper for use on Centos. Several packages names are different from debian based installs, and the system service is handled via systemd rather than LSB.
Signed-off-by: Alan Weinstock <pyroballpcs@gmail.com>
Add virtualenv, build-essential, gcc-arm-none-eabi, and
binutils-arm-none-eabi packages - just in case they aren't already
installed. Reported by @AxMod3DPrint.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The python-dev package is usually already installed, but there's no
harm in stating it explicitly. Reported by @yschroeder.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add --always flag to "git describe" command to get a build identifier
even if one checks out the repo with a depth parameter that prunes out
the last tagged version.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the travis installation steps from the travis-build.sh script to
a new script (scripts/travis-install.sh). Move the travis-build.sh
script to the scripts/ directory as well.
The data dictionaries built in the compile tests are useful during
host software testing, so run all the compile tests sequentially in a
single VM and save the data dictionaries after each build. Also,
build all the config files found in the test/configs/ directory.
Create the python virtualenv environment during the install phase and
invoke the klippy.py host software in the build phase to perform a
basic host software sanity check.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The mcu stats (that contain a prefix) may occur before some other
stats - make sure to only apply the stats prefix to those stats that
need it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The print_stall logic could cause large portions of the graph to show
up as 100% host utilized. Rework the logic to avoid that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use an alpha transparency on each of the stats, so that it is possible
to see how the values overlap.
Also, always enable the "awake time" stat - just use a lower alpha
transparency for it.
Also, explicitly set the graph size as some version of matplotlib have
a different default.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Update the mechanism to filter out cases where buffer_time is below
MAXBUFFER so that it works with the statistics currently generated.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Matplotlib will try to open a display by default - tell it not to do
that so that it can run in batch mode on headless machines.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Store the gcc and binutils versions used in the compilation of the
firmware in the firmware data dictionary. Forward that information to
the log so it is available during debugging.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add initial support for extracting out shutdown information from a
klippy.log file. The shutdown dump will be reordered into the
sequence that they occurred, and timestamps/sequence numbers in the
mcu message dump will be expanded.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Update the graphstats.py graphing script so that it works with recent
stats changes - the stats can now contain groups that end with a ':'
and the print_time is no longer reset to zero on a new print.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Make sure the ADC module gets loaded during startup - it's normally
loaded by the cape manager eeprom, but there's no harm in requesting
it explicitly.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It appears some versions of Debian will load the PRU with firmware on
boot, so make sure to always deactivate the PRU before attempting to
activate it with new firmware.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Update the scripts used to install and "flash" the pru
micro-controller code. Also, add a "flash" script for the linux
micro-controller code. This makes it easier to install Klipper on a
Beaglebone board that uses a Replicape.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that tasks are only run when needed it's common for there to be a
larger variation in task execution time. When graphing load, consider
a 99-percentile task duration of 2.5ms to be 100% loaded (up from
1ms).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>