All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] cmd: pxe: add support for FDT overlays
@ 2021-01-04 14:33 Neil Armstrong
  2021-01-04 14:41 ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Neil Armstrong @ 2021-01-04 14:33 UTC (permalink / raw)
  To: u-boot

This adds support for specifying FDT overlays in an extlinux/pxelinux
configuration file.

Without this, there is no simple way to apply overlays when the kernel
and fdt is loaded by the pxe command.

This change adds the 'fdtoverlays' keyword for a label, supporting multiple
overlay files to be applied on top of the fdt specified in the 'fdt' or
'devicetree' keyword.

Example:
  label linux
    kernel /Image
    devicetree /soc-board.dtb
    fdtoverlays /soc-board-function.dtbo
    append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait

This code makes usage of a new variable called fdtoverlay_addr_r used to load
the overlay files without overwritting anything important.

Cc: Tom Rini <trini@konsulko.com>
Cc: Andre Heider <a.heider@gmail.com>
Cc: Jernej ?krabec <jernej.skrabec@siol.net>
Cc: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
Hi Tom,

This is repost of my last year's attempt.
It fills a hole to allow loading FDT overlays using PXE/Extlinux without
using FIT.

V2 adds documentation.

Neil


 cmd/pxe_utils.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++
 cmd/pxe_utils.h |   1 +
 doc/README.pxe  |   9 +++++
 3 files changed, 113 insertions(+)

diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index 8716e782f6..25367190a7 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -13,6 +13,8 @@
 #include <mapmem.h>
 #include <lcd.h>
 #include <net.h>
+#include <fdt_support.h>
+#include <linux/libfdt.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
 #include <errno.h>
@@ -284,6 +286,9 @@ static void label_destroy(struct pxe_label *label)
 	if (label->fdtdir)
 		free(label->fdtdir);
 
+	if (label->fdtoverlays)
+		free(label->fdtoverlays);
+
 	free(label);
 }
 
@@ -331,6 +336,92 @@ static int label_localboot(struct pxe_label *label)
 	return run_command_list(localcmd, strlen(localcmd), 0);
 }
 
