All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/7] PXE parsing fixes and local file support
@ 2012-03-28 15:51 Rob Herring
  2012-03-28 15:51 ` [U-Boot] [PATCH 1/7] menu: only timeout when menu is displayed Rob Herring
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Rob Herring @ 2012-03-28 15:51 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

The first 6 patches are menu file parsing fixes found in testing ubuntu/
debian generated menu files. The menu display is cleaned up to display
the friendly menu label string and boot the default image on timeout as
is typical for a PC bootloader.

The last patch adds support for parsing local disk files on ext2 or fat
filesystems. This is essentially syslinux/extlinux emulation and simply
reuses the existing pxe support.

Rob

Rob Herring (7):
  menu: only timeout when menu is displayed
  pxe: support include files at top-level
  pxe: add support for label menu text
  pxe: support linux entries for labels
  pxe: support absolute paths
  pxe: parse initrd file from append string
  pxe: add support for parsing local syslinux files

 common/cmd_pxe.c |  198 +++++++++++++++++++++++++++++++++++++++++++++++-------
 common/menu.c    |   36 +---------
 doc/README.pxe   |    3 -
 include/common.h |    6 ++
 4 files changed, 184 insertions(+), 59 deletions(-)

-- 
1.7.5.4

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

* [U-Boot] [PATCH 1/7] menu: only timeout when menu is displayed
  2012-03-28 15:51 [U-Boot] [PATCH 0/7] PXE parsing fixes and local file support Rob Herring
@ 2012-03-28 15:51 ` Rob Herring
  2012-06-21 20:34   ` Wolfgang Denk
  2012-03-28 15:51 ` [U-Boot] [PATCH 2/7] pxe: support include files at top-level Rob Herring
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2012-03-28 15:51 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

Make the menu timeout apply only when prompt flag is set and after the
menu is displayed. This allows auto boot to work no matter whether prompt
is set or cleared. Use the default selection if the menu times out.

This also fixes the timeout value given to readline_into_buffer to be
seconds instead of 10th of seconds.

Old behavior:

if prompt
  display menu and wait for choice
else
  wait for timeout
  if key pressed
    display menu and wait for choice
  else
    exit command

New behavior:

if prompt
  display menu
  if key pressed
    wait for choice
  else
    boot default entry on timeout
else
  boot default entry

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 common/menu.c |   36 ++++--------------------------------
 1 files changed, 4 insertions(+), 32 deletions(-)

diff --git a/common/menu.c b/common/menu.c
index aa16c9a..6b2a2db 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -171,32 +171,6 @@ static inline struct menu_item *menu_item_by_key(struct menu *m,
 }
 
 /*
- * Wait for the user to hit a key according to the timeout set for the menu.
- * Returns 1 if the user hit a key, or 0 if the timeout expired.
- */
-static inline int menu_interrupted(struct menu *m)
-{
-	if (!m->timeout)
-		return 0;
-
-	if (abortboot(m->timeout/10))
-		return 1;
-
-	return 0;
-}
-
-/*
- * Checks whether or not the default menu item should be used without
- * prompting for a user choice. If the menu is set to always prompt, or the
- * user hits a key during the timeout period, return 0. Otherwise, return 1 to
- * indicate we should use the default menu item.
- */
-static inline int menu_use_default(struct menu *m)
-{
-	return !m->prompt && !menu_interrupted(m);
-}
-
-/*
  * Set *choice to point to the default item's data, if any default item was
  * set, and returns 1. If no default item was set, returns -ENOENT.
  */
@@ -231,7 +205,7 @@ static inline int menu_interactive_choice(struct menu *m, void **choice)
 		menu_display(m);
 
 		readret = readline_into_buffer("Enter choice: ", cbuf,
-				m->timeout);
+				m->timeout / 10);
 
 		if (readret >= 0) {
 			choice_item = menu_item_by_key(m, cbuf);
@@ -240,10 +214,8 @@ static inline int menu_interactive_choice(struct menu *m, void **choice)
 				printf("%s not found\n", cbuf);
 				m->timeout = 0;
 			}
-		} else {
-			puts("^C\n");
-			return -EINTR;
-		}
+		} else
+			return menu_default_choice(m, choice);
 	}
 
 	*choice = choice_item->data;
@@ -300,7 +272,7 @@ int menu_get_choice(struct menu *m, void **choice)
 	if (!m || !choice)
 		return -EINVAL;
 
-	if (menu_use_default(m))
+	if (!m->prompt)
 		return menu_default_choice(m, choice);
 
 	return menu_interactive_choice(m, choice);
-- 
1.7.5.4

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

* [U-Boot] [PATCH 2/7] pxe: support include files at top-level
  2012-03-28 15:51 [U-Boot] [PATCH 0/7] PXE parsing fixes and local file support Rob Herring
  2012-03-28 15:51 ` [U-Boot] [PATCH 1/7] menu: only timeout when menu is displayed Rob Herring
@ 2012-03-28 15:51 ` Rob Herring
  2012-05-25 20:43   ` [U-Boot] [PATCH v2] " Rob Herring
  2012-03-28 15:51 ` [U-Boot] [PATCH 3/7] pxe: add support for label menu text Rob Herring
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2012-03-28 15:51 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

Include files outside of a menu were not getting included and parsed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 common/cmd_pxe.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 8a68fa1..25054ba 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -1110,6 +1110,11 @@ static int parse_pxefile_top(char *p, struct pxe_menu *cfg, int nest_level)
 
 			break;
 
+		case T_INCLUDE:
+			err = handle_include(&p, b + strlen(b) + 1, cfg,
+							nest_level + 1);
+			break;
+
 		case T_PROMPT:
 			err = parse_integer(&p, &cfg->prompt);
 			break;
-- 
1.7.5.4

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

* [U-Boot] [PATCH 3/7] pxe: add support for label menu text
  2012-03-28 15:51 [U-Boot] [PATCH 0/7] PXE parsing fixes and local file support Rob Herring
  2012-03-28 15:51 ` [U-Boot] [PATCH 1/7] menu: only timeout when menu is displayed Rob Herring
  2012-03-28 15:51 ` [U-Boot] [PATCH 2/7] pxe: support include files at top-level Rob Herring
