[FE training-materials-updates] kernel labs: use U-Boot saveenv command

Michael Opdenacker michael.opdenacker at free-electrons.com
Thu Oct 3 06:05:23 CEST 2013

Repository : git://git.free-electrons.com/training-materials.git

On branch  : kernel-ng
Link       : http://git.free-electrons.com/training-materials/commit/?id=ff5f99eca21ff2fb9d30e8fb054b93a2fdc92d33


commit ff5f99eca21ff2fb9d30e8fb054b93a2fdc92d33
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date:   Thu Oct 3 06:02:22 2013 +0200

    kernel labs: use U-Boot saveenv command
    - Now works fine with a properly configured U-Boot
      for Beagle Bone Black.
    Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>


 labs/kernel-board-setup/kernel-board-setup.tex     |   17 +++++------------
 .../kernel-compiling-and-nfs-booting.tex           |   17 ++++++++---------
 2 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/labs/kernel-board-setup/kernel-board-setup.tex b/labs/kernel-board-setup/kernel-board-setup.tex
index 300feea..d562c9b 100644
--- a/labs/kernel-board-setup/kernel-board-setup.tex
+++ b/labs/kernel-board-setup/kernel-board-setup.tex
@@ -213,24 +213,17 @@ or set it to \code{}:
 Now, it's time to configure networking on U-Boot's side.
-Remove the micro-SD card and connect it to your workstation. Create a
-new \code{uEnv.txt} file in the boot partition (mounted on
-\code{/media/boot}), with the below contents:
+Back to the U-Boot command line, set the below environment variables:
+setenv ipaddr
+setenv serverip
-Umount your micro-SD card, put in back in the board, and reset your
-BeagleBone Black.
-Make sure that your environment settings were loaded properly, by
-checking the value of your environment variables:
+Save these settings to the MMC card:
-U-Boot# printenv ipaddr
 You can then test the TFTP connection.  First, put a small text
diff --git a/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex b/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex
index 03c186a..cfaa0e6 100644
--- a/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex
+++ b/labs/kernel-compiling-and-nfs-booting/kernel-compiling-and-nfs-booting.tex
@@ -176,12 +176,14 @@ First, boot the board to the U-Boot prompt. Before booting the kernel,
 we need to tell it which console to use and that the root filesystem
 should be mounted over NFS, by setting some kernel parameters.
-Do this by setting U-boot's \code{bootargs} environment variable:
-Modify the \code{uEnv.txt} file by adding the below line (in just 1 line):
+Do this by setting U-boot's \code{bootargs} environment variable (all in
+just one line, pay attention to the \code{O} character, like "OMAP", in
 setenv bootargs root=/dev/nfs ip= console=ttyO0
 Of course, you need to adapt the IP addresses to your exact network
@@ -213,19 +215,16 @@ also have a look at the NFS server logs in \code{/var/log/syslog}.
 \section{Automate the boot process}
 To avoid typing the same U-boot commands over and over again each time
-you power on or reset your board, here's a way to automatically call the
-above commands at boot time:
+you power on or reset your board, you can use U-Boot's \code{bootcmd}
+environment variable:
-Modify your \code{uEnv.txt} file and add the below lines:
-bootargs=root=/dev/nfs ip= console=ttyO0 nfsroot=<user>/felabs/linux/modules/nfsroot
-uenvcmd=tftp 0x81000000 uImage; tftp 0x82000000 am335x-boneblack.dtb; bootm 0x81000000 - 0x82000000
+setenv bootcmd 'tftp 0x81000000 uImage; tftp 0x82000000 am335x-boneblack.dtb; bootm 0x81000000 - 0x82000000'
-\code{uenvcmd} will automatically be run after the U-boot timeout
-expires and the \code{uEnv.txt} settings are loaded.
 Don't hesitate to change it according to your exact needs.
 We could also copy the \code{uImage} file to the eMMC flash and avoid

More information about the training-materials-updates mailing list