This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BeagleBone can not boot from Ethernet (using setup.sh in TI LINUX EZSDK)

Hi all,

I have just used BeagleBone (Rev A6) and TI Linux EZSDK (5.05.00.00). I have tried to boot my board form ethernet several times but not successful.

My host machine is Ubuntu 10.04 (with VMWare 8.0 on Win7 32 bit). I connected my system as the figure in http://processors.wiki.ti.com/index.php/Sitara_Linux_Software_Developer%E2%80%99s_Guide

I used setup.sh script in TI EZSDK root path as instructed in http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_Setup_Script

(and Preparing to Develop using the setup.sh Script in http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Hands_on_with_the_SDK)

I think the script executed without error. My terminal screeen looked like:

 

--------------------------------------------------------------------------------
TISDK setup script

This script will set up your development host for dvsdk development.
Parts of this script require administrator priviliges (sudo access).
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Verifying Linux host distribution
Ubuntu 10.04 LTS found successfully, continuing..
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
This step will make sure you have the proper host support packages installed
using the following command: sudo apt-get install xinetd tftpd nfs-kernel-server minicom build-essential libncurses5-dev uboot-mkimage autoconf automake

Note! This command requires you to have administrator priviliges (sudo access) 
on your host.
Press return to continue

Reading package lists... Done
Building dependency tree 
Reading state information... Done
autoconf is already the newest version.
automake is already the newest version.
build-essential is already the newest version.
libncurses5-dev is already the newest version.
nfs-kernel-server is already the newest version.
uboot-mkimage is already the newest version.
xinetd is already the newest version.
minicom is already the newest version.
tftpd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 53 not upgraded.

Package verification and installation successfully completed
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
In which directory do you want to install the target filesystem?(if this directory does not exist it will be created)
[ /home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS ] 
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
This step will extract the target filesystem to /home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS

Note! This command requires you to have administrator priviliges (sudo access) 
on your host.
Press return to continue
/home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS already exists
(r) rename existing filesystem (o) overwrite existing filesystem (s) skip filesystem extraction
[r] s
Skipping filesystem extraction
WARNING! Keeping the previous filesystem may cause compatibility problems if you are upgrading the SDK
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
This step will set up the SDK to install binaries in to:
/home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS/home/root/am335x-evm

The files will be available from /home/root/am335x-evm on the target.

This setting can be changed later by editing Rules.make and changing the
EXEC_DIR or DESTDIR variable (depending on your SDK).

Press return to continue
Rules.make edited successfully..
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
This step will export your target filesystem for NFS access.

Note! This command requires you to have administrator priviliges (sudo access) 
on your host.
Press return to continue
/home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS already NFS exported, skipping..

* Stopping NFS kernel daemon [ OK ] 
* Unexporting directories for NFS kernel daemon... [ OK ] 
* Exporting directories for NFS kernel daemon... [ OK ] 
* Starting NFS kernel daemon [ OK ] 
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Which directory do you want to be your tftp root directory?(if this directory does not exist it will be created for you)
[ /tftpboot ] 
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
This step will set up the tftp server in the /tftpboot directory.

Note! This command requires you to have administrator priviliges (sudo access) 
on your host.
Press return to continue

/tftpboot already exists, not creating..

/tftpboot/uImage-am335x-evm.bin already exists. The existing installed file can be renamed and saved under the new name.
(r) rename (o) overwrite (s) skip copy 
[r] s
Skipping copy of uImage-am335x-evm.bin, existing version will be used

/etc/xinetd.d/tftp already exists..
/tftpboot already exported for TFTP, skipping..

Restarting tftp server
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service xinetd stop

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop xinetd
xinetd stop/waiting
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service xinetd start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start xinetd
xinetd start/running, process 24948
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
This step will set up minicom (serial communication application) for
SDK development


For boards that contain a USB-to-Serial converter on the board (BeagleBone), 
the port used for minicom will be automatically detected. By default Ubuntu 
will not recognize this device. Setup will add will add a udev rule to 
/etc/udev/ so that from now on it will be recognized as soon as the board is 
plugged in.

For other boards, the serial will defualt to /dev/ttyS0. Please update based 
on your setup.
--------------------------------------------------------------------------------


