Difference between revisions of "EBC Listings for Embedded Linux Primer"

From eLinux.org
Jump to: navigation, search
(Chapter 4: Added Listing 4-1)
m (Added Header/Footer)
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:ECE597]]
+
[[Category:ECE497]]
 +
{{YoderHead}}
  
 
Here are the listing from the Embedded Linux Primer as done on the Beagle.
 
Here are the listing from the Embedded Linux Primer as done on the Beagle.
  
== Chapter 2 ==
+
* [[ECE497 Listings for Embedded Linux Primer Chapter 2]]
 +
* [[ECE497 Listings for Embedded Linux Primer Chapter 4]]
 +
* [[ECE497 Listings for Embedded Linux Primer Chapter 5]]
 +
* [[ECE497 Listings for Embedded Linux Primer Chapter 6]]
 +
* [[ECE497 Listings for Embedded Linux Primer Chapter 7]]
 +
* [[ECE497 Listings for Embedded Linux Primer Chapter 8]]
  
{|
+
{{YoderFoot}}
! Number
+
! Page
+
! Caption
+
! Listing
+
|-
+
| 2-1
+
| 2-6
+
| Initial Bootloader Serial Output
+
| <pre>
+
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)
+
Reading boot sector
+
Loading u-boot.bin from mmc
+
 
+
 
+
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 #
+
</pre>
+
|-
+
| 2-2
+
| 2-7
+
| Loading the Linux Kernel
+
|
+
|-
+
| 2-3
+
| 2-9
+
| Linux Final Boot Messages
+
| <pre>
+
</pre>
+
|-
+
| 2-4
+
| 2-21
+
| Hello World, Embedded Style
+
| <pre>
+
#include <stdio.h>
+
 
+
int bss_var;        /* Uninitialized global variable */
+
 
+
int data_var = 1;  /* Initialized global variable */
+
 
+
int main(int argc, char **argv)
+
{
+
  void *stack_var;            /* Local variable on the stack */
+
 
+
  stack_var = (void *)main;  /* Don't let the compiler */
+
                              /* optimize it out */
+
 
+
  printf("Hello, World! Main is executing at %p\n", stack_var);
+
  printf("This address (%p) is in our stack frame\n", &stack_var);
+
 
+
  /* bss section contains uninitialized data */
+
  printf("This address (%p) is in our bss section\n", &bss_var);
+
 
+
  /* data section contains initializated data */
+
  printf("This address (%p) is in our data section\n", &data_var);
+
 
+
  return 0;
+
}
+
</pre>
+
|-
+
| 2-5
+
| 2-22
+
| Hello Output for Host Computer
+
| <pre>
+
</pre>
+
|-
+
| 2-5
+
| 2-22
+
| Hello Output for Beagle
+
| <pre>
+
</pre>
+
|}
+
 
+
== Chapter 4 ==
+
 
+
{|
+
! Number
+
! Page
+
! Caption
+
! Listing
+
|-
+
| 4-1
+
| 4-7
+
| Kernel Build Output
+
| <pre>
+
$ export OETREE="${HOME}/oe"
+
$ PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}
+
$ PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}
+
$ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage
+
  CHK    include/linux/version.h
+
make[1]: `include/asm-arm/mach-types.h' is up to date.
+
  CHK    include/linux/utsrelease.h
+
  SYMLINK include/asm -> include/asm-arm
+
  CALL    scripts/checksyscalls.sh
+
  CHK    include/linux/compile.h
+
  CC      arch/arm/mach-omap2/io.o
+
  CC      arch/arm/mach-omap2/devices.o
+
      .
+
      .  <lines of output omitted here>
+
      .
+
  LD      vmlinux
+
  SYSMAP  System.map
+
  SYSMAP  .tmp_System.map
+
  OBJCOPY arch/arm/boot/Image
+
  Kernel: arch/arm/boot/Image is ready
+
  GZIP    arch/arm/boot/compressed/piggy.gz
+
  AS      arch/arm/boot/compressed/piggy.o
+
  LD      arch/arm/boot/compressed/vmlinux
+
  OBJCOPY arch/arm/boot/zImage
+
  Kernel: arch/arm/boot/zImage is ready
+
  UIMAGE  arch/arm/boot/uImage
+
Image Name:  Linux-2.6.29-omap1
+
Created:      Tue Mar  9 12:58:27 2010
+
Image Type:  ARM Linux Kernel Image (uncompressed)
+
Data Size:    2991236 Bytes = 2921.13 kB = 2.85 MB
+
Load Address: 0x80008000
+
Entry Point:  0x80008000
+
  Image arch/arm/boot/uImage is ready
+
</pre>
+
|-
+
| 4-2
+
| 4-9
+
| Link Stage: vmlinux
+
| <pre>
+
</pre>
+
|-
+
| 4-3
+
| 4-14
+
| Kernel Subdirectory
+
| <pre>
+
</pre>
+
|}
+

Revision as of 17:54, 28 May 2012

thumb‎ Embedded Linux Class by Mark A. Yoder


Here are the listing from the Embedded Linux Primer as done on the Beagle.




thumb‎ Embedded Linux Class by Mark A. Yoder