All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET)
@ 2014-02-06  3:49 Stephen Warren
  2014-02-06  3:49 ` [U-Boot] [PATCH V2 2/4] ARM: rpi_b: convert to use distro defaults Stephen Warren
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Stephen Warren @ 2014-02-06  3:49 UTC (permalink / raw)
  To: u-boot

pxe.c provides both the "pxe" command which relies on a network, and the
"sysboot" command which doesn't. Fix the file to compile when network
support isn't enabled. This is useful e.g. on the Raspberry Pi which has
no network support yet, but will soon support the sysboot command.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
v2: No change.

This patch doesn't appear to depend on anything much, but is needed by
the rest of this series. Given the dependencies in the rest of this
series, either (a) this one patch can be applied to u-boot/master, and
then u-boot/arm can merge that in before the rest of the series, or (b)
u-boot/master can be merged into u-boot-arm/master, then this whole
series applied there.
---
 common/cmd_pxe.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 29e48db..3d13268 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -45,6 +45,7 @@ static char *from_env(const char *envvar)
 	return ret;
 }
 
+#ifdef CONFIG_CMD_NET
 /*
  * Convert an ethaddr from the environment to the format used by pxelinux
  * filenames based on mac addresses. Convert's ':' to '-', and adds "01-" to
@@ -75,6 +76,7 @@ static int format_mac_pxe(char *outbuf, size_t outbuf_len)
 
 	return 1;
 }
+#endif
 
 /*
  * Returns the directory the file specified in the bootfile env variable is
@@ -120,6 +122,7 @@ static int get_bootfile_path(const char *file_path, char *bootfile_path,
 
 static int (*do_getfile)(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr);
 
+#ifdef CONFIG_CMD_NET
 static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
 {
 	char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
@@ -132,6 +135,7 @@ static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
 
 	return 1;
 }
+#endif
 
 static char *fs_argv[5];
 
@@ -249,6 +253,8 @@ static int get_pxe_file(cmd_tbl_t *cmdtp, const char *file_path, void *file_addr
 	return 1;
 }
 
+#ifdef CONFIG_CMD_NET
+
 #define PXELINUX_DIR "pxelinux.cfg/"
 
 /*
@@ -397,6 +403,7 @@ do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	return 1;
 }
+#endif
 
 /*
  * Wrapper to make it easier to store the file at file_path in the location
@@ -647,6 +654,7 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
 		len += strlen(ip_str);
 	}
 
+#ifdef CONFIG_CMD_NET
 	if (label->ipappend & 0x2) {
 		int err;
 		strcpy(mac_str, " BOOTIF=");
@@ -655,6 +663,7 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
 			mac_str[0] = '\0';
 		len += strlen(mac_str);
 	}
+#endif
 
 	if (label->append)
 		len += strlen(label->append);
@@ -1500,6 +1509,7 @@ static void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg)
 	boot_unattempted_labels(cmdtp, cfg);
 }
 
+#ifdef CONFIG_CMD_NET
 /*
  * Boots a system using a pxe file
  *
@@ -1576,6 +1586,7 @@ 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"
 );
+#endif
 
 /*
  * Boots a system using a local disk syslinux/extlinux file
-- 
1.8.3.2

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

* [U-Boot] [PATCH V2 2/4] ARM: rpi_b: convert to use distro defaults
  2014-02-06  3:49 [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Stephen Warren
@ 2014-02-06  3:49 ` Stephen Warren
  2014-02-06  3:49 ` [U-Boot] [PATCH V2 3/4] ARM: rpi_b: load /uEnv.txt from MMC at startup Stephen Warren
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Stephen Warren @ 2014-02-06  3:49 UTC (permalink / raw)
  To: u-boot

Modify the rpi_b board to include the "distro defaults" header, so that
all the config options distros expect are enabled. Remove any #defines
that enable the same options from the rpi_b.h.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
v2: No change.

Patches 2/4 and 4/4 depend on various patches in u-boot/master, so that
will need to be merged into u-boot-arm/master if this series gets applied
there. In particular, "config: add config_distro_defaults.h" and various
patches before that are required.
---
 include/configs/rpi_b.h | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h
index 976ceaa..202c9c3 100644
--- a/include/configs/rpi_b.h
+++ b/include/configs/rpi_b.h
@@ -147,37 +147,34 @@
 #define CONFIG_BOOTDELAY		2
 
 /* Shell */
-#define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_MAXARGS		8
 #define CONFIG_SYS_PROMPT		"U-Boot> "
-#define CONFIG_SYS_LONGHELP
-#define CONFIG_CMDLINE_EDITING
 #define CONFIG_COMMAND_HISTORY
-#define CONFIG_AUTO_COMPLETE
 
 /* Commands */
 #include <config_cmd_default.h>
-#define CONFIG_CMD_BOOTZ
 #define CONFIG_CMD_GPIO
 #define CONFIG_CMD_MMC
-#define CONFIG_DOS_PARTITION
 #define CONFIG_PARTITION_UUIDS
 #define CONFIG_CMD_PART
-#define CONFIG_CMD_FS_GENERIC
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_EXT
-/* Some things don't make sense on this HW or yet */
-#undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_NET
-#undef CONFIG_CMD_NFS
-#undef CONFIG_CMD_SAVEENV
 
-/* Device tree support for bootm/bootz */
-#define CONFIG_OF_LIBFDT
+/* Device tree support */
 #define CONFIG_OF_BOARD_SETUP
 /* ATAGs support for bootm/bootz */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_INITRD_TAG
 
+#include <config_distro_defaults.h>
+
+/* Some things don't make sense on this HW or yet */
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
+#undef CONFIG_CMD_SAVEENV
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_MII
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_PING
+
 #endif
-- 
1.8.3.2

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

* [U-Boot] [PATCH V2 3/4] ARM: rpi_b: load /uEnv.txt from MMC at startup
  2014-02-06  3:49 [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Stephen Warren
  2014-02-06  3:49 ` [U-Boot] [PATCH V2 2/4] ARM: rpi_b: convert to use distro defaults Stephen Warren