@ 2012-03-28 15:51 ` Rob Herring
  2012-06-21 20:34   ` Wolfgang Denk
  2012-03-28 15:51 ` [U-Boot] [PATCH 4/7] pxe: support linux entries for labels Rob Herring
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2012-03-28 15:51 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

Use a menu string if present, otherwise use the kernel string.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 common/cmd_pxe.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 25054ba..2497b73 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -409,6 +409,7 @@ static int get_relfile_envaddr(char *file_path, char *envaddr_name)
  */
 struct pxe_label {
 	char *name;
+	char *menu;
 	char *kernel;
 	char *append;
 	char *initrd;
@@ -491,17 +492,18 @@ static void label_destroy(struct pxe_label *label)
 static void label_print(void *data)
 {
 	struct pxe_label *label = data;
+	const char *c = label->menu ? label->menu : label->kernel;
 
-	printf("Label: %s\n", label->name);
+	printf("%s:\t%s\n", label->name, c);
 
 	if (label->kernel)
-		printf("\tkernel: %s\n", label->kernel);
+		printf("\t\tkernel: %s\n", label->kernel);
 
 	if (label->append)
-		printf("\tappend: %s\n", label->append);
+		printf("\t\tappend: %s\n", label->append);
 
 	if (label->initrd)
-		printf("\tinitrd: %s\n", label->initrd);
+		printf("\t\tinitrd: %s\n", label->initrd);
 }
 
 /*
@@ -970,6 +972,9 @@ static int parse_label_menu(char **c, struct pxe_menu *cfg,
 			return -ENOMEM;
 
 		break;
+	case T_LABEL:
+		parse_sliteral(c, &label->menu);
+		break;
 	default:
 		printf("Ignoring malformed menu command: %.*s\n",
 				(int)(*c - s), s);
-- 
1.7.5.4

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

* [U-Boot] [PATCH 4/7] pxe: support linux entries for labels
  2012-03-28 15:51 [U-Boot] [PATCH 0/7] PXE parsing fixes and local file support Rob Herring
                   ` (2 preceding siblings ...)
  2012-03-28 15:51 ` [U-Boot] [PATCH 3/7] pxe: add support for label menu text Rob Herring
@ 2012-03-28 15:51 ` Rob Herring
  2012-06-21 20:35   ` Wolfgang Denk
  2012-03-28 15:51 ` [U-Boot] [PATCH 5/7] pxe: support absolute paths Rob Herring
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2012-03-28 15:51 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

