Technical Details


Hydra Board
CPU - MC68EN302
About the Kernel
More About the Kernel
For Those Who Want to Rebuild the Kernel
About the Applications
For Those who want to Write Applications for the Hydra

Hydra Board

The Hydra board was designed by Roy Want, Kurt Partridge, and Frank Vest when Kurt was working as a summer intern at Xerox Parc in 1998.

CPU - MC68EN302

About the Kernel

CPU feature
The core of MC68EN302 is the M68000, and the major difference from other CPUs where linux is running is that it doesn't have MMU(Memory Management Unit).

Linux for the CPU without MMU - uClinux
Linux was first developed for the processor - Intel 386 - that has MMU in it, and most of the other linux ports are also for the CPU's with MMU. The uClinux is a linux port for PalmPilot(with 68328). The 68328 is also an extension of M68000. The uClinux developers have changed the linux kernel so that it can run on 68000 which doesn't have MMU. They've modified the kernel 2.0.33, and most of their work is on the memory management part of the kernel. We've started porting with uClinux.

Limitation
There is no virtual memory concept in uClinux, and all the user level processes access physical memory directly. Because many processes must share the physical memory, absolute addressing cannot be used. Instead, all processes use relative addressing. So, the code size cannot exceed 64K.

Changes
We've changed the CPU specific part of the kernel(bootup, chip initialization, timer, etc.), and also changed serial device driver. 68EN302 has ethernet controller in it, and we've added ethernet device driver to the kernel, too.

More About the Kernel

From Power-On to Shell prompt
When the power is turned on, the CPU can recognizes only first 8K of ROM and RAM and the on-chip RAM are not defined. The address of the 8K of ROM starts from 0x0. First, the reset vector is taken at address 0x04 and the CPU starts executing instructions from that address specified by reset vector. The bootup routine(arch/m68knommu/kernel/head.S) initializes the on-chip RAM and copies the instructions that initialize RAM and ROM to the onchip RAM and branches to the onchip RAM. After finishing setting up RAM and ROM, it jumps back to the ROM(now, ROM's starting address is changed to 0xc00000). Memory blocks are configured as in the table.
Address Block
0x000000 - 0x7fffff RAM
0xc00000 - 0xcfffff ROM
0xffe000 - 0xffefff MBC registers (MC68EN302 specific registers)
0xfff000 - 0xffffff IMP registers (MC68302 specific registers)

The bootup routine moves data section of the kernel from ROM to RAM. And, then the bootup routine initializes the serial port and jumps to start_kernel(). All the kernel data structures are initialized in start_kernel(), and then init program is executed. In init(/etc/init), RAM file system and proc file system are mounted and the loopback device and the ethernet device are initialized, and then finally shell(/bin/sh) starts.

Loader script file
When linking the kernel, following loader script file is used. After building the kernel, kernel text section, kernel data section, and rom disk image are copied to ROM. The data section is copied to RAM during the boot process, and also some of the RAM space is reserved (and initialized to 0) for bss section.
MEMORY
        {
        flash  : ORIGIN = 0xc00000, LENGTH = 0x100000
        ram    : ORIGIN = 0x400, LENGTH = 0x800000 - 0x400
        eram   : ORIGIN = 0x800000, LENGTH = 1
        }

SECTIONS
{
        .text :
        {
        text_start = . ;
        *(.text)
        _etext = . ;
        __data_rom_start = ALIGN ( 4 ) ;
        } > flash
        .data :
        {
        __data_start = . ;
        *(.data)
        _edata = . ;
        edata = ALIGN( 0x10 ) ;
        } > ram
        .bss :
        {
        __bss_start = ALIGN( 0x10 ) ;
        __data_end = ALIGN( 0x10 ) ;
        *(.bss)
        *(COMMON)
        __bss_end = . ;
        end = ALIGN( 0x10 ) ;
        _end = ALIGN( 0x10 ) ;
        } > ram
        .eram :
        {
        _ramend = . ;
        } > eram
}

Serial Device Driver(drivers/char/68302serial.c)
The 68EN302 has three independent full duplex Serial Communication Controllers(SCCs). In the Hydra, we used SCC1 for serial port.
Ethernet Device Driver(drivers/net/hydra.c)

For Those Who Want to Rebuild the Kernel

Installing tools and sources
All the tools and libraries can be found at uClinux site. And, the sources are available at this site.

Once you install all the above tools and sources, your directory should be look like followings :
    genromfs-0.3/  apps/          uC-libm/
    coff2flt-0.3/  linux/         uC-libc/
How to Build
At first build romfs image in /apps, and then copy the romfs image to linux source directory(/linux) and build the rom image(kernel + romfs). To build the rom image, follow these steps.
    % make config
    % make depend
    % make updateromfs

About the Applications

For Those who want to Write Applications for the Hydra

Here are some informations for those who want to write application programs for the Hydra.

Hydra Home Page

Portolano Project Home Page


jhkang@cs.washington.edu