@ 2014-02-06  3:49 ` Stephen Warren
  2014-02-06  3:49 ` [U-Boot] [PATCH V2 4/4] ARM: rpi_b: rework boot scripts, enable sysboot Stephen Warren
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Stephen Warren @ 2014-02-06  3:49 UTC (permalink / raw)
  To: u-boot

The Pi has no flash to store an environment in the usual fashion. However,
the user may wish to customize the environment. We know that the SD card
must be present, since that's where the boot ROM has loaded U-Boot from.
So, load uEnv.txt from there early during boot. This allows the user to
e.g. customize boot_targets, in order to automatically select network
boot.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
v2: No change.
---
 include/configs/rpi_b.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h
index 202c9c3..4b5a0c2 100644
--- a/include/configs/rpi_b.h
+++ b/include/configs/rpi_b.h
@@ -95,6 +95,11 @@
 #define CONFIG_SYS_LOAD_ADDR		0x1000000
 #define CONFIG_CONSOLE_MUX
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_PREBOOT \
+	"if load mmc 0:1 ${loadaddr} /uEnv.txt; then " \
+		"env import -t ${loadaddr} ${filesize}; " \
+	"fi"
+
 /*
  * Memory layout for where various images get loaded by boot scripts:
  *
-- 
1.8.3.2

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

* [U-Boot] [PATCH V2 4/4] ARM: rpi_b: rework boot scripts, enable sysboot
  2014-02-06  3:49 [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Stephen Warren
  2014-02-06  3:49 ` [U-Boot] [PATCH V2 2/4] ARM: rpi_b: convert to use distro defaults Stephen Warren
  2014-02-06  3:49 ` [U-Boot] [PATCH V2 3/4] ARM: rpi_b: load /uEnv.txt from MMC at startup Stephen Warren
@ 2014-02-06  3:49 ` Stephen Warren
  2014-02-10  8:52 ` [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Albert ARIBAUD
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Stephen Warren @ 2014-02-06  3:49 UTC (permalink / raw)
  To: u-boot

Rework rpi_b's bootcmd (and sub-commands) to match Tegra's bootcmd as
much as possible. This will aid in a future patch which will create a
common header e.g. config_distro_bootcmd.h.

While at it, enable booting from extlinux.conf using the sysboot command.

The iteration and componentization currently makes a little more sense
for Tegra than RPi, but I'd still like to keep the two as similar as
possible. USB and networking support is coming to the RPi in due course,
and it'll all make more sense then anyway.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
v2:
* Replace ; in the middle of echo'd text in boot scripts.
* Add missing space between commands in boot scripts.
---
 include/configs/rpi_b.h | 87 ++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 72 insertions(+), 15 deletions(-)

diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h
index 4b5a0c2..68bb2b0 100644
--- a/include/configs/rpi_b.h
+++ b/include/configs/rpi_b.h
@@ -100,12 +100,20 @@
 		"env import -t ${loadaddr} ${filesize}; " \
 	"fi"
 
+#define ENV_DEVICE_SETTINGS \
+	"stdin=serial,lcd\0" \
+	"stdout=serial,lcd\0" \
+	"stderr=serial,lcd\0"
+
 /*
  * Memory layout for where various images get loaded by boot scripts:
  *
  * scriptaddr can be pretty much anywhere that doesn't conflict with something
  *   else. Put it low in memory to avoid conflicts.
  *
+ * pxefile_addr_r can be pretty much anywhere that doesn't conflict with
+ *   something else. Put it low in memory to avoid conflicts.
+ *
  * kernel_addr_r must be within the first 128M of RAM in order for the
  *   kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will
  *   decompress itself to 0x8000 after the start of RAM, kernel_addr_r
@@ -121,35 +129,84 @@
  * ramdisk_addr_r simply shouldn't overlap anything else. Choosing 33M allows
  *   for the FDT/DTB to be up to 1M, which is hopefully plenty.
  */