Kernels can be specified using "linux" or "kernel" entry. The difference
is kernel is supposed to detect the type of file, but for u-boot both are
treated the same.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 common/cmd_pxe.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 2497b73..b8cb4f3 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -628,6 +628,7 @@ enum token_type {
 	T_TIMEOUT,
 	T_LABEL,
 	T_KERNEL,
+	T_LINUX,
 	T_APPEND,
 	T_INITRD,
 	T_LOCALBOOT,
@@ -656,6 +657,7 @@ static const struct token keywords[] = {
 	{"prompt", T_PROMPT},
 	{"label", T_LABEL},
 	{"kernel", T_KERNEL},
+	{"linux", T_LINUX},
 	{"localboot", T_LOCALBOOT},
 	{"append", T_APPEND},
 	{"initrd", T_INITRD},
@@ -1024,6 +1026,7 @@ static int parse_label(char **c, struct pxe_menu *cfg)
 			break;
 
 		case T_KERNEL:
+		case T_LINUX:
 			err = parse_sliteral(c, &label->kernel);
 			break;
 
-- 
1.7.5.4

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

* [U-Boot] [PATCH 5/7] pxe: support absolute paths
  2012-03-28 15:51 [U-Boot] [PATCH 0/7] PXE parsing fixes and local file support Rob Herring
                   ` (3 preceding siblings ...)
  2012-03-28 15:51 ` [U-Boot] [PATCH 4/7] pxe: support linux entries for labels Rob Herring
@ 2012-03-28 15:51 ` Rob Herring
  2012-06-21 20:35   ` Wolfgang Denk
  2012-03-28 15:51 ` [U-Boot] [PATCH 6/7] pxe: parse initrd file from append string Rob Herring
  2012-03-28 15:51 ` [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files Rob Herring
  6 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2012-03-28 15:51 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

If the file path starts with a '/', then don't pre-pend the bootfile path.
This fixes a problem with running 'pxe boot' multiple times where the
bootfile path gets pre-pended to itself each time.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 common/cmd_pxe.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index b8cb4f3..ac1bc56 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -96,24 +96,24 @@ static int format_mac_pxe(char *outbuf, size_t outbuf_len)
  * in. If bootfile isn't defined in the environment, return NULL, which should
  * be interpreted as "don't prepend anything to paths".
  */
-static int get_bootfile_path(char *bootfile_path, size_t bootfile_path_size)
+static int get_bootfile_path(const char *file_path, char *bootfile_path,
+			     size_t bootfile_path_size)
 {
 	char *bootfile, *last_slash;
-	size_t path_len;
+	size_t path_len = 0;
+
+	if (file_path[0] == '/')
+		goto ret;
 
 	bootfile = from_env("bootfile");
 
-	if (!bootfile) {
-		bootfile_path[0] = '\0';
-		return 1;
-	}
+	if (!bootfile)
+		goto ret;
 
 	last_slash = strrchr(bootfile, '/');
 
-	if (last_slash == NULL) {
-		bootfile_path[0] = '\0';
-		return 1;
-	}
+	if (last_slash == NULL)
+		goto ret;
 
 	path_len = (last_slash - bootfile) + 1;
 
@@ -126,6 +126,7 @@ static int get_bootfile_path(char *bootfile_path, size_t bootfile_path_size)
 
 	strncpy(bootfile_path, bootfile, path_len);
 
+ ret:
 	bootfile_path[path_len] = '\0';
 
 	return 1;
@@ -147,7 +148,7 @@ static int get_relfile(char *file_path, void *file_addr)
 	char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
 	int err;
 
-	err = get_bootfile_path(relfile, sizeof(relfile));
+	err = get_bootfile_path(file_path, relfile, sizeof(relfile));
 
 	if (err < 0)
 		return err;
-- 
1.7.5.4

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

* [U-Boot] [PATCH 6/7] pxe: parse initrd file from append string
  2012-03-28 15:51 [U-Boot] [PATCH 0/7] PXE parsing fixes and local file support Rob Herring
                   ` (4 preceding siblings ...)
  2012-03-28 15:51 ` [U-Boot] [PATCH 5/7] pxe: support absolute paths Rob Herring
@ 2012-03-28 15:51 ` Rob Herring
  2012-06-21 20:35   ` Wolfgang Denk
  2012-03-28 15:51 ` [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files Rob Herring
  6 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2012-03-28 15:51 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

For syslinux, the initrd can be set in the append string as
"initrd=<file>", so try to find it there if we haven't already set the
initrd.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 common/cmd_pxe.c |   15 ++++++++++++++-
 doc/README.pxe   |    3 ---
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index ac1bc56..4ad067a 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -999,6 +999,7 @@ static int parse_label_menu(char **c, struct pxe_menu *cfg,
 static int parse_label(char **c, struct pxe_menu *cfg)
 {
 	struct token t;
+	int len;
 	char *s = *c;
 	struct pxe_label *label;
 	int err;
@@ -1033,10 +1034,22 @@ static int parse_label(char **c, struct pxe_menu *cfg)
 
 		case T_APPEND:
 			err = parse_sliteral(c, &label->append);
+			if (label->initrd)
+				break;
+			s = strstr(label->append, "initrd=");
+			if (!s)
+				break;
+			s += 7;
+			len = (int)(strchr(s, ' ') - s);
+			label->initrd = malloc(len + 1);
+			strncpy(label->initrd, s, len);
+			label->initrd[len] = '\0';
+
 			break;
 
 		case T_INITRD:
-			err = parse_sliteral(c, &label->initrd);
+			if (!label->initrd)
+				err = parse_sliteral(c, &label->initrd);
 			break;
 
 		case T_LOCALBOOT:
diff --git a/doc/README.pxe b/doc/README.pxe
index 95cd9b9..2bbf53d 100644
--- a/doc/README.pxe
+++ b/doc/README.pxe
@@ -224,9 +224,6 @@ PXELINUX and U-boot's pxe support.
 - U-boot's pxe expects U-boot uimg's as kernels.  Anything that would work
   with the 'bootm' command in U-boot could work with the 'pxe boot' command.
 
-- U-boot's pxe doesn't recognize initrd options in the append command - you
-  must specify initrd files using the initrd command.
-
 - U-boot's pxe only recognizes a single file on the initrd command line.  It
   could be extended to support multiple.
 
-- 
1.7.5.4

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

* [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files
  2012-03-28 15:51 [U-Boot] [PATCH 0/7] PXE parsing fixes and local file support Rob Herring
                   ` (5 preceding siblings ...)
  2012-03-28 15:51 ` [U-Boot] [PATCH 6/7] pxe: parse initrd file from append string Rob Herring
@ 2012-03-28 15:51 ` Rob Herring
  2012-05-23 22:11   ` Joe Hershberger
  2012-05-25 20:47   ` [U-Boot] [PATCH v2] " Rob Herring
  6 siblings, 2 replies; 22+ messages in thread
From: Rob Herring @ 2012-03-28 15:51 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

Add a new command "sysboot" which parses syslinux menu files and boots
using kernel and initrd specified by menu files. The operation is similar
to "pxe boot" except local files on ext2 or fat filesystem are parsed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 common/cmd_pxe.c |  139 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 include/common.h |    6 ++
 2 files changed, 137 insertions(+), 8 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 4ad067a..82b0a8e 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -132,6 +132,49 @@ static int get_bootfile_path(const char *file_path, char *bootfile_path,
 	return 1;
 }
 
+static int (*do_getfile)(char *file_path, char *file_addr);
+
+static int do_get_tftp(char *file_path, char *file_addr)
+{
+	char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
+
+	tftp_argv[1] = file_addr;
+	tftp_argv[2] = file_path;
+
+	if (do_tftpb(NULL, 0, 3, tftp_argv))
+		return -ENOENT;
+
+	return 1;
+}
+
+static char *fs_argv[5];
+
+static int do_get_ext2(char *file_path, char *file_addr)
+{
+	fs_argv[0] = "ext2load";
+	fs_argv[3] = file_addr;
+	fs_argv[4] = file_path;
+
+	if (do_ext2load(NULL, 0, 5, fs_argv))
+		return -ENOENT;
+
+	return 1;
+}
+
+static int do_get_fat(char *file_path, char *file_addr)
+{
+	fs_argv[0] = "fatload";
+	fs_argv[3] = file_addr;
+	fs_argv[4] = file_path;
+
+	if (do_fat_fsload(NULL, 0, 5, fs_argv))
+		return -ENOENT;
+
+	return 1;
+}
+
+
+
 /*
  * As in pxelinux, paths to files referenced from files we retrieve are
  * relative to the location of bootfile. get_relfile takes such a path and
@@ -145,7 +188,6 @@ static int get_relfile(char *file_path, void *file_addr)
 	size_t path_len;
 	char relfile[MAX_TFTP_PATH_LEN+1];
 	char addr_buf[10];
-	char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
 	int err;
 
 	err = get_bootfile_path(file_path, relfile, sizeof(relfile));
@@ -170,13 +212,7 @@ static int get_relfile(char *file_path, void *file_addr)
 
 	sprintf(addr_buf, "%p", file_addr);
 
-	tftp_argv[1] = addr_buf;
-	tftp_argv[2] = relfile;
-
-	if (do_tftpb(NULL, 0, 3, tftp_argv))
-		return -ENOENT;
-
-	return 1;
+	return do_getfile(relfile, addr_buf);
 }
 
 /*
@@ -322,6 +358,8 @@ do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	void *pxefile_addr_r;
 	int err;
 
+	do_getfile = do_get_tftp;
+
 	if (argc != 1)
 		return CMD_RET_USAGE;
 
@@ -1331,6 +1369,8 @@ do_pxe_boot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	struct pxe_menu *cfg;
 	char *pxefile_addr_str;
 
+	do_getfile = do_get_tftp;
+
 	if (argc == 1) {
 		pxefile_addr_str = from_env("pxefile_addr_r");
 		if (!pxefile_addr_str)
@@ -1391,3 +1431,86 @@ U_BOOT_CMD(
 	"get - try to retrieve a pxe file using tftp\npxe "
 	"boot [pxefile_addr_r] - boot from the pxe file at pxefile_addr_r\n"
 );
+
+/*
+ * Boots a system using a local disk syslinux/extlinux file
+ *
+ * Returns 0 on success, 1 on error.
+ */
+int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	unsigned long pxefile_addr_r;
+	struct pxe_menu *cfg;
+	char *pxefile_addr_str;
+	char *filename;
+	int prompt = 0;
+
+	if (strstr(argv[1], "-p")) {
+		prompt = 1;
+		argc--;
+		argv++;
+	}
+
+	if (argc < 4)
+		return cmd_usage(cmdtp);
+
+	if (argc < 5) {
+		pxefile_addr_str = from_env("pxefile_addr_r");
+		if (!pxefile_addr_str)
+			return 1;
+	} else {
+		pxefile_addr_str = argv[4];
+	}
+
+	if (argc < 6)
+		filename = getenv("bootfile");
+	else {
+		filename = argv[5];
+		setenv("bootfile", filename);
+	}
+
+	if (strstr(argv[3], "ext2"))
+		do_getfile = do_get_ext2;
+	else if (strstr(argv[3], "fat"))
+		do_getfile = do_get_fat;
+	else {
+		printf("Invalid filesystem: %s\n", argv[3]);
+		return 1;
+	}
+	fs_argv[1] = argv[1];
+	fs_argv[2] = argv[2];
+
+	if (strict_strtoul(pxefile_addr_str, 16, &pxefile_addr_r) < 0) {
+		printf("Invalid pxefile address: %s\n", pxefile_addr_str);
+		return 1;
+	}
+
+	if (get_pxe_file(filename, (void *)pxefile_addr_r) < 0) {
+		printf("Error reading config file\n");
+		return 1;
+	}
+
+	cfg = parse_pxefile((char *)(pxefile_addr_r));
+
+	if (cfg == NULL) {
+		printf("Error parsing config file\n");
+		return 1;
+	}
+
+	if (prompt)
+		cfg->prompt = 1;
+
+	handle_pxe_menu(cfg);
+
+	destroy_pxe_menu(cfg);
+
+	return 0;
+}
+
+U_BOOT_CMD(
+	sysboot, 7, 1, do_sysboot,
+	"command to get and boot from syslinux files",
+	"[-p] <interface> <dev[:part]> <ext2|fat> [addr] [filename]\n"
+	"    - load and parse syslinux menu file 'filename' from ext2 or fat\n"
+	"      filesystem on 'dev' on 'interface' to address 'addr'"
+);
diff --git a/include/common.h b/include/common.h
index 74d9704..67029b8 100644
--- a/include/common.h
+++ b/include/common.h
@@ -307,6 +307,12 @@ void	doc_probe(unsigned long physadr);
 /* common/cmd_net.c */
 int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 
+/* common/cmd_fat.c */
+int do_fat_fsload(cmd_tbl_t *, int, int, char * const []);
+
+/* common/cmd_ext2.c */
+int do_ext2load(cmd_tbl_t *, int, int, char * const []);
+
 /* common/cmd_nvedit.c */
 int	env_init     (void);
 void	env_relocate (void);
-- 
1.7.5.4

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

* [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files
  2012-03-28 15:51 ` [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files Rob Herring
@ 2012-05-23 22:11   ` Joe Hershberger
  2012-05-23 22:57     ` Rob Herring
  2012-05-25 20:47   ` [U-Boot] [PATCH v2] " Rob Herring
  1 sibling, 1 reply; 22+ messages in thread
From: Joe Hershberger @ 2012-05-23 22:11 UTC (permalink / raw)
  To: u-boot

Hi Rob,

On Wed, Mar 28, 2012 at 10:51 AM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Add a new command "sysboot" which parses syslinux menu files and boots
> using kernel and initrd specified by menu files. The operation is similar
> to "pxe boot" except local files on ext2 or fat filesystem are parsed.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>

I attempted to apply this patch but it failed.

Applying: pxe: add support for parsing local syslinux files
error: patch failed: common/cmd_pxe.c:322
error: common/cmd_pxe.c: patch does not apply
fatal: sha1 information is lacking or useless (common/cmd_pxe.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0007.

Please rebase the series and resend.

Thanks,
-Joe

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

* [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files
  2012-05-23 22:11   ` Joe Hershberger
@ 2012-05-23 22:57     ` Rob Herring
  2012-05-23 23:02       ` Joe Hershberger
  0 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2012-05-23 22:57 UTC (permalink / raw)
  To: u-boot

On 05/23/2012 05:11 PM, Joe Hershberger wrote:
> Hi Rob,
> 
> On Wed, Mar 28, 2012 at 10:51 AM, Rob Herring <robherring2@gmail.com> wrote:
>> From: Rob Herring <rob.herring@calxeda.com>
>>
>> Add a new command "sysboot" which parses syslinux menu files and boots
>> using kernel and initrd specified by menu files. The operation is similar
>> to "pxe boot" except local files on ext2 or fat filesystem are parsed.
>>
>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> 
> I attempted to apply this patch but it failed.
> 
> Applying: pxe: add support for parsing local syslinux files
> error: patch failed: common/cmd_pxe.c:322
> error: common/cmd_pxe.c: patch does not apply
> fatal: sha1 information is lacking or useless (common/cmd_pxe.c).
> Repository lacks necessary blobs to fall back on 3-way merge.
> Cannot fall back to three-way merge.
> Patch failed at 0007.
> 
> Please rebase the series and resend.

I rebased to Wolfgang's current master without any conflicts, so I'm
puzzled why this failed for you. I was originally based on this commit
plus a few otherwise unrelated highbank fixes:

commit 7cb30b13f12077c7eec8ce2419cd96cd65ace8e2
Merge: 636f77a 85c344e
Author: Wolfgang Denk <wd@denx.de>
Date:   Fri Mar 23 21:59:16 2012 +0100

    Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

    * 'master' of git://git.denx.de/u-boot-cfi-flash:
      cfi: fix the incomplete erased status check in buffer write

What base were you applying these to?

Rob

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

* [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files
  2012-05-23 22:57     ` Rob Herring
@ 2012-05-23 23:02       ` Joe Hershberger
  2012-05-25 18:56         ` Joe Hershberger
  0 siblings, 1 reply; 22+ messages in thread
From: Joe Hershberger @ 2012-05-23 23:02 UTC (permalink / raw)
  To: u-boot

Hi Rob,

On Wed, May 23, 2012 at 5:57 PM, Rob Herring <robherring2@gmail.com> wrote:
> On 05/23/2012 05:11 PM, Joe Hershberger wrote:
>> Hi Rob,
>>
>> On Wed, Mar 28, 2012 at 10:51 AM, Rob Herring <robherring2@gmail.com> wrote:
>>> From: Rob Herring <rob.herring@calxeda.com>
>>>
>>> Add a new command "sysboot" which parses syslinux menu files and boots
>>> using kernel and initrd specified by menu files. The operation is similar
>>> to "pxe boot" except local files on ext2 or fat filesystem are parsed.
>>>
>>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>>
>> I attempted to apply this patch but it failed.
>>
>> Applying: pxe: add support for parsing local syslinux files
>> error: patch failed: common/cmd_pxe.c:322
>> error: common/cmd_pxe.c: patch does not apply
>> fatal: sha1 information is lacking or useless (common/cmd_pxe.c).
>> Repository lacks necessary blobs to fall back on 3-way merge.
>> Cannot fall back to three-way merge.
>> Patch failed at 0007.
>>
>> Please rebase the series and resend.
>
> I rebased to Wolfgang's current master without any conflicts, so I'm
> puzzled why this failed for you. I was originally based on this commit
> plus a few otherwise unrelated highbank fixes:
>
> commit 7cb30b13f12077c7eec8ce2419cd96cd65ace8e2
> Merge: 636f77a 85c344e
> Author: Wolfgang Denk <wd@denx.de>
> Date: ? Fri Mar 23 21:59:16 2012 +0100
>
> ? ?Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash
>
> ? ?* 'master' of git://git.denx.de/u-boot-cfi-flash:
> ? ? ?cfi: fix the incomplete erased status check in buffer write
>
> What base were you applying these to?

I just tried again on u-boot.git/master...

> git checkout origin/master
Note: moving to "origin/master" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at b86a475... MAKEALL: Report boards with errors vs warnings

> git am < bundle-2943.mbox
Applying: menu: only timeout when menu is displayed
Applying: pxe: support include files at top-level
Applying: pxe: add support for label menu text
Applying: pxe: support linux entries for labels
Applying: pxe: support absolute paths
Applying: pxe: parse initrd file from append string
Applying: pxe: add support for parsing local syslinux files
error: patch failed: common/cmd_pxe.c:322
error: common/cmd_pxe.c: patch does not apply
Patch failed@0007.
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

I'm attempting to apply these patches in patchwork:

http://patchwork.ozlabs.org/patch/149281/
http://patchwork.ozlabs.org/patch/149280/
http://patchwork.ozlabs.org/patch/149282/
http://patchwork.ozlabs.org/patch/149283/
http://patchwork.ozlabs.org/patch/149284/
http://patchwork.ozlabs.org/patch/149286/
http://patchwork.ozlabs.org/patch/149285/

in that order... is that incorrect?

Thanks
-Joe

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

* [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files
  2012-05-23 23:02       ` Joe Hershberger
@ 2012-05-25 18:56         ` Joe Hershberger
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Hershberger @ 2012-05-25 18:56 UTC (permalink / raw)
  To: u-boot

Hi Rob,

On Wed, May 23, 2012 at 6:02 PM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> Hi Rob,
>
> On Wed, May 23, 2012 at 5:57 PM, Rob Herring <robherring2@gmail.com> wrote:
>> On 05/23/2012 05:11 PM, Joe Hershberger wrote:
>>> Hi Rob,
>>>
>>> On Wed, Mar 28, 2012 at 10:51 AM, Rob Herring <robherring2@gmail.com> wrote:
>>>> From: Rob Herring <rob.herring@calxeda.com>
>>>>
>>>> Add a new command "sysboot" which parses syslinux menu files and boots
>>>> using kernel and initrd specified by menu files. The operation is similar
>>>> to "pxe boot" except local files on ext2 or fat filesystem are parsed.
>>>>
>>>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>>>
>>> I attempted to apply this patch but it failed.
>>>
>>> Applying: pxe: add support for parsing local syslinux files
>>> error: patch failed: common/cmd_pxe.c:322
>>> error: common/cmd_pxe.c: patch does not apply
>>> fatal: sha1 information is lacking or useless (common/cmd_pxe.c).
>>> Repository lacks necessary blobs to fall back on 3-way merge.
>>> Cannot fall back to three-way merge.
>>> Patch failed at 0007.
>>>
>>> Please rebase the series and resend.
>>
>> I rebased to Wolfgang's current master without any conflicts, so I'm
>> puzzled why this failed for you. I was originally based on this commit
>> plus a few otherwise unrelated highbank fixes:
>>
>> commit 7cb30b13f12077c7eec8ce2419cd96cd65ace8e2
>> Merge: 636f77a 85c344e
>> Author: Wolfgang Denk <wd@denx.de>
>> Date: ? Fri Mar 23 21:59:16 2012 +0100
>>
>> ? ?Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash
>>
>> ? ?* 'master' of git://git.denx.de/u-boot-cfi-flash:
>> ? ? ?cfi: fix the incomplete erased status check in buffer write
>>
>> What base were you applying these to?
>
> I just tried again on u-boot.git/master...
>
>> git checkout origin/master
> Note: moving to "origin/master" which isn't a local branch
> If you want to create a new branch from this checkout, you may do so
> (now or later) by using -b with the checkout command again. Example:
> ?git checkout -b <new_branch_name>
> HEAD is now at b86a475... MAKEALL: Report boards with errors vs warnings
>
>> git am < bundle-2943.mbox
> Applying: menu: only timeout when menu is displayed
> Applying: pxe: support include files at top-level
> Applying: pxe: add support for label menu text
> Applying: pxe: support linux entries for labels
> Applying: pxe: support absolute paths
> Applying: pxe: parse initrd file from append string
> Applying: pxe: add support for parsing local syslinux files
> error: patch failed: common/cmd_pxe.c:322
> error: common/cmd_pxe.c: patch does not apply
> Patch failed at 0007.
> When you have resolved this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort".
>
> I'm attempting to apply these patches in patchwork:
>
> http://patchwork.ozlabs.org/patch/149281/
> http://patchwork.ozlabs.org/patch/149280/
> http://patchwork.ozlabs.org/patch/149282/
> http://patchwork.ozlabs.org/patch/149283/
> http://patchwork.ozlabs.org/patch/149284/
> http://patchwork.ozlabs.org/patch/149286/
> http://patchwork.ozlabs.org/patch/149285/
>
> in that order... is that incorrect?
>
> Thanks
> -Joe

Any luck figuring out why the patch at
http://patchwork.ozlabs.org/patch/149285/ will not apply?  Perhaps
just rebase (since that works for you) and resend.

Thanks,
-Joe

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

* [U-Boot] [PATCH v2] pxe: support include files at top-level
  2012-03-28 15:51 ` [U-Boot] [PATCH 2/7] pxe: support include files at top-level Rob Herring
@ 2012-05-25 20:43   ` Rob Herring
  2012-06-21 20:34     ` Wolfgang Denk
  0 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2012-05-25 20:43 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

Include files outside of a menu were not getting included and parsed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
v2:
- ensure include file load address is aligned

 common/cmd_pxe.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index b3c1f67..5949b24 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -1110,6 +1110,11 @@ static int parse_pxefile_top(char *p, struct pxe_menu *cfg, int nest_level)
 
 			break;
 
+		case T_INCLUDE:
+			err = handle_include(&p, b + ALIGN(strlen(b), 4), cfg,
+							nest_level + 1);
+			break;
+
 		case T_PROMPT:
 			err = parse_integer(&p, &cfg->prompt);
 			break;
-- 
1.7.9.5

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

* [U-Boot] [PATCH v2] pxe: add support for parsing local syslinux files
  2012-03-28 15:51 ` [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files Rob Herring
  2012-05-23 22:11   ` Joe Hershberger
@ 2012-05-25 20:47   ` Rob Herring
  2012-05-25 21:44     ` Joe Hershberger
  2012-06-21 20:36     ` Wolfgang Denk
  1 sibling, 2 replies; 22+ messages in thread
From: Rob Herring @ 2012-05-25 20:47 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

Add a new command "sysboot" which parses syslinux menu files and boots
using kernel and initrd specified by menu files. The operation is similar
to "pxe boot" except local files on ext2 or fat filesystem are parsed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
v2:
- rebase to current mainline
- fix compile if ext2 or fat is disabled

 common/cmd_pxe.c |  141 ++++++++++++++++++++++++++++++++++++++++++++++++++----
 include/common.h |    6 +++
 2 files changed, 139 insertions(+), 8 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 0fc863b..2b1115d 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -132,6 +132,51 @@ static int get_bootfile_path(const char *file_path, char *bootfile_path,
 	return 1;
 }
 
+static int (*do_getfile)(char *file_path, char *file_addr);
+
+static int do_get_tftp(char *file_path, char *file_addr)
+{
+	char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
+
+	tftp_argv[1] = file_addr;
+	tftp_argv[2] = file_path;
+
+	if (do_tftpb(NULL, 0, 3, tftp_argv))
+		return -ENOENT;
+
+	return 1;
+}
+
+static char *fs_argv[5];
+
+static int do_get_ext2(char *file_path, char *file_addr)
+{
+#ifdef CONFIG_CMD_EXT2
+	fs_argv[0] = "ext2load";
+	fs_argv[3] = file_addr;
+	fs_argv[4] = file_path;
+
+	if (!do_ext2load(NULL, 0, 5, fs_argv))
+		return 1;
+#endif
+	return -ENOENT;
+}
+
+static int do_get_fat(char *file_path, char *file_addr)
+{
+#ifdef CONFIG_CMD_FAT
+	fs_argv[0] = "fatload";
+	fs_argv[3] = file_addr;
+	fs_argv[4] = file_path;
+
+	if (!do_fat_fsload(NULL, 0, 5, fs_argv))
+		return 1;
+#endif
+	return -ENOENT;
+}
+
+
+
 /*
  * As in pxelinux, paths to files referenced from files we retrieve are
  * relative to the location of bootfile. get_relfile takes such a path and
@@ -145,7 +190,6 @@ static int get_relfile(char *file_path, void *file_addr)
 	size_t path_len;
 	char relfile[MAX_TFTP_PATH_LEN+1];
 	char addr_buf[10];
-	char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
 	int err;
 
 	err = get_bootfile_path(file_path, relfile, sizeof(relfile));
@@ -170,13 +214,7 @@ static int get_relfile(char *file_path, void *file_addr)
 
 	sprintf(addr_buf, "%p", file_addr);
 
-	tftp_argv[1] = addr_buf;
-	tftp_argv[2] = relfile;
-
-	if (do_tftpb(NULL, 0, 3, tftp_argv))
-		return -ENOENT;
-
-	return 1;
+	return do_getfile(relfile, addr_buf);
 }
 
 /*
@@ -322,6 +360,8 @@ do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	unsigned long pxefile_addr_r;
 	int err;
 
+	do_getfile = do_get_tftp;
+
 	if (argc != 1)
 		return CMD_RET_USAGE;
 
@@ -1331,6 +1371,8 @@ do_pxe_boot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	struct pxe_menu *cfg;
 	char *pxefile_addr_str;
 
+	do_getfile = do_get_tftp;
+
 	if (argc == 1) {
 		pxefile_addr_str = from_env("pxefile_addr_r");
 		if (!pxefile_addr_str)
@@ -1391,3 +1433,86 @@ U_BOOT_CMD(
 	"get - try to retrieve a pxe file using tftp\npxe "
 	"boot [pxefile_addr_r] - boot from the pxe file at pxefile_addr_r\n"
 );
+
+/*
+ * Boots a system using a local disk syslinux/extlinux file
+ *
+ * Returns 0 on success, 1 on error.
+ */
+int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	unsigned long pxefile_addr_r;
+	struct pxe_menu *cfg;
+	char *pxefile_addr_str;
+	char *filename;
+	int prompt = 0;
+
+	if (strstr(argv[1], "-p")) {
+		prompt = 1;
+		argc--;
+		argv++;
+	}
+
+	if (argc < 4)
+		return cmd_usage(cmdtp);
+
+	if (argc < 5) {
+		pxefile_addr_str = from_env("pxefile_addr_r");
+		if (!pxefile_addr_str)
+			return 1;
+	} else {
+		pxefile_addr_str = argv[4];
+	}
+
+	if (argc < 6)
+		filename = getenv("bootfile");
+	else {
+		filename = argv[5];
+		setenv("bootfile", filename);
+	}
+
+	if (strstr(argv[3], "ext2"))
+		do_getfile = do_get_ext2;
+	else if (strstr(argv[3], "fat"))
+		do_getfile = do_get_fat;
+	else {
+		printf("Invalid filesystem: %s\n", argv[3]);
+		return 1;
+	}
+	fs_argv[1] = argv[1];
+	fs_argv[2] = argv[2];
+
+	if (strict_strtoul(pxefile_addr_str, 16, &pxefile_addr_r) < 0) {
+		printf("Invalid pxefile address: %s\n", pxefile_addr_str);
+		return 1;
+	}
+
+	if (get_pxe_file(filename, (void *)pxefile_addr_r) < 0) {
+		printf("Error reading config file\n");
+		return 1;
+	}
+
+	cfg = parse_pxefile((char *)(pxefile_addr_r));
+
+	if (cfg == NULL) {
+		printf("Error parsing config file\n");
+		return 1;
+	}
+
+	if (prompt)
+		cfg->prompt = 1;
+
+	handle_pxe_menu(cfg);
+
+	destroy_pxe_menu(cfg);
+
+	return 0;
+}
+
+U_BOOT_CMD(
+	sysboot, 7, 1, do_sysboot,
+	"command to get and boot from syslinux files",
+	"[-p] <interface> <dev[:part]> <ext2|fat> [addr] [filename]\n"
+	"    - load and parse syslinux menu file 'filename' from ext2 or fat\n"
+	"      filesystem on 'dev' on 'interface' to address 'addr'"
+);
diff --git a/include/common.h b/include/common.h
index eb9de18..49b1f75 100644
--- a/include/common.h
+++ b/include/common.h
@@ -325,6 +325,12 @@ void	doc_probe(unsigned long physadr);
 /* common/cmd_net.c */
 int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 
+/* common/cmd_fat.c */
+int do_fat_fsload(cmd_tbl_t *, int, int, char * const []);
+
+/* common/cmd_ext2.c */
+int do_ext2load(cmd_tbl_t *, int, int, char * const []);
+
 /* common/cmd_nvedit.c */
 int	env_init     (void);
 void	env_relocate (void);
-- 
1.7.9.5

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

* [U-Boot] [PATCH v2] pxe: add support for parsing local syslinux files
  2012-05-25 20:47   ` [U-Boot] [PATCH v2] " Rob Herring
@ 2012-05-25 21:44     ` Joe Hershberger
  2012-06-21 20:36     ` Wolfgang Denk
  1 sibling, 0 replies; 22+ messages in thread
From: Joe Hershberger @ 2012-05-25 21:44 UTC (permalink / raw)
  To: u-boot

Hi Rob,

On Fri, May 25, 2012 at 3:47 PM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Add a new command "sysboot" which parses syslinux menu files and boots
> using kernel and initrd specified by menu files. The operation is similar
> to "pxe boot" except local files on ext2 or fat filesystem are parsed.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
> v2:
> - rebase to current mainline
> - fix compile if ext2 or fat is disabled

It applies now.

Thanks,
-Joe

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

* [U-Boot] [PATCH 1/7] menu: only timeout when menu is displayed
  2012-03-28 15:51 ` [U-Boot] [PATCH 1/7] menu: only timeout when menu is displayed Rob Herring
@ 2012-06-21 20:34   ` Wolfgang Denk
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Denk @ 2012-06-21 20:34 UTC (permalink / raw)
  To: u-boot

Dear Rob Herring,

In message <1332949898-6502-2-git-send-email-robherring2@gmail.com> you wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> Make the menu timeout apply only when prompt flag is set and after the
> menu is displayed. This allows auto boot to work no matter whether prompt
> is set or cleared. Use the default selection if the menu times out.
> 
> This also fixes the timeout value given to readline_into_buffer to be
> seconds instead of 10th of seconds.
> 
> Old behavior:
> 
> if prompt
>   display menu and wait for choice
> else
>   wait for timeout
>   if key pressed
>     display menu and wait for choice
>   else
>     exit command
> 
> New behavior:
> 
> if prompt
>   display menu
>   if key pressed
>     wait for choice
>   else
>     boot default entry on timeout
> else
>   boot default entry
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
>  common/menu.c |   36 ++++--------------------------------
>  1 files changed, 4 insertions(+), 32 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
We fight only when there is no other choice. We prefer  the  ways  of
peaceful contact.
	-- Kirk, "Spectre of the Gun", stardate 4385.3

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

* [U-Boot] [PATCH v2] pxe: support include files at top-level
  2012-05-25 20:43   ` [U-Boot] [PATCH v2] " Rob Herring
@ 2012-06-21 20:34     ` Wolfgang Denk
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Denk @ 2012-06-21 20:34 UTC (permalink / raw)
  To: u-boot

Dear Rob Herring,

In message <1337978596-7769-1-git-send-email-robherring2@gmail.com> you wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> Include files outside of a menu were not getting included and parsed.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
> v2:
> - ensure include file load address is aligned
> 
>  common/cmd_pxe.c |    5 +++++
>  1 file changed, 5 insertions(+)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Imagination is more important than knowledge.      -- Albert Einstein

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

* [U-Boot] [PATCH 3/7] pxe: add support for label menu text
  2012-03-28 15:51 ` [U-Boot] [PATCH 3/7] pxe: add support for label menu text Rob Herring
@ 2012-06-21 20:34   ` Wolfgang Denk
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Denk @ 2012-06-21 20:34 UTC (permalink / raw)
  To: u-boot

Dear Rob Herring,

In message <1332949898-6502-4-git-send-email-robherring2@gmail.com> you wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> Use a menu string if present, otherwise use the kernel string.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
>  common/cmd_pxe.c |   13 +++++++++----
>  1 files changed, 9 insertions(+), 4 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The ultimate barrier is one's viewpoint.
                        - Terry Pratchett, _The Dark Side of the Sun_

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

* [U-Boot] [PATCH 4/7] pxe: support linux entries for labels
  2012-03-28 15:51 ` [U-Boot] [PATCH 4/7] pxe: support linux entries for labels Rob Herring
@ 2012-06-21 20:35   ` Wolfgang Denk
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Denk @ 2012-06-21 20:35 UTC (permalink / raw)
  To: u-boot

Dear Rob Herring,

In message <1332949898-6502-5-git-send-email-robherring2@gmail.com> you wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> Kernels can be specified using "linux" or "kernel" entry. The difference
> is kernel is supposed to detect the type of file, but for u-boot both are
> treated the same.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
>  common/cmd_pxe.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A stone was placed at a ford in a river with the inscription:
"When this stone is covered it is dangerous to ford here."

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

* [U-Boot] [PATCH 5/7] pxe: support absolute paths
  2012-03-28 15:51 ` [U-Boot] [PATCH 5/7] pxe: support absolute paths Rob Herring
@ 2012-06-21 20:35   ` Wolfgang Denk
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Denk @ 2012-06-21 20:35 UTC (permalink / raw)
  To: u-boot

Dear Rob Herring,

In message <1332949898-6502-6-git-send-email-robherring2@gmail.com> you wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> If the file path starts with a '/', then don't pre-pend the bootfile path.
> This fixes a problem with running 'pxe boot' multiple times where the
> bootfile path gets pre-pended to itself each time.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
>  common/cmd_pxe.c |   23 ++++++++++++-----------
>  1 files changed, 12 insertions(+), 11 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Pain is a thing of the mind.  The mind can be controlled.
	-- Spock, "Operation -- Annihilate!" stardate 3287.2

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

* [U-Boot] [PATCH 6/7] pxe: parse initrd file from append string
  2012-03-28 15:51 ` [U-Boot] [PATCH 6/7] pxe: parse initrd file from append string Rob Herring
@ 2012-06-21 20:35   ` Wolfgang Denk
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Denk @ 2012-06-21 20:35 UTC (permalink / raw)
  To: u-boot

Dear Rob Herring,

In message <1332949898-6502-7-git-send-email-robherring2@gmail.com> you wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> For syslinux, the initrd can be set in the append string as
> "initrd=<file>", so try to find it there if we haven't already set the
> initrd.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
>  common/cmd_pxe.c |   15 ++++++++++++++-
>  doc/README.pxe   |    3 ---
>  2 files changed, 14 insertions(+), 4 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
First study the enemy.  Seek weakness.
	-- Romulan Commander, "Balance of Terror", stardate 1709.2

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

* [U-Boot] [PATCH v2] pxe: add support for parsing local syslinux files
  2012-05-25 20:47   ` [U-Boot] [PATCH v2] " Rob Herring
  2012-05-25 21:44     ` Joe Hershberger
@ 2012-06-21 20:36     ` Wolfgang Denk
  1 sibling, 0 replies; 22+ messages in thread
From: Wolfgang Denk @ 2012-06-21 20:36 UTC (permalink / raw)
  To: u-boot

Dear Rob Herring,

In message <1337978859-8501-1-git-send-email-robherring2@gmail.com> you wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> Add a new command "sysboot" which parses syslinux menu files and boots
> using kernel and initrd specified by menu files. The operation is similar
> to "pxe boot" except local files on ext2 or fat filesystem are parsed.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
> v2:
> - rebase to current mainline
> - fix compile if ext2 or fat is disabled
> 
>  common/cmd_pxe.c |  141 ++++++++++++++++++++++++++++++++++++++++++++++++++----
>  include/common.h |    6 +++
>  2 files changed, 139 insertions(+), 8 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When a child is taught ... its programmed with simple instructions --
and at some point, if its mind develops properly, it exceeds the  sum
of what it was taught, thinks independently.
	-- Dr. Richard Daystrom, "The Ultimate Computer",
	   stardate 4731.3.

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

end of thread, other threads:[~2012-06-21 20:36 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-28 15:51 [U-Boot] [PATCH 0/7] PXE parsing fixes and local file support Rob Herring
2012-03-28 15:51 ` [U-Boot] [PATCH 1/7] menu: only timeout when menu is displayed Rob Herring
2012-06-21 20:34   ` Wolfgang Denk
2012-03-28 15:51 ` [U-Boot] [PATCH 2/7] pxe: support include files at top-level Rob Herring
2012-05-25 20:43   ` [U-Boot] [PATCH v2] " Rob Herring
2012-06-21 20:34     ` Wolfgang Denk
2012-03-28 15:51 ` [U-Boot] [PATCH 3/7] pxe: add support for label menu text Rob Herring
2012-06-21 20:34   ` Wolfgang Denk
2012-03-28 15:51 ` [U-Boot] [PATCH 4/7] pxe: support linux entries for labels Rob Herring
2012-06-21 20:35   ` Wolfgang Denk
2012-03-28 15:51 ` [U-Boot] [PATCH 5/7] pxe: support absolute paths Rob Herring
2012-06-21 20:35   ` Wolfgang Denk
2012-03-28 15:51 ` [U-Boot] [PATCH 6/7] pxe: parse initrd file from append string Rob Herring
2012-06-21 20:35   ` Wolfgang Denk
2012-03-28 15:51 ` [U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files Rob Herring
2012-05-23 22:11   ` Joe Hershberger
2012-05-23 22:57     ` Rob Herring
2012-05-23 23:02       ` Joe Hershberger
2012-05-25 18:56         ` Joe Hershberger
2012-05-25 20:47   ` [U-Boot] [PATCH v2] " Rob Herring
2012-05-25 21:44     ` Joe Hershberger
2012-06-21 20:36     ` Wolfgang Denk

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.