kontron_kt690 - Kontron KT690/mITX target specific documentation
This reference entry provides board-specific information necessary to run VxWorks for the Kontron KT690/mITX BSP. Before using a board with VxWorks, verify that the board runs in the factory configuration by using vendor-supplied ROMs and jumper settings and checking the RS-232 connection.
This BSP doesn't support Symmetric Multiprocessing (SMP).
Please refer to the board vendor's documentation.
The target board is capable of booting from the onboard Ethernet adapters (PXE), the (optional) USB NAND Flash module, external SATA Hard Disk drives or external USB mass storage devices, external PATA Hard Disk drive or Compact Flash Card Type I/II.
In the standard configuration the BIOS loads and executes the bootstrap loader located in the boot sector of a diskette, a hard disk, or a compact flash device. The VxWorks bootstrap loader looks for the bootrom.sys file, loads it into memory, and transfers execution to it.
Booting is normally a two step process during development. In the first step, the VxWorks boot loader is started. In the second step, the VxWorks image is loaded and started by the boot loader. In the table below you can find the boot devices which are supported. Note that not all boot devices are included in the default configuration.
Boot device Description gei0 First Gigabit Ethernet Interface gei1 Second Gigabit Ethernet Interface ata[=0,0] PATA Disk Device or CF card ahci[=x,x] SATA Disk Device usb USB Bulk (Mass Storage) Device
The BSP support the following images.
Image Name Description Built in Device Compressed Loads Into bootrom.bin bootrom IDE/BSP Disk Yes High Memory bootrom.pxe bootrom IDE/BSP Net Yes High Memory vxWorks loadable VxWorks IDE Net/Disk No Low Memory (The binary images *.bin are used for creation of the appropriate bootrom.sys file)
To build a boot loader or a VxWorks image you should use the Wind River Workbench. If the default configuration is not appropriate for your application you can change it by editing the file config.h in the BSP directory (for the boot loader) or with help of the Wind River Workbench (for VxWorks image).
For instructions on how to configure and compile a bootable image from the Wind River Workbench see Wind River Workbench User's Guide: Projects. ( Please keep in mind that Low Memory boot images are limited to approximately 640KB in size due to the constraints of the processor running in real mode.)
The configuration of the boot loader can only be changed by modifying the file config.h in the BSP directory.
When the board is powered on, the system BIOS code loads and executes the bootstrap loader. The bootstrap loader is written in 8088 16-bit assembly language. The BIOS obtains the bootstrap loader from the boot sector, which may be in one of several locations: an USB 2.0 key, a hard disk, or some other alternatives. When the BIOS finds the bootstrap loader, it transfers execution to it. The bootstrap loader finds the bootrom.sys file, loads it into memory, and transfers execution to romInit.
1. Make bootable USB key
1) Creating a bootrom image.
Create VxWorks "System Image" project with PROFILE_BOOTAPP profile.
Choose "default_RomCompress" as active build specification and build vxWorks_romCompress.bin.BIN file.
2) Make boot device.
Download free software mkbt20 from ftp://dl.xs4all.nl/pub/mirror/nu2files/mkbt20.zip,
or http://ftp.rz.tu-bs.de/pub/mirror/www.nu2.nu/nu2files/mkbt20.zip and extract it to
BSP directory, Insert an USB 2.0 key to PC (USB 1.x key is not supported), format it
to FAT file system. (assume the drive name is g:),
also in the BSP directory run the following command:
mkbt -x bootsect.bin g:Following information will be shown :
* Expert mode (-x) * Warning different filesystem ID Size=0bytes OEM="MSDOS5.0" VolLabel="NO NAME" FileSys="FAT16"Then run this command to copy the generated bootrom.bin to the USB key.
copy vxWorks_romCompress.bin g:bootrom.sysInsert the USB key to Atom board and reset. Change the BIOS setting to
boot from the USB. After the VxWorks bootrom boots up, you will see following:
VxWorks System Boot Copyright 1984-2008 Wind River Systems, Inc. CPU: Kontron KT690/mITX Version: VxWorks 6.8 BSP version: R00.00 Creation date: Aug 11 2010, 10:12:59 Press any key to stop auto-boot... [VxWorks Boot]:If you want to boot vxWorks image from usb key, enable INCLUDE_USB
in config.h (default is enable), re-make the bootrom and copy vxWorks image to
USB key.
When bootrom boot up it can enumerate out the USB key, sometimes you need to
plug out and plug in it again, because of some USB key's compatibility isn't good.
Enter following command in VxWorks Boot Shell,
[VxWorks Boot]: devsYou will see following:
drv name 0 /null 1 /tyCo/0 1 /tyCo/1 1 /tyCo/2 1 /tyCo/3 3 /ata0a 6 bootHost: 3 /ahci00:1 3 /bd0[VxWorks Boot]: ?You will see some information as following:
Device Formats: boot device: usb file name: /bdx/vxWorks Boot Flags: 0x02 - load local system symbols 0x04 - don't autoboot 0x08 - quick autoboot (no countdown) 0x80 - use tftp to get boot image Available Boot Devices: Filesystem Devices: /ata0a /ahci00:1 /bd0 bd0 Enhanced Network Devices: gei0 [VxWorks Boot]:The "/bd0" shows vxWorks bootrom found the USB key, Then enter c command in
VxWorks Boot Shell to change boot device to "usb", file name to "/bd0/vxWorks",
save it. Finally, enter @ command to start vxWorks image, and you'll see vxWorks
shell.
2. Make bootable hard disk
There are two ways to make the bootable hard disk.
1) Connect hard disk to PC through IDE to USB convertor or by other ways,
Format a partition less than 2GB to FAT file system, assume the drive name is g:,
then followed the same steps of make bootable USB key.
2) Boot VxWorks by network and type some commands in the target shell.
a. Start Workbench 3.1.
b. Create a VxWorks Image Project, Include the following components
through the Kernel Configuration window:
DRV_STORAGE_SB600_AHCI or INCLUDE_ATA.
INCLUDE_XBD, INCLUDE_XBD_BLK_DEV, INCLUDE_XBD_PART_LIB, INCLUDE_XBD_RAMDRV.
INCLUDE_DOSFS.
INCLUDE_FS_MONITOR.
Other optional components such as, INCLUDE_SHELL, etc.
c. Import the file mkboot.c (in the BSP directory)
d. Build the project to create the vxWorks image. This image has the
tools to partition and format disk.
e. Load the generated vxWorks image into the target
f. From the target shell prompt, enter the command:
-> xbdCreatePartition "/ahci00", 4, 33, 33, 33Note: Any bootable hard disk partition should not exceed 2 GB. The
parameters "4, 33, 33, 33" specifies that there should be 4
partitions, part0, part1, part2, part3. The partitions part1, 2,
and 3 are created with "33 percent" of the disk capacity and the
rest would be allocated to part0. The command does not specify the
amount of the first partition size.
With a 80GB drive. The above command creates 4 partitions, the
last of partitions with sizes of 33%, 33%, 33% respectively. The
bootable partition gets 1% (i.e. 100 minus 33 minus 33 minus 33 = 1%),
which is less than 2GB on a 80 GB hard disk.
g. From the target shell prompt, enter the command:
->devs drv name 0 /null 2 /tyCo/0 2 /tyCo/1 4 /ahci00:1 5 /ahci00:2 5 /ahci00:3 5 /ahci00:4 6 /bd0 host: 10 /vioh. Each of the partitions that begin with "/ahciXXX", execute the command
"dosFsVolFormat" command:
-> dosFsVolFormat "/ahci00:1" -> dosFsVolFormat "/ahci00:2" -> dosFsVolFormat "/ahci00:3" -> dosFsVolFormat "/ahci00:4"i. Now, execute a command to transfer the Master Boot Record and
bootrom.sys to the just formatted hard drive partition: (assuming
that the hard drive is connected to the controller 0 and the drive is
0, then do the following.
-> cp "/bd0/bootrom.sys","/ahci00:1" -> mkMbrAhci 0, 0j. Make the bootable hard drive.
-> cd "/ahci00:1" -> mkbootAhci 0, 0, "bootrom.sys"k. Reboot the target board, change the BIOS settings to boot from the hard disk.
If you want to boot vxWorks image from hard disk, #define INCLUDE_BOOT_ATA_LOADER
in config.h and re-make the bootrom and copy vxWorks to hard disk.
When vxWorks bootrom boot up, enter '?'command in VxWorks Boot Shell.
you will see
Device Formats: boot device: ahci[=ctrl,drive] file name: /ahci00:1/vxWorks boot device: usb file name: /bdx/vxWorks Boot Flags: 0x02 - load local system symbols 0x04 - don't autoboot 0x08 - quick autoboot (no countdown) 0x80 - use tftp to get boot image Available Boot Devices: Filesystem Devices: /ahci00:1 /bd0 Enhanced Network Devices: [VxWorks Boot]:The available boot device shows "ahci00:1", we used c command to change
boot device to "ahci00:1", file name to "/ahci00:1/vxWorks",save it, and use @
command to load vxWorks image, and you'll see vxWorks shell.
For a detailed description of the hardware features and configuration options available please refer to the target board Hardware User's Guide. Note that if Compact Flash card is attached to onboard slot it is not possible to use other PATA devices connected by 80-wired PATA cable, it is recommended to use SATA Hard Disks in this case.
- FEATURES
This section describes all features of the board, supported or not. It documents all configurations of the board and the interaction between features and configuration items.
- BSP Library
There are different functional components additionally provided to configure this BSP. The components can be included into the VxWorks image either with help of the Wind River Workbench project facility (recommended) or by changing macro definitions in the file config.h.
The components described below utilize the drivers which are delivered as a part of the BSP library, but also the standard drivers which are provided in the VxWorks installation.
For more information on supported functions of the different components please follow the link to the online documentation.
- INCLUDE_PC_CONSOLE
In addition to the keyboard types supported by the original Wind River BSP, USB keyboards can be used. To initialize the USB stack and attach a USB keyboard to the PC console, the macro PC_KBD_TYPE must be set to USB_KBD. This macro definition can be found in the file config.h.
The default setting of the serial interface (independent of including PC console) is 115200 baud, 8 data bits, 1 stop bit, no parity and no flow control.
- INCLUDE_CFG_GEI8254X_END_1
- INCLUDE_CFG_GEI8254X_END_2
These components are providing support for configuration of the onboard Gigabit Ethernet Interface at the front panel connector and/or REAR-IO. It sets the network mask and internet address of the interface to the values defined for CFG_GEI_X_MASK and CFG_GEI_X_ADDR. You can modify both parameters within the Workbench project facility. It is allowed to set CFG_GEI_X_ADDR to "dhcp", in this case the NIC will use DHCP client to retrieve IP information (Note: INCLUDE_IPDHCPC component has to be enabled to use this facility).
This component requires INCLUDE_GEI825XX_VXB_END GEI driver.
- INCLUDE_HAL_DRV
This component serves as an abstraction layer to obtain hardware specific information about the board in use.
./halK.html - Hardware Abstraction Layer- List of Hardware Features
Hardware Interface Controller Driver/Component Status UART:0 PCIe vxbNs16550Sio.c SUPPORTED 1GB-ETHERNET:0 PCIe gei825xxVxbEnd.c SUPPORTED SATA on-chip vxbIntelAhciStorageK.c SUPPORTED PATA on-chip ataDrvK.c SUPPORTED GRAPHICS on-chip vxbM6845Vga.c SUPPORTED PS2 on-chip vxbI8042KbdK.c SUPPORTED TIMER on-chip vxbI8253Timer.c SUPPORTED RTC on-chip vxbMc146818RtcK.c SUPPORTED USB2-HOST on-chip USB EHCI driver SUPPORTED USB2-DEVICE on-chip n/a UNSUPPORTED USB1-HOST on-chip n/a UNSUPPORTED SD/MMC-CARD on-chip n/a UNSUPPORTED VIDEO-DECODE on-chip n/a UNSUPPORTED AUDIO on-chip n/a UNSUPPORTED LPC on-chip n/a UNSUPPORTED - Feature Interactions
Refer to the board vendor's documentation.
- Network Configuration
This BSP provides support for VxBus drivers, including network drivers. The list of VxBus network drivers available for PCIe devices includes the following:
INCLUDE_FEI8255X_VXB_END INCLUDE_GEI825XX_VXB_END INCLUDE_RTL8169_VXB_END INCLUDE_ENDFor command line builds and for building bootrom, the config.h file must be modified to define above macros, corresponding to the desired driver.
- PC CONSOLE
This function will use PC monitor as VxWorks console. To use these controllers the INCLUDE_PC_CONSOLE directive must be enabled in config.h. Only PS2 keyboard is supported.
- ataDrv and ataShow
Driver for the IDE/ATA hard disk controller for ATA/ATAPI devices including onboad CF card. To use this driver, the INCLUDE_ATA directive must be enabled in config.h. Note that the old INCLUDE_IDE directive is replaced by INCLUDE_ATA. Note: OnBoard PCI IDE controller BIOS should be set to Primary.
- vxbIntelAhciStorage and vxbIntelAhciStorageShow
Vxbus Driver for the SATA hard disk controller. To use this driver, the DRV_STORAGE_SB600_AHCI must be enabled in config.h.
Note: SATA controller in BIOS should be configured in AHCI or Native IDE mode.
- vxbI8253Timer
This library contains a board-independent interface for manipulating the timer functions on Intel 8253 and compatible timer chip devices. Timer 0 is used as system clock, According to different applications, timer 1,2 has different usage.
- vxbMc146818RtcK
- DRV_TIMER_KONTRON_RTC
This is the additional driver for the real time clock, it supports Get/Set current date/time functions.
./vxbMC146818RtcK.html - MC146818 RTC clock driver support- vxbIntelTimestamp
This is the driver for the timestamp on Intel chipsets to use the timestamp feature, the macro INCLUDE_TIMESTAMP must be defined in config.h.
- i8259Intr
Driver for the Intel 8259A Programmable Interrupt Controller (PIC). IRQs 0 - 7 are handled by PIC1 and IRQs 8 - 15 by PIC2. PIC2 interrupts are cascaded into PIC1 at IRQ2 .The Fully Nested Mode is used in the default configuration of this BSP.
- INCLUDE_MULTI_WINBOND_W83627_DHG
This component includes W83627 sensor driver.
./vxbW83627dhgK.html - W83627 sensor driver support- INCLUDE_MULTI_WINBOND_W83627_WDT
This component includes W83627 watchdog timer driver.
./vxbW83627wdtK.html - W83627 watchdog timer driver support- USB Host Support
A standard USB EHCI controller is supported in this BSP. Please refer to Wind River's USB documents.
- Boot Devices
The supported boot devices are:
gei0 - Primary Ethernet (10baseT, 100baseTX, or 1000baseT) ata0a - ATA/IDE drive ahci00:1 - SATA Hard disk usb - USB disk - Boot Methods
The boot methods are affected by the boot parameters. If no password is specified, RSH (remote shell) protocol is used. If a password is specified, FTP protocol is used, or, if the flag is set to 0x80, TFTP protocol is used.
The make targets are listed as the names of object-format files. Other images not listed here may not be tested.
bootrom bootrom.bin vxWorks (with vxWorks.sym) vxWorks.st
Bootloader/Bootrom Status BIOS (pre-flashed) SUPPORTED bootrom SUPPORTED bootrom_uncmp UNSUPPORTED vxWorks SUPPORTED vxWorks_rom UNSUPPORTED vxWorks_romCompress UNSUPPORTED vxWorks_romResident UNSUPPORTED
Tool Connection/Type Status Workbench Debugger ETHERNET/WDB SUPPORTED Workbench System Viewer ETHERNET/WDB SUPPORTED Workbench MemScope ETHERNET/WDB SUPPORTED Workbench ProfileScope ETHERNET/WDB SUPPORTED Workbench StethoScope ETHERNET/WDB SUPPORTED Workbench CoverageScope ETHERNET/WDB SUPPORTED Workbench Core File Analysis ETHERNET/WDB UNVALIDATED Workbench Sensor Points ETHERNET/WDB UNVALIDATED Workbench OCD Debugger JTAG UNSUPPORTED Workbench OCD Flash JTAG UNSUPPORTED
The following routines are specific to this BSP and are available to the user. They are written in assembly code in sysALib.s. For further details, please refer to following entries:
sysInByte( ) input one byte from I/O space sysInWord( ) input one word from I/O space sysInLong( ) input one long-word from I/O space sysOutByte( ) output one byte to I/O space sysOutWord( ) output one word to I/O space sysOutLong( ) output one long-word to I/O space sysInWordString( ) input word string from I/O space sysInLongString( ) input long string from I/O space sysOutWordString( ) output word string to I/O space sysOutLongString( ) output long string to I/O space
./KnownProblems.html - Known Problems
AMD64 Archtecture Programmer's Manual, Volume 1: Application Programming
AMD64 Archtecture Programmer's Manual, Volume 2: System Programming
PCI System Architecture, Fourth Edition, Addison-Wesley, 1999, ISBN 0-201-30974-2
VxWorks User's Guide: Getting Started, VxWorks Programmer's Guide: Configuration, VxWorks Programmer's Guide: Architecture Supplement