-#define CONFIG_EXTRA_ENV_SETTINGS \
-	"stdin=serial\0" \
-	"stderr=serial,lcd\0" \
-	"stdout=serial,lcd\0" \
+#define ENV_MEM_LAYOUT_SETTINGS \
 	"scriptaddr=0x00000000\0" \
+	"pxefile_addr_r=0x00100000\0" \
 	"kernel_addr_r=0x01000000\0" \
 	"fdt_addr_r=0x02000000\0" \
 	"fdtfile=bcm2835-rpi-b.dtb\0" \
 	"ramdisk_addr_r=0x02100000\0" \
-	"boot_targets=mmc0\0" \
-	\
-	"script_boot=" \
-		"if fatload ${devtype} ${devnum}:1 " \
-					"${scriptaddr} boot.scr.uimg; then " \
-			"source ${scriptaddr}; " \
-		"fi;\0" \
-	\
+
+#define BOOTCMDS_MMC \
 	"mmc_boot=" \
 		"setenv devtype mmc; " \
 		"if mmc dev ${devnum}; then " \
-			"run script_boot; " \
+			"run scan_boot; " \
 		"fi\0" \
+	"bootcmd_mmc0=setenv devnum 0; run mmc_boot;\0"
+#define BOOT_TARGETS_MMC "mmc0"
+
+#define BOOTCMDS_COMMON \
+	"rootpart=1\0" \
+	\
+	"do_script_boot="                                                 \
+		"load ${devtype} ${devnum}:${rootpart} "                  \
+			"${scriptaddr} ${prefix}${script}; "              \
+		"source ${scriptaddr}\0"                                  \
+	\
+	"script_boot="                                                    \
+		"for script in ${boot_scripts}; do "                      \
+			"if test -e ${devtype} ${devnum}:${rootpart} "    \
+					"${prefix}${script}; then "       \
+				"echo Found U-Boot script "               \
+					"${prefix}${script}; "            \
+				"run do_script_boot; "                    \
+				"echo SCRIPT FAILED: continuing...; "     \
+			"fi; "                                            \
+		"done\0"                                                  \
 	\
