Previous Home Next


Configuration


As discussed in the previous section, there are a number of files that specify the configuration for the NetBSD kernel. Some of the files are specific to the processor, and shared by any machine which uses that processor, while others are specific to the machine (development board).

Directories

The files (configuration, source and header) associated with an ARM SoC or platform port are placed in subdirectories created for that SoC or platform. The SoC-specific directory is created in the sys/arch/arm directory; it's sys/arch/arm/vx115 in this case. The platform-specific directory is created in the sys/arch/evbarm directory; here, it's sys/arch/evbarm/vx115_vep.

Processor Configuration Files

These are files that are specific to the SoC, and present regardless of the board it is used on. These files are placed within the sys/arch/arm/<processor-name> subdirectory (sys/arch/arm/vx115 in this case).

files.vx115

This specification file contains fundamental device specifications, attachment indications and source-file inclusions for peripherals associated with the processor, i.e., used by any platform based on the processor. This includes things like
This file is used by the NetBSD autoconfiguration system, to include appropriate source files for compilation and to create appropriate structures reflecting the organization of the system (which peripherals are attached to which bus, what parameters the buses pass to their children, etc.) This file is included by the board-specific configuration file (in this case, files.vx115_vep, described below).

As can bee seen in files.vx115, each bus or device has 3 basic parts to its specification
The vx115.files configuration file has just the basic set of configuration options (buses, interrupts, timers and serial interface) needed to initially bring up the system. Additional lines would be added as support is added for each of the additional on-chip system peripherals.

Note that the system AHB and APB buses are attached to something called "mainbus". This is the root bus in NetBSD. The CPU itself (the ARM926 core) is attached to this as part of the standard ARM system configuration (specified in the file sys/arch/arm/conf/files.arm).

Board Configuration Files

These files provide configuration for features that are board-specific. Note that this includes things like startup code (since this depends on the specific memory selects used on a board),  as well as the exact specification of kernel features to be supported.

These files are placed in the directory sys/arch/evbarm/conf.

files.vx115_vep

This specifies board-specific files to be included in the build, including:
 Again, the particular file files.vx115_vep specifies the bare minimum to get the system going.

mk.vx115_vep

This file is used in building the system Makefile, and adds defines and extra specifications to the build. For us, it specifies the following.
SYSTEM_FIRST_OBJ=    vx115_vep_start.o
SYSTEM_FIRST_SFILE=    ${THISARM}/vx115_vep/vx115_vep_start.S
SYSTEM_LD_TAIL_EXTRA+=; \
echo ${OBJCOPY} -S -O binary $@ $@.bin; \
${OBJCOPY} -S -O binary $@ $@.bin; \
echo gzip \< $@.bin \> $@.bin.gz; \
gzip < $@.bin > $@.bin.gz
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin.gz@}

std.vx115_vep

This specifies general build options for board.
machine evbarm arm
options    HZ=64
makeoptions   KERNEL_BASE_PHYS=0x24300000
makeoptions    KERNEL_BASE_VIRT=0xc0200000
makeoptions   BOARDTYPE="vx115_vep"
makeoptions   BOARDMKFRAG="${THISARM}/conf/mk.vx115_vep"
options   ARM_INTR_IMPL="<arch/arm/vx115/vx115_intr.h>"

VX115_VEP

This is the main config file, passed as argument to nbconfig. It's similar to the Linux .config file.
# The main bus device
mainbus0    at root

# The boot cpu
cpu0    at mainbus?

# Vx115 AHB and APB
vx115_ahb0   at mainbus?
vx115_apb0   at mainbus?

# On-chip interrupt controller
vx115_pic0   at vx115_apb? addr 0x700C1000 size 0x14c

# On-chip timer
vx115_clk0   at vx115_apb? addr 0x700C5000 size 0x68  intr 9

# On-chip serial UART
vx115_com0   at vx115_apb? addr 0x700E2000 size 0x7c  intr 19



Previous Home Next

Comments/questions: jsevy@cs.drexel.edu