1 | ===============================================================================
|
---|
2 | Information on AiR-BOOT Development [2017-04-13]
|
---|
3 | ===============================================================================
|
---|
4 |
|
---|
5 |
|
---|
6 | This is the AiR-BOOT Development Build Directory
|
---|
7 | ------------------------------------------------
|
---|
8 | AiR-BOOT roughly consists of the following components:
|
---|
9 | o The BootLoader
|
---|
10 | o The Installer Program
|
---|
11 | o The SetABoot Program
|
---|
12 |
|
---|
13 | Required Tools
|
---|
14 | --------------
|
---|
15 | o Open Watcom -- v1.9 is the version used by the maintainer
|
---|
16 | o JWasm -- v2.06d (July 9 2011) is the version used by the maintainer
|
---|
17 | o GNU Make -- v3.81 or higher
|
---|
18 |
|
---|
19 | A note on supported Assemblers and Build Utilities
|
---|
20 | --------------------------------------------------
|
---|
21 | The (earlier) support for TASM/MASM and WASM was actually an excercise
|
---|
22 | investigating assembler capabilities and code-generation. This has not been
|
---|
23 | maintained and the relevant sections and files will be removed. The only
|
---|
24 | supported assembler is JWasm, specifically v2.06d for OS/2. Also, the Watcom
|
---|
25 | Make utility (wmake) is about to be replaced by GNU Make to enhance the overall
|
---|
26 | build-system.
|
---|
27 |
|
---|
28 | The BootLoader
|
---|
29 | --------------
|
---|
30 | The main source file is 'airboot.asm', from which other sources are included
|
---|
31 | at the source level. Building the BootLoader results in a 16-bit binary image
|
---|
32 | called 'airboot.bin' which is the stuff that gets installed in TRACK0 of the
|
---|
33 | boot-disk.
|
---|
34 |
|
---|
35 | Post Processing of the BootLoader
|
---|
36 | ---------------------------------
|
---|
37 | When 'airboot.asm' is assembled, the resulting binary is not ready yet.
|
---|
38 | The 'mbr-prot' module is a seperatedly built module that has to be embedded
|
---|
39 | to form the final loader-image. This is done by the 'fixcode' utility.
|
---|
40 | Even when this embedding is done, the resulting image is not ready yet because
|
---|
41 | the CRC that protects the code-section has not been calculated yet, because
|
---|
42 | that is done by the installer when the loader-imaged is installed. This means
|
---|
43 | that a regular built loader-image cannot be manually merged to TRACK0 of a disk
|
---|
44 | and be functional. The moment AiR-BOOT starts it will halt on the invalid
|
---|
45 | code-section CRC. See the para below on how to circumvent that.
|
---|
46 |
|
---|
47 | The 'CRC_IGNORE' build-option
|
---|
48 | -----------------------------
|
---|
49 | If you look at 'fc.mnu' you see the use of the 'CRC_IGNORE' build-option.
|
---|
50 | This option disables the CRC check for the code-section in the resulting
|
---|
51 | loader-image so that it is now possible to manually merge the loader-image to
|
---|
52 | TRACK0 of a disk. This is handy when using virtual machines for development.
|
---|
53 | Of course you cannot blindly copy the loader-image to TRACK0, because that
|
---|
54 | would overwrite the partition-table of the disk.
|
---|
55 |
|
---|
56 | The Internal Mini Debugger
|
---|
57 | --------------------------
|
---|
58 | If AUX_DEBUG (airboot.asm:~97) is enabled, rudimentary COM-port debugging is
|
---|
59 | possible. If a terminal is attached to the COM-port, AiR-BOOT will dump
|
---|
60 | information there when it is loading and a few 'hotkeys' exist to dump some
|
---|
61 | internal stuff when the MAIN MENU is active. Press 'h' to have AiR-BOOT dump
|
---|
62 | de hotkeys to the COM-port.
|
---|
63 |
|
---|
64 | Adjusting the Mini Debugger to your needs
|
---|
65 | -----------------------------------------
|
---|
66 | The debugger hooks into the main keyboard loop to check if the key pressed is
|
---|
67 | one of its hotkeys. These hotkeys are defined in 'debug.asm'. More precisely,
|
---|
68 | they are part of a dispatch-table where each hotkey maps to a pointer that
|
---|
69 | points to the function to be executed. This makes it easy to redefine existing
|
---|
70 | hotkeys or add new ones and their corresponding functions to suit your needs.
|
---|
71 |
|
---|
72 | The need for the '/forcecode' flag
|
---|
73 | ----------------------------------
|
---|
74 | When developing, if the regular installer is used to install a new build,
|
---|
75 | the '/forcecode' option is required. This is because the installer checks the
|
---|
76 | version, which is most probably the same as the previously installed build,
|
---|
77 | so the installer assumes the installed version 'up-to-date'. The '/forcecode'
|
---|
78 | flag forces the installer to write the new code-section to TRACK0 of the disk.
|
---|
79 |
|
---|
80 | CAUTION when developing on a Real System
|
---|
81 | ----------------------------------------
|
---|
82 | Remember that AiR-BOOT always accesses all disks and modifies the boot-flags
|
---|
83 | in the MBRs it finds. A small bug can render disks unusable. This also involves
|
---|
84 | attached USB mass storage devices (accidently) left plugged-in. Needless to say
|
---|
85 | that a virtual machine environment is the safest and both Qemu and VirtualBox
|
---|
86 | are very suitable for that.
|
---|
87 |
|
---|
88 | The Installer Program
|
---|
89 | ---------------------
|
---|
90 | This is a cross-platform program written in C.
|
---|
91 | It takes the 'airboot.bin' loader-image and installs it into TRACK0 of the
|
---|
92 | boot-disk. Needless to say that the OS/2 version of the installer,
|
---|
93 | 'airboot2.exe', is the most tested version. Versions for the other platforms
|
---|
94 | are tested occasionally but not intensively.
|
---|
95 |
|
---|
96 | The SetABoot Program
|
---|
97 | --------------------
|
---|
98 | This is the AiR-BOOT replacement for 'setboot.exe'.
|
---|
99 | If offers roughly the same functionality, but instead of acting on IBM-BM,
|
---|
100 | it of course acts on AiR-BOOT. If AiR-BOOT is not found, it delegates to
|
---|
101 | 'setbm.exe' which it assumes is the original 'setboot.exe' renamed.
|
---|
102 |
|
---|
103 | The FixCode Utility
|
---|
104 | -------------------
|
---|
105 | This utility is used to embed the 'mbr-prot' module into the loader-image.
|
---|
106 | It is only used when developing and not part of the AiR-BOOT distribution.
|
---|
107 |
|
---|
108 | The File Commander Build Menu
|
---|
109 | -----------------------------
|
---|
110 | The Swiss Army Knife used to provide Build Menus.
|
---|
111 | Just press F2 here for the Developer Build Menu.
|
---|
112 |
|
---|
113 | Resources:
|
---|
114 | ----------
|
---|
115 | Netlabs Project Page : http://trac.netlabs.org/air-boot
|
---|
116 | Netlabs Respository : http://trac.netlabs.org/air-boot/browser/trunk
|
---|
117 | Netlabs Revision Log : http://trac.netlabs.org/air-boot/log
|
---|
118 | Bug tracking: : http://trac.netlabs.org/air-boot/report
|
---|
119 | GitHub Project Portal : http://rousseaux.github.io/netlabs.air-boot
|
---|
120 | GitHub Repository : http://github.com/rousseaux/netlabs.air-boot
|
---|
121 | Contact e-mail : rousseau.os2dev@gmx.com
|
---|
122 |
|
---|
123 |
|
---|
124 |
|
---|
125 | Ben Rietbroek <rousseau.os2dev@gmx.com>,
|
---|
126 |
|
---|
127 | AiR-BOOT maintainer.
|
---|