* [tisdk-setup-scripts][PATCH 0/5] Keystone enhancements
@ 2015-12-04 15:01 Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 1/5] setup-minicom: Update list of auto-detected EVMs Jacob Stiffler
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Jacob Stiffler @ 2015-12-04 15:01 UTC (permalink / raw)
To: meta-arago
* Enhance board detection for K2E and K2L
* Enahnce u-boot update with error checking and the ability to update
from MCSDK u-boot
* Add support for K2G
Jacob Stiffler (5):
setup-minicom: Update list of auto-detected EVMs
setup-uboot-env-keystone: Enhance board detection for k2l and k2e
setup-uboot-env-keystone: Add error checking to u-boot update
setup-tftp: Copy pmmc-firmware if available
setup-uboot-env-k2g-evm: Add u-boot setup for k2g-evm
setup-minicom.sh | 3 +-
setup-tftp.sh | 3 +
setup-uboot-env-k2g-evm.sh | 253 ++++++++++++++++++++++++++++++++++++++++++++
setup-uboot-env-keystone.sh | 146 +++++++++++++++++++------
4 files changed, 369 insertions(+), 36 deletions(-)
create mode 100755 setup-uboot-env-k2g-evm.sh
--
1.9.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [tisdk-setup-scripts][PATCH 1/5] setup-minicom: Update list of auto-detected EVMs
2015-12-04 15:01 [tisdk-setup-scripts][PATCH 0/5] Keystone enhancements Jacob Stiffler
@ 2015-12-04 15:01 ` Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 2/5] setup-uboot-env-keystone: Enhance board detection for k2l and k2e Jacob Stiffler
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Jacob Stiffler @ 2015-12-04 15:01 UTC (permalink / raw)
To: meta-arago
* Add K2H, K2E, and K2L EVMs
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
setup-minicom.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/setup-minicom.sh b/setup-minicom.sh
index aa18dd4..7ec0ec6 100644
--- a/setup-minicom.sh
+++ b/setup-minicom.sh
@@ -47,7 +47,8 @@ For boards that contain a USB-to-Serial converter on the board such as:
* BeagleBone
* Beaglebone Black
* AM335x EVM-SK
- * AM57xx EVM
+ * AM57xx EVM
+ * K2H, K2L, and K2E EVMs
the port used for minicom will be automatically detected. By default Ubuntu
will not recognize this device. Setup will add a udev rule to
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [tisdk-setup-scripts][PATCH 2/5] setup-uboot-env-keystone: Enhance board detection for k2l and k2e
2015-12-04 15:01 [tisdk-setup-scripts][PATCH 0/5] Keystone enhancements Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 1/5] setup-minicom: Update list of auto-detected EVMs Jacob Stiffler
@ 2015-12-04 15:01 ` Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 3/5] setup-uboot-env-keystone: Add error checking to u-boot update Jacob Stiffler
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Jacob Stiffler @ 2015-12-04 15:01 UTC (permalink / raw)
To: meta-arago
* Also allow user to override auto-detected device
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
setup-uboot-env-keystone.sh | 72 ++++++++++++++++++++++++++++++++-------------
1 file changed, 51 insertions(+), 21 deletions(-)
diff --git a/setup-uboot-env-keystone.sh b/setup-uboot-env-keystone.sh
index 71e407d..b709cd6 100755
--- a/setup-uboot-env-keystone.sh
+++ b/setup-uboot-env-keystone.sh
@@ -183,19 +183,33 @@ fi
board="unknown"
check_for_board() {
- lsusb -vv -d 0403:6001 > /dev/null 2>&1
-
- if [ "$?" = "0" ]
- then
- board="x15"
- fi
-
- lsusb -vv -d 0403:6010 > /dev/null 2>&1
-
- if [ "$?" = "0" ]
- then
- board="k2hk"
- fi
+ case $platform in
+ "k2hk-evm")
+ lsusb -vv -d 0403:6010 > /dev/null 2>&1
+
+ if [ "$?" = "0" ]
+ then
+ board="k2evm"
+ board_vendor="0403"
+ board_product="6010"
+ num_port="2"
+ uart_port="1"
+ fi
+ ;;
+
+ "k2l-evm"|"k2e-evm")
+ lsusb -vv -d 10c4:ea70 > /dev/null 2>&1
+
+ if [ "$?" = "0" ]
+ then
+ board="k2evm"
+ board_vendor="10c4"
+ board_product="ea70"
+ num_port="2"
+ uart_port="1"
+ fi
+ ;;
+ esac
}
echo "timeout 1800" > $cwd/setupBoard.minicom
@@ -255,7 +269,7 @@ if [ "$minicom" = "y" ]; then
do
check_for_board
- if [ "$board" = "k2hk" ]
+ if [ "$board" = "k2evm" ]
then
break
else
@@ -280,23 +294,39 @@ if [ "$minicom" = "y" ]; then
echo
echo -n "Detecting connection to board... "
loopCount=0
- usb_id=`dmesg | grep 'idVendor=0403' | grep 'idProduct=6010' | tail -1 | sed -e 's|.*usb \(.*\):.*|\1|'`
- port=`dmesg | grep FTDI | grep "$usb_id" | grep "tty" | tail -2 | head -1 | grep "attached" | awk '{ print $NF }'`
+ usb_id=`dmesg | grep "idVendor=${board_vendor}" | grep "idProduct=${board_product}" | tail -1 | sed -e 's|.*usb \(.*\):.*|\1|'`
+ port=`dmesg | grep "usb $usb_id" | grep "tty" | tail -${num_port} | head -${uart_port} | tail -1 | grep "attached" | awk '{ print $NF }'`
while [ -z "$port" ] && [ "$loopCount" -ne "10" ]
do
#count to 10 and timeout if no connection is found
loopCount=$((loopCount+1))
sleep 1
- usb_id=`dmesg | grep 'idVendor=0403' | grep 'idProduct=6010' | tail -1 | sed -e 's|.*usb \(.*\):.*|\1|'`
- port=`dmesg | grep FTDI | grep "$usb_id" | grep "tty" | tail -2 | head -1 | grep "attached" | awk '{ print $NF }'`
+ usb_id=`dmesg | grep "idVendor=${board_vendor}" | grep "idProduct=${board_product}" | tail -1 | sed -e 's|.*usb \(.*\):.*|\1|'`
+ port=`dmesg | grep "usb $usb_id" | grep "tty" | tail -${num_port} | head -${uart_port} | tail -1 | grep "attached" | awk '{ print $NF }'`
done
#check to see if we actually found a port
if [ -n "$port" ]; then
- echo "k2hk-evm connected at /dev/$port"
+ echo "${platform} autodetected at /dev/$port"
echo
- break;
+ echo "Please verify that this is correct or manually enter the correct port:"
+ echo
+ read -p "[/dev/$port] " dev_port
+ echo
+
+ if [ ! -n "$dev_port" ]
+ then
+ dev_port="/dev/$port"
+ break
+ else
+ if [ ! -e "${dev_port}" ]
+ then
+ echo "ERROR: ${dev_port} does not exist!"
+ else
+ break
+ fi
+ fi
fi
#if we didn't find a port and reached the timeout limit then ask to reconnect
@@ -316,7 +346,7 @@ if [ "$minicom" = "y" ]; then
fi
done
- sed -i -e "s|^pu port.*$|pu port /dev/$port|g" ${HOME}/.minirc.dfl
+ sed -i -e "s|^pu port.*$|pu port $dev_port|g" ${HOME}/.minirc.dfl
fi
echo
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [tisdk-setup-scripts][PATCH 3/5] setup-uboot-env-keystone: Add error checking to u-boot update
2015-12-04 15:01 [tisdk-setup-scripts][PATCH 0/5] Keystone enhancements Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 1/5] setup-minicom: Update list of auto-detected EVMs Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 2/5] setup-uboot-env-keystone: Enhance board detection for k2l and k2e Jacob Stiffler
@ 2015-12-04 15:01 ` Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 4/5] setup-tftp: Copy pmmc-firmware if available Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 5/5] setup-uboot-env-k2g-evm: Add u-boot setup for k2g-evm Jacob Stiffler
4 siblings, 0 replies; 8+ messages in thread
From: Jacob Stiffler @ 2015-12-04 15:01 UTC (permalink / raw)
To: meta-arago
* Also refuse to proceed if not upgrading update from MCSDK
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
setup-uboot-env-keystone.sh | 74 ++++++++++++++++++++++++++++++++++++---------
1 file changed, 60 insertions(+), 14 deletions(-)
diff --git a/setup-uboot-env-keystone.sh b/setup-uboot-env-keystone.sh
index b709cd6..750b8cf 100755
--- a/setup-uboot-env-keystone.sh
+++ b/setup-uboot-env-keystone.sh
@@ -215,26 +215,67 @@ check_for_board() {
echo "timeout 1800" > $cwd/setupBoard.minicom
echo "verbose on" >> $cwd/setupBoard.minicom
do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send \"env default -f -a\"" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send \"reset\"" $cwd/setupBoard.minicom
+
+if [ "$ubootupdate" != "y" ]; then
+ # If not updating U-Boot, refure to procede if running an old MCSDK version.
+ cat >> $cwd/setupBoard.minicom << '__EOF__'
+expect {
+ "U-Boot#"
+ "# " goto uboot_update_required
+ timeout 60 goto end
+}
+send " "
+__EOF__
+fi
+
+# Reset to the default environment
+do_expect "\"# \"" "send \"env default -f -a\"" $cwd/setupBoard.minicom
+do_expect "\"# \"" "send \"saveenv\"" $cwd/setupBoard.minicom
+
+# Reset incase any variables are set when u-boot initializes
+do_expect "\"# \"" "send \"reset\"" $cwd/setupBoard.minicom
do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send \"setenv serverip $ip\"" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send setenv tftp_root '$tftproot'" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send setenv nfs_root '$rootpath'" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send \"setenv name_ubi $ubifsimage\"" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send \"setenv name_kern $kernelimage\"" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send \"setenv name_uboot $ubootimage\"" $cwd/setupBoard.minicom
-do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
+# Set vars required to flash u-boot
+do_expect "\"# \"" "send \"setenv serverip $ip\"" $cwd/setupBoard.minicom
+do_expect "\"# \"" "send \"setenv tftp_root '$tftproot'\"" $cwd/setupBoard.minicom
+do_expect "\"# \"" "send \"setenv name_uboot $ubootimage\"" $cwd/setupBoard.minicom
if [ "$ubootupdate" = "y" ]; then
- do_expect "\"U-Boot#\"" "send \"run get_uboot_net\"" $cwd/setupBoard.minicom
- do_expect "\"U-Boot#\"" "send \"run burn_uboot_spi\"" $cwd/setupBoard.minicom
+ # Use common "burn_uboot" command
+ do_expect "\"# \"" "send \"if test -n \$burn_uboot_spi; then setenv burn_uboot \$burn_uboot_spi; fi\"" $cwd/setupBoard.minicom
+
+ # Create command to print a known message if u-boot update succeeds
+ update_uboot_success="U-Boot successfully updated"
+
+ # Create command to fetch and flash u-boot
+ do_expect "\"# \"" "send \"setenv update_uboot 'if run get_uboot_net burn_uboot; then echo $update_uboot_success; else echo U-boot update failed!; fi'\"" $cwd/setupBoard.minicom
+ do_expect "\"# \"" "send \"run update_uboot\"" $cwd/setupBoard.minicom
+
+ do_expect "\"$update_uboot_success\"" "send \"reset\"" $cwd/setupBoard.minicom
+
+ # Reset once to get new u-boot
+ do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+
+ # Reset environment to the new U-Boot's defaults
+ do_expect "\"U-Boot#\"" "send \"env default -f -a\"" $cwd/setupBoard.minicom
+ do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
+
+ # Reset a second time incase any variables are set when u-boot initializes
do_expect "\"U-Boot#\"" "send \"reset\"" $cwd/setupBoard.minicom
do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+
+ # Reinitialize any variables previously set
+ do_expect "\"U-Boot#\"" "send \"setenv serverip $ip\"" $cwd/setupBoard.minicom
+ do_expect "\"U-Boot#\"" "send setenv tftp_root '$tftproot'" $cwd/setupBoard.minicom
+ do_expect "\"U-Boot#\"" "send \"setenv name_uboot $ubootimage\"" $cwd/setupBoard.minicom
fi
+do_expect "\"U-Boot#\"" "send setenv nfs_root '$rootpath'" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"setenv name_ubi $ubifsimage\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"setenv name_kern $kernelimage\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
+
if [ "$secondary_boot" -eq "1" ]; then
#TFTP and NFS Boot
do_expect "\"U-Boot#\"" "send \"setenv boot net\"" $cwd/setupBoard.minicom
@@ -248,8 +289,13 @@ fi
do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
do_expect "\"U-Boot#\"" "send \"boot\"" $cwd/setupBoard.minicom
-echo "end:" >> $cwd/setupBoard.minicom
-echo "! killall -s SIGHUP minicom" >> $cwd/setupBoard.minicom
+cat >> $cwd/setupBoard.minicom << __EOF__
+goto end
+uboot_update_required:
+send echo; echo "*** U-boot is require to be updated before proceding!"; echo "*** Please re-run setup.sh and choose to update U-boot."; echo
+end:
+__EOF__
+#echo "! killall -s SIGHUP minicom" >> $cwd/setupBoard.minicom
echo "--------------------------------------------------------------------------------"
echo "Would you like to create a minicom script with the above parameters (y/n)?"
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [tisdk-setup-scripts][PATCH 4/5] setup-tftp: Copy pmmc-firmware if available
2015-12-04 15:01 [tisdk-setup-scripts][PATCH 0/5] Keystone enhancements Jacob Stiffler
` (2 preceding siblings ...)
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 3/5] setup-uboot-env-keystone: Add error checking to u-boot update Jacob Stiffler
@ 2015-12-04 15:01 ` Jacob Stiffler
2015-12-04 16:54 ` Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 5/5] setup-uboot-env-k2g-evm: Add u-boot setup for k2g-evm Jacob Stiffler
4 siblings, 1 reply; 8+ messages in thread
From: Jacob Stiffler @ 2015-12-04 15:01 UTC (permalink / raw)
To: meta-arago
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
setup-tftp.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/setup-tftp.sh b/setup-tftp.sh
index 714968f..d675ba4 100644
--- a/setup-tftp.sh
+++ b/setup-tftp.sh
@@ -159,6 +159,9 @@ copy_to_tftproot "$uboot_gph_files"
monfiles=`cd $prebuiltimagesdir;ls -1 skern*.bin 2> /dev/null`
copy_to_tftproot "$monfiles"
+pmmcfiles=`cd $prebuiltimagesdir;ls -1 pmmc*.bin 2> /dev/null`
+copy_to_tftproot "$pmmcfiles"
+
echo
if [ -f $tftpcfg ]; then
echo "$tftpcfg already exists.."
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [tisdk-setup-scripts][PATCH 5/5] setup-uboot-env-k2g-evm: Add u-boot setup for k2g-evm
2015-12-04 15:01 [tisdk-setup-scripts][PATCH 0/5] Keystone enhancements Jacob Stiffler
` (3 preceding siblings ...)
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 4/5] setup-tftp: Copy pmmc-firmware if available Jacob Stiffler
@ 2015-12-04 15:01 ` Jacob Stiffler
4 siblings, 0 replies; 8+ messages in thread
From: Jacob Stiffler @ 2015-12-04 15:01 UTC (permalink / raw)
To: meta-arago
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
setup-uboot-env-k2g-evm.sh | 253 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 253 insertions(+)
create mode 100755 setup-uboot-env-k2g-evm.sh
diff --git a/setup-uboot-env-k2g-evm.sh b/setup-uboot-env-k2g-evm.sh
new file mode 100755
index 0000000..f7c8561
--- /dev/null
+++ b/setup-uboot-env-k2g-evm.sh
@@ -0,0 +1,253 @@
+#!/bin/sh
+
+# This distribution contains contributions or derivatives under copyright
+# as follows:
+#
+# Copyright (c) 2015, Texas Instruments Incorporated
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# - Neither the name of Texas Instruments nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cwd=`dirname $0`
+. $cwd/common.sh
+
+do_expect() {
+ echo "expect {" >> $3
+ check_status
+ echo " $1" >> $3
+ check_status
+ echo " timeout 600 goto end" >> $3
+ echo "}" >> $3
+ check_status
+ echo $2 >> $3
+ check_status
+ echo >> $3
+}
+
+copy_to_tftproot() {
+ files="$1"
+ for file in $files
+ do
+ if [ -f $tftproot/$file ]; then
+ echo
+ echo "$tftproot/$file already exists. The existing installed file can be renamed and saved under the new name."
+ echo "(o) overwrite (s) skip copy "
+ read -p "[o] " exists
+ case "$exists" in
+ s) echo "Skipping copy of $file, existing version will be used"
+ ;;
+ *) sudo cp "$prebuiltimagesdir/$file" $tftproot
+ check_status
+ echo
+ echo "Successfully overwritten $file in tftp root directory $tftproot"
+ ;;
+ esac
+ else
+ sudo cp "$prebuiltimagesdir/$file" $tftproot
+ check_status
+ echo
+ echo "Successfully copied $file to tftp root directory $tftproot"
+ fi
+ done
+}
+
+echo
+echo "--------------------------------------------------------------------------------"
+echo "This step will set up the u-boot variables for booting the EVM."
+echo "--------------------------------------------------------------------------------"
+
+ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'`
+platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2`
+
+echo "Autodetected the following ip address of your host, correct it if necessary"
+read -p "[ $ipdefault ] " ip
+echo
+
+if [ ! -n "$ip" ]; then
+ ip=$ipdefault
+fi
+
+if [ -f $cwd/../.tftproot ]; then
+ tftproot=`cat $cwd/../.tftproot`
+else
+ echo "Where is your tftp root directory?"
+ read -p "[ /tftpboot ]" tftproot
+
+ if [ ! -n "$tftproot" ]; then
+ tftproot="/tftpboot"
+ fi
+ echo
+fi
+
+if [ -f $cwd/../.targetfs ]; then
+ rootpath=`cat $cwd/../.targetfs`
+else
+ echo "Where is your target filesystem extracted?"
+ read -p "[ ${HOME}/targetNFS ]" rootpath
+
+ if [ ! -n "$rootpath" ]; then
+ rootpath="${HOME}/targetNFS"
+ fi
+ echo
+fi
+
+
+kernelimage="zImage-""$platform"".bin"
+kernelimagesrc=`ls -1 $cwd/../board-support/prebuilt-images/$kernelimage`
+kernelimagedefault=`basename $kernelimagesrc`
+
+ubootimage="u-boot-spi-${platform}.gph"
+
+ubifsimage="tisdk-server-rootfs-image-${platform}.ubi"
+ubifsimagesrc=`ls -1 $cwd/../filesystem/$ubifsimage`
+ubifsimagedefault=`basename $ubifsimagesrc`
+
+prebuiltimagesdir=`cd $cwd/../filesystem/ ; echo $PWD`
+ubifsimages=`cd $prebuiltimagesdir;ls -1 *.ubi 2> /dev/null`
+copy_to_tftproot "$ubifsimages"
+
+
+echo "Select Linux kernel location:"
+echo " 1: TFTP"
+echo " 2: SD card"
+echo
+read -p "[ 1 ] " kernel
+
+if [ ! -n "$kernel" ]; then
+ kernel="1"
+fi
+
+echo
+echo "Select root file system location:"
+echo " 1: NFS"
+echo " 2: SD card"
+echo
+read -p "[ 1 ] " fs
+
+if [ ! -n "$fs" ]; then
+ fs="1"
+fi
+
+
+if [ "$kernel" -eq "1" ]; then
+ echo
+ echo "Available kernel images in $tftproot:"
+ for file in $tftproot/*; do
+ basefile=`basename $file`
+ echo " $basefile"
+ done
+ echo
+ echo "Which kernel image do you want to boot from TFTP?"
+ read -p "[ $kernelimagedefault ] " kernelimage
+
+ if [ ! -n "$kernelimage" ]; then
+ kernelimage=$kernelimagedefault
+ fi
+else
+ kernelimage=zImage
+fi
+
+echo "timeout 300" > $cwd/setupBoard.minicom
+echo "verbose on" >> $cwd/setupBoard.minicom
+do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"env default -f -a\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"reset\"" $cwd/setupBoard.minicom
+do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+
+do_expect "\"U-Boot#\"" "send \"setenv serverip $ip\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"setenv tftp_root '$tftproot'\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"setenv nfs_root '$rootpath'\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"setenv name_ubi $ubifsimage\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"setenv name_kern $kernelimage\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"setenv name_uboot $ubootimage\"" $cwd/setupBoard.minicom
+
+do_expect "\"U-Boot#\"" "send \"setenv bootcmd 'run init_\${fs_mode} get_pmmc_\${kern_mode} run_pmmc get_fdt_\${kern_mode} get_mon_\${kern_mode} get_kern_\${kern_mode} run_mon run_kern'\"" $cwd/setupBoard.minicom
+
+do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
+
+if [ "$kernel" -eq "1" ]; then
+ #TFTP
+ do_expect "\"U-Boot#\"" "send \"setenv kern_mode net\"" $cwd/setupBoard.minicom
+else
+ #SD
+ do_expect "\"U-Boot#\"" "send \"setenv kern_mode mmc\"" $cwd/setupBoard.minicom
+fi
+
+if [ "$fs" -eq "1" ]; then
+ #NFS
+ do_expect "\"U-Boot#\"" "send \"setenv fs_mode net\"" $cwd/setupBoard.minicom
+else
+ #SD
+ do_expect "\"U-Boot#\"" "send \"setenv fs_mode mmc\"" $cwd/setupBoard.minicom
+fi
+
+do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"boot\"" $cwd/setupBoard.minicom
+
+echo "end:" >> $cwd/setupBoard.minicom
+#echo "! killall -s SIGHUP minicom" >> $cwd/setupBoard.minicom
+
+echo "--------------------------------------------------------------------------------"
+echo "Would you like to create a minicom script with the above parameters (y/n)?"
+read -p "[ y ] " minicom
+echo
+
+if [ ! -n "$minicom" ]; then
+ minicom="y"
+fi
+
+if [ "$minicom" = "y" ]; then
+
+ echo -n "Successfully wrote "
+ readlink -m $cwd/setupBoard.minicom
+
+ echo "Would you like to run the setup script now (y/n)? This requires you to connect"
+ echo "the RS-232 cable between your host and EVM as well as your ethernet cable as"
+ echo "described in the Quick Start Guide. Once answering 'y' on the prompt below"
+ echo "you will have 300 seconds to connect the board and power cycle it"
+ echo "before the setup times out"
+ echo
+ echo "After successfully executing this script, your EVM will be set up. You will be "
+ echo "able to connect to it by executing 'minicom -w' or if you prefer a windows host"
+ echo "you can set up Tera Term as explained in the Software Developer's Guide."
+ echo "If you connect minicom or Tera Term and power cycle the board Linux will boot."
+ echo
+ read -p "[ y ] " minicomsetup
+
+ if [ ! -n "$minicomsetup" ]; then
+ minicomsetup="y"
+ fi
+
+ if [ "$minicomsetup" = "y" ]; then
+ cd $cwd
+ sudo minicom -w -S setupBoard.minicom
+ cd -
+ fi
+
+ echo "You can manually run minicom in the future with this setup script using: minicom -S $cwd/setupBoard.minicom"
+ echo "--------------------------------------------------------------------------------"
+
+fi
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [tisdk-setup-scripts][PATCH 4/5] setup-tftp: Copy pmmc-firmware if available
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 4/5] setup-tftp: Copy pmmc-firmware if available Jacob Stiffler
@ 2015-12-04 16:54 ` Jacob Stiffler
2015-12-04 20:08 ` Denys Dmytriyenko
0 siblings, 1 reply; 8+ messages in thread
From: Jacob Stiffler @ 2015-12-04 16:54 UTC (permalink / raw)
To: meta-arago
Due to recent updates in u-boot, this patch will need to be reworked as
the pmmc firmware name has been changed.
On 12/4/2015 10:01 AM, Jacob Stiffler wrote:
> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> ---
> setup-tftp.sh | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/setup-tftp.sh b/setup-tftp.sh
> index 714968f..d675ba4 100644
> --- a/setup-tftp.sh
> +++ b/setup-tftp.sh
> @@ -159,6 +159,9 @@ copy_to_tftproot "$uboot_gph_files"
> monfiles=`cd $prebuiltimagesdir;ls -1 skern*.bin 2> /dev/null`
> copy_to_tftproot "$monfiles"
>
> +pmmcfiles=`cd $prebuiltimagesdir;ls -1 pmmc*.bin 2> /dev/null`
> +copy_to_tftproot "$pmmcfiles"
> +
> echo
> if [ -f $tftpcfg ]; then
> echo "$tftpcfg already exists.."
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [tisdk-setup-scripts][PATCH 4/5] setup-tftp: Copy pmmc-firmware if available
2015-12-04 16:54 ` Jacob Stiffler
@ 2015-12-04 20:08 ` Denys Dmytriyenko
0 siblings, 0 replies; 8+ messages in thread
From: Denys Dmytriyenko @ 2015-12-04 20:08 UTC (permalink / raw)
To: Jacob Stiffler; +Cc: meta-arago
On Fri, Dec 04, 2015 at 11:54:41AM -0500, Jacob Stiffler wrote:
> Due to recent updates in u-boot, this patch will need to be reworked
> as the pmmc firmware name has been changed.
Ack
> On 12/4/2015 10:01 AM, Jacob Stiffler wrote:
> >Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> >---
> > setup-tftp.sh | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> >diff --git a/setup-tftp.sh b/setup-tftp.sh
> >index 714968f..d675ba4 100644
> >--- a/setup-tftp.sh
> >+++ b/setup-tftp.sh
> >@@ -159,6 +159,9 @@ copy_to_tftproot "$uboot_gph_files"
> > monfiles=`cd $prebuiltimagesdir;ls -1 skern*.bin 2> /dev/null`
> > copy_to_tftproot "$monfiles"
> >+pmmcfiles=`cd $prebuiltimagesdir;ls -1 pmmc*.bin 2> /dev/null`
> >+copy_to_tftproot "$pmmcfiles"
> >+
> > echo
> > if [ -f $tftpcfg ]; then
> > echo "$tftpcfg already exists.."
>
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-12-04 20:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 15:01 [tisdk-setup-scripts][PATCH 0/5] Keystone enhancements Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 1/5] setup-minicom: Update list of auto-detected EVMs Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 2/5] setup-uboot-env-keystone: Enhance board detection for k2l and k2e Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 3/5] setup-uboot-env-keystone: Add error checking to u-boot update Jacob Stiffler
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 4/5] setup-tftp: Copy pmmc-firmware if available Jacob Stiffler
2015-12-04 16:54 ` Jacob Stiffler
2015-12-04 20:08 ` Denys Dmytriyenko
2015-12-04 15:01 ` [tisdk-setup-scripts][PATCH 5/5] setup-uboot-env-k2g-evm: Add u-boot setup for k2g-evm Jacob Stiffler
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.