Difference between revisions of "ECE597 icassp 2010 Lab 2 The Boot Sequence"
(Init page) |
(Added Sections) |
||
Line 2: | Line 2: | ||
[[Category:BeagleBoard]] | [[Category:BeagleBoard]] | ||
− | In the first lab you saw the BeagleBoard from a users point of view. In this lab we'll take a look at what's going on inside. If your Beagle is still running do this to shut it down. | + | In the first lab you saw the BeagleBoard from a users point of view. In this lab we'll take a look at what's going on inside. |
+ | |||
+ | == Connecting to the Beagle's serial port == | ||
+ | |||
+ | If your Beagle is still running do this to shut it down. | ||
# Start HyperTerminal | # Start HyperTerminal | ||
** Go to Start:Accessories:Communications:HuperTermainal | ** Go to Start:Accessories:Communications:HuperTermainal | ||
− | # [[File:HyperTerminal_init.png]] | + | # [[File:HyperTerminal_init.png|200px]] |
− | # [[File:HyperTerminal_Connect_To.png]] | + | # [[File:HyperTerminal_Connect_To.png|200px]] |
− | # [[File:HyperTerminal_Properties.png]] | + | # [[File:HyperTerminal_Properties.png|200px]] |
+ | |||
+ | == Shutting Down and Rebooting on U-Boot == | ||
+ | |||
<pre> | <pre> | ||
yoder@beagleboard:~$ shutdown -r now | yoder@beagleboard:~$ shutdown -r now | ||
Line 119: | Line 126: | ||
</pre> | </pre> | ||
This gives you some information about the board. It appears we have some RAM starting at <code>0x8000 0000</code>. | This gives you some information about the board. It appears we have some RAM starting at <code>0x8000 0000</code>. | ||
+ | |||
+ | == Booting Linux == | ||
+ | |||
Here's what happens when you boot Linux: | Here's what happens when you boot Linux: | ||
<pre> | <pre> |
Revision as of 10:17, 13 March 2010
In the first lab you saw the BeagleBoard from a users point of view. In this lab we'll take a look at what's going on inside.
Connecting to the Beagle's serial port
If your Beagle is still running do this to shut it down.
- Start HyperTerminal
- Go to Start:Accessories:Communications:HuperTermainal
Shutting Down and Rebooting on U-Boot
yoder@beagleboard:~$ shutdown -r now
As your Beagle reboots you will see:
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24) Reading boot sector Loading u-boot.bin from mmc
Which is then followed by
U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52) OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz OMAP3 Beagle board + LPDDR/NAND I2C: ready DRAM: 256 MB NAND: 256 MiB In: serial Out: serial Err: serial Board revision C4 Die ID #5444000400000000040365fa1400e007 Hit any key to stop autoboot: 0 OMAP3 beagleboard.org #
Hit a key before it goes on to boot Linux. What has happened so far is:
- When power is first applied the Beagle jumps to a boot loader in the OMAPs ROM.
- This bootloader finds the SD card run runs a file called MLO.
- MLO is X-Loader with a couple things added. The first bit of output above is from X-Loader.
- X-Loader looks and finds u-boot.bin and starts running it.
Das U-Boot is universal boot loader that is used on many embedded systems. You can find more information at http://www.denx.de/wiki/U-Boot. You can list the commands it understands:
OMAP3 beagleboard.org # help ? - alias for 'help' base - print or set address offset bdinfo - print Board Info structure boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootm - boot application image from memory chpart - change active partition cmp - memory compare coninfo - print console devices and information cp - memory copy crc32 - checksum calculation echo - echo args to console editenv - edit environment variable exit - exit script ext2load- load binary file from a Ext2 filesystem ext2ls - list files in a directory (default /) false - do nothing, unsuccessfully fatinfo - print information about filesystem fatload - load binary file from a dos filesystem fatls - list files in a directory (default /) fsinfo - print information about filesystems fsload - load binary file from a filesystem image go - start application at address 'addr' help - print command description/usage i2c - I2C sub-system imxtract- extract a part of a multi-image itest - return true/false on integer compare |
loadb - load binary file over serial line (kermit mode) loads - load S-Record file over serial line loady - load binary file over serial line (ymodem mode) loop - infinite loop on address range ls - list files in a directory (default /) md - memory display mm - memory modify (auto-incrementing address) mmc - MMC sub-system mtdparts- define flash/nand partitions mtest - simple RAM read/write test mw - memory write (fill) nand - NAND sub-system nandecc - nandecc - switch OMAP3 NAND ECC calculation algorithm nboot - boot from NAND device nm - memory modify (constant address) printenv- print environment variables reset - Perform RESET of the CPU run - run commands in an environment variable saveenv - save environment variables to persistent storage setenv - set environment variables showvar - print local hushshell variables sleep - delay execution for some time source - run script from memory test - minimal test like /bin/sh true - do nothing, successfully version - print monitor version |
U-Boot source code is available is highly configurable, therefore the command list can be expanded or reduced to fit your application. Try:
OMAP3 beagleboard.org # bdi arch_number = 0x0000060A env_t = 0x00000000 boot_params = 0x80000100 DRAM bank = 0x00000000 -> start = 0x80000000 -> size = 0x08000000 DRAM bank = 0x00000001 -> start = 0x88000000 -> size = 0x08000000 baudrate = 115200 bps
This gives you some information about the board. It appears we have some RAM starting at 0x8000 0000
.
Booting Linux
Here's what happens when you boot Linux:
OMAP3 beagleboard.org # print bootcmd bootcmd=mmc init;fatload mmc 0 80300000 uImage;bootm 80300000 OMAP3 beagleboard.org # print bootargs bootargs=console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rw rootfstype=t