DOC PREVIEW
UB CSE 321 - Project 2 – Shell Programming and Simple Device Drivers for XINU

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1. Objectives and overview of the project:2. Project Environment:Project #2 – Shell Programming and Simple Device Drivers for XINU CSE321: Embedded and Realtime Operating Systems Fall 20071. Objectives and overview of the project:In Project #1 we prepared a simple hardware system and embedded in it a minimal operating system. The minimaloperating system will be enhanced in this project by adding shell commands and by adding a simple device driver.Objectives of the project are to:(i) study the software representing various components of the Embedded XINU operating system(ii) learn to modify the Embedded XINU system to add shell commands and (iii) add a simple device driver to enhance the capabilities of the Embedded XINU. 2. Project Environment:2.1 Operating system XINU: XINU ("Xinu Is Not Unix") is a small, academic operating system developed at Purdue University by Dr. Douglas E. Comer in the early 1980s for the LSI-11 platform; it has now been ported to a variety of platforms. Embedded XINU is an update of this project which attempts to modernize the code base (to ANSI-compliant C) and port the system to a modern architecture (specifically the MIPS architecture). 2.2 Hardware WRT54GL: We will use wireless router WRT54GL as a host for embedded the software we will develop for enhancing the features of an embedded operating system. The WRT54G is notable for being the first consumer-level network device that had its firmware source code released to satisfy the obligations of the GNU GPL. This allows programmers to modify the firmware to change or add functionality to the device. WRT54GL features a Broadcom MIPS processor BCM5352 (200-250Mhz), a four port switch, 802.11b and 802.11g wirelessLAN support, a Web interface for configuration of the router, 16Mbytes of RAM and 4Mbytes of flash memory. Any modification to the router function itself has to be done by updating the firmware on the flash memory. However we will use the RAM to load the embedded XINU.2.3 Test Environment: The lab environment will be supported by other hardware and software components to provide cross-compiling and networking support. In order to compile Embedded MIPS kernels on a workstation that is not itself a MIPS processor, it is necessary to build and install an appropriate cross compiler. Any time you modify the embedded XINU, the recompiled software will have to be reloaded. A simple network configuration allocating IP address to the host with the cross-compiler, the wireless router that will host the embedded XINU and a common router that forms the network are shown in Figure 1. Figure 1: Network to enable uploading Embedded XINU into WRT54GL (by D. You)Network connection Serial Communication IP: 192.168.0.130 IP: 192.168.0.101 1The Common Firmware Environment (CFE) is the firmware developed by Broadcom for the BCM947xx SoC platform (among others). It is the first code that runs when the router boots and performs functions:- Initializes the system - Sets up a basic environment in which code can run - Optionally provides a command line interface non-standard usage - Loads and executes a kernel image So, in normal operation, a user will not see CFE working at all; it will load the LinkSys kernel and exits. For us, however, CFE is crucial, because it provides us with the ability to load an image over the network using TFTP.3. What to do?3.1 Study Embedded XINU filesDownload the Embedded XINU bundle (tarball) from http://xinu.mscs.mu.edu and untar it. Examine the directorystructure and understand the purpose of various directories. Specifically, study these files in the directories:- include (header files): shell.h, device.h, gpio.h, interrupt.h, shell.h, tty.h, uart.h- shell (shell command files): shell.c, xsh_led.c, xsh_help.c- system (system operations): devtable.c, getc.c, putc.c, read.c, write.c, initialize.c, kprintf.c, open.c, close.c, startup.S- all the files in tty and uart directories.3.2 Write simple shell commandsThe XINU shell is a subsystem designed as an interface for interacting with the operating system. The shell relies on the TTY driver to receive user input and provide output to the user. When XINU starts, a shell process is spawned for each serial port (or TTY). TTY operates on the UART driver. Study the steps given in http://xinu.mscs.mu.edu/Shell to understand how to create a shell command. Add three commands:(i) rev string that reverses and prints a given string(ii) ledLoop args that flashes leds on WRT54GL in a loop according to the args given; use your imagination for the args and for the usage of the command; and (iii) a command of your choice; create a fun command that exploits the components on the WRT54GL. 3.3 Write a framebuffer driverThe framebuffer is a graphic hardware-independent abstraction layer to show graphics on a console without relying on system-specific libraries or the heavy overhead of the X Window System. You will have to design a header file for the device that specifies the operations, add a device number in the device table and implement theappropriate operations. You will then write a test program to test the device driver. More details and code segments will be given to you in next recitation.4. Deadline for the project: October


View Full Document

UB CSE 321 - Project 2 – Shell Programming and Simple Device Drivers for XINU

Documents in this Course
Anomaly1

Anomaly1

48 pages

ProcSept9

ProcSept9

17 pages

LecSept2

LecSept2

30 pages

CRCNov23

CRCNov23

14 pages

Load more
Download Project 2 – Shell Programming and Simple Device Drivers for XINU
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Project 2 – Shell Programming and Simple Device Drivers for XINU and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Project 2 – Shell Programming and Simple Device Drivers for XINU 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?