NordicSemiconductor / Nordic-Thingy52-FW

Nordic Thingy:52 software development kit. This kit is designed to assist users in developing their own custom firmware for Thingy. Please see http://www.nordicsemi.com/thingy for the latest news and software releases.
Other
210 stars 133 forks source link

Linux install: problems patching Nordic SDK #6

Closed pabigot closed 7 years ago

pabigot commented 7 years ago

When installing on a Linux system setup_sdk.sh fails with these errors because the SDK uses DOS EOL but the Thingy52 diff comes out of git with Unix EOL:

patching file components/ble/ble_services/ble_dfu/ble_dfu.c
Hunk #1 FAILED at 88 (different line endings).
Hunk #2 FAILED at 99 (different line endings).
Hunk #3 FAILED at 128 (different line endings).
Hunk #4 FAILED at 141 (different line endings).
4 out of 4 hunks FAILED -- saving rejects to file components/ble/ble_services/ble_dfu/ble_dfu.c.rej
patching file components/ble/ble_services/ble_dfu/ble_dfu.h
// many lines removed
patching file external/segger_rtt/SEGGER_RTT.h
Hunk #1 FAILED at 159 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file external/segger_rtt/SEGGER_RTT.h.rej

Since upstream patch has only recently been asked to fix this particular line feed combination I worked around it by running:

unix2dos external/sdk_12.1.diff

before sh setup_sdk.sh.

jorgenmk commented 7 years ago

Hi and thanks for reporting! I added .gitattributes which should force that file to always have CRLF endings. Tested and working on my Ubuntu VM, please report back if not resolved on your side.