summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2012-02-02 16:02:48 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2012-02-02 16:02:48 +0100
commit84babf1c1a5fb26d56ee5c534b2ac2c3f9825af2 (patch)
tree0bff51e19d8d2eda88ace7c4fedb0e5ec3b3ddea /boot
parentdfa93b47f721c4161dcb782cd48cb2fb52493d73 (diff)
lpc32xxcdl: fix patch step
The lpc32xxcdl files have dos newlines, which our patch infrastructure doesn't handle. Work around it by converting the affected files to unix newlines before patching. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'boot')
-rw-r--r--boot/lpc32xxcdl/lpc32xxcdl.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/boot/lpc32xxcdl/lpc32xxcdl.mk b/boot/lpc32xxcdl/lpc32xxcdl.mk
index 80f3493a2..d11be6cf2 100644
--- a/boot/lpc32xxcdl/lpc32xxcdl.mk
+++ b/boot/lpc32xxcdl/lpc32xxcdl.mk
@@ -42,6 +42,16 @@ LPC32XXCDL_BUILD_FLAGS = \
LPC32XXCDL_BOARD_STARTUP_DIR = \
csps/lpc32xx/bsps/$(BR2_TARGET_LPC32XXCDL_BOARDNAME)/startup/examples/
+# Source files are with dos newlines, which our patch infrastructure doesn't
+# handle. Work around it by converting the affected files to unix newlines
+# before patching
+define LPC32XXCDL_DOS2UNIX_FOR_PATCH
+ sed -n 's|^[+-]\{3\} [^/]\+\([^ \t]*\)\(.*\)|$(@D)\1|p' \
+ boot/lpc32xxcdl/*.patch| sort -u | xargs $(SED) 's/\x0D$$//'
+endef
+
+LPC32XXCDL_POST_EXTRACT_HOOKS += LPC32XXCDL_DOS2UNIX_FOR_PATCH
+
define LPC32XXCDL_BUILD_CMDS
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_KICKSTART_BURNER)