From 38e90ab0d9110d3ede39c70e27961b833813a7d4 Mon Sep 17 00:00:00 2001 From: Neil Chen Date: Wed, 2 Apr 2014 15:38:09 +0800 Subject: [PATCH] nyan*: Fix unexpected symbol (CR) when converting DOS-formatted BCT config. There are some unexpected symbol at the end of each line in the generated .inc file when the config file is DOS format (CR+LF). Modify cfg2inc to support DOS format cfg file. BUG=chrome-os-partner:27614 TEST=sudo cfg2inc.sh XXX.cfg # make a expected inc file BRANCH=nyan Signed-off-by: Neil Chen Change-Id: I68b0f4b3805fcb5a6b633653c95afbafcb880a93 Reviewed-on: https://chromium-review.googlesource.com/192697 Tested-by: Neil Chen Reviewed-by: Hung-Te Lin Commit-Queue: Neil Chen --- src/mainboard/google/nyan/bct/cfg2inc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainboard/google/nyan/bct/cfg2inc.sh b/src/mainboard/google/nyan/bct/cfg2inc.sh index 6d0c7a8eaf..a9c629b523 100755 --- a/src/mainboard/google/nyan/bct/cfg2inc.sh +++ b/src/mainboard/google/nyan/bct/cfg2inc.sh @@ -23,7 +23,7 @@ bct_cfg2inc() { echo "{ /* generated from ${in_file}; do not edit. */" >"${out_file}" # Note currently we can only handle DDR3 type memory, even in C # implementation. - sed "/^#.*$/d; s/^SDRAM.0./ /; s/;$/,/;" \ + sed "/^#.*$/d; s/^SDRAM.0./ /; s/\r$//; s/;$/,/;" \ "${in_file}" >> "${out_file}" echo "}," >>"${out_file}" }