NOTE: For boards with a built-in USB to Serial adapter please press
ENTER at the prompt below. The correct port will be determined
automatically at a later step. For all other boards select
the serial port that the board is connected to
Which serial port do you want to use with minicom?
[ /dev/ttyS0 ]

Copied existing /home/tinnd/.minirc.dfl to /home/tinnd/.minirc.dfl.old

Configuration saved to /home/tinnd/.minirc.dfl. You can change it further from inside
minicom, see the Software Development Guide for more information.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
This step will set up the u-boot variables for booting the EVM.
Becuase the not all AM335x devices have a NAND, the u-boot variables will
be stored in uEnv.txt on the boot partition. U-boot will read this
file on boot.

Autodetected the following ip address of your host, correct it if necessary
[ 192.168.1.126 ]

Select Linux kernel location:
1: TFTP
2: SD card

[ 1 ] 1

Select root file system location:
1: NFS
2: SD card

[ 1 ] 1

 

Then, there are 2 cases:

1. If the board did not connect before, I got following messages:

Available kernel images in /tftproot:
uImage-am335x-evm.bin
uImage-am335x-evm.bin.08132012_11.09

Which kernel image do you want to boot from TFTP?
[ uImage-am335x-evm.bin ] 
--------------------------------------------------------------------------------
Would you like to create a minicom script with the above parameters (y/n)?
[ y ] y

Successfully wrote /home/tinnd/ti-sdk-am335x-evm-05.05.00.00/bin/setupBoard.minicom
Would you like to run the setup script now (y/n)? This requires you to connect
the RS-232 cable between your host and EVM as well as your ethernet cable as
described in the Quick Start Guide. Once answering 'y' on the prompt below
you will have 300 seconds to connect the board and power cycle it
before the setup times out

After successfully executing this script, your EVM will be set up. You will be 
able to connect to it by executing 'minicom -w' or if you prefer a windows host
you can set up Tera Term as explained in the Software Developer's Guide.
If you connect minicom or Tera Term and power cycle the board Linux will boot.

[ y ]

 

I connected the board right after as instructed but I only got a screen of minicom. Nothing more!

 Welcome to minicom 2.5

OPTIONS: I18n 
Compiled on May 2 2011, 00:39:27.
Port /dev/ttyS0

Press CTRL-A Z for help on special keys

bigger 50

2. If the board was connected before, the messages are:

Available kernel images in /tftproot:
uImage-am335x-evm.bin
uImage-am335x-evm.bin.08132012_11.09

Which kernel image do you want to boot from TFTP?
[ uImage-am335x-evm.bin ]


This SDK supports both the AM335x EVM and the BeagleBone/EVM-SK.
A BeagleBone/EVM-SK has been detected as attached to your host system
Are you wanting to configure u-boot for this device? An
answer of 'n' will configure u-boot for the AM335x EVM instead
(y/n) y
Copying uEnv.txt to boot partition...


--------------------------------------------------------------------------------
uEnv.text has been saved to the boot partition. uEnv.txt contains:
serverip=192.168.1.126
rootpath=/home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS
bootfile=uImage-am335x-evm.bin
ip_method=dhcp
tftp_nfs_boot=echo Booting from network...; dhcp ${loadaddr} ${bootfile}; run net_args; bootm ${loadaddr}
uenvcmd=run tftp_nfs_boot

On the next boot, the BeagleBone will boot with these settings.
Would you like to restart now (y/n)?
[ y ]



Stopping Dropbear SSH server: stopped /usr/sbin/dropbear (pid 123
7)lcome to minicom 2.5
dropbear.
Stopping telnet daemon.
Stopping Hardware abstraction layer hald
Stopping system message bus: stopped process in pidfile '/var/run/dbus/pid' (pid
1136)
dbus. CTRL-A Z for help on special keys
Stopping network benchmark server: netserverstopped /usr/sbin/netserver (pid 124
9)gger 50
.
Stopping thttpdError opening /dev/fb0: No such file or directory
. _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_ 
ALSA: Storing mixer settings...| _| . | | | -_| _| _|
/usr/sbin/alsactl: save_state:1519: No soundcards found...
Deconfiguring network interfaces... done.__| 
Stopping Lighttpd Web Server: stopped /usr/sbin/lighttpd (pid 1277)
lighttpd.ject http://arago-project.org am335x-evm ttyO0
Stopping syslogd/klogd: stopped syslogd (pid 1254)
stopped klogd (pid 1256) ttyO0
done
Stopping Matrix GUI applicationstart-stop-daemon: warning: killing process 0: No
such process

