More about the NitrOS-9 Boot file

From NitrOS-9
Revision as of 16:21, 21 May 2017 by NealC (Talk | contribs) (Created page with "The NitrOS-9 Boot file is used during the second stage of the boot process. It contains the additional modules required to bring the system to a running state. See also The...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The NitrOS-9 Boot file is used during the second stage of the boot process. It contains the additional modules required to bring the system to a running state. See also The NitrOS-9 Boot Process Explained, More about the NitrOS-9 Kernel file and More about SysGo.

The Boot file is created by concatenating multiple binary modules.

This works because each NitrOS-9 module is relocatable code and because there is a header on each module which allows the modules to be treated as a linked list that is searchable by module name.

How to create a Boot file

There are two ways to create a Boot file:

  • If you create a boot file during the NitrOS-9 build process, the contents of the Boot file is specified in a makefile -- typically, the makefile for a particular target will define multiple Boot file variants and create disk images for some or all of them.
  • If you create a boot file on a running NitrOS-9 system, a utility called os9gen can be used to create a new Boot file and to update the pointer in LSN0. The contents of the Boot file are typically defined by a file in the NITROS9/<target>/BOOTLISTS directory. After running os9gen on a disk, rebooting the system using that disk will use the new Boot file.

Boot file examples for Level 1

The Boot files for Coco1 Level 1 are defined in level1/coco1/bootfiles/makefile

Here is the definition of a sample Boot file for Coco1 Level 1 from that file:

  BOOTFILE_COVDG  = $(MD)/ioman \
                    $(MD)/rbf.mn \
                    $(FLOPPY_40D) \
                    $(MD)/ddd0_40d.dd \
                    $(MD)/scf.mn \
                    $(VTIO_COVDG) \
                    $(MD)/scbbp.dr $(MD)/p_scbbp.dd \
                    $(MD)/scbbt.dr $(MD)/t1_scbbt.dd \
                    $(PIPE) \
                    $(CLOCK60HZ) \
                    $(MD)/sysgo_dd
   
  VTIO_COVDG      = $(MD)/vtio.dr $(MD)/covdg.io $(MD)/term_vdg.dt

The VTIO stuff is code to control text output on the memory-mapped/character mapped display, including code to do scroll under software control.


Here is an example of a minimal Boot file, from level1/mc09/bootfiles/makefile

  BOOTFILE_MC09SD = $(MD)/ioman \
                    $(MD)/rbf.mn \
                    $(MD)/dds0_80d.dd \
                    $(MC09SDC_80D) \
                    $(MD)/scf.mn \
                    $(TERM_MC09) \
                    $(PIPE) \
                    $(CLOCK50HZMC09) \
                    $(MD)/sysgo_dd
  
  TERM_MC09       = $(MD)/mc6850.dr $(MD)/term_mc6850.dt $(MD)/term_mc6850_t0.dt $(MD)/term_mc6850_t1.dt
  MC09SDC_80D     = $(MD)/mc09sdc.dr $(MD)/s0_80d.dd $(MD)/s1_80d.dd $(MD)/s2_80d.dd $(MD)/s3_80d.dd

The MC09 only supports VT100-style terminal I/O through physical and virtual UARTs, and so the VTIO modules are not needed; instead, modules drivers for serial I/O are present.

Boot file examples for Level 2

The Boot files for Coco3 Level 2 are defined in level2/coco3/bootfiles/makefile

Here is the definition of a sample Boot file for Coco3 Level 2 from that file:

  BOOTFILE_80D    = $(MD)/krnp2 $(MD)/ioman $(MD)/init \
                    $(MD)/rbf.mn \
                    $(FLOPPY_80D) \
                    $(MD)/ddd0_80d.dd \
                    $(MD)/scf.mn \
                    $(VTIO_COGRF_80) \
                    $(PIPE) \
                    $(CLOCK60HZ)
  
  VTIO_COGRF_80   = $(MD)/vtio.dr \
                    $(MD)/keydrv_cc3.sb $(MD)/joydrv_joy.sb $(MD)/snddrv_cc3.sb \
                    $(MD)/cogrf.io \
                    $(MD)/term_win80.dt \
                    $(MD)/w.dw $(MD)/w1.dw $(MD)/w2.dw $(MD)/w3.dw $(MD)/w4.dw \
                    $(MD)/w5.dw $(MD)/w6.dw $(MD)/w7.dw

The VTIO stuff is code to control windowed text output on the memory-mapped/character mapped display.

Here is an example of a minimal Boot file, from level2/mc09l2/bootfiles/makefile

  BOOTFILE_MC09SD =  $(MD)/krnp2 $(MD)/ioman $(MD)/init \
                     $(MD)/rbf.mn \
                     $(MD)/dds0_80d.dd \
                     $(MC09SDC_80D) \
                     $(MD)/scf.mn \
                     $(TERM_MC09) \
                     $(PIPE) \
                     $(CLOCK50HZMC09)
  
  TERM_MC09       =  $(MD)/mc6850.dr $(MD)/term_mc6850.dt $(MD)/term_mc6850_t0.dt $(MD)/term_mc6850_t1.dt
  MC09SDC_80D     =  $(MD)/mc09sdc.dr $(MD)/s0_80d.dd $(MD)/s1_80d.dd $(MD)/s2_80d.dd $(MD)/s3_80d.dd

Bootlist examples

Here are some example bootlist files:

level1/coco1/bootlists/standard.bl level1/mc09/bootlists/standard.bl level2/coco3/bootlists/standard.bl level2/mc09l2/bootlists/standard.bl

What to include in a Boot file