+/*
+ * Loads fdt overlays specified in 'fdtoverlays'.
+ */
+#ifdef CONFIG_OF_LIBFDT_OVERLAY
+static void label_boot_fdtoverlay(struct cmd_tbl *cmdtp, struct pxe_label *label)
+{
+	char *fdtoverlay = label->fdtoverlays;
+	struct fdt_header *working_fdt;
+	char *fdtoverlay_addr_env;
+	ulong fdtoverlay_addr;
+	ulong fdt_addr;
+	int err;
+
+	/* Get the main fdt and map it */
+	fdt_addr = simple_strtoul(env_get("fdt_addr_r"), NULL, 16);
+	working_fdt = map_sysmem(fdt_addr, 0);
+	err = fdt_check_header(working_fdt);
+	if (err)
+		return;
+
+	/* Get the specific overlay loading address */
+	fdtoverlay_addr_env = env_get("fdtoverlay_addr_r");
+	if (!fdtoverlay_addr_env) {
+		printf("Invalid fdtoverlay_addr_r for loading overlays\n");
+		return;
+	}
+
+	fdtoverlay_addr = simple_strtoul(fdtoverlay_addr_env, NULL, 16);
+
+	/* Cycle over the overlay files and apply them in order */
+	do {
+		struct fdt_header *blob;
+		char *overlayfile;
+		char *end;
+		int len;
+
+		/* Drop leading spaces */
+		while (*fdtoverlay == ' ')
+			++fdtoverlay;
+
+		/* Copy a single filename if multiple provided */
+		end = strstr(fdtoverlay, " ");
+		if (end) {
+			len = (int)(end - fdtoverlay);
+			overlayfile = malloc(len + 1);
+			strncpy(overlayfile, fdtoverlay, len);
+			overlayfile[len] = '\0';
+		} else
+			overlayfile = fdtoverlay;
+
+		if (!strlen(overlayfile))
+			goto skip_overlay;
+
+		/* Load overlay file */
+		err = get_relfile_envaddr(cmdtp, overlayfile,
+					  "fdtoverlay_addr_r");
+		if (err < 0) {
+			printf("Failed loading overlay %s\n", overlayfile);
+			goto skip_overlay;
+		}
+
+		/* Resize main fdt */
+		fdt_shrink_to_minimum(working_fdt, 8192);
+
+		blob = map_sysmem(fdtoverlay_addr, 0);
+		err = fdt_check_header(blob);
+		if (err) {
+			printf("Invalid overlay %s, skipping\n",
+			       overlayfile);
+			goto skip_overlay;
+		}
+
+		err = fdt_overlay_apply_verbose(working_fdt, blob);
+		if (err) {
+			printf("Failed to apply overlay %s, skipping\n",
+			       overlayfile);
+			goto skip_overlay;
+		}
+
+skip_overlay:
+		if (end)
+			free(overlayfile);
+	} while ((fdtoverlay = strstr(fdtoverlay, " ")));
+}
+#endif
+
 /*
  * Boot according to the contents of a pxe_label.
  *
@@ -525,6 +616,11 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label)
 				       label->name);
 				goto cleanup;
 			}
+
+#ifdef CONFIG_OF_LIBFDT_OVERLAY
+			if (label->fdtoverlays)
+				label_boot_fdtoverlay(cmdtp, label);
+#endif
 		} else {
 			bootm_argv[3] = NULL;
 		}
@@ -582,6 +678,7 @@ enum token_type {
 	T_INCLUDE,
 	T_FDT,
 	T_FDTDIR,
+	T_FDTOVERLAYS,
 	T_ONTIMEOUT,
 	T_IPAPPEND,
 	T_BACKGROUND,
@@ -616,6 +713,7 @@ static const struct token keywords[] = {
 	{"fdt", T_FDT},
 	{"devicetreedir", T_FDTDIR},
 	{"fdtdir", T_FDTDIR},
+	{"fdtoverlays", T_FDTOVERLAYS},
 	{"ontimeout", T_ONTIMEOUT,},
 	{"ipappend", T_IPAPPEND,},
 	{"background", T_BACKGROUND,},
@@ -1048,6 +1146,11 @@ static int parse_label(char **c, struct pxe_menu *cfg)
 				err = parse_sliteral(c, &label->fdtdir);
 			break;
 
+		case T_FDTOVERLAYS:
+			if (!label->fdtoverlays)
+				err = parse_sliteral(c, &label->fdtoverlays);
+			break;
+
 		case T_LOCALBOOT:
 			label->localboot = 1;
 			err = parse_integer(c, &label->localboot_val);
diff --git a/cmd/pxe_utils.h b/cmd/pxe_utils.h
index 77d2588875..6af9523734 100644
--- a/cmd/pxe_utils.h
+++ b/cmd/pxe_utils.h
@@ -43,6 +43,7 @@ struct pxe_label {
 	char *initrd;
 	char *fdt;
 	char *fdtdir;
+	char *fdtoverlays;
 	int ipappend;
 	int attempted;
 	int localboot;
diff --git a/doc/README.pxe b/doc/README.pxe
index 42f913c61f..352415b581 100644
--- a/doc/README.pxe
+++ b/doc/README.pxe
@@ -89,6 +89,9 @@ pxe boot
      fdt_addr - the location of a fdt blob. 'fdt_addr' will be passed to bootm
      command if it is set and 'fdt_addr_r' is not passed to bootm command.
 
+     fdtoverlay_addr_r - location in RAM at which 'pxe boot' will temporarily store
+     fdt overlay(s) before applying them to the fdt blob stored at 'fdt_addr_r'.
+
 pxe file format
 ===============
 The pxe file format is nearly a subset of the PXELINUX file format; see
@@ -148,6 +151,12 @@ kernel <path>	    - if this label is chosen, use tftp to retrieve the kernel
 		      It useful for overlay selection in pxe file
 		      (see: doc/uImage.FIT/overlay-fdt-boot.txt)
 
+fdtoverlays <path> [...] - if this label is chosen, use tftp to retrieve the DT
+                      overlay(s) at <path>. it will temporarily stored at the
+                      address indicated in the fdtoverlay_addr_r environment variable,
+                      and then applied in the load order to the fdt blob stored at the
+                      address indicated in the fdt_addr_r environment variable.
+
 append <string>	    - use <string> as the kernel command line when booting this
 		      label.
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2] cmd: pxe: add support for FDT overlays
  2021-01-04 14:33 [PATCH v2] cmd: pxe: add support for FDT overlays Neil Armstrong
@ 2021-01-04 14:41 ` Tom Rini
  2021-01-04 16:21   ` Jernej Škrabec
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2021-01-04 14:41 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 04, 2021 at 03:33:43PM +0100, Neil Armstrong wrote:
> This adds support for specifying FDT overlays in an extlinux/pxelinux
> configuration file.
> 
> Without this, there is no simple way to apply overlays when the kernel
> and fdt is loaded by the pxe command.
> 
> This change adds the 'fdtoverlays' keyword for a label, supporting multiple
> overlay files to be applied on top of the fdt specified in the 'fdt' or
> 'devicetree' keyword.
> 
> Example:
>   label linux
>     kernel /Image
>     devicetree /soc-board.dtb
>     fdtoverlays /soc-board-function.dtbo
>     append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
> 
> This code makes usage of a new variable called fdtoverlay_addr_r used to load
> the overlay files without overwritting anything important.
> 
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Andre Heider <a.heider@gmail.com>
> Cc: Jernej ?krabec <jernej.skrabec@siol.net>
> Cc: Jonas Karlman <jonas@kwiboo.se>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> Hi Tom,
> 
> This is repost of my last year's attempt.
> It fills a hole to allow loading FDT overlays using PXE/Extlinux without
> using FIT.
> 
> V2 adds documentation.

Thanks for following up.  I assume this follows what the spec says for
this file?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210104/72b23985/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] cmd: pxe: add support for FDT overlays
  2021-01-04 14:41 ` Tom Rini
@ 2021-01-04 16:21   ` Jernej Škrabec
  2021-01-05  8:12     ` Neil Armstrong
  2021-01-05  8:14     ` Neil Armstrong
  0 siblings, 2 replies; 8+ messages in thread
From: Jernej Škrabec @ 2021-01-04 16:21 UTC (permalink / raw)
  To: u-boot

Dne ponedeljek, 04. januar 2021 ob 15:41:17 CET je Tom Rini napisal(a):
> On Mon, Jan 04, 2021 at 03:33:43PM +0100, Neil Armstrong wrote:
> > This adds support for specifying FDT overlays in an extlinux/pxelinux
> > configuration file.
> > 
> > Without this, there is no simple way to apply overlays when the kernel
> > and fdt is loaded by the pxe command.
> > 
> > This change adds the 'fdtoverlays' keyword for a label, supporting
> > multiple
> > overlay files to be applied on top of the fdt specified in the 'fdt' or
> > 'devicetree' keyword.
> > 
> > Example:
> >   label linux
> >   
> >     kernel /Image
> >     devicetree /soc-board.dtb

This should be "fdt /soc-board.dtb",

> >     fdtoverlays /soc-board-function.dtbo
> >     append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
> > 
> > This code makes usage of a new variable called fdtoverlay_addr_r used to
> > load the overlay files without overwritting anything important.
> > 
> > Cc: Tom Rini <trini@konsulko.com>
> > Cc: Andre Heider <a.heider@gmail.com>
> > Cc: Jernej ?krabec <jernej.skrabec@siol.net>
> > Cc: Jonas Karlman <jonas@kwiboo.se>
> > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>

Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>

With above fix:
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>

> > ---
> > Hi Tom,
> > 
> > This is repost of my last year's attempt.
> > It fills a hole to allow loading FDT overlays using PXE/Extlinux without
> > using FIT.
> > 
> > V2 adds documentation.
> 
> Thanks for following up.  I assume this follows what the spec says for
> this file?

Which specs? Official extlinux configuration specs [1] don't say anything about 
device tree files, so anything related to that is an extension (I hope I found 
correct specs). I think this one is extremely useful, users can easily specify 
which overlay file(s) they want to be applied in a text file.

Best regards,
Jernej

[1] https://repo.or.cz/syslinux.git/blob/HEAD:/doc/syslinux.txt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] cmd: pxe: add support for FDT overlays
  2021-01-04 16:21   ` Jernej Škrabec
@ 2021-01-05  8:12     ` Neil Armstrong
  2021-01-05  8:14     ` Neil Armstrong
  1 sibling, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2021-01-05  8:12 UTC (permalink / raw)
  To: u-boot

On 04/01/2021 17:21, Jernej ?krabec wrote:
> Dne ponedeljek, 04. januar 2021 ob 15:41:17 CET je Tom Rini napisal(a):
>> On Mon, Jan 04, 2021 at 03:33:43PM +0100, Neil Armstrong wrote:
>>> This adds support for specifying FDT overlays in an extlinux/pxelinux
>>> configuration file.
>>>
>>> Without this, there is no simple way to apply overlays when the kernel
>>> and fdt is loaded by the pxe command.
>>>
>>> This change adds the 'fdtoverlays' keyword for a label, supporting
>>> multiple
>>> overlay files to be applied on top of the fdt specified in the 'fdt' or
>>> 'devicetree' keyword.
>>>
>>> Example:
>>>   label linux
>>>   
>>>     kernel /Image
>>>     devicetree /soc-board.dtb
> 
> This should be "fdt /soc-board.dtb",

> 
>>>     fdtoverlays /soc-board-function.dtbo
>>>     append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
>>>
>>> This code makes usage of a new variable called fdtoverlay_addr_r used to
>>> load the overlay files without overwritting anything important.
>>>
>>> Cc: Tom Rini <trini@konsulko.com>
>>> Cc: Andre Heider <a.heider@gmail.com>
>>> Cc: Jernej ?krabec <jernej.skrabec@siol.net>
>>> Cc: Jonas Karlman <jonas@kwiboo.se>
>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> 
> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
> 
> With above fix:
> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
> 
>>> ---
>>> Hi Tom,
>>>
>>> This is repost of my last year's attempt.
>>> It fills a hole to allow loading FDT overlays using PXE/Extlinux without
>>> using FIT.
>>>
>>> V2 adds documentation.
>>
>> Thanks for following up.  I assume this follows what the spec says for
>> this file?
> 
> Which specs? Official extlinux configuration specs [1] don't say anything about 
> device tree files, so anything related to that is an extension (I hope I found 
> correct specs). I think this one is extremely useful, users can easily specify 
> which overlay file(s) they want to be applied in a text file.
> 
> Best regards,
> Jernej
> 
> [1] https://repo.or.cz/syslinux.git/blob/HEAD:/doc/syslinux.txt
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] cmd: pxe: add support for FDT overlays
  2021-01-04 16:21   ` Jernej Škrabec
  2021-01-05  8:12     ` Neil Armstrong
@ 2021-01-05  8:14     ` Neil Armstrong
  2021-01-08 13:43       ` Tom Rini
  2021-01-14 23:30       ` Tom Rini
  1 sibling, 2 replies; 8+ messages in thread
From: Neil Armstrong @ 2021-01-05  8:14 UTC (permalink / raw)
  To: u-boot

On 04/01/2021 17:21, Jernej ?krabec wrote:
> Dne ponedeljek, 04. januar 2021 ob 15:41:17 CET je Tom Rini napisal(a):
>> On Mon, Jan 04, 2021 at 03:33:43PM +0100, Neil Armstrong wrote:
>>> This adds support for specifying FDT overlays in an extlinux/pxelinux
>>> configuration file.
>>>
>>> Without this, there is no simple way to apply overlays when the kernel
>>> and fdt is loaded by the pxe command.
>>>
>>> This change adds the 'fdtoverlays' keyword for a label, supporting
>>> multiple
>>> overlay files to be applied on top of the fdt specified in the 'fdt' or
>>> 'devicetree' keyword.
>>>
>>> Example:
>>>   label linux
>>>   
>>>     kernel /Image
>>>     devicetree /soc-board.dtb
> 
> This should be "fdt /soc-board.dtb",


Indeed, thx

> 
>>>     fdtoverlays /soc-board-function.dtbo
>>>     append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
>>>
>>> This code makes usage of a new variable called fdtoverlay_addr_r used to
>>> load the overlay files without overwritting anything important.
>>>
>>> Cc: Tom Rini <trini@konsulko.com>
>>> Cc: Andre Heider <a.heider@gmail.com>
>>> Cc: Jernej ?krabec <jernej.skrabec@siol.net>
>>> Cc: Jonas Karlman <jonas@kwiboo.se>
>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> 
> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
> 
> With above fix:
> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
> 
>>> ---
>>> Hi Tom,
>>>
>>> This is repost of my last year's attempt.
>>> It fills a hole to allow loading FDT overlays using PXE/Extlinux without
>>> using FIT.
>>>
>>> V2 adds documentation.
>>
>> Thanks for following up.  I assume this follows what the spec says for
>> this file?
> 
> Which specs? Official extlinux configuration specs [1] don't say anything about 
> device tree files, so anything related to that is an extension (I hope I found 
> correct specs). I think this one is extremely useful, users can easily specify 
> which overlay file(s) they want to be applied in a text file.

Indeed, it follows the spec by not breaking it and simply extends the already
u-boot specific pxe format.

Neil


> 
> Best regards,
> Jernej
> 
> [1] https://repo.or.cz/syslinux.git/blob/HEAD:/doc/syslinux.txt
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] cmd: pxe: add support for FDT overlays
  2021-01-05  8:14     ` Neil Armstrong
@ 2021-01-08 13:43       ` Tom Rini
  2021-01-14 23:30       ` Tom Rini
  1 sibling, 0 replies; 8+ messages in thread
From: Tom Rini @ 2021-01-08 13:43 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 05, 2021 at 09:14:24AM +0100, Neil Armstrong wrote:
> On 04/01/2021 17:21, Jernej ?krabec wrote:
> > Dne ponedeljek, 04. januar 2021 ob 15:41:17 CET je Tom Rini napisal(a):
> >> On Mon, Jan 04, 2021 at 03:33:43PM +0100, Neil Armstrong wrote:
> >>> This adds support for specifying FDT overlays in an extlinux/pxelinux
> >>> configuration file.
> >>>
> >>> Without this, there is no simple way to apply overlays when the kernel
> >>> and fdt is loaded by the pxe command.
> >>>
> >>> This change adds the 'fdtoverlays' keyword for a label, supporting
> >>> multiple
> >>> overlay files to be applied on top of the fdt specified in the 'fdt' or
> >>> 'devicetree' keyword.
> >>>
> >>> Example:
> >>>   label linux
> >>>   
> >>>     kernel /Image
> >>>     devicetree /soc-board.dtb
> > 
> > This should be "fdt /soc-board.dtb",
> 
> 
> Indeed, thx
> 
> > 
> >>>     fdtoverlays /soc-board-function.dtbo
> >>>     append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
> >>>
> >>> This code makes usage of a new variable called fdtoverlay_addr_r used to
> >>> load the overlay files without overwritting anything important.
> >>>
> >>> Cc: Tom Rini <trini@konsulko.com>
> >>> Cc: Andre Heider <a.heider@gmail.com>
> >>> Cc: Jernej ?krabec <jernej.skrabec@siol.net>
> >>> Cc: Jonas Karlman <jonas@kwiboo.se>
> >>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> > 
> > Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > 
> > With above fix:
> > Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > 
> >>> ---
> >>> Hi Tom,
> >>>
> >>> This is repost of my last year's attempt.
> >>> It fills a hole to allow loading FDT overlays using PXE/Extlinux without
> >>> using FIT.
> >>>
> >>> V2 adds documentation.
> >>
> >> Thanks for following up.  I assume this follows what the spec says for
> >> this file?
> > 
> > Which specs? Official extlinux configuration specs [1] don't say anything about 
> > device tree files, so anything related to that is an extension (I hope I found 
> > correct specs). I think this one is extremely useful, users can easily specify 
> > which overlay file(s) they want to be applied in a text file.
> 
> Indeed, it follows the spec by not breaking it and simply extends the already
> u-boot specific pxe format.

I could have sworn that the spec on freedesktop.org had been extended
for overlays, but I don't see it now.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210108/67db0efe/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] cmd: pxe: add support for FDT overlays
  2021-01-05  8:14     ` Neil Armstrong
  2021-01-08 13:43       ` Tom Rini
@ 2021-01-14 23:30       ` Tom Rini
  2021-01-20  8:47         ` Neil Armstrong
  1 sibling, 1 reply; 8+ messages in thread
From: Tom Rini @ 2021-01-14 23:30 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 05, 2021 at 09:14:24AM +0100, Neil Armstrong wrote:
> On 04/01/2021 17:21, Jernej ?krabec wrote:
> > Dne ponedeljek, 04. januar 2021 ob 15:41:17 CET je Tom Rini napisal(a):
> >> On Mon, Jan 04, 2021 at 03:33:43PM +0100, Neil Armstrong wrote:
> >>> This adds support for specifying FDT overlays in an extlinux/pxelinux
> >>> configuration file.
> >>>
> >>> Without this, there is no simple way to apply overlays when the kernel
> >>> and fdt is loaded by the pxe command.
> >>>
> >>> This change adds the 'fdtoverlays' keyword for a label, supporting
> >>> multiple
> >>> overlay files to be applied on top of the fdt specified in the 'fdt' or
> >>> 'devicetree' keyword.
> >>>
> >>> Example:
> >>>   label linux
> >>>   
> >>>     kernel /Image
> >>>     devicetree /soc-board.dtb
> > 
> > This should be "fdt /soc-board.dtb",
> 
> 
> Indeed, thx
> 
> > 
> >>>     fdtoverlays /soc-board-function.dtbo
> >>>     append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
> >>>
> >>> This code makes usage of a new variable called fdtoverlay_addr_r used to
> >>> load the overlay files without overwritting anything important.
> >>>
> >>> Cc: Tom Rini <trini@konsulko.com>
> >>> Cc: Andre Heider <a.heider@gmail.com>
> >>> Cc: Jernej ?krabec <jernej.skrabec@siol.net>
> >>> Cc: Jonas Karlman <jonas@kwiboo.se>
> >>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> > 
> > Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > 
> > With above fix:
> > Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>

Since I'll almost certainly forget when applying, can I get a v3 with
the change?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210114/acfe0f53/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] cmd: pxe: add support for FDT overlays
  2021-01-14 23:30       ` Tom Rini
@ 2021-01-20  8:47         ` Neil Armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2021-01-20  8:47 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 15/01/2021 00:30, Tom Rini wrote:
> On Tue, Jan 05, 2021 at 09:14:24AM +0100, Neil Armstrong wrote:
>> On 04/01/2021 17:21, Jernej ?krabec wrote:
>>> Dne ponedeljek, 04. januar 2021 ob 15:41:17 CET je Tom Rini napisal(a):
>>>> On Mon, Jan 04, 2021 at 03:33:43PM +0100, Neil Armstrong wrote:
>>>>> This adds support for specifying FDT overlays in an extlinux/pxelinux
>>>>> configuration file.
>>>>>
>>>>> Without this, there is no simple way to apply overlays when the kernel
>>>>> and fdt is loaded by the pxe command.
>>>>>
>>>>> This change adds the 'fdtoverlays' keyword for a label, supporting
>>>>> multiple
>>>>> overlay files to be applied on top of the fdt specified in the 'fdt' or
>>>>> 'devicetree' keyword.
>>>>>
>>>>> Example:
>>>>>   label linux
>>>>>   
>>>>>     kernel /Image
>>>>>     devicetree /soc-board.dtb
>>>
>>> This should be "fdt /soc-board.dtb",
>>
>>
>> Indeed, thx
>>
>>>
>>>>>     fdtoverlays /soc-board-function.dtbo
>>>>>     append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
>>>>>
>>>>> This code makes usage of a new variable called fdtoverlay_addr_r used to
>>>>> load the overlay files without overwritting anything important.
>>>>>
>>>>> Cc: Tom Rini <trini@konsulko.com>
>>>>> Cc: Andre Heider <a.heider@gmail.com>
>>>>> Cc: Jernej ?krabec <jernej.skrabec@siol.net>
>>>>> Cc: Jonas Karlman <jonas@kwiboo.se>
>>>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>>>
>>> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
>>>
>>> With above fix:
>>> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
> 
> Since I'll almost certainly forget when applying, can I get a v3 with
> the change?  Thanks!
> 

Sure !

Neil

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210120/193d44b3/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-20  8:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 14:33 [PATCH v2] cmd: pxe: add support for FDT overlays Neil Armstrong
2021-01-04 14:41 ` Tom Rini
2021-01-04 16:21   ` Jernej Škrabec
2021-01-05  8:12     ` Neil Armstrong
2021-01-05  8:14     ` Neil Armstrong
2021-01-08 13:43       ` Tom Rini
2021-01-14 23:30       ` Tom Rini
2021-01-20  8:47         ` Neil Armstrong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.