apollo80 / wireless-klipper

Firmware for MKS Robin WiFi (esp8266) - organizing a klipper <-> wifi <-> mcu bridge
GNU General Public License v3.0
21 stars 2 forks source link

Klipper source code patching guide #1

Closed moookino closed 1 year ago

moookino commented 1 year ago

hi @apollo80

Can you share how to apply patch to Klipper source code?

apollo80 commented 1 year ago

Hi. It's simple enough. That's why I didn't write about it. Just copy the data/klipper-wifi-enable.patch file to the root of klipper's sources and run the command:

patch -p1 -i klipper-wifi-enable.patch

In general, it will look like this:

<login>@<hostname>:~/tmp$ git clone https://github.com/Klipper3d/klipper
...
<login>@<hostname>:~/tmp$ git clone https://github.com/apollo80/wireless-klipper
...
<login>@<hostname>:~/tmp$ cp wireless-klipper/data/klipper-wifi-enable.patch klipper/
<login>@<hostname>:~/tmp$ cd klipper/
<login>@<hostname>:~/tmp/klipper$ patch -p1 -i klipper-wifi-enable.patch 
patching file src/stm32/serial.c
<login>@<hostname>:~/tmp/klipper$ 
moookino commented 1 year ago

Thanks for explanation :)