![]() |
|
||||
LynxOS Installation Guide |
Booting LynxOS
Introduction
This chapter provides instructions for booting LynxOS, platform-specific details, and troubleshooting solutions.
Before booting LynxOS from the hard disk for the first time, it may be necessary to set up the development system's BIOS or hardware for LynxOS operation; see "Working with BIOS" below for more information.
The LynxOS boot process starts with preboot (the LynxOS preboot utility), that allows the user to select the hard disk, partition, and file to boot from. preboot uses built-in defaults that are set with the makeboot command. The default settings of preboot boot LynxOS from the same hard disk and partition from where preboot was loaded.
Once preboot is running, the user can change the root and boot devices, and boot LynxOS. Typically, both the root device and the boot device are the same, and are the defaults. The preboot utility can boot from the default devices; see "LynxOS preboot Utility" for details.
If LynxOS fails to boot successfully, some problems are due to minor BIOS and/or hardware variations. For further information, see "Troubleshooting Booting".
Working with BIOS
LynuxWorks regularly installs and boots LynxOS on PCs from various vendors using several kinds of BIOS and x86-compatible processors. However, due to the large number of PC vendors and rapid changes and upgrades to PC models, it is not possible to test LynxOS on all commercially available PCs.
For up-to-date information on supported hardware, see the Hardware Support Guide at www.lynuxworks.com and on the LynxOS Documentation CD-ROM.
LynxOS also requires the BIOS to set up the serial ports, parallel ports, and IDE channels. Setting Disable PnP OS and setting these devices to
not autodetect in the BIOS ensures that these devices can be set up in the BIOS as required by LynxOS.On PCI systems, if an ISA ethernet adapter is used, allocate IRQ 5 (or the adapter's chosen IRQ) to Legacy ISA mode from within the BIOS. When IRQ 5 is used for an ISA ethernet device, the on-board audio port (if present) should be disabled to prevent IRQ overlap. In general, ISA interrupts cannot be shared.
If an SMC EtherEZ/Ultra/Elite series Ethernet adapter is used, the memory range CC000-CFFFF (or the adapter's RAM region) should be allocated as ISA RAM space. Shadowing for this RAM segment should be disabled.
If a PC has multiple ethernet adapters, only one of the ethernet cards can be chosen during installation. All other interfaces should be disconnected from the network. Once LynxOS is installed, multiple network adapters can be configured.
The BIOS in many x86 development systems includes an option called LFB SIZE and a start address. In some development systems, this memory range is write-protected and used by system components such as himem.sys. This feature should be disabled when running LynxOS. If not, LynxOS may not recognize memory above this reserved write-protected region.
See the LynxOS User's Guide for default x86 DMA channels and IRQ allocations.
LynxOS preboot Utility
preboot is the LynxOS loader that provides a user interface prior to LynxOS
boot-up. This utility supports the loading of any LynxOS kernel located on any partition. With preboot, users can also load kernels on non-bootable partitions.preboot defines two different devices for booting LynxOS: the root device and the boot device. The root device is where the LynxOS root file system is located. The boot device is the LynxOS image used to boot the system. In many cases, the boot device is the same as the root device; these two devices are discussed in detail in "Setting the Root Device" and "Setting the Boot Device".
Major and Minor Device Numbers
Both preboot and LynxOS identify each device driver in the development system with a unique pair of numbers: major and minor device numbers. The major device number defines the device controller/adapter (such as IDE or SCSI) that a given device is attached to. The minor device number defines the logical unit (or, in some cases, a software-defined subunit such as a disk partition) of a given device. For example, on x86 development systems all IDE drives on the primary bus have a major number of 0 to indicate that the drive is accessed through the IDE controller.
x86 Device Numbers
Major numbers for device nodes are determined by the order in which the drivers are included in the CONFIG.TBL file. Rearranging the driver entries in this file changes the major numbers allocated to devices controlled by those drivers. The following table lists the major number allocations based on the default CONFIG.TBL file. Any modification to CONFIG.TBL by the user may cause the major number allocations change. The default major device numbers are shown in the table below.
Default Major Numbers for Disk Devices (x86) Major Number Description Driver Primary and Secondary IDE/EIDE Floppy Adaptec 1542 SCSI Adaptec 2940 Adaptec 2940 U2W SCSI1Adaptec 2940 UW Pro SCSIAdaptec Ultra160 SCSI SimBios 8xx
1The Adaptec 2940 U2W and 2940 UW Pro SCSI Adapters are controlled by the ascsi driver. All other Adaptec 2940 SCSI cards are supported by the a2940 driver.
The default minor device numbers for x86 systems are shown in the table below.
Default Minor Numbers for Disk Devices (x86)To determine the device ID for an IDE disk, refer to the following table.
Device IDs for IDE Disks Primary Master Primary Slave Secondary Master Secondary Slave
PowerPC Device Numbers
The default major device numbers are shown below.
Default Major Numbers for Disks (PowerPC) RAM disk SCSI devices including hard disk, CDROM, and tape IDE Primary and SecondaryThe default minor device numbers are the same as on x86 development systems; see the table "Default Minor Numbers for Disk Devices (x86)".
Setting the Root Device
The root device is the location of a LynxOS root file system. With the major and minor number of the device, the root device can be set using preboot.
On x86 and PowerPC Systems
To display the current default root device, enter the following at the
preboot prompt:To set the root device to something other than the default, enter the following at the preboot prompt:
To set the root device for partition b of an Adaptec 2940 SCSI disk at ID 2, enter the following at the preboot prompt:
Setting the Boot Device
The boot device is the location of the LynxOS kernel that is to be booted. In most cases, preboot automatically detects and selects the correct boot device. The preboot boot command is used to determine the boot device. The boot command has the following syntax:
In the example above, <controller> can be: ide, sd1542, sd2940, sdncr, or another driver. Additionally, other SCSI buses may be available. <device_id> is the desired drive's ID. <boot_file> is the name of the file on the selected drive to boot (normally /lynx.os). <boot_dev_args> and <root_dev_args> for ISA devices is a 16-bit I/O address of a specific ISA card. For PCI devices the argument is two 8-bit numbers, PCIBus and PCIDev, representing a specific PCI device. If one PCI or ISA card is present, the arguments are redundant.
For example, to set the boot device to partition b of a SCSI (2940 Adaptec) device at ID 3, enter the following at the preboot prompt:
To set the boot device to partition c of an IDE secondary slave device, enter the following at the preboot prompt:
Specifying a Serial Port for Preboot on x86 Systems
The preboot output can be changed to a specific serial port or all serial ports in addition to the video console. To configure preboot with a specific port, use the following instructions. Note that these instructions are for x86 systems only.
- Edit the Makefile file in /src/bin/preboot.customer
- Remove the comment (#) for the serial port(s) to define. For example, change
- Remove the uarts.o file.
- Rebuild preboot and use this binary with the makeboot command. The preboot output will now sent to the chosen COM port(s) in addition to the video console.
To disable the normal keyboard input, keyboard.c must be edited to change the kybd_ready() routine to return 0. This prevents Preboot from performing keyboard checks. Change the line:
Troubleshooting Booting
The following table provides troubleshooting tips for problems that users may encounter when booting LynxOS.
Troubleshooting All Platforms
Troubleshooting x86 Platforms
The following troubleshooting table is specific to x86 platforms.
Problems & Solutions: x86-Specific I have successfully booted LynxOS, but can't access all of the available memory. Why? In some instances, BIOS has allocated memory regions that LynxOS cannot access. From the BIOS setup, delete these memory allocations. How do I boot LynxOS from a removable disk drive? A removable device must be recognized by the development system BIOS in order to boot. The Adaptec BIOS, for example, has an option to "Support Removable Disks as Fixed Disk." This option should be set to All devices so all removable drives are treated as fixed disks and can be used as boot devices. I moved my disk from an Adaptec 1542 SCSI controller to an Adaptec 2742/2940 SCSI controller. Now, preboot won't load the kernel. Why? The major device used by preboot is incorrect for the current controller. Refer to "Setting the Root Device" for details on getting the new kernel to boot. Once LynxOS boots, type the following:This command updates the major number in preboot. The SCSI controller on the PCI system works with DOS but not LynxOS. There are usually two buses on PCI-based systems: the ISA bus and the PCI bus. PCI devices on the system communicate with the PCI bus about interrupts, DMA channels, and the like, so that the PCI bus knows how to assign resources. The ISA devices do not communicate this information to the PCI bus and resource conflicts may result. To fix this problem, use the PCI BIOS setup utility to enable the ISA cards on the development system. See BIOS documentation. Why must preboot be used to boot a LynxOS kernel that is greater than 512 KB? The LynuxWorks secondary boot loader begins in real-mode and is currently limited to the first 640 KB of memory. The boot loading code must be less than 512 KB to safely load in this memory region.
![]() LynuxWorks, Inc. 855 Branham Lane East San Jose, CA 95138 http://www.lynuxworks.com 1.800.255.5969 |
![]() |
![]() |
![]() |
![]() |