Embedded Linux: Hardware, Software and Interfacing Serving the Embedded Linux Community Since 2001    
 Welcome to Embedded Linux: Hardware, Software and Interfacing
 Monday, September 06 2010 @ 04:12 AM MDT
Board - Emac 53C52

Manufacturer
Product Information
Manual
CPU Manual
config file:   2.4.14, DOC
config file:   2.4.20, DOC

BoardImage


Building a driver development harddisk for the 53E52

If you want to write device drivers for the 53E52 you'll need a development environment that matches the Emac distribution on the board's DOC. Basically you'll need a compiler, the kernel source (maybe) and the kernel headers that match the kernel running from the DOC (on July 14, the DOC has kernel 2.4.20). You can set up this environment easily on a desktop workstation but if your writing device drivers, you'll need access to the real hardware. Since most device drivers are small, you can use the board itself to compile its own code. But that takes a little setup before that can happen. Here are the options for development environment.

1. Compile on desktop, copy binary to target, run on target (the execute, debug, edit, compile loop time is long)
2. Target NFS mounts desktop directory, desktop compiles, target executes (NFS can be pain to setup)
3. Boot target on development harddisk, compile and execute on target (simple, but compile times can be long)

The third option is most attractive because its simple. Remember you are only compiling device drivers which are small. If you want to compile the kernel on the 53E52, be prepared to wait for a long, long time.

Instructions

On a desktop, install Debian 3.0 on a 1.2G HD or greater, follow these instructions
Then run this sbc.install script
This sbc.install installs everything needed, compiler, kernel source and headers, kernel 2.4.20, and DOC module etc
Connect this disk to the 53E52, change BIOS to boot from HD (see BIOS setup below for HD booting), boot and your ready for development

helloworld_proc_module.c is in /root, grep it for gcc to see how to compile it

 cd /root
 grep gcc helloworld_proc_module.c > a
 cat a
  gcc -O2 -D__KERNEL__ -DMODULE -I/usr/src/linux/include -c helloworld_proc_module.c -o helloworld_proc_module.o
 source a
 insmod helloworld_proc_module.o
 lsmod
  Module                  Size  Used by    Tainted: P
  helloworld_proc_module     765   0  (unused)
 cat /proc/helloworld
  helloworld Default

DOC patching 2.4.20 notes

As of 7/14/03, Emac was shipping kernel version 2.4.20 with DOC patch 5.1.4 applied. I tried to patch 2.4.20 with doc 5.1.4 but was unsuccessful. The DOC docs say 5.1.4 in qualified with 2.4.17, 2.4.18, and 2.4.19 but not 2.4.20. Somehow Emac has patched 2.4.20 with 5.1.4 but hasn't released that infomation.

I couldn't patch 2.4.20 with doc 5.1.4, using old 5.0.0
 cd /usr/src
 rm -rf linux
 tar zxvf linux-2.4.20.tar.gz
 ln -s linux-2.4.20 linux
 tar zxvf doc-linux-5.0.0.tgz
 cd doc-linux-5.0.0/driver
 ./patch_linux linux-2_4-patch driver-patch /usr/src/linux
 cd /usr/src/linux
 wget http://www.embeddedlinuxinterfacing.com/seminar/ouray03w/config2.4.20doc
 cp config2.4.20doc .config
 yes n | make oldconfig
 make dep
 make bzImage
 cp arch/i386/boot/bzImage /tmp
 make modules
 cp drivers/block/doc/doc.o /tmp

Emac Inc - 53E52 (BIOS 7.6) with 16/16M Notes

BIOS setup

  • Serial access
    • Connect keyboard, reset board, press 'del' key while the board beeps
    • You need to use a PS/2 keyboard because you don't want to possibility of entering the BIOS from a noisy modem

Here's the fastest boot setup for development disk booting

 +------------------------------------------------------------------------------+
 |                 System Bios Setup - Basic CMOS Configuration                 |
 |            (C) 2000 General Software, Inc. All rights reserved               |
 +---------------------------+--------------------+-----------------------------+
 | DRIVE ASSIGNMENT ORDER:   | Date:>Jul 15, 2003 | Typematic Delay  : 250 ms   |
 | Drive A: (None)           | Time: 20 : 48 : 05 | Typematic Rate   : 30 cps   |
 | Drive B: (None)           | NumLock:  Disabled | Seek at Boot     : Floppy   |
 | Drive C: Ide 0/Pri Master +--------------------+ Show "Hit Del"   : Enabled  |
 | Drive D: (None)           | BOOT ORDER:        | Config Box       : Disabled |
 | Drive E: (None)           | Boot 1st: Drive C: | F1 Error Wait    : Disabled |
 | Drive F: (None)           | Boot 2nd: Drive A: | Parity Checking  : (Unused) |
 | Drive G: (None)           | Boot 3rd: (None)   | Memory Test Tick : Enabled  |
 | Drive H: (None)           | Boot 4th: (None)   | Test Above 1 MB  : Enabled  |
 | Drive I: (None)           | Boot 5th: (None)   | Debug Breakpoints: Disabled |
 | Drive J: (None)           | Boot 6th: (None)   | Splash Screen    : (Unused) |
 | Drive K: (None)           +--------------------+-----------------+-----------+
 | Boot Method: Boot Sector  | IDE DRIVE GEOMETRY:  Sect  Hds  Cyls | Memory    |
 +---------------------------+ Ide 0: 3 = AUTOCONFIG, LBA           |  Base:    |
 | FLOPPY DRIVE TYPES:       | Ide 1: Not installed                 |   640KB   |
 | Floppy 0: Not installed   | Ide 2: Not installed                 |  Ext:     |
 | Floppy 1: Not installed   | Ide 3: Not installed                 |   15MB    |
 +---------------------------+--------------------------------------+-----------+