[ 111.428497] musb-hdrc musb-hdrc.0: remove, state 1 
[ 111.433532] usb usb2: USB disconnect, device number 1 
[ 111.439453] musb-hdrc musb-hdrc.0: USB bus 2 deregistered 
*************************************************************** 
*************************************************************** 
NOTICE: This file system contains the followin GPLv3 packages: 
binutils-symlinks 
binutils 
gdbserver 

If you do not wish to distribute GPLv3 components please remove 
the above packages prior to distribution. This can be done using 
the opkg remove command. i.e.: 
opkg remove <package> 
Where <package> is the name printed in the list above 

NOTE: If the package is a dependency of another package you 
will be notified of the dependent packages. You should 
use the --force-removal-of-dependent-packages option to 
also remove the dependent packages as well 
*************************************************************** 
*************************************************************** 
Sending all processes the TERM signal... 
Sending all processes the KILL signal... 
Unmounting remote filesystems... 
Deactivating swap... 
Unmounting local filesystems... 
Rebooting... [ 127.539672] musb-hdrc musb-hdrc.1: remove, state 1 
[ 127.544769] usb usb1: USB disconnect, device number 1 
[ 127.550659] musb-hdrc musb-hdrc.1: USB bus 1 deregistered 
[ 127.556701] Restarting system.

/home/tinnd/ti-sdk-am335x-evm-05.05.00.00
--------------------------------------------------------------------------------

The board rebooted but could not load the kernel :

Welcome to minicom 2.5

OPTIONS: I18n 
Compiled on May 2 2011, 00:39:27.
Port /dev/ttyUSB1

Press CTRL-A Z for help on special keys


SD/MMC found on device 0
reading uEnv.txt

262 bytes read
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
Booting from network...
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 46
*** Unhandled DHCP Option in OFFER/ACK: 46
DHCP client bound to address 192.168.1.128
Using cpsw device 
TFTP from server 192.168.1.254; our IP address is 192.168.1.128 
Filename 'uImage-am335x-evm.bin'. 
Load address: 0x82000000 
Loading: T T T T T T T T T T T T T T T T T T T T 
Retry count exceeded; starting again 
link up on port 0, speed 100, full duplex 
BOOTP broadcast 1 
*** Unhandled DHCP Option in OFFER/ACK: 46 
BOOTP broadcast 2 
BOOTP broadcast 3 
BOOTP broadcast 4 
BOOTP broadcast 5 
BOOTP broadcast 6 
BOOTP broadcast 7 
BOOTP broadcast 8 
BOOTP broadcast 9 
BOOTP broadcast 10 

Retry count exceeded; starting again 
link up on port 0, speed 100, full duplex 
BOOTP broadcast 1 
*** Unhandled DHCP Option in OFFER/ACK: 46 
BOOTP broadcast 2 
BOOTP broadcast 3 
BOOTP broadcast 4 
BOOTP broadcast 5

It ran BOOTP broadcasst again and again and again

I tried many times but the result unchanged.

I turned my firewall off . And I had my VMWare network configured as NAT, Host Only, Bridge but I am still unsuccessful.

When the board boot it got the right IP. I could ping the board but could not load the kernel.

