From 18ecb1a6e855e3f14ae6dce036497b14efb94ade Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 20 Dec 2011 17:28:33 -0800 Subject: Add option to tftp kernel then boot from eMMC The mmc0_tftpboot option reads a kernel using TFTP but then boots from eMMC. This allows kernel development without resorting to NFS root (which changes some parts of the boot process). BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I23c0890f76dc63dde128d7137d8891341761c884 Reviewed-on: https://gerrit.chromium.org/gerrit/13280 Commit-Ready: Simon Glass Reviewed-by: Simon Glass Tested-by: Simon Glass --- include/configs/tegra-common.h | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'include/configs') diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index e81e9a9b30e..4614cbfb6bd 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -233,10 +233,13 @@ "source ${loadaddr}; " \ "fi\0" \ \ - "ext2_boot=" \ + "regen_ext2_bootargs=" \ "setenv bootdev_bootargs " \ - "root=/dev/${devname}${rootpart} rootwait ro; " \ - "run regen_all; " \ + "root=/dev/${devname}${rootpart} rootwait ro; " \ + "run regen_all\0" \ + \ + "ext2_boot=" \ + "run regen_ext2_bootargs; " \ "if ext2load ${devtype} ${devnum}:${rootpart} " \ "${loadaddr} ${cros_bootfile}; then " \ "bootm ${loadaddr};" \ @@ -290,6 +293,17 @@ "echo 'ERROR: Could not load root/kernel from TFTP'; " \ "exit; " \ "fi\0" \ + "tftp_ext2_boot=" \ + "run tftp_setup; " \ + "run regen_ext2_bootargs; " \ + "bootp; " \ + "if tftpboot ${loadaddr} ${tftpserverip}:${tftpkernelpath}; " \ + "then " \ + "bootm ${loadaddr}; " \ + "else " \ + "echo 'ERROR: Could not load kernel from TFTP'; " \ + "exit; " \ + "fi\0" \ "nfsroot_boot=" \ "run tftp_setup; " \ "run regen_nfsroot_bootargs; " \ @@ -336,15 +350,21 @@ "run run_disk_boot_script;" \ "run ext2_boot\0" \ \ - "mmc_boot=mmc rescan ${devnum}; " \ + "mmc_setup=" \ + "mmc rescan ${devnum}; " \ "setenv devtype mmc; " \ - "setenv devname mmcblk${devnum}p; " \ + "setenv devname mmcblk${devnum}p\0" \ + "mmc_boot=" \ + "run mmc_setup; " \ "run run_disk_boot_script;" \ "run ext2_boot\0" \ "mmc0_boot=setenv devnum 0; " \ "run mmc_boot\0" \ "mmc1_boot=setenv devnum 1; " \ "run mmc_boot\0" \ + "mmc0_tftpboot=setenv devnum 0; " \ + "run mmc_setup; " \ + "run tftp_ext2_boot\0" \ \ "non_verified_boot=" \ "usb start; " \ -- cgit v1.2.3