© Promwad Innovation Company
Application Notes |
Use of NetBSD with Marvell Kirkwood Processors
This article provides an overview of NetBSD and highlights its differences from other operating systems of the family. It also briefly discusses the implementation and configuration of device drivers. The author studies an example of using this operating system, as an alternative to Linux, on the IP-Plug.
NetBSD is an operating system which represents the BSD family, along with OpenBSD and FreeBSD. Originally, BSD (an acronym of Berkeley Software Distribution) was a combination of patches and utilities for Bell Labs Unix, which evolved into an independent system. The source code had two licenses - Bell (because the company owned the larger part of the original source code) and BSD proper. After a while, the team of BSD developers broke up and the BSD project later received a new incarnation as 386BSD, an architecture i386 port. Eventually, the BSD family broke into three branches: NetBSD, OpenBSD and FreeBSD. Each of the three systems is unique in its own way, but they all have a lot in common. The key feature of NetBSD is multi-platform support. The developers’ slogan was: “Of course, you can run NetBSD on this platform”. Developers have applied for registering 53 architectures, and the number of supported machines continues to grow. Meanwhile, NetBSD remains just as safe and high-performing as its “family members”, OpenBSD and FreeBSD. NetBSD was first officially released in April 1993 and had the version number 0.8. Today’s latest version is 6.0. We should especially mention the advantages of a BSD license. Unlike Linux GPL, a BSD license helps in every possibly way modify the source code, change file names and distribute the final product provided we mention the author’s name. NetBSD source codes are accessible through an FTP server as tar archives or iso images. You can also receive any version of the system out of the cvs repository by referring to the release name tag. The source code tree includes a kernel code (sys directory), utilities (bin, usr.bin, sbin, usr, usr.sbin, gnu), a cross-compiler (tools), the build script build.sh, as well as relevant libraries and documentation. System compilation involves the following stages:
The IP-Plug uses the Marvell 88F6282 processor, ARMv5TE Kirkwood architecture series. Its support has been added to the NetBSD distribution since July 2012 and represented by files in the directory sys/arch/evbarm/marvell:
- To build a tool chain for the target architecture, you should call the script build.sh with the parameter tools. The tools include as, binutils, gcc, m4, yacc, etc. You can see all supported architectures in the sys/arch directory.
- Building the kernel is based on the specified configuration.
- To build system utilities and create a root file system, you should call the script build.sh with the parameter distribution.
|Microprocessor||1 GHz Marvell Kirkwood 88F6283, ARM Compliant|
|Memory||Up to 1024 MB 16 bit DDR2@800 MHz / Up to 4 GB NAND Flash|
|Ethernet||2x Gigabit Ethernet|
|Wi-Fi/BT||Wi-Fi 802.11 b/g/n + BT 2.1 EDR (optional)|
|Power||Input voltage: 100–240 V, 50/60 Hz; / Power consumption: 15 Watt, 5V@3.0A max|
|Dimensions||118 мм (L) x 76 mm (W) x 43 mm (H)|
|Package size||145 mm (L) х 125 mm (W) х 55 mm (H)|
- marvell_start.S is low-level kernel initialization: MMU initialization, transfer of boot parameters to the high-level code;
- marvell_machdep.c contains the main initialization code of the ARM kernel, peripherals (including boot console), building a page table and kernel relocation;
- marvellreg.h and marvellvar.h are constant values for addresses and sizes of memory locations, into which the registers of peripherals needed for system boot are mapped.