-	"bootcmd_mmc0=setenv devnum 0; run mmc_boot\0" \
+	"do_sysboot_boot="                                                \
+		"sysboot ${devtype} ${devnum}:${rootpart} any "           \
+			"${scriptaddr} ${prefix}extlinux.conf\0"          \
+	\
+	"sysboot_boot="                                                   \
+		"if test -e ${devtype} ${devnum}:${rootpart} "            \
+				"${prefix}extlinux.conf; then "           \
+			"echo Found extlinux config "                     \
+				"${prefix}extlinux.conf; "                \
+			"run do_sysboot_boot; "                           \
+			"echo SCRIPT FAILED: continuing...; "             \
+		"fi\0"                                                    \
+	\
+	"scan_boot="                                                      \
+		"echo Scanning ${devtype} ${devnum}...; "                 \
+		"for prefix in ${boot_prefixes}; do "                     \
+			"run sysboot_boot; "                              \
+			"run script_boot; "                               \
+		"done\0"                                                  \
+	\
+	"boot_targets=" \
+		BOOT_TARGETS_MMC " " \
+		"\0" \
+	\
+	"boot_prefixes=/\0" \
+	\
+	"boot_scripts=boot.scr.uimg\0" \
+	\
+	BOOTCMDS_MMC
 
 #define CONFIG_BOOTCOMMAND \
 	"for target in ${boot_targets}; do run bootcmd_${target}; done"
 
-#define CONFIG_BOOTDELAY		2
+#define CONFIG_BOOTCOMMAND \
+	"for target in ${boot_targets}; do run bootcmd_${target}; done"
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	ENV_DEVICE_SETTINGS \
+	ENV_MEM_LAYOUT_SETTINGS \
+	BOOTCMDS_COMMON
+
+#define CONFIG_BOOTDELAY 2
 
 /* Shell */
 #define CONFIG_SYS_MAXARGS		8
-- 
1.8.3.2

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

