summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongjin Kim <tobetter@gmail.com>2017-05-31 09:13:26 +0300
committercodewalker <codewalker@hardkernel.com>2017-06-01 11:48:34 +0300
commit6a9e36913c62173e8a407fc304e004cf8c0ddbc7 (patch)
tree27973a11be07aa6a4b52989025c4166e325afeb4
parent1312f15e0c2d85da3eb16db873aeeb62516bcf83 (diff)
downloadu-boot-6a9e36913c62173e8a407fc304e004cf8c0ddbc7.tar.xz
ODROID-C2: net: enable network protocols DHCP/TFTP/BOOTP/PXE
This patch is to enable few network protocols such as BOOTP or PXE to allow ODROID-C2 to boot through network. The server must support such protocols as well as DHCP/TFTP server must be running with decent configuration. Change-Id: I94c4caa4077160427152c31180b06326f8aee62e Signed-off-by: Dongjin Kim <tobetter@gmail.com>
-rw-r--r--configs/odroidc2_defconfig2
-rwxr-xr-xinclude/configs/odroidc2.h59
2 files changed, 43 insertions, 18 deletions
diff --git a/configs/odroidc2_defconfig b/configs/odroidc2_defconfig
index 4d64cb3042..0251a8afe8 100644
--- a/configs/odroidc2_defconfig
+++ b/configs/odroidc2_defconfig
@@ -4,3 +4,5 @@ CONFIG_ODROID_C2=y
CONFIG_DM=y
CONFIG_DM_GPIO=y
CONFIG_AML_GPIO=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_DHCP=y
diff --git a/include/configs/odroidc2.h b/include/configs/odroidc2.h
index 5d0c93fb8c..887c58f78b 100755
--- a/include/configs/odroidc2.h
+++ b/include/configs/odroidc2.h
@@ -78,24 +78,6 @@
/* args/envs */
#define CONFIG_SYS_MAXARGS 64
-#define CONFIG_EXTRA_ENV_SETTINGS \
- "boardname=ODROIDC2\0" \
- "loadaddr=0x20000000\0" \
- "dtbaddr=0x1000000\0" \
- "fdt_high=0x20000000\0" \
- "hdmimode=custombuilt\0" \
- "usb pwren \0" \
- "hdmitx edid \0" \
- "cecconfig=cec0xf\0" \
- "bootargs=root=/dev/mmcblk0p2 rw init=/init rootwait " \
- "console=ttyS0,115200 " \
- "hdmimode=custombuilt hdmitx=cecf " \
- "modeline=${modeline} " \
- "logo=osd1,loaded,0x3f800000,1080p60hz " \
- "androidboot.hardware=odroidc2 androidboot.serialno=${fbt_id#} " \
- "androidboot.selinux=disabled \0" \
- "bootcmd=cfgload; showlogo ${hdmimode}; movi read dtb 0 ${dtbaddr}; movi read boot 0 ${loadaddr}; booti ${loadaddr} - ${dtbaddr}\0"
-
#define CONFIG_PREBOOT
#define CONFIG_BOOTCOMMAND
@@ -171,6 +153,28 @@
#define CONFIG_SYS_ALT_MEMTEST 1
#endif
+#define CONFIG_CMD_PXE 1
+
+#if defined(CONFIG_CMD_PXE)
+#define CONFIG_BOOTP_PXE 1
+#define CONFIG_BOOTP_PXE_CLIENTARCH 0x16
+#define CONFIG_BOOTP_GATEWAY 1
+#define CONFIG_BOOTP_HOSTNAME 1
+#define CONFIG_BOOTP_VCI_STRING "U-Boot.armv8"
+#define CONFIG_BOOTP_BOOTPATH 1
+#define CONFIG_BOOTP_SUBNET 1
+#define CONFIG_BOOTP_DNS 1
+#define CONFIG_UDP_CHECKSUM 1
+
+#define CONFIG_MENU 1
+#define ENV_PXE_DEFAULT \
+ "pxefile_addr_r=0x30000000\0" \
+ "pxeuuid=HKDKS905\0" \
+ "bootfile=zImage\0"
+#else
+#define ENV_PXE_DEFAULT
+#endif
+
/* File systems */
#define CONFIG_DOS_PARTITION 1
#define CONFIG_MMC 1
@@ -277,4 +281,23 @@
/* Wakeup from GPIO key */
#define CONFIG_GPIO_WAKEUP 1
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "boardname=ODROIDC2\0" \
+ "loadaddr=0x20000000\0" \
+ "dtbaddr=0x1000000\0" \
+ "fdt_high=0x20000000\0" \
+ "hdmimode=custombuilt\0" \
+ "usb pwren \0" \
+ "hdmitx edid \0" \
+ "cecconfig=cec0xf\0" \
+ ENV_PXE_DEFAULT \
+ "bootargs=root=/dev/mmcblk0p2 rw init=/init rootwait " \
+ "console=ttyS0,115200 " \
+ "hdmimode=custombuilt hdmitx=cecf " \
+ "modeline=${modeline} " \
+ "logo=osd1,loaded,0x3f800000,1080p60hz " \
+ "androidboot.hardware=odroidc2 androidboot.serialno=${fbt_id#} " \
+ "androidboot.selinux=disabled \0" \
+ "bootcmd=cfgload; showlogo ${hdmimode}; movi read dtb 0 ${dtbaddr}; movi read boot 0 ${loadaddr}; booti ${loadaddr} - ${dtbaddr}\0"
+
#endif