diff --git a/arch/arm/include/asm/arch-am33xx/spl.h b/arch/arm/include/asm/arch-am33xx/spl.h
index 70f521d26972264497ba77f5e2c14b56422757d7..dc838823d3269cdee8800f28b9752ca6f2b65771 100644
--- a/arch/arm/include/asm/arch-am33xx/spl.h
+++ b/arch/arm/include/asm/arch-am33xx/spl.h
@@ -27,5 +27,6 @@
 #define BOOT_DEVICE_MMC1	8
 #define BOOT_DEVICE_MMC2	9	/* eMMC or daughter card */
 #define BOOT_DEVICE_UART	65
+#define BOOT_DEVICE_CPGMAC	70
 #define BOOT_DEVICE_MMC2_2      0xFF
 #endif
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 99f833f0410ac197d1bfab8e6a5f4ae99beedc23..4954475553264ca7afcd6bfbe66f4f41d57ec29b 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -488,7 +488,7 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-#ifdef CONFIG_USB_EHCI
+#if defined(CONFIG_USB_EHCI) && !defined(CONFIG_SPL_BUILD)
 /* Call usb_stop() before starting the kernel */
 void show_boot_progress(int val)
 {
diff --git a/common/Makefile b/common/Makefile
index 125b2be31557c22d98bc592b86561b364cc74900..5442fbbc99d226c2a320ff5f86f46ce67cbdcfbe 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -198,6 +198,10 @@ endif
 
 ifdef CONFIG_SPL_BUILD
 COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
+COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o
+COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o
+COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o
+COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
 endif
 COBJS-y += console.o
 COBJS-y += dlmalloc.o
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 3474bc60940bb1b4d5ac7dc9324287627f3939b4..8ecc4982309874e4cbfe8c1c0b6e0dd0efb17010 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -103,6 +103,7 @@ int get_env_id(void)
 	return env_id;
 }
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * Command interface: print one or all environment variables
  *
@@ -196,6 +197,7 @@ static int do_env_grep(cmd_tbl_t *cmdtp, int flag,
 	return rcode;
 }
 #endif
+#endif /* CONFIG_SPL_BUILD */
 
 /*
  * Perform consistency checking before setting, replacing, or deleting an
@@ -437,6 +439,7 @@ int setenv_addr(const char *varname, const void *addr)
 	return setenv(varname, str);
 }
 
+#ifndef CONFIG_SPL_BUILD
 int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc < 2)
@@ -536,6 +539,7 @@ int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return setenv(argv[1], buffer);
 }
 #endif /* CONFIG_CMD_EDITENV */
+#endif /* CONFIG_SPL_BUILD */
 
 /*
  * Look up variable from environment,
@@ -621,6 +625,7 @@ ulong getenv_ulong(const char *name, int base, ulong default_val)
 	return str ? simple_strtoul(str, NULL, base) : default_val;
 }
 
+#ifndef CONFIG_SPL_BUILD
 #if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
 int do_env_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
@@ -635,6 +640,7 @@ U_BOOT_CMD(
 	""
 );
 #endif
+#endif /* CONFIG_SPL_BUILD */
 
 
 /*
@@ -656,6 +662,7 @@ int envmatch(uchar *s1, int i2)
 	return -1;
 }
 
+#ifndef CONFIG_SPL_BUILD
 static int do_env_default(cmd_tbl_t *cmdtp, int __flag,
 			  int argc, char * const argv[])
 {
@@ -1114,3 +1121,4 @@ U_BOOT_CMD_COMPLETE(
 	var_complete
 );
 #endif
+#endif /* CONFIG_SPL_BUILD */
diff --git a/common/env_common.c b/common/env_common.c
index 3e46c260df815a2dfeb4d707c6e697cc0ce80347..57221efe01f6547eea67ccf99e8d597875d7df38 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -231,6 +231,7 @@ int set_default_vars(int nvars, char * const vars[])
 				nvars, vars, 1 /* do_apply */);
 }
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * Check if CRC is valid and (if yes) import the environment.
  * Note that "buf" may or may not be aligned.
@@ -262,6 +263,7 @@ int env_import(const char *buf, int check)
 
 	return 0;
 }
+#endif
 
 void env_relocate(void)
 {
@@ -269,7 +271,8 @@ void env_relocate(void)
 	env_reloc();
 #endif
 	if (gd->env_valid == 0) {
-#if defined(CONFIG_ENV_IS_NOWHERE)	/* Environment not changable */
+#if defined(CONFIG_ENV_IS_NOWHERE) || defined(CONFIG_SPL_BUILD)
+		/* Environment not changable */
 		set_default_env(NULL);
 #else
 		bootstage_error(BOOTSTAGE_ID_NET_CHECKSUM);
@@ -280,7 +283,7 @@ void env_relocate(void)
 	}
 }
 
