Previous Home Next


Porting NetBSD To A New ARM SoC


This article describes experiences in porting NetBSD to a new ARM-based SoC. The specific chip addressed is the ARM9-based Agere Vx115 cellular telephony digital baseband chip, and the Vx115 VEP evaluation board hosting the chip. The information presented here is intended to assist with the porting of NetBSD to any new ARM-based platform.

Porting Variants

There are a couple of variants possible when porting NetBSD depending on the level of support already available in the kernel.
This involves adapting the NetBSD kernel to run on a new processor architecture type (like MIPS, PowerPC, ARM, etc., though those types are already supported). This is a major undertaking that requires deep understanding of both the NetBSD core and the processor architecture.
This involves porting NetBSD to a new SoC which uses as its processor core a type already supported by NetBSD but provides some unique set of on-chip peripheral devices. This involves defining the bus structures needed to interconnect the devices on the SoC, as well as drivers for the peripherals.
This involves developing code to allow NetBSD to run on a particular platform (evaluation board) that uses a chip (SoC) already supported by the NetBSD kernel. This involves creating appropriate platform startup code, as well as support for off-chip peripherals on the board, as well as an appropriate root filesystem with the platform applications and libraries.

This document describes the latter two activities. The Vx115 SoC is based on an ARM9 processor core already supported by NetBSD (though the exact variant, the ARM926EJ-S, was not directly supported in the kernel version used and required minor adaptation), so a processor port was not needed, but the SoC provides a uniques set of on-chip peripherals, and was provided on an evaluation board with various supporting hardware components.

Scope

The focus of this porting effort was to get NetBSD running on the platform with only the minimum support needed to host a console and shell on the serial port. Only those on- and off-chip peripherals needed to support this operation were addressed; the SoC provides many other peripherals which would need support (drivers) to comprise anything near a full board-support package.

Such a "basic" port requires addressing a relatively small number of issues, described in the following sections. Each of these involves creating various configuration, source and header files, and the contents of these files is discussed in the subsequent sections.

Acknowledgments and References

As is standard practice with open-source systems, much of the required functionality can be found in corresponding files for existing ports. This project makes full use of this available source code (with thanks to all of the original authors). In fact, it's because of the work of others, and their openness in sharing it, that NetBSD and other open-source systems are quite straightforward to adapt to new platforms.

There's a great deal of information available on the NetBSD Project website on building and working with NetBSD systems. Of particular interest for building is the NetBSD Guide, especially the sections on building and cross-compiling.

Also invaluable is the web-based source cross-referencing tool initially provided as the Linux Cross-Reference by the LXR Project. This tool has been applied to the NetBSD source (as well as many others) by Robert Watson in his FreeBSD and Linux Kernel Cross-Reference.




Previous Home Next


Comments/questions: jsevy@cs.drexel.edu