uClinux for Sparc-MMUless with EthernetMAC: Patches

Introduction

I did the following changes to the latest uClinux sparc-port to get it running on an XSV800-board. I used the LEON-1 core (from http://www.gaisler.com) without mul and div instructions, with the open Ethernet MAC (from http://www.opencores.org). A demonstration of the boot sequence, the invocation of user programs and the telnet connection from PC to the board can be found here.

Applying the patches

These patches can be applied to the uClinux distrubution uClinux-dist-20030305; see http://www.leox.org.
Be careful: Some patches contain changes that are specific to my target, that is clock frequency (25MHz), baud rate (38400) and memory layout. I didn't remove them, because I wanted to test the patches on my system. I didn't and I counldn't test all possible combinations of these patches.

Apply the patches in the top-level directory (the directory containing the uClinux-dist directory) and type:
patch -p1 <fixes.diff

General fixes

Download: fixes.diff

This patch contains general fixes for this uClinux port. It allows you to start user applications from the shell.
At least the following applications will compile and run: sash, ifconfig, route, ping, inetd, telnetd.

Changes:

Memory layout for kernel in RAM

Download: ram_kernel.diff

This patch includes the memory layout to be used when the kernel should be located in RAM area. Note that you will have to change this in the configuration, too. Locating the kernel in ROM will still work after this patch.

Changes:

Incorporation of the Ethernet MAC

Download: open_eth.c, open_eth.h, open_eth.diff

Place the open_eth-files in the drivers/net dirctory before applying the patch. Those are the same files which can be found at http://www.opencores.org/cvsweb.shtml/or1k/uclinux/uClinux-2.0.x/drivers/net. The patch adds some options to the graphical configuration, allowing to set the MAC-address, IRQ and base-address of the Ethernet MAC.
Note that you will get a memory access violation if you enable the Ethernet MAC and run it on TSIM. Enabling networking and the loopback device will work also on the simulator.

Changes:

Support for LEON without mul and div instructions

Download: sparcv7.diff

This patch allows running the uClinux port on processors without mul and div instructions. If you use a processor without the mulscc instruction, also download umul.S and place it in the arch/sparcnommu/lib directory.

Changes:

Network configuration

Download: romfs.etc.tar.gz

This is an example for the network configuration files in the romfs/etc directory.

© 2003, Michael Wurm. – Read about my other projects.