diff mbox

[Xen-devel,RFC,OSSTEST,05/19] ts-host-install: Add fdtdir to PXE stanza if dtbs directory exists

Message ID 1412942554-752-5-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell Oct. 10, 2014, 12:02 p.m. UTC
u-boot's pxe client uses this together with $fdtfile in its local environment
to automatically load the fdt when pxe booting.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ts-host-install | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ian Jackson Oct. 10, 2014, 2:01 p.m. UTC | #1
Ian Campbell writes ("[PATCH RFC OSSTEST 05/19] ts-host-install: Add fdtdir to PXE stanza if dtbs directory exists"):
> u-boot's pxe client uses this together with $fdtfile in its local environment
> to automatically load the fdt when pxe booting.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Although, bikeshedding,

> +    my $dtbs = "fdtdir /$d_i/dtbs" if
> +	-e "$ho->{Tftp}{Path}/$d_i/dtbs";
> +

the if at the end of the line strikes me as a slightly odd style.
There are many fewer of those in the codebase right now than places
where it's on the start and the next line.

Ian.
Ian Campbell Oct. 10, 2014, 2:08 p.m. UTC | #2
On Fri, 2014-10-10 at 15:01 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH RFC OSSTEST 05/19] ts-host-install: Add fdtdir to PXE stanza if dtbs directory exists"):
> > u-boot's pxe client uses this together with $fdtfile in its local environment
> > to automatically load the fdt when pxe booting.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> Although, bikeshedding,
> 
> > +    my $dtbs = "fdtdir /$d_i/dtbs" if
> > +	-e "$ho->{Tftp}{Path}/$d_i/dtbs";
> > +
> 
> the if at the end of the line strikes me as a slightly odd style.
> There are many fewer of those in the codebase right now than places
> where it's on the start and the next line.

Yes, in fact I would naturally have done it the other way, I suppose I
wasn't paying close enough attention to my fingers...

> 
> Ian.
diff mbox

Patch

diff --git a/ts-host-install b/ts-host-install
index 95ce845..ca26f95 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -188,6 +188,9 @@  SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="$ho->{Ether}", A
 END
     }
 
+    my $dtbs = "fdtdir /$d_i/dtbs" if
+	-e "$ho->{Tftp}{Path}/$d_i/dtbs";
+
     file_simple_write_contents("$initrd_overlay.cpio", sub {
         contents_make_cpio($_[0], 'newc', "$initrd_overlay.d");
     });
@@ -222,6 +225,7 @@  label overwrite
 	kernel $kernel
 	append $installcmdline
 	ipappend $ipappend
+	$dtbs
 default overwrite
 END
 }