Boot on the harddisk, then
 insmod /usr/src/53e52/doc.o
 mount /dev/fla1 /mnt
 ls /mnt

Copy your working device drivers to /mnt.

Shutdown, remove development hardware and power up. The 53e52 should boot from flash with the Emac distribution.


Here's the fastest boot setup for DOC booting
 +------------------------------------------------------------------------------+
 |                 System Bios Setup - Basic CMOS Configuration                 |
 |            (C) 2000 General Software, Inc. All rights reserved               |
 +---------------------------+--------------------+-----------------------------+
 | DRIVE ASSIGNMENT ORDER:   | Date:>Mar 09, 2003 | Typematic Delay  : 250 ms   |
 | Drive A: (None)           | Time: 22 : 34 : 26 | Typematic Rate   : 30 cps   |
 | Drive B: (None)           | NumLock:  Disabled | Seek at Boot     : None     |
 | Drive C: (None)           +--------------------+ Show "Hit Del"   : Enabled  |
 | Drive D: (None)           | BOOT ORDER:        | Config Box       : Disabled |
 | Drive E: (None)           | Boot 1st: Drive C: | F1 Error Wait    : Disabled |
 | Drive F: (None)           | Boot 2nd: (None)   | Parity Checking  : (Unused) |
 | Drive G: (None)           | Boot 3rd: (None)   | Memory Test Tick : Disabled |
 | Drive H: (None)           | Boot 4th: (None)   | Test Above 1 MB  : Enabled  |
 | Drive I: (None)           | Boot 5th: (None)   | Debug Breakpoints: Enabled  |
 | Drive J: (None)           | Boot 6th: (None)   | Splash Screen    : (Unused) |
 | Drive K: (None)           +--------------------+-----------------+-----------+
 | Boot Method: Boot Sector  | IDE DRIVE GEOMETRY:  Sect  Hds  Cyls | Memory    |
 +---------------------------+ Ide 0: 3 = AUTOCONFIG, LBA           |  Base:    |
 | FLOPPY DRIVE TYPES:       | Ide 1: Not installed                 |   640KB   |
 | Floppy 0: Not installed   | Ide 2: Not installed                 |  Ext:     |
 | Floppy 1: Not installed   | Ide 3: Not installed                 |   15MB    |
 +---------------------------+--------------------------------------+-----------+
 |                    ^E/^X/<Tab> to select or +/- to modify                    |
 |                         <Esc> to return to main menu                         |
 +------------------------------------------------------------------------------+

Linux issues EMAC should address

  • Provide full instructions for development station setup, EMAC is working on this
  • Provide full instructions for kernel compiling complete with board .config file, EMAC is working on this
  • Provide full instructions for kernel installation and lilo or dlilo operation, EMAC is working on this
  • Document use of watchdog timer, EMAC is working on this

Hold down Ctrl-Shift during startup to enter BIOS debugger

BIOS Debugger help screen
 REBOOT                          - cold boot the target
 CONSOLE [CON|COMn]              - set debug console
 MASK x                          - set debug mask for EDOSROM
 WCOMx byte [n]                  - write byte to COMx n times
 MODE n                          - set video mode
 D[b|w|d] [addr]                 - dump memory (bytes/words/dwords)
 R[16|32] [reg value]            - display registers
 I[w|d] port                     - input from 8/16/32-bit I/O port
 O[w|d] port val                 - output to 8/16/32-bit I/O port
 U[16|32] [addr]                 - unassemble code
 E addr byte [...]               - enter bytes
 V vector#                       - display interrupt vector table pointer
 T                               - trace next instruction
 +|-                             - inc/dec IP
 G                               - go (resume execution)
 BP addr                         - set breakpoint
 BC bkpt#                        - clear breakpoint
 BL                              - list breakpoints
 SO x                            - route EDOSROM output to COMx
 EA20|DA20                       - enable/disable A20 line
 ECACHE|DCACHE                   - enable/disable cache
 TORAM                           - run BIOS from RAM
 TOROM                           - run BIOS from ROM
 WP [addr]                       - set/clear watchpoint
 RC index                        - read CMOS RAM data
 WC index byte ...               - write CMOS RAM data
 RFL phys:phys len               - read nwords words from Flash
 WFL phys:phys xxxx ...          - write words to Flash
 EFL phys:phys                   - erase Flash block
 LFL phys:phys                   - lock Flash block
 SFL phys:phys wdcnt value       - set Flash words to value
 UFL phys:phys wdcnt addr        - update Flash from buffer
 CSR index                       - read data from chipset
 CSW index data                  - write data to chipset
 SIOR index                      - read data from SIO chip
 SIOW index data                 - write data to SIO chip
 PCIR[BWD] idx [func dev bus]    - read data from PCI device
 PCIW[BWD] idx val [func dev bus]- write data to PCI device
 PCID                            - dump PCI enumeration
 RD|WD unit sec hd trk addr      - read/write disk sector to/from buffer
 BIOSDATA                        - display BIOS data area
 ?|HELP                          - show this help


Last Updated Sunday, March 27 2005 @ 04:37 PM MST View Printable Version


Copyright © 2002-2008 Craig Hollabaugh
All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.05 seconds