Can anybody help me, please!

 

  • According to your boot load you are trying to tftp your kernel the server at 192.168.1.124 but the script output says your tftp server should be 192.168.1.126.  Can you do a tftp from 192.168.1.126 to check if that is the issue?

    Chase

  • Why do you think TFTP serverip is 192.168.1.124? I sure that my VM-Host IP is 192.168.1.126. But I don't khow why the messages are 

    TFTP from server 192.168.1.254; our IP address is 192.168.1.128

    Should it be            TFTP from server 192.168.1.126 ?



  • Yes, it should be 192.168.1.126.  The 192.168.1.254 doesn't look right.

  • I have just test my TFTP server as recommended. Everything is ok. Another computer (Ubuntu 10.04 on VMWare) could get files from my host. 

    I wonder if I configured my VMWare Network correctly? Now I am setting my network as Bridged (my real IP is 192.168.1.45 and the VM-host IP is 192.168.1.126)

    Do you have any idea?

  • I would look to see why u-boot is taking the wrong ip address for the serverip.  in u-boot if you run the tftp command yourself using the correct IP address does it work?

    i.e.

    setenv serverip 192.168.1.126

    tftp 0x82000000 uImage-am335x-evm.bin

    Chase

  • I tried it. But if your uboot commands did not work :

    U-Boot# setenv serverip 192.168.1.126
    U-Boot# tftp 0x82000000 uImage-am335x-evm.bin
    link up on port 0, speed 100, full duplex
    *** ERROR: `ipaddr' not set

    Then I set ipaddr and I had following messages:

    U-Boot# setenv serverip 192.168.1.126
    U-Boot# setenv ipaddr 192.168.1.95
    U-Boot# tftp 0x82000000 uImage-am335x-evm.bin
    link up on port 0, speed 100, full duplex
    Using cpsw device
    TFTP from server 192.168.1.126; our IP address is 192.168.1.95
    Filename 'uImage-am335x-evm.bin'.
    Load address: 0x82000000
    Loading: #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################
    done
    Bytes transferred = 3163680 (304620 hex)

    So I run      #Uboot boot

    My board continued load uEnv.txt and repaeted the same error:

    SD/MMC found on device 0
    reading uEnv.txt

    262 bytes read
    Loaded environment from uEnv.txt
    Importing environment from mmc ...
    Running uenvcmd ...
    Booting from network...
    link up on port 0, speed 100, full duplex
    BOOTP broadcast 1
    *** Unhandled DHCP Option in OFFER/ACK: 46
    *** Unhandled DHCP Option in OFFER/ACK: 46
    DHCP client bound to address 192.168.1.95
    Using cpsw device
    TFTP from server 192.168.1.254; our IP address is 192.168.1.95
    Filename 'uImage-am335x-evm.bin'.
    Load address: 0x82000000
    Loading: T T T T T T T T T T

    I decided to delete uEnv.txt. And run some commands as instructed in

     http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#ENV_on_SD_card_using_uEnv.txt

    U-Boot# setenv serverip 192.168.1.126
    U-Boot# setenv ipaddr 192.168.1.95
    U-Boot# setenv rootpath /home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS
    U-Boot# setenv bootfile uImage-am335x-evm.bin
    U-Boot# setenv bootcmd run net_boot
    U-Boot# boot


    Booting from network ...
    link up on port 0, speed 100, full duplex
    BOOTP broadcast 1
    *** Unhandled DHCP Option in OFFER/ACK: 46
    *** Unhandled DHCP Option in OFFER/ACK: 46
    DHCP client bound to address 192.168.1.123
    link up on port 0, speed 100, full duplex
    Using cpsw device
    TFTP from server 192.168.1.254; our IP address is 192.168.1.123
    Filename 'uImage-am335x-evm.bin'.
    Load address: 0x80007fc0
    Loading: T T T T T T checksum bad
    checksum bad
    T checksum bad
    T T T T T T T T T T T T T
    Retry count exceeded; starting again
    link up on port 0, speed 100, full duplex
    Using cpsw device
    TFTP from server 192.168.1.254; our IP address is 192.168.1.123
    Filename 'uImage-am335x-evm.bin'.
    Load address: 0x80007fc0
    Loading: T T

    Finally, I still could not boot from network! 

    My uEnv.txt content:

    serverip=192.168.1.126
    rootpath=/home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS
    bootfile=uImage-am335x-evm.bin
    ip_method=dhcp
    tftp_nfs_boot=echo Booting from network...; dhcp ${loadaddr} ${bootfile}; run net_args; bootm ${loadaddr}
    uenvcmd=run tftp_nfs_boot

    Does anyone know how to solve this problem?

  • After "manually" loaded kernel image via TFTP, you have to issue something like "bootm 0x82000000" and not "boot".

    Anyway, try to modify this line of your uEnv.txt as follow:

    tftp_nfs_boot=echo Booting from network...; setenv autoload no; dhcp; setenv serverip 192.168.1.126; tftp ${kloadaddr} uImage-am335x-evm.bin; run net_args; bootm ${kloadaddr}

    Max

  • Thank you very much, Max!

    I used your code. It really worked. My board could boot from network!

    After testing many times, I reconfigured my uEnv.txt as following:

    rootpath=/home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS
    tftp_nfs_boot=echo Booting from network...; setenv autoload no; dhcp; setenv serverip 192.168.1.126; tftp ${kloadaddr} uImage-am335x-evm.bin; run net_args; bootm ${kloadaddr}
    uenvcmd=run tftp_nfs_boot

     But I still do not know why some environment variables in uEnv.txt do not work? For example:

    serverip=192.168.1.126

    bootfile=uImage-am335x-evm.bin

    After reading uEnv.txt these variables returned default values (192.168.1.254 or uImage). While rootpath did not (it remained value in uEnv.txt)

    And another thing: why we used kloadaddr instead of loadaddr

    Can anyone explain these to me?

  • kloadaddr is used to that the kernel will not have to be relocated to the boot address by u-boot during the boot process.  If you use loadaddr you will spend time copying the kernel from the loadaddr location to the kloadaddr location during boot.

    Chase

  • When importing env, "bootfile" could cause some problems. I found this issue some time ago but I did not yet submit to u-boot mailing list.

    The point is that at startup u-boot read "bootfile" env var and store its value in a global variable BootFile. This global variable is updated every time you issue a "setenv bootfile blablabla" but it is not when you import. DHCP protocol has the capability to receive serverip addr and bootfile from DHCP server. So what happens when "dhcp" command is issued before "tftp" is that dhcp code will read BootFile and update env var "bootfile" overriding the value specified in the imported environment.

    Try next, it should work too (the "setenv bootfile ${bootfile}" will makes thinks working):

    rootpath=/home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS
    bootfile=uImage-am335x-evm.bin
    tftp_nfs_boot=echo Booting from network...; setenv bootfile ${bootfile}; setenv autoload no; dhcp; setenv serverip 192.168.1.126; tftp ${kloadaddr} ${bootfile}; run net_args; bootm ${kloadaddr}
    uenvcmd=run tftp_nfs_boot

    I do not know if it's the same for "serverip" env var. BTW, in you specific case, I suppose the issue is due to the DHCP server which is passing the value "192.168.1.254" as serverip addr option: check at your DHCP server configuration or just check DHCP/BOOTP transaction to see if that option is set.

    Regards

    Max


  • Yeah, I've just checked at u-boot source code.

    If DHCP server reply has not empty serverip addr option (and u-boot is built without CONFIG_BOOTP_SERVERIP), dhcp code will use that address as tftp server address instead of the one of "serverip" env var. But in any case it will not override the env var. So I expect the following to work too:

    serverip=192.168.1.126
    rootpath=/home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS

    bootfile=uImage-am335x-evm.bin
    tftp_nfs_boot=echo Booting from network...; setenv bootfile ${bootfile}; setenv autoload no; dhcp; tftp ${kloadaddr} ${bootfile}; run net_args; bootm ${kloadaddr}
    uenvcmd=run tftp_nfs_boot

  • Thanks again Max,

    I have just tested your code with my BeagleBone.

    The "setenv bootfile ${bootfile}" worked! But serverip env isn't the same. It still get "192.168.1.254" which is my company server IP. So in this situation, I think

    rootpath=/home/tinnd/ti-sdk-am335x-evm-05.05.00.00/targetNFS
    bootfile=uImage-am335x-evm.bin
    tftp_nfs_boot=echo Booting from network...; setenv bootfile ${bootfile}; setenv autoload no; dhcp; setenv serverip 192.168.1.126; tftp ${kloadaddr} ${bootfile}; run net_args; bootm ${kloadaddr}
    uenvcmd=run tftp_nfs_boot  

    is perfect!

    Regards,

    TinND

  • I just ran into this same problem with my Beaglebone. Following the directions shown in setup.sh does not produce an environment file which works.

    Max's modifications are great and makes everything work, but what can we do so that the setup.sh will work as it is supplosed to do??

    Regards,

    Jose