* [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET)
  2014-02-06  3:49 [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Stephen Warren
                   ` (2 preceding siblings ...)
  2014-02-06  3:49 ` [U-Boot] [PATCH V2 4/4] ARM: rpi_b: rework boot scripts, enable sysboot Stephen Warren
@ 2014-02-10  8:52 ` Albert ARIBAUD
  2014-02-21  4:14 ` Stephen Warren
  2014-02-22 13:04 ` Albert ARIBAUD
  5 siblings, 0 replies; 9+ messages in thread
From: Albert ARIBAUD @ 2014-02-10  8:52 UTC (permalink / raw)
  To: u-boot

Hi Stephen,

On Wed,  5 Feb 2014 20:49:20 -0700, Stephen Warren
<swarren@wwwdotorg.org> wrote:

> pxe.c provides both the "pxe" command which relies on a network, and the
> "sysboot" command which doesn't. Fix the file to compile when network
> support isn't enabled. This is useful e.g. on the Raspberry Pi which has
> no network support yet, but will soon support the sysboot command.
> 
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
> ---
> v2: No change.
> 
> This patch doesn't appear to depend on anything much, but is needed by
> the rest of this series. Given the dependencies in the rest of this
> series, either (a) this one patch can be applied to u-boot/master, and
> then u-boot/arm can merge that in before the rest of the series, or (b)
> u-boot/master can be merged into u-boot-arm/master, then this whole
> series applied there.

I'm ok with applying the series to u-boot-arm since it is 75%
arm-specific and I prefer whole series to be applied in the same repo.

Amicalement,
-- 
Albert.

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

* [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET)
  2014-02-06  3:49 [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Stephen Warren
                   ` (3 preceding siblings ...)
  2014-02-10  8:52 ` [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Albert ARIBAUD
@ 2014-02-21  4:14 ` Stephen Warren
  2014-02-21 14:31   ` Albert ARIBAUD
  2014-02-22 13:04 ` Albert ARIBAUD
  5 siblings, 1 reply; 9+ messages in thread
From: Stephen Warren @ 2014-02-21  4:14 UTC (permalink / raw)
  To: u-boot

On 02/05/2014 08:49 PM, Stephen Warren wrote:
> pxe.c provides both the "pxe" command which relies on a network, and the
> "sysboot" command which doesn't. Fix the file to compile when network
> support isn't enabled. This is useful e.g. on the Raspberry Pi which has
> no network support yet, but will soon support the sysboot command.

Albert, does this series look good? Everything it relies on should be in
u-boot/master for a while now. Thanks.

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

* [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET)
  2014-02-21  4:14 ` Stephen Warren
@ 2014-02-21 14:31   ` Albert ARIBAUD
  2014-02-21 14:41     ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Albert ARIBAUD @ 2014-02-21 14:31 UTC (permalink / raw)
  To: u-boot

Hi Stephen,

On Thu, 20 Feb 2014 21:14:52 -0700, Stephen Warren
<swarren@wwwdotorg.org> wrote:

> On 02/05/2014 08:49 PM, Stephen Warren wrote:
> > pxe.c provides both the "pxe" command which relies on a network, and the
> > "sysboot" command which doesn't. Fix the file to compile when network
> > support isn't enabled. This is useful e.g. on the Raspberry Pi which has
> > no network support yet, but will soon support the sysboot command.
> 
> Albert, does this series look good? Everything it relies on should be in
> u-boot/master for a while now. Thanks.

Series looks good, just waiting to be applied and tested.

Amicalement,
-- 
Albert.

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

* [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET)
  2014-02-21 14:31   ` Albert ARIBAUD
@ 2014-02-21 14:41     ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2014-02-21 14:41 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 21, 2014 at 03:31:07PM +0100, Albert ARIBAUD wrote:
> Hi Stephen,
> 
> On Thu, 20 Feb 2014 21:14:52 -0700, Stephen Warren
> <swarren@wwwdotorg.org> wrote:
> 
> > On 02/05/2014 08:49 PM, Stephen Warren wrote:
> > > pxe.c provides both the "pxe" command which relies on a network, and the
> > > "sysboot" command which doesn't. Fix the file to compile when network
> > > support isn't enabled. This is useful e.g. on the Raspberry Pi which has
> > > no network support yet, but will soon support the sysboot command.
> > 
> > Albert, does this series look good? Everything it relies on should be in
> > u-boot/master for a while now. Thanks.
> 
> Series looks good, just waiting to be applied and tested.

Soon then please?  Thanks! :)

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140221/c82b4794/attachment.pgp>

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

* [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET)
  2014-02-06  3:49 [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Stephen Warren
                   ` (4 preceding siblings ...)
  2014-02-21  4:14 ` Stephen Warren
@ 2014-02-22 13:04 ` Albert ARIBAUD
  5 siblings, 0 replies; 9+ messages in thread
From: Albert ARIBAUD @ 2014-02-22 13:04 UTC (permalink / raw)
  To: u-boot

Hi Stephen,

On Wed,  5 Feb 2014 20:49:20 -0700, Stephen Warren
<swarren@wwwdotorg.org> wrote:

> pxe.c provides both the "pxe" command which relies on a network, and the
> "sysboot" command which doesn't. Fix the file to compile when network
> support isn't enabled. This is useful e.g. on the Raspberry Pi which has
> no network support yet, but will soon support the sysboot command.
> 
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
> ---
> v2: No change.
> 
> This patch doesn't appear to depend on anything much, but is needed by
> the rest of this series. Given the dependencies in the rest of this
> series, either (a) this one patch can be applied to u-boot/master, and
> then u-boot/arm can merge that in before the rest of the series, or (b)
> u-boot/master can be merged into u-boot-arm/master, then this whole
> series applied there.
> ---
>  common/cmd_pxe.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
> index 29e48db..3d13268 100644
> --- a/common/cmd_pxe.c
> +++ b/common/cmd_pxe.c
> @@ -45,6 +45,7 @@ static char *from_env(const char *envvar)
>  	return ret;
>  }
>  
> +#ifdef CONFIG_CMD_NET
>  /*
>   * Convert an ethaddr from the environment to the format used by pxelinux
>   * filenames based on mac addresses. Convert's ':' to '-', and adds "01-" to
> @@ -75,6 +76,7 @@ static int format_mac_pxe(char *outbuf, size_t outbuf_len)
>  
>  	return 1;
>  }
> +#endif
>  
>  /*
>   * Returns the directory the file specified in the bootfile env variable is
> @@ -120,6 +122,7 @@ static int get_bootfile_path(const char *file_path, char *bootfile_path,
>  
>  static int (*do_getfile)(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr);
>  
> +#ifdef CONFIG_CMD_NET
>  static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
>  {
>  	char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
> @@ -132,6 +135,7 @@ static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
>  
>  	return 1;
>  }
> +#endif
>  
>  static char *fs_argv[5];
>  
> @@ -249,6 +253,8 @@ static int get_pxe_file(cmd_tbl_t *cmdtp, const char *file_path, void *file_addr
>  	return 1;
>  }
>  
> +#ifdef CONFIG_CMD_NET
> +
>  #define PXELINUX_DIR "pxelinux.cfg/"
>  
>  /*
> @@ -397,6 +403,7 @@ do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>  
>  	return 1;
>  }
> +#endif
>  
>  /*
>   * Wrapper to make it easier to store the file at file_path in the location
> @@ -647,6 +654,7 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
>  		len += strlen(ip_str);
>  	}
>  
> +#ifdef CONFIG_CMD_NET
>  	if (label->ipappend & 0x2) {
>  		int err;
>  		strcpy(mac_str, " BOOTIF=");
> @@ -655,6 +663,7 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
>  			mac_str[0] = '\0';
>  		len += strlen(mac_str);
>  	}
> +#endif
>  
>  	if (label->append)
>  		len += strlen(label->append);
> @@ -1500,6 +1509,7 @@ static void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg)
>  	boot_unattempted_labels(cmdtp, cfg);
>  }
>  
> +#ifdef CONFIG_CMD_NET
>  /*
>   * Boots a system using a pxe file
>   *
> @@ -1576,6 +1586,7 @@ 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"
>  );
> +#endif
>  
>  /*
>   * Boots a system using a local disk syslinux/extlinux file

Applied the whole series to u-boot-arm/master, thanks!

Amicalement,
-- 
Albert.

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

end of thread, other threads:[~2014-02-22 13:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-06  3:49 [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Stephen Warren
2014-02-06  3:49 ` [U-Boot] [PATCH V2 2/4] ARM: rpi_b: convert to use distro defaults Stephen Warren
2014-02-06  3:49 ` [U-Boot] [PATCH V2 3/4] ARM: rpi_b: load /uEnv.txt from MMC at startup Stephen Warren
2014-02-06  3:49 ` [U-Boot] [PATCH V2 4/4] ARM: rpi_b: rework boot scripts, enable sysboot Stephen Warren
2014-02-10  8:52 ` [U-Boot] [PATCH V2 1/4] pxe: allow compilation when !defined(CONFIG_CMD_NET) Albert ARIBAUD
2014-02-21  4:14 ` Stephen Warren
2014-02-21 14:31   ` Albert ARIBAUD
2014-02-21 14:41     ` Tom Rini
2014-02-22 13:04 ` Albert ARIBAUD

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.