From: Niklaus Giger Date: Sat, 1 Nov 2008 10:41:06 +0100 Subject: [U-Boot] [PATCH]v2: Fixed lineendings in tools/img2brec.sh In-Reply-To: <20081030232332.67EDD8522296@gemini.denx.de> References: <200810231231.15846.niklaus.giger@member.fsf.org> <20081030232332.67EDD8522296@gemini.denx.de> Message-ID: <200811011041.06641.niklaus.giger@member.fsf.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Freitag 31 Oktober 2008 00.23:32 schrieb Wolfgang Denk: > Dear Niklaus Giger, > > In message <200810231231.15846.niklaus.giger@member.fsf.org> you wrote: > > This time I took a closer look at img2brec.sh. My conclusions are > > img2brec.sh was done for development under Windows (probably cygwin), as > > it uses a command filesize which is not available as such under Unix. > > Therefore I replaced with a functional equivalent (wc --bytes) which > > should also work under cygwin (not tested). > > I modified the script to git also rid of extra \M (LF) caracters in the > > output. Now the outputfile on my Debian system after calling > > tools/img2brec.sh u-boot.bin [u-boot.brec] > > looks fine. > > Hm.... but the \r\n sequences are probably intentional because theyu > are needed on Win* systems? I think they were needed in previous versions of Cygwin. Also often programs transforrm automatically \n into \l\n sequences. Also if the destination program does not handle correctly Unix-linefeed one would have to add something like unix2dos into the shell. Also cygwin has a variety of options whether mount points automatically transform textfiles from/to Unix to MS/DOS-format. Therefore I cannot perform tests a Win* systems. Do you now of any user of this batch who could answer these question? > Best regards, > > Wolfgang Denk Best regards Niklaus Giger