-#ifdef CONFIG_AUTO_COMPLETE
+#if defined(CONFIG_AUTO_COMPLETE) && !defined(CONFIG_SPL_BUILD)
 int env_complete(char *var, int maxv, char *cmdv[], int bufsz, char *buf)
 {
 	ENTRY *match;
diff --git a/common/spl/Makefile b/common/spl/Makefile
index 7cf01ad72d05592884ea9fdf8b420d69e809fcdd..5698a2335a98a83ab2c555983db3774ba9f9b15f 100644
--- a/common/spl/Makefile
+++ b/common/spl/Makefile
@@ -18,6 +18,7 @@ COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o
 COBJS-$(CONFIG_SPL_NOR_SUPPORT) += spl_nor.o
 COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += spl_ymodem.o
 COBJS-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o
+COBJS-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o
 endif
 
 COBJS	:= $(sort $(COBJS-y))
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 29cbb9335a376fa4ad8329e2b2e57fd1842ee01f..40a7acaeaf5d38dd4f679f2a8e78b38bf02606d7 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -195,6 +195,15 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 	case BOOT_DEVICE_SPI:
 		spl_spi_load_image();
 		break;
+#endif
+#ifdef CONFIG_SPL_ETH_SUPPORT
+	case BOOT_DEVICE_CPGMAC:
+#ifdef CONFIG_SPL_ETH_DEVICE
+		spl_net_load_image(CONFIG_SPL_ETH_DEVICE);
+#else
+		spl_net_load_image(NULL);
+#endif
+		break;
 #endif
 	default:
 		debug("SPL: Un-supported Boot Device\n");
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
new file mode 100644
index 0000000000000000000000000000000000000000..e1596fee2747163b6efe37ccd2f9193818e2e7af
--- /dev/null
+++ b/common/spl/spl_net.c
@@ -0,0 +1,52 @@
+/*
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * (C) Copyright 2012
+ * Ilya Yanok <ilya.yanok@gmail.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ */
+#include <common.h>
+#include <spl.h>
+#include <net.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void spl_net_load_image(const char *device)
+{
+	int rv;
+
+	env_init();
+	env_relocate();
+	setenv("autoload", "yes");
+	load_addr = CONFIG_SYS_TEXT_BASE - sizeof(struct image_header);
+	rv = eth_initialize(gd->bd);
+	if (rv == 0) {
+		printf("No Ethernet devices found\n");
+		hang();
+	}
+	if (device)
+		setenv("ethact", device);
+	rv = NetLoop(BOOTP);
+	if (rv < 0) {
+		printf("Problem booting with BOOTP\n");
+		hang();
+	}
+	spl_parse_image_header((struct image_header *)load_addr);
+}
diff --git a/include/bootstage.h b/include/bootstage.h
index a00053888f6f489ac57bb92e955508013f55be71..db94a957e6e65ae057314fa62bfcc380808e580c 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -210,6 +210,7 @@ enum bootstage_id {
  */
 ulong timer_get_boot_us(void);
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * Board code can implement show_boot_progress() if needed.
  *
@@ -217,8 +218,11 @@ ulong timer_get_boot_us(void);
  *		has occurred.
  */
 void show_boot_progress(int val);
+#else
+#define show_boot_progress(val) do {} while (0)
+#endif
 
-#ifdef CONFIG_BOOTSTAGE
+#if defined(CONFIG_BOOTSTAGE) && !defined(CONFIG_SPL_BUILD)
 /* This is the full bootstage implementation */
 
 /*
diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h
new file mode 100644
index 0000000000000000000000000000000000000000..bab3ddf4af3549d0b5ffc228028dae84f81e4004
--- /dev/null
+++ b/include/config_uncmd_spl.h
@@ -0,0 +1,44 @@
+/*
+ * (C) Copyright 2012
+ * Ilya Yanok, ilya.yanok@gmail.com
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ *
+ * We don't use any commands in SPL, but generic networking code
+ * has some features enabled/disabled based on CONFIG_CMD_*
+ * options. As we want a minimal set of features included
+ * into network SPL image, we undefine some config options here.
+ */
+
+#ifndef __CONFIG_UNCMD_SPL_H__
+#define __CONFIG_UNCMD_SPL_H__
+
+#ifdef CONFIG_SPL_BUILD
+/* SPL needs only BOOTP + TFTP so undefine other stuff to save space */
+#undef CONFIG_CMD_CDP
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_DNS
+#undef CONFIG_CMD_LINK_LOCAL
+#undef CONFIG_CMD_NFS
+#undef CONFIG_CMD_PING
+#undef CONFIG_CMD_RARP
+#undef CONFIG_CMD_SNTP
+#undef CONFIG_CMD_TFTPPUT
+#undef CONFIG_CMD_TFTPSRV
+#endif /* CONFIG_SPL_BUILD */
+#endif /* __CONFIG_UNCMD_SPL_H__ */
diff --git a/include/spl.h b/include/spl.h
index af94a8238f18e25b4604f5455840f3a5c6054412..b02f36fa94173078a185ec6e43110816a59bc807 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -71,6 +71,9 @@ void spl_ymodem_load_image(void);
 /* SPI SPL functions */
 void spl_spi_load_image(void);
 
+/* Ethernet SPL functions */
+void spl_net_load_image(const char *device);
+
 #ifdef CONFIG_SPL_BOARD_INIT
 void spl_board_init(void);
 #endif
diff --git a/lib/Makefile b/lib/Makefile
index 45798de8a14a164b77b2bb779c9f3cb27539f526..a099885f7b63b435f4f5ada5fa0d436ce89b139c 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -53,12 +53,17 @@ COBJS-$(CONFIG_SHA1) += sha1.o
 COBJS-$(CONFIG_SHA256) += sha256.o
 COBJS-y	+= strmhz.o
 COBJS-$(CONFIG_RBTREE)	+= rbtree.o
-else
-COBJS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += display_options.o
 endif
 
 ifdef CONFIG_SPL_BUILD
 COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
+COBJS-$(CONFIG_SPL_NET_SUPPORT) += crc32.o
+ifneq ($(CONFIG_SPL_SPI_FLASH_SUPPORT)$(CONFIG_SPL_NET_SUPPORT),)
+COBJS-y += display_options.o
+endif
+COBJS-$(CONFIG_SPL_NET_SUPPORT) += errno.o
+COBJS-$(CONFIG_SPL_NET_SUPPORT) += hashtable.o
+COBJS-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o
 endif
 COBJS-y += crc32.o
 COBJS-y += ctype.o
diff --git a/lib/hashtable.c b/lib/hashtable.c
index 670a704a4182947d0fccf8592b372d42b61c62a2..94a7b61717a8b9f0ecc6312c9dfda2130a6e6767 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -435,6 +435,7 @@ int hdelete_r(const char *key, struct hsearch_data *htab, int do_apply)
  * hexport()
  */
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * Export the data stored in the hash table in linearized form.
  *
@@ -601,6 +602,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep,
 
 	return size;
 }
+#endif
 
 
 /*
diff --git a/mkconfig b/mkconfig
index d3363c6df37a210cd1bd02ad76286b25df9e1611..7c9aa74eb27ffc8274832fdb49b003229c10f24a 100755
--- a/mkconfig
+++ b/mkconfig
@@ -185,6 +185,7 @@ cat << EOF >> config.h
 #include <configs/${CONFIG_NAME}.h>
 #include <asm/config.h>
 #include <config_fallbacks.h>
+#include <config_uncmd_spl.h>
 EOF
 
 exit 0
diff --git a/net/bootp.c b/net/bootp.c
index ccf9ee66758492c112595ee7d93c1066eea8b4a0..cd5c5dd1d74b3d63b485804b152eb29e35cd8708 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -535,9 +535,14 @@ static int BootpExtended(u8 *e)
 	*e++ = (576 - 312 + OPT_FIELD_SIZE) & 0xff;
 #endif
 
-#ifdef CONFIG_BOOTP_VCI_STRING
+#if defined(CONFIG_BOOTP_VCI_STRING) || \
+	(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_NET_VCI_STRING))
+#ifdef CONFIG_SPL_BUILD
+	put_vci(e, CONFIG_SPL_NET_VCI_STRING);
+#else
 	put_vci(e, CONFIG_BOOTP_VCI_STRING);
 #endif
+#endif
 
 #if defined(CONFIG_BOOTP_SUBNETMASK)
 	*e++ = 1;		/* Subnet mask request */
diff --git a/spl/Makefile b/spl/Makefile
index d9b1c2ff8ec20dd78f923440ce8cf71ce31743df..e9d0ec4c9a3d24ac7acf2f61c1ea3d93d4c8c9e2 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -57,6 +57,9 @@ LIBS-$(CONFIG_SPL_NAND_SUPPORT) += drivers/mtd/nand/libnand.o
 LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/libonenand.o
 LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/libdma.o
 LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/memory.o
+LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/libnet.o
+LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/libnet.o
+LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/libphy.o
 
 ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
 LIBS-y += $(CPUDIR)/omap-common/libomap-common.o