This is my 2nd day with an AM335x EVM, it can boot from the SD card provided by TI, but now I'd like to boot the EVM from my computer using tftp and NFS.
I installed ti-sdk-am335x-evm-05.04.00.00 in Ubuntu 10.04 LTS in a real computer, not a virtual machine, and run /home/user/ti-sdk-am335x-evm-05.04.00.00/setup.sh several times to boot from tftp or SD card. It boots correctly from SD card, but I have problems to boot from tftp.
My computer IP is 11.0.0.139
Gateway/DHCP/DNS server IP is 11.0.0.1
EVM IP is 11.0.0.138
setup.sh creates and runs with minicom the file /home/user/ti-sdk-am335x-evm-05.04.00.00/bin/setupBoard.minicom:
timeout 300
verbose on
expect {
"stop autoboot:"
}
send " "
expect {
"U-Boot#"
}
send "setenv serverip 11.0.0.139"
expect {
"U-Boot#"
}
send "setenv rootpath /home/user/ti-sdk-am335x-evm-05.04.00.00/targetNFS"
expect {
"U-Boot#"
}
send "setenv bootfile uImage-am335x-evm.bin"
expect {
"U-Boot#"
}
send "setenv ip_method dhcp"
expect {
"U-Boot#"
}
send "setenv bootcmd 'setenv autoload no;dhcp "$\{bootfile\}";tftp "$\{loadaddr\}" "$\{bootfile\}";run net_args;bootm "$\{loadaddr\}"'"
expect {
"U-Boot#"
}
send "saveenv"
expect {
"U-Boot#"
}
send "boot"
! killall -s SIGHUP minicom
I also run this script with minicom:
user@user:~/ti-sdk-am335x-evm-05.04.00.00$ minicom -S ./bin/setupBoard.minicom
Welcome to minicom 2.4
OPCIONES: I18n
Compilado en Jan 25 2010, 06:49:09.
Port /dev/ttyS0
Presione CTRL-A Z para obtener ayuda sobre teclas especiales
CCCCCCCC
U-Boot SPL 2011.09 (Feb 09 2012 - 15:38:59)
Texas Instruments Revision detection unimplemented
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img
U-Boot 2011.09 (Feb 09 2012 - 15:11:31)
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
Found a daughter card connected
NAND: HW ECC Hamming Code selected
256 MiB
MMC: OMAP SD/MMC: 0
Net: cpsw
Hit any key to stop autobo 0
U-Boot#setenv serverip 11.0.0.139
U-Boot#setenv rootpath /home/user/ti-sdk-am335x-evm-05.04.00.00/targetNFS
U-Boot#setenv bootfile uImage-am335x-evm.bin
U-Boot#setenv ip_method dhcp
U-Boot#setenv bootcmd 'setenv autoload no;dhcp ${bootfile};tftp ${loadaddr} ${bootfile};run net_args;bootm ${loadaddr}'
U-Boot#saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x260000 -- 100% complete.
Writing to Nand... done
U-Boot#
Minicom is closed automatically.
I open minicom and reset the EVM, it should boot from tftps, but U-Boot does not find the kernel image because the server IP is wrong, it is trying to get the file from my router (11.0.0.1), not my computer (11.0.0.139).
Welcome to minicom 2.4
OPCIONES: I18n
Compilado en Jan 25 2010, 06:49:09.
Port /dev/ttyS0
Presione CTRL-A Z para obtener ayuda sobre teclas especiales
CCCCCCCC
U-Boot SPL 2011.09 (Feb 09 2012 - 15:38:59)
Texas Instruments Revision detection unimplemented
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img
U-Boot 2011.09 (Feb 09 2012 - 15:11:31)
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
Found a daughter card connected
NAND: HW ECC Hamming Code selected
256 MiB
MMC: OMAP SD/MMC: 0
Net: cpsw
Hit any key to stop autoboot: 0
link up on port 0, speed 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 11.0.0.138
link up on port 0, speed 1000, full duplex
Using cpsw device
TFTP from server 11.0.0.1; our IP address is 11.0.0.138
Filename 'uImage-am335x-evm.bin'.
Load address: 0x82000000
Loading: T
TFTP error: 'File not found' (1)
Not retrying...
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot#
I do some checks:
U-Boot# printenv
autoload=no
baudrate=115200
bootargs=console=ttyO0,115200n8 root=/dev/nfs nfsroot=11.0.0.1:/home/user/ti-sdk-am335x-evm-05.04.00.00/targetNFS,nolock rw ip=dhcp
bootargs_defaults=setenv bootargs console=${console} ${optargs}
bootcmd=setenv autoload no;dhcp ${bootfile};tftp ${loadaddr} ${bootfile};run net_args;bootm ${loadaddr}
bootdelay=3
bootenv=uEnv.txt
bootfile=uImage-am335x-evm.bin
console=ttyO0,115200n8
dnsip=11.0.0.1
ethact=cpsw
ethaddr=d4:94:a1:91:6b:aa
gatewayip=11.0.0.1
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
ip_method=dhcp
ipaddr=11.0.0.138
kloadaddr=0x80007fc0
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}
mmc_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${mmc_root} rootfstype=${mmc_root_fs_type} ip=${ip_method}
mmc_boot=run mmc_args; run mmc_load_uimage; bootm ${kloadaddr}
mmc_dev=0
mmc_load_uimage=fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}
mmc_root=/dev/mmcblk0p2 rw
mmc_root_fs_type=ext3 rootwait
nand_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${nand_root} noinitrd rootfstype=${nand_root_fs_type} ip=${ip_method}
nand_boot=echo Booting from nand ...; run nand_args; nandecc hw 2; nand read.i ${kloadaddr} ${nand_src_addr} ${nand_img_siz}; bootm ${kloadaddr}
nand_img_siz=0x500000
nand_root=ubi0:rootfs rw ubi.mtd=7,2048
nand_root_fs_type=ubifs rootwait=1
nand_src_addr=0x280000
net_args=run bootargs_defaults;setenv bootargs ${bootargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
net_boot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${kloadaddr} ${bootfile}; run net_args; bootm ${kloadaddr}
netmask=255.255.255.0
nfsopts=nolock
nor_args=run bootargs_defaults;setenv bootargs ${bootargs} root={nor_root} rootfstype=${nor_root_fs_type} ip=${ip_method}
nor_boot=echo Booting from NOR ...; run nor_args; cp.b ${0x08080000} ${kloadaddr} ${nor_img_siz}; bootm ${kloadaddr}
nor_img_siz=0x280000
nor_root=/dev/mtdblock3 rw
nor_root_fs_type=jffs2
nor_src_addr=0x08080000
rootpath=/home/user/ti-sdk-am335x-evm-05.04.00.00/targetNFS
script_addr=0x81900000
serverip=11.0.0.1
spi_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${spi_root} rootfstype=${spi_root_fs_type} ip=${ip_method}
spi_boot=echo Booting from spi ...; run spi_args; sf probe ${spi_bus_no}:0; sf read ${kloadaddr} ${spi_src_addr} ${spi_img_siz}; bootm ${kloadaddr}
spi_bus_no=0
spi_img_siz=0x280000
spi_root=/dev/mtdblock4 rw
spi_root_fs_type=jffs2
spi_src_addr=0x62000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial
stdin=serial
stdout=serial
Environment size: 2762/8188 bytes
nfsroot and serverip are wrong, correct it:
U-Boot# setenv serverip 11.0.0.139
U-Boot# setenv bootargs console=ttyO0,115200n8 root=/dev/nfs nfsroot=11.0.0.139:/home/user/ti-sdk-am335x-evm-05.04.00.00/targetNFS,nolock rw
U-Boot# saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x260000 -- 100% complete.
Writing to Nand... done
U-Boot# printenv
autoload=no
baudrate=115200
bootargs=console=ttyO0,115200n8 root=/dev/nfs nfsroot=11.0.0.139:/home/user/ti-sdk-am335x-evm-05.04.00.00/targetNFS,nolock rw ip=dhcp
bootargs_defaults=setenv bootargs console=${console} ${optargs}
bootcmd=setenv autoload no;dhcp ${bootfile};tftp ${loadaddr} ${bootfile};run net_args;bootm ${loadaddr}
bootdelay=3
bootenv=uEnv.txt
bootfile=uImage-am335x-evm.bin
console=ttyO0,115200n8
dnsip=11.0.0.1
ethact=cpsw
ethaddr=d4:94:a1:91:6b:aa
gatewayip=11.0.0.1
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
ip_method=dhcp
ipaddr=11.0.0.138
kloadaddr=0x80007fc0
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}
mmc_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${mmc_root} rootfstype=${mmc_root_fs_type} ip=${ip_method}
mmc_boot=run mmc_args; run mmc_load_uimage; bootm ${kloadaddr}
mmc_dev=0
mmc_load_uimage=fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}
mmc_root=/dev/mmcblk0p2 rw
mmc_root_fs_type=ext3 rootwait
nand_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${nand_root} noinitrd rootfstype=${nand_root_fs_type} ip=${ip_method}
nand_boot=echo Booting from nand ...; run nand_args; nandecc hw 2; nand read.i ${kloadaddr} ${nand_src_addr} ${nand_img_siz}; bootm ${kloadaddr}
nand_img_siz=0x500000
nand_root=ubi0:rootfs rw ubi.mtd=7,2048
nand_root_fs_type=ubifs rootwait=1
nand_src_addr=0x280000
net_args=run bootargs_defaults;setenv bootargs ${bootargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
net_boot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${kloadaddr} ${bootfile}; run net_args; bootm ${kloadaddr}
netmask=255.255.255.0
nfsopts=nolock
nor_args=run bootargs_defaults;setenv bootargs ${bootargs} root={nor_root} rootfstype=${nor_root_fs_type} ip=${ip_method}
nor_boot=echo Booting from NOR ...; run nor_args; cp.b ${0x08080000} ${kloadaddr} ${nor_img_siz}; bootm ${kloadaddr}
nor_img_siz=0x280000
nor_root=/dev/mtdblock3 rw
nor_root_fs_type=jffs2
nor_src_addr=0x08080000
rootpath=/home/user/ti-sdk-am335x-evm-05.04.00.00/targetNFS
script_addr=0x81900000
serverip=11.0.0.139
spi_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${spi_root} rootfstype=${spi_root_fs_type} ip=${ip_method}
spi_boot=echo Booting from spi ...; run spi_args; sf probe ${spi_bus_no}:0; sf read ${kloadaddr} ${spi_src_addr} ${spi_img_siz}; bootm ${kloadaddr}
spi_bus_no=0
spi_img_siz=0x280000
spi_root=/dev/mtdblock4 rw
spi_root_fs_type=jffs2
spi_src_addr=0x62000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial
stdin=serial
stdout=serial
Now I think everything is OK, try boot again:
U-Boot# boot
link up on port 0, speed 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 11.0.0.138
link up on port 0, speed 1000, full duplex
Using cpsw device
TFTP from server 11.0.0.1; our IP address is 11.0.0.138
Filename 'uImage-am335x-evm.bin'.
Load address: 0x82000000
Loading: T
TFTP error: 'File not found' (1)
Not retrying...
Wrong Image Format for bootm command
ERROR: can't get kernel image!
It is trying again to get the kernel from my router (11.0.0.1), not my computer (11.0.0.139). boot modifies nfsroot and serverip, why?
U-Boot# printenv
autoload=no
baudrate=115200
bootargs=console=ttyO0,115200n8 root=/dev/nfs nfsroot=11.0.0.1:/home/user/ti-sdk-am335x-evm-05.04.00.00/targetNFS,nolock rw ip=dhcp
bootargs_defaults=setenv bootargs console=${console} ${optargs}
bootcmd=setenv autoload no;dhcp ${bootfile};tftp ${loadaddr} ${bootfile};run net_args;bootm ${loadaddr}
bootdelay=3
bootenv=uEnv.txt
bootfile=uImage-am335x-evm.bin
console=ttyO0,115200n8
dnsip=11.0.0.1
ethact=cpsw
ethaddr=d4:94:a1:91:6b:aa
gatewayip=11.0.0.1
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
ip_method=dhcp
ipaddr=11.0.0.138
kloadaddr=0x80007fc0
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}
mmc_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${mmc_root} rootfstype=${mmc_root_fs_type} ip=${ip_method}
mmc_boot=run mmc_args; run mmc_load_uimage; bootm ${kloadaddr}
mmc_dev=0
mmc_load_uimage=fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}
mmc_root=/dev/mmcblk0p2 rw
mmc_root_fs_type=ext3 rootwait
nand_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${nand_root} noinitrd rootfstype=${nand_root_fs_type} ip=${ip_method}
nand_boot=echo Booting from nand ...; run nand_args; nandecc hw 2; nand read.i ${kloadaddr} ${nand_src_addr} ${nand_img_siz}; bootm ${kloadaddr}
nand_img_siz=0x500000
nand_root=ubi0:rootfs rw ubi.mtd=7,2048
nand_root_fs_type=ubifs rootwait=1
nand_src_addr=0x280000
net_args=run bootargs_defaults;setenv bootargs ${bootargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
net_boot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${kloadaddr} ${bootfile}; run net_args; bootm ${kloadaddr}
netmask=255.255.255.0
nfsopts=nolock
nor_args=run bootargs_defaults;setenv bootargs ${bootargs} root={nor_root} rootfstype=${nor_root_fs_type} ip=${ip_method}
nor_boot=echo Booting from NOR ...; run nor_args; cp.b ${0x08080000} ${kloadaddr} ${nor_img_siz}; bootm ${kloadaddr}
nor_img_siz=0x280000
nor_root=/dev/mtdblock3 rw
nor_root_fs_type=jffs2
nor_src_addr=0x08080000
rootpath=/home/user/ti-sdk-am335x-evm-05.04.00.00/targetNFS
script_addr=0x81900000
serverip=11.0.0.1
spi_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${spi_root} rootfstype=${spi_root_fs_type} ip=${ip_method}
spi_boot=echo Booting from spi ...; run spi_args; sf probe ${spi_bus_no}:0; sf read ${kloadaddr} ${spi_src_addr} ${spi_img_siz}; bootm ${kloadaddr}
spi_bus_no=0
spi_img_siz=0x280000
spi_root=/dev/mtdblock4 rw
spi_root_fs_type=jffs2
spi_src_addr=0x62000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial
stdin=serial
stdout=serial
Environment size: 2762/8188 bytes
Thank you in advance