diff mbox

[Xen-devel,OSSTEST,v2,19/20] Osstest/Debian: Add 0x prefix to $filesize

Message ID 1414579302-6692-19-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell Oct. 29, 2014, 10:41 a.m. UTC
$filesize is an unprefixed hex number, but fdt set requires the 0x to interpret
it properly.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch, previously included in "Osstest/Debian: Workaround oddities in
    the u-boot script parser.". Note that the oddities with requiring a space
    before the ">" is no longer reproducible with the latest u-boot.
---
 Osstest/Debian.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ian Jackson Oct. 29, 2014, 4:40 p.m. UTC | #1
Ian Campbell writes ("[PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize"):
> $filesize is an unprefixed hex number, but fdt set requires the 0x
> to interpret it properly.

What will happen if they fix u-boot ?

Ian.
Ian Campbell Oct. 30, 2014, 2:01 p.m. UTC | #2
On Wed, 2014-10-29 at 16:40 +0000, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize"):
> > $filesize is an unprefixed hex number, but fdt set requires the 0x
> > to interpret it properly.
> 
> What will happen if they fix u-boot ?

I've sent http://lists.denx.de/pipermail/u-boot/2014-October/193622.html

Lets see where they consider the bug to be (if anywhere)

Ian.
Ian Campbell Oct. 30, 2014, 2:22 p.m. UTC | #3
On Thu, 2014-10-30 at 14:01 +0000, Ian Campbell wrote:
> On Wed, 2014-10-29 at 16:40 +0000, Ian Jackson wrote:
> > Ian Campbell writes ("[PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize"):
> > > $filesize is an unprefixed hex number, but fdt set requires the 0x
> > > to interpret it properly.
> > 
> > What will happen if they fix u-boot ?
> 
> I've sent http://lists.denx.de/pipermail/u-boot/2014-October/193622.html
> 
> Lets see where they consider the bug to be (if anywhere)

In the meantime I've added this URL to the commit message.
Ian Jackson Oct. 30, 2014, 2:49 p.m. UTC | #4
Ian Campbell writes ("Re: [PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize"):
> On Wed, 2014-10-29 at 16:40 +0000, Ian Jackson wrote:
> > Ian Campbell writes ("[PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize"):
> > > $filesize is an unprefixed hex number, but fdt set requires the 0x
> > > to interpret it properly.
> > 
> > What will happen if they fix u-boot ?
> 
> I've sent http://lists.denx.de/pipermail/u-boot/2014-October/193622.html
> 
> Lets see where they consider the bug to be (if anywhere)

Right.

I'm a bit worried that if they fix this by making the value contain a
0x at the start, it will break your workaround.

Ian.
Ian Campbell Oct. 30, 2014, 2:51 p.m. UTC | #5
On Thu, 2014-10-30 at 14:49 +0000, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize"):
> > On Wed, 2014-10-29 at 16:40 +0000, Ian Jackson wrote:
> > > Ian Campbell writes ("[PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize"):
> > > > $filesize is an unprefixed hex number, but fdt set requires the 0x
> > > > to interpret it properly.
> > > 
> > > What will happen if they fix u-boot ?
> > 
> > I've sent http://lists.denx.de/pipermail/u-boot/2014-October/193622.html
> > 
> > Lets see where they consider the bug to be (if anywhere)
> 
> Right.
> 
> I'm a bit worried that if they fix this by making the value contain a
> 0x at the start, it will break your workaround.

Right.

Note that updating u-boot on these boards requires someone to actually
go and reflash them, we don't do it as part of each test run for
example.

Ian.
Ian Jackson Oct. 30, 2014, 2:54 p.m. UTC | #6
Ian Campbell writes ("Re: [PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize"):
> Note that updating u-boot on these boards requires someone to actually
> go and reflash them, we don't do it as part of each test run for
> example.

Ah, OK, that makes it less of a potential annoyance.

Ian.
Ian Campbell Oct. 30, 2014, 3:03 p.m. UTC | #7
On Thu, 2014-10-30 at 14:54 +0000, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST v2 19/20] Osstest/Debian: Add 0x prefix to $filesize"):
> > Note that updating u-boot on these boards requires someone to actually
> > go and reflash them, we don't do it as part of each test run for
> > example.
> 
> Ah, OK, that makes it less of a potential annoyance.

Or at least a controlled annoyance which we'll have brought onto
ourselves at the time of our choosing ;-)
diff mbox

Patch

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index eb7464c..9d105b1 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -170,7 +170,7 @@  echo command line: \\\${bootargs}
 ext2load scsi 0 \\\${kernel_addr_r} $kern
 fdt mknod /chosen module\@0
 fdt set /chosen/module\@0 compatible "xen,linux-zimage" "xen,multiboot-module"
-fdt set /chosen/module\@0 reg <\\\${kernel_addr_r} \\\${filesize}>
+fdt set /chosen/module\@0 reg <\\\${kernel_addr_r} 0x\\\${filesize}>
 fdt set /chosen/module\@0 bootargs "$xenkopt ro root=$root clk_ignore_unused"
 echo Loaded $kern to \\\${kernel_addr_r} (\\\${filesize})
 echo command line: $xenkopt ro root=$root
@@ -178,7 +178,7 @@  echo command line: $xenkopt ro root=$root
 ext2load scsi 0 \\\${ramdisk_addr_r} $initrd
 fdt mknod /chosen module\@1
 fdt set /chosen/module\@1 compatible "xen,linux-initrd" "xen,multiboot-module"
-fdt set /chosen/module\@1 reg <\\\${ramdisk_addr_r} \\\${filesize}>
+fdt set /chosen/module\@1 reg <\\\${ramdisk_addr_r} 0x\\\${filesize}>
 echo Loaded $initrd to \\\${ramdisk_addr_r} (\\\${filesize})
 
 fdt print /chosen