[U-Boot] [PATCH]v2: Fixed lineendings in tools/img2brec.sh

Niklaus Giger niklaus.giger at member.fsf.org
Sat Nov 1 10:41:06 CET 2008


Am Freitag 31 Oktober 2008 00.23:32 schrieb Wolfgang Denk:
> Dear Niklaus Giger,
>
> In message <200810231231.15846.niklaus.giger at 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



More information about the U-Boot mailing list