source: trunk/bootcode/devinfo.txt@ 201

Last change on this file since 201 was 190, checked in by Ben Rietbroek, 8 years ago

Initial AiR-BOOT Development Information [v1.1.1-testing]

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

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