Re: [U-Boot] [PATCH] mkimage: Fix generating multi and script images again

2015-12-07 Thread Philippe De Swert
Hi, On 07/12/15 21:06, Tom Rini wrote: On Mon, Dec 07, 2015 at 06:01:54PM +0100, Marek Vasut wrote: Seems 6ae6e160 broke creating multi and script type images and even building of mkimage itself. There are two problems with that patch. First is that expression (!(x == 0) || !(x == 1)) is alwa

Re: [U-Boot] [PATCH] mkimage: Fix generating multi and script images again

2015-12-07 Thread Tom Rini
On Mon, Dec 07, 2015 at 06:01:54PM +0100, Marek Vasut wrote: > Seems 6ae6e160 broke creating multi and script type images and even > building of mkimage itself. There are two problems with that patch. > > First is that expression (!(x == 0) || !(x == 1)) is always true for > unsigned int x. The e

Re: [U-Boot] [PATCH] mkimage: Fix generating multi and script images again

2015-12-07 Thread Philippe De Swert
Hi, I haven't had time to check the previous report yet. On 07/12/15 19:01, Marek Vasut wrote: Seems 6ae6e160 broke creating multi and script type images and even building of mkimage itself. There are two problems with that patch. First is that expression (!(x == 0) || !(x == 1)) is always tru

Re: [U-Boot] [PATCH] mkimage : Fix generating multi and script images

2015-12-07 Thread Philippe De Swert
Hi Simon, On 07/12/15 06:31, Simon Glass wrote: - dfd = open(params.datafile, O_RDONLY | O_BINARY); - if (dfd < 0) { - fprintf(stderr, "%s: Can't open %s: %s\n", - params.cmdname, params.datafile, strerror(errno)); - exit(EXIT_FAILUR

Re: [U-Boot] [PATCH] mkimage: Fix generating multi and script images again

2015-12-07 Thread Marek Vasut
On Monday, December 07, 2015 at 06:47:36 PM, Wolfgang Denk wrote: > Dear Marek, > > In message <1449507714-9599-1-git-send-email-ma...@denx.de> you wrote: > > Second is the coding which causes gcc 4.9.x and newer scream gruesome > > death and murder. The expression !x == 0 && !x == 1 is ambiguous

Re: [U-Boot] [PATCH] mkimage: Fix generating multi and script images again

2015-12-07 Thread Tom Rini
On Mon, Dec 07, 2015 at 06:47:36PM +0100, Wolfgang Denk wrote: > Dear Marek, > > In message <1449507714-9599-1-git-send-email-ma...@denx.de> you wrote: > > > > Second is the coding which causes gcc 4.9.x and newer scream gruesome > > death and murder. The expression !x == 0 && !x == 1 is ambiguou

Re: [U-Boot] [PATCH] mkimage: Fix generating multi and script images again

2015-12-07 Thread Wolfgang Denk
Dear Marek, In message <1449507714-9599-1-git-send-email-ma...@denx.de> you wrote: > > Second is the coding which causes gcc 4.9.x and newer scream gruesome > death and murder. The expression !x == 0 && !x == 1 is ambiguous and > should instead be rewritten into (x != 0) && (x != 1) to be correct

Re: [U-Boot] [PATCH] mkimage: Fix generating multi and script images again

2015-12-07 Thread Marek Vasut
On Monday, December 07, 2015 at 06:18:02 PM, Philippe De Swert wrote: > Hi, > > I haven't had time to check the previous report yet. > > On 07/12/15 19:01, Marek Vasut wrote: > > Seems 6ae6e160 broke creating multi and script type images and even > > building of mkimage itself. There are two prob

[U-Boot] [PATCH] mkimage: Fix generating multi and script images again

2015-12-07 Thread Marek Vasut
Seems 6ae6e160 broke creating multi and script type images and even building of mkimage itself. There are two problems with that patch. First is that expression (!(x == 0) || !(x == 1)) is always true for unsigned int x. The expression must use AND (&&) not OR (||) to be correct. Second is the co

Re: [U-Boot] [PATCH] mkimage : Fix generating multi and script images

2015-12-07 Thread Simon Glass
Hi Philippe, On 7 December 2015 at 01:02, Philippe De Swert wrote: > Hi Simon, > > On 07/12/15 06:31, Simon Glass wrote: > > > - dfd = open(params.datafile, O_RDONLY | O_BINARY); > - if (dfd < 0) { > - fprintf(stderr, "%s: Can't open %s: %s\n", > -

Re: [U-Boot] [PATCH] mkimage : Fix generating multi and script images

2015-12-06 Thread Simon Glass
Hi Philippe, On 3 December 2015 at 14:11, Philippe De Swert wrote: > Seems 92a655c3 broke creating multi and script type images. > Since the file1:file2:file3 string does not get split up, > it fails on trying to open an non-existing file. > > mkimage -A arm -O linux -T multi -C none -d zImage:sp

[U-Boot] [PATCH] mkimage : Fix generating multi and script images

2015-12-03 Thread Philippe De Swert
Seems 92a655c3 broke creating multi and script type images. Since the file1:file2:file3 string does not get split up, it fails on trying to open an non-existing file. mkimage -A arm -O linux -T multi -C none -d zImage:splash.bmp:device.dtb uimage tools/mkimage: Can't open zImage:splash.bmp:device