TI Processor SDK 2.00 Bootstrap - matianfu/sitara-wiki GitHub Wiki
TI has excellent official wiki page.
This page just clarify some subtle problems.
The top document is:
http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_Software_Developer%E2%80%99s_Guide
And this page should be read carefully before any action
http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_Getting_Started_Guide
I have a Beaglebone Black board and a microSD card.
I bought a FTDI cable to connect BeagleBone Black to my Ubuntu PC. This is not a must-have, but setup-uboot-env script, which is used in set-up stage, recognizes only FTDI usb-serial cable. If you do NOT have this cable, you can manually create a minicom script file (as shown below) and set up BeagleBone Black.
Ubuntu 12.04 or 14.04 are required. Other OS or OS version wont do.
Step 1:
If your BeagleBone Black boots from eMMC, you should rename or remove the MLO file in boot partition.
If you connect BBB to Ubuntu PC and there is a mass storage device mounted automatically, you can delete it from Ubuntu; otherwise, you need to access the console through ssh or serial port. log into the system and modify the file using command line.
Step 2:
Install the SDK
Step 3:
Create a bootable SD card. Follow the official guide.
http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_create_SD_card_script
Step 4:
Run setup script.
The setup script brings up almost everything you need in traditional embedded linux developement setup, including:
(NETBOOT)
- tftp for kernel image
- nfs server for rootfs
- dhcpd for ip address allocation
In the last stage of setup script, the program tries to
- identify the board type
- generate a minicom script file accordingly
- start minicom with script to boot BBB from network
Here is something not fully clarified by official document:
First, BBB (or other dev board) are identified by SERIAL PORT, not USB DEVICE (mini/micro USB). There is no need to connect miniUSB to PC.
Second, the board is identified by uboot output to serial port during system boot. So after the identification action starts (press y after the question), you need to reset the board by pressing the reset button or doing a power cycle. There is no magic in identification.
Third, setup script generate a setupBoard.minicom
script file. This file is provided to minicom as an argument, which will be run by minicom. This is a way to communicate to serial port automatically and programmatically.
Fourth, minicom script requires expect
, you need to install this package before running setup script.
My setupBoard.minicom
looks like this:
timeout 300
verbose on
expect {
"stop autoboot:"
}
send " "
expect {
"U-Boot#"
}
send "env default -f -a"
expect {
"U-Boot#"
}
send "saveenv"
expect {
"U-Boot#"
}
send "reset"
expect {
"stop autoboot:"
}
send " "
expect {
"U-Boot#"
}
send "setenv serverip 192.168.1.111"
expect {
"U-Boot#"
}
send setenv rootpath '/home/ma/ti-02.00.00.00/targetNFS'
expect {
"U-Boot#"
}
send "setenv bootfile zImage-am335x-evm.bin"
expect {
"U-Boot#"
}
send "setenv ip_method dhcp"
expect {
"U-Boot#"
}
send "setenv nfsopts 'nolock,v3,tcp,rsize=4096,wsize=4096'"
expect {
"U-Boot#"
}
send "setenv getuenv 'if mmc rescan; then if run loadbootenv; then run importbootenv; fi; fi;'"
expect {
"U-Boot#"
}
send setenv bootcmd 'run findfdt; run getuenv; setenv autoload no;dhcp ;tftp ${loadaddr} zImage-am335x-evm.bin; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}'
expect {
"U-Boot#"
}
send "saveenv"
expect {
"U-Boot#"
}
send "boot"
! killall -s SIGHUP minicom
If you don't have FTDI cable, you can use this file as template. Modify it according to your system environment, and manually run:
minicom -S setupBoard.minicom
FTDI cable
It is surprising that FT232R FTDI cable is not recognized by Ubuntu. The reason is driver is not loaded.
Load driver before you plugging the cable to PC.
sudo modprobe ftdi_sio