EBC Exercise 21a Boot Sequence

From eLinux.org
Revision as of 07:32, 1 October 2012 by Yoder (talk | contribs) (Initial page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

thumb‎ Embedded Linux Class by Mark A. Yoder


Up to this point we've always booted the Beagle into Linux and worked from there. Now it's time to learn what has to happen before we can run Linux. To do this you need to look at the output of the serial port so see the boot sequence.

Booting Up

Boot up your bone and connect to the serial port using the screen command. Hit return and log in.

host$ screen /dev/ttyUSB0 115200
.---O---.                                           
|       |                  .-.           o o        
|   |   |-----.-----.-----.| |   .----..-----.-----.
|       |     | __  |  ---'| '--.|  .-'|     |     |
|   |   |  |  |     |---  ||  --'|  |  |  '  | | | |
'---'---'--'--'--.  |-----------'  '-----'-'-'-'
                -'  |
                '---'

The Angstrom Distribution beaglebone ttyO0 

Angstrom v2012.05 - Kernel 3.2.25

beaglebone login: root
root@beaglebone:~# 

Now shutdown and be ready to hit return when you get the u-boot prompt.

beagle$ shutdown -r now
Sending SIGTERM to remaining processes...
Sending SIGKILL to remaining processes...
Unmounting file systems.
Unmounted /dev/mqueue.
Unmounted /sys/kernel/debug.
Disabling swaps.
Detaching loop devices.
Detaching DM devices.
[  599.018005] Restarting system.

These first messages are from the kernel shutting down. The following messages are the boot sequence.

U-Boot SPL 2011.09-00053-gb423c52 (Aug 10 2012 - 11:26:55)
Texas Instruments Revision detection unimplemented
No daughter card present
No AC power, disabling frequency switch
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img


U-Boot 2011.09-00053-gb423c52 (Aug 10 2012 - 11:26:55)

I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
No daughter card present
NAND:  HW ECC Hamming Code selected
No NAND device found!!!
0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Net:   cpsw
Hit any key to stop autoboot:  0 
U-Boot# 

You are now in the u-boot boot loader. Try help

U-boot# help
?       - alias for 'help'
askenv  - get environment variables from stdin
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
bootp   - boot image via network using BOOTP/TFTP protocol
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
dcache  - enable or disable data cache
dhcp    - boot image via network using DHCP/TFTP protocol
echo    - echo args to console
editenv - edit environment variable
env     - environment handling commands
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
ext4load- load binary file from a Ext2 filesystem
ext4ls  - 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 /)
go      - start application at address 'addr'
help    - print command description/usage
i2c     - I2C sub-system
icache  - enable or disable instruction cache
iminfo  - print header information for application image
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
md      - memory display
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - display MMC info
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nandecc - Switch NAND ECC calculation algorithm b/w hardware and software
nboot   - boot from NAND device
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
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
sf      - SPI flash sub-system
showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true    - do nothing, successfully
version - print monitor, compiler and linker version


U-boot# boot
SD/MMC found on device 0
reading uEnv.txt

33 bytes read
Loaded environment from uEnv.txt
Importing environment from mmc ...
Loading file "/boot/uImage" from mmc device 0:2 xxa2
3319440 bytes read
## Booting kernel from Legacy Image at 80007fc0 ...
   Image Name:   Angstrom/3.2.25/beaglebone
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3319376 Bytes = 3.2 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
systemd-fsck[56]: Angstrom-Cloud9: clean, 51868/218592 files, 304346/873534 blocks

.---O---.                                           
|       |                  .-.           o o        
|   |   |-----.-----.-----.| |   .----..-----.-----.
|       |     | __  |  ---'| '--.|  .-'|     |     |
|   |   |  |  |     |---  ||  --'|  |  |  '  | | | |
'---'---'--'--'--.  |-----------'  '-----'-'-'-'
                -'  |
                '---'

The Angstrom Distribution beaglebone ttyO0

Angstrom v2012.05 - Kernel 3.2.25

beaglebone login: 




thumb‎ Embedded Linux Class by Mark A. Yoder