1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<title>BRLTTY on DOS</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="brltty-on-dos">
<h1 class="title">BRLTTY on DOS</h1>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#using-brltty" id="toc-entry-1">Using BRLTTY</a><ul>
<li><a class="reference internal" href="#serial-support" id="toc-entry-2">Serial Support</a></li>
<li><a class="reference internal" href="#usb-support" id="toc-entry-3">USB Support</a></li>
<li><a class="reference internal" href="#bluetooth-support" id="toc-entry-4">Bluetooth Support</a></li>
<li><a class="reference internal" href="#unpacking-the-archive" id="toc-entry-5">Unpacking the Archive</a><ul>
<li><a class="reference internal" href="#a-simple-but-dangerous-way" id="toc-entry-6">A Simple but Dangerous Way</a></li>
<li><a class="reference internal" href="#using-kpatrx" id="toc-entry-7">Using <tt class="docutils literal">kpatrx</tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#dosidle" id="toc-entry-8"><tt class="docutils literal">DOSIDLE</tt></a></li>
<li><a class="reference internal" href="#using-dosemu-on-linux" id="toc-entry-9">Using <tt class="docutils literal">dosemu</tt> on Linux</a></li>
</ul>
</li>
<li><a class="reference internal" href="#making-the-cross-compiler" id="toc-entry-10">Making the Cross Compiler</a><ul>
<li><a class="reference internal" href="#the-mkdostools-script" id="toc-entry-11">The <tt class="docutils literal">mkdostools</tt> Script</a><ul>
<li><a class="reference internal" href="#basic-options" id="toc-entry-12">Basic Options</a></li>
<li><a class="reference internal" href="#build-directories" id="toc-entry-13">Build Directories</a></li>
<li><a class="reference internal" href="#required-archives" id="toc-entry-14">Required Archives</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#building-brltty" id="toc-entry-15">Building BRLTTY</a><ul>
<li><a class="reference internal" href="#configuring-the-build" id="toc-entry-16">Configuring the Build</a><ul>
<li><a class="reference internal" href="#the-cfg-dos-script" id="toc-entry-17">The <tt class="docutils literal"><span class="pre">cfg-dos</span></tt> Script</a></li>
</ul>
</li>
<li><a class="reference internal" href="#the-mkdosarc-script" id="toc-entry-18">The <tt class="docutils literal">mkdosarc</tt> Script</a><ul>
<li><a class="reference internal" href="#parameters" id="toc-entry-19">Parameters</a></li>
<li><a class="reference internal" href="#options" id="toc-entry-20">Options</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="using-brltty">
<h2><a class="toc-backref" href="#toc-entry-1">Using BRLTTY</a></h2>
<div class="section" id="serial-support">
<h3><a class="toc-backref" href="#toc-entry-2">Serial Support</a></h3>
<p>The default DOS serial driver does not support speeds above 9600 baud. For
higher speeds, a more capable serial driver (like ADF) must be used.</p>
</div>
<div class="section" id="usb-support">
<h3><a class="toc-backref" href="#toc-entry-3">USB Support</a></h3>
<p>USB isn't supported.</p>
</div>
<div class="section" id="bluetooth-support">
<h3><a class="toc-backref" href="#toc-entry-4">Bluetooth Support</a></h3>
<p>Bluetooth isn't supported.</p>
</div>
<div class="section" id="unpacking-the-archive">
<h3><a class="toc-backref" href="#toc-entry-5">Unpacking the Archive</a></h3>
<p>If you'd like to unpack the archive on your DOS system but don't have an
unzip command on it, you can get one from
<a class="reference external" href="ftp://ftp.delorie.com/pub/djgpp/current/v2/unzip32.exe">ftp://ftp.delorie.com/pub/djgpp/current/v2/unzip32.exe</a>.</p>
<p>If you'd like to unpack the archive into your DOS file system from your Linux
system then you need to be able to mount your DOS partition on your Linux
system. If you do this then you must be careful about two things. The first is
that you must ensure that your DOS system is shut down first so that two
systems won't be accessing the same partition at the same time. The second is
that you must mount the partition in a way that prevents the long file names
that BRLTTY uses from being converted into those cryptic Windows short file
names - the ones that look like <tt class="docutils literal">longna~1.ext</tt>. One way to do this is to use
the <tt class="docutils literal"><span class="pre">-o</span> nonumtail</tt> option when mounting your DOS partition. For example:</p>
<pre class="literal-block">
mkdir -p /mnt/dos
mount -o nonumtail /dev/sda1 /mnt/dos
</pre>
<p>What you most likely have is an image of the whole hard disk, rather than an
image of just the DOS partition. There are a number of ways to mount the DOS
partition within the hard disk image. We'll describe some of them here. For our
examples, we'll assume that the DOS partition is the first primary partition of
a hard disk whose image is in the file <tt class="docutils literal">disk.img</tt>.</p>
<div class="section" id="a-simple-but-dangerous-way">
<h4><a class="toc-backref" href="#toc-entry-6">A Simple but Dangerous Way</a></h4>
<p>The simplest, but also the most dangerous, way is to do some simple math and to
use an obscure mount option. First, use the <tt class="docutils literal">fdisk</tt> command to find out where
the DOS partition starts within the hard disk image. To do this, use the
command:</p>
<pre class="literal-block">
fdisk -l disk.img
</pre>
<p>You should see output that looks like this:</p>
<pre class="literal-block">
Disk disk.img: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
disk.img1 * 63 2062367 1031152+ 6 FAT16
</pre>
<p>From the <tt class="docutils literal">Start</tt> column, you can see that the DOS partition starts in sector
63 of the hard disk. Since a sector is a 512-byte block, you need to multiply
63 by 512 in order to calculate the partition's byte offset:</p>
<pre class="literal-block">
63 x 512 = 32256
</pre>
<p>Now you can mount the DOS partition using that obscure option:</p>
<pre class="literal-block">
mount -o offset=32256 disk.img /mnt/dos
</pre>
<p>But don't forget the afore-mentioned Windows cryptic short file name problem.
The command you should really use, therefore, is:</p>
<pre class="literal-block">
mount -o offset=32256,nonumtail disk.img /mnt/dos
</pre>
<p>Before you restart your DOS system, don't forget to first unmount the DOS
partition from your Linux system:</p>
<pre class="literal-block">
umount /mnt/dos
</pre>
</div>
<div class="section" id="using-kpatrx">
<h4><a class="toc-backref" href="#toc-entry-7">Using <tt class="docutils literal">kpatrx</tt></a></h4>
<p>Another way to mount the DOS partition, which is much safer, is to use the
<tt class="docutils literal">kpartx</tt> command to create a loop device for the desired partition within the
hard disk image. Use a command like this:</p>
<pre class="literal-block">
kpartx -v -s -a disk.img
</pre>
<ul class="simple">
<li>The <tt class="docutils literal"><span class="pre">-v</span></tt> (verbose) option tells <tt class="docutils literal">kpartx</tt> to be informative, which is the
easiest way to find out the name of the loop device that it will create.</li>
<li>The <tt class="docutils literal"><span class="pre">-s</span></tt> (synchronous) option tells <tt class="docutils literal">kpartx</tt> to wait until the loop
device has been created by <tt class="docutils literal">udev</tt> before returning.</li>
<li>The <tt class="docutils literal"><span class="pre">-a</span></tt> (add) option tells <tt class="docutils literal">kpartx</tt> to create the loop device.</li>
</ul>
<p>You should see output like this:</p>
<pre class="literal-block">
add map loop0p1 (253:11): 0 2062305 linear /dev/loop0 63
</pre>
<p>So you now know that the loop device you need to mount is
<tt class="docutils literal">/dev/mapper/loop0p1</tt>:</p>
<pre class="literal-block">
mount -o nonumtail /dev/mapper/loop0p1 /mnt/dos
</pre>
<p>When you're finished, you need to unmount the partition and to remove the loop
device:</p>
<pre class="literal-block">
umount /mnt/dos
kpartx -d disk.img
</pre>
</div>
</div>
<div class="section" id="dosidle">
<h3><a class="toc-backref" href="#toc-entry-8"><tt class="docutils literal">DOSIDLE</tt></a></h3>
<p><tt class="docutils literal">DOSIDLE</tt> is a DOS application that many users run in order to stop their
computer or virtual machine from needlessly consuming CPU time when DOS has
nothing meaningful to do. If you use it, don't use a "cooling strategy" more
invasive than <tt class="docutils literal">weak</tt>. In other words, don't specify more than <tt class="docutils literal"><span class="pre">-fm1</span></tt>. Using
a "cooling strategy" that is too aggressive will cause <tt class="docutils literal">DOSIDLE</tt> to correctly
deduce that the system is idle when BRLTTY has nothing to do, but that will
cause BRLTTY to stop running, too, which isn't what you want.</p>
</div>
<div class="section" id="using-dosemu-on-linux">
<h3><a class="toc-backref" href="#toc-entry-9">Using <tt class="docutils literal">dosemu</tt> on Linux</a></h3>
<p>If you're using <tt class="docutils literal">dosemu</tt> on Linux, and the Linux kernel is 3.15, then you'll
need to explicitly enable 16-bit segment support. This can be done with the
following command:</p>
<pre class="literal-block">
echo 1 >/proc/sys/abi/ldt16
</pre>
<p>If you'd like this setting to take effect automatically each time you reboot,
then create the file <tt class="docutils literal">ldt16.conf</tt> in the directory <tt class="docutils literal">/etc/sysctl.d/</tt>,
and place the following line in it:</p>
<pre class="literal-block">
abi.ldt16 = 1
</pre>
</div>
</div>
<div class="section" id="making-the-cross-compiler">
<h2><a class="toc-backref" href="#toc-entry-10">Making the Cross Compiler</a></h2>
<p>The DOS version of BRLTTY can be compiled on Linux by using a cross-compiler.
To create it, get the following archives:</p>
<ul class="simple">
<li><a class="reference external" href="ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/gcc410s2.zip">ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/gcc410s2.zip</a></li>
<li><a class="reference external" href="ftp://ftp.delorie.com/pub/djgpp/current/v2/djcrx203.zip">ftp://ftp.delorie.com/pub/djgpp/current/v2/djcrx203.zip</a></li>
</ul>
<p>The <tt class="docutils literal">djcrx203.zip</tt> archive contains a file named <tt class="docutils literal">cross/howto.32</tt> that
explains how to build a cross-compiler for gcc 3.2. You can build one for gcc
4.1 by applying the same instructions to the <tt class="docutils literal">gcc410s2.zip</tt> archive (listed
above) instead of to the <tt class="docutils literal">gcc32s2.zip</tt> archive (mentioned in the "howto").
You can also use a more recent <tt class="docutils literal">binutils</tt> package (2.2.24 works fine).</p>
<p>If, when building the cross-compiler, you encounter an error that complains
about the <tt class="docutils literal">writev</tt> function and the <tt class="docutils literal">iovec</tt> structure not being defined,
then you need to upgrade to a newer version of <tt class="docutils literal">djcrx</tt>. Upgrading to
<tt class="docutils literal">djcrx204</tt> is sufficient. It can be downloaded from
<a class="reference external" href="ftp://ftp.delorie.com/pub/djgpp/beta/v2/djcrx204.zip">ftp://ftp.delorie.com/pub/djgpp/beta/v2/djcrx204.zip</a>.</p>
<p>Another complexity when building the cross-compiler is that some parts of the
process need an older version of <tt class="docutils literal">autoconf</tt> (2.13) whereas other parts of it
need a newer version (2.57). Also, the build works best when a specific version
of <tt class="docutils literal">automake</tt> (1.9.6) is used.</p>
<p>We've written a script that builds the cross-compiler, and that also takes care
of all of the idiosyncracies that we encountered when doing so.</p>
<div class="section" id="the-mkdostools-script">
<h3><a class="toc-backref" href="#toc-entry-11">The <tt class="docutils literal">mkdostools</tt> Script</a></h3>
<p>The <tt class="docutils literal">mkdostools</tt> script builds the cross-compiler that's needed in order to
build BRLTTY for DOS on Linux. It resides in the <tt class="docutils literal">DOS/</tt> subdirectory of
BRLTTY's source tree.</p>
<div class="section" id="basic-options">
<h4><a class="toc-backref" href="#toc-entry-12">Basic Options</a></h4>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">-v</span></tt> (verbose)</dt>
<dd>Increase output verbosity. This option complements the <tt class="docutils literal"><span class="pre">-q</span></tt> option. It may
be specified multiple times.</dd>
<dt><tt class="docutils literal"><span class="pre">-q</span></tt> (quiet)</dt>
<dd>Decrease output verbosity. This option complements the <tt class="docutils literal"><span class="pre">-v</span></tt> option. It may
be specified multiple times.</dd>
<dt><tt class="docutils literal"><span class="pre">-h</span></tt> (help)</dt>
<dd>Write a brief command line usage summary on standard output, and then exit.</dd>
</dl>
</div>
<div class="section" id="build-directories">
<h4><a class="toc-backref" href="#toc-entry-13">Build Directories</a></h4>
<p>A number of directories are used during the build process. Each of them can be
explicitly specified via an option, and also has a default subdirectory within
the directory that contains the script itself. Each of the default
subdirectories may be a symbolic link that points somewhere else. These
directories are:</p>
<blockquote>
<table border="1" class="docutils">
<colgroup>
<col width="35%" />
<col width="26%" />
<col width="39%" />
</colgroup>
<tbody valign="top">
<tr><td>Purpose</td>
<td>Option</td>
<td>Default</td>
</tr>
<tr><td>archives</td>
<td><tt class="docutils literal"><span class="pre">-a</span></tt></td>
<td>Archives/</td>
</tr>
<tr><td>build</td>
<td><tt class="docutils literal"><span class="pre">-b</span></tt></td>
<td>Build/</td>
</tr>
<tr><td>install</td>
<td><tt class="docutils literal"><span class="pre">-i</span></tt></td>
<td>Tools/</td>
</tr>
</tbody>
</table>
</blockquote>
<p>The <strong>archives</strong> directory is the only one that you need to prepare. It must
contain all of the archives that are needed in order to build the
cross-compiler. DJGPP archives have the <tt class="docutils literal">.zip</tt> extension, and Gnu archives
have the <tt class="docutils literal">.tar.gz</tt> extension. See <a class="reference internal" href="#required-archives">Required Archives</a> for the list.</p>
<p>The <strong>build</strong> directory will contain all of the files that are intirimly needed
during the build process. It's created if it doesn't already exist. If it does
already exist then it's emptied at the start of the build process. It's also
emptied upon the completion of a successful build. This directory needs to be
on a volume that has at least 1.5GB of free file space.</p>
<p>The <strong>install</strong> directory is where the cross-compiler tools are to be
installed. It's created if it doesn't already exist. If it does already exist
then it's emptied at the start of the build process.</p>
</div>
<div class="section" id="required-archives">
<h4><a class="toc-backref" href="#toc-entry-14">Required Archives</a></h4>
<p>You'll need the following DJGPP archives:</p>
<blockquote>
<table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<tbody valign="top">
<tr><td>Archive Name</td>
<td>Download From</td>
</tr>
<tr><td><tt class="docutils literal">djcrx204.zip</tt></td>
<td><a class="reference external" href="ftp://ftp.delorie.com/pub/djgpp/beta/v2">ftp://ftp.delorie.com/pub/djgpp/beta/v2</a></td>
</tr>
<tr><td><tt class="docutils literal">gcc432s2.zip</tt></td>
<td><a class="reference external" href="ftp://ftp.delorie.com/pub/djgpp/current/v2gnu">ftp://ftp.delorie.com/pub/djgpp/current/v2gnu</a></td>
</tr>
</tbody>
</table>
</blockquote>
<p>You'll need the following Gnu archives:</p>
<blockquote>
<table border="1" class="docutils">
<colgroup>
<col width="41%" />
<col width="59%" />
</colgroup>
<tbody valign="top">
<tr><td>Archive Name</td>
<td>Download From</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">autoconf-2.13.tar.gz</span></tt></td>
<td><a class="reference external" href="http://ftp.gnu.org/gnu/autoconf">http://ftp.gnu.org/gnu/autoconf</a></td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">autoconf-2.57.tar.gz</span></tt></td>
<td><a class="reference external" href="http://ftp.gnu.org/gnu/autoconf">http://ftp.gnu.org/gnu/autoconf</a></td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">automake-1.9.6.tar.gz</span></tt></td>
<td><a class="reference external" href="http://ftp.gnu.org/gnu/automake">http://ftp.gnu.org/gnu/automake</a></td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">binutils-2.24.tar.gz</span></tt></td>
<td><a class="reference external" href="http://ftp.gnu.org/gnu/binutils">http://ftp.gnu.org/gnu/binutils</a></td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">gcc-4.3.2.tar.gz</span></tt></td>
<td><a class="reference external" href="http://gcc.gnu.org/mirrors.html">http://gcc.gnu.org/mirrors.html</a></td>
</tr>
</tbody>
</table>
</blockquote>
<p>If you'd prefer to build a different version of gcc, there are two important
things to know. One is that you need the <tt class="docutils literal">gcc*s2.zip</tt> archives from
DJGPP. The other is that the versions of the Gnu and DJGPP gcc archives must
match. If, for example, you'd like to build gcc-4.1.2, then you'll need
both <tt class="docutils literal"><span class="pre">gcc-4.1.2.tar.gz</span></tt> and <tt class="docutils literal">gcc412s2.zip</tt>. The reason we use gcc-4.3.2 in
our examples here is because it's the highest version of gcc for which we could
find an <tt class="docutils literal">s2.zip</tt> DJGPP archive.</p>
<p>If you only have one Gnu archive for gcc in your <strong>archives</strong> directory then
that version will be built. If you have more than one then you'll need to use
the <tt class="docutils literal"><span class="pre">-g</span></tt> (gcc) option (e.g. <tt class="docutils literal"><span class="pre">-g</span> 4.3.2</tt>) to explicitly specify the version
that is to be built.</p>
</div>
</div>
</div>
<div class="section" id="building-brltty">
<h2><a class="toc-backref" href="#toc-entry-15">Building BRLTTY</a></h2>
<div class="section" id="configuring-the-build">
<h3><a class="toc-backref" href="#toc-entry-16">Configuring the Build</a></h3>
<p>Before configuring BRLTTY, you must add the <tt class="docutils literal">bin/</tt> subdirectory of the
cross-compiler tools to your command search path. If, for example, the
cross-compiler is installed in <tt class="docutils literal">/usr/local/dostools</tt>, then add its tools to
your command search path with a command like this:</p>
<pre class="literal-block">
export PATH="/usr/local/dostools/bin:$PATH"
</pre>
<p>You'll also need to ensure that gcc's <tt class="docutils literal"><span class="pre">-fgnu89-inline</span></tt> option is used. This
is done by setting the <tt class="docutils literal">CFLAGS</tt> environment variable before configuring. For
example:</p>
<pre class="literal-block">
export CFLAGS="-fgnu89-inline"
</pre>
<p>You should be able to use a configure command like this one:</p>
<pre class="literal-block">
./configure \
--prefix=/brltty-dos --host=i586-pc-msdosdjgpp \
--enable-relocatable-install \
--disable-api --disable-icu --disable-x \
--without-usb-package --without-bluetooth-package \
--without-libbraille --with-braille-driver=-vr,all \
--without-espeak --without-espeak-ng \
--without-flite --without-speechd \
--with-speech-driver=all \
--with-screen-driver=pb,-all
</pre>
<div class="section" id="the-cfg-dos-script">
<h4><a class="toc-backref" href="#toc-entry-17">The <tt class="docutils literal"><span class="pre">cfg-dos</span></tt> Script</a></h4>
<p>We provide a script named <tt class="docutils literal"><span class="pre">cfg-dos</span></tt>, which resides in the top-level directory
of BRLTTY's source tree, that should make configuring BRLTTY for DOS a bit
easier. It runs the <tt class="docutils literal">configure</tt> script for you, giving it all of the options
that are required for a successful DOS build. You can specify additional
<tt class="docutils literal">configure</tt> options (although that shouldn't be necessary) simply by giving
them to <tt class="docutils literal"><span class="pre">cfg-dos</span></tt>. The only thing you do need to do is to point the
<tt class="docutils literal">DOS_TOOLS_ROOT</tt> environment variable to the top-level directory of your
cross-compiler tools. For example:</p>
<pre class="literal-block">
export DOS_TOOLS_ROOT=/usr/local/dostools
</pre>
</div>
</div>
<div class="section" id="the-mkdosarc-script">
<h3><a class="toc-backref" href="#toc-entry-18">The <tt class="docutils literal">mkdosarc</tt> Script</a></h3>
<p>The <tt class="docutils literal">mkdosarc</tt> script, which resides in the <tt class="docutils literal">DOS/</tt> subdirectory of BRLTTY's
source tree, creates a DOS archive (a <tt class="docutils literal">.zip</tt> file) of BRLTTY. It does
everything (<tt class="docutils literal">configure</tt>, <tt class="docutils literal">make</tt>, ..., <tt class="docutils literal">zip</tt>) except for building the
cross-compiler. If you don't already have a cross-compiler for DOS then see
<a class="reference internal" href="#making-the-cross-compiler">Making the Cross Compiler</a> for instructions on how to build one.</p>
<p>Before running this script, ensure that the following commands have been
installed on your system:</p>
<ul class="simple">
<li>linuxdoc</li>
<li>unix2dos</li>
<li>zip</li>
</ul>
<p>You'll also need to point the <tt class="docutils literal">DOS_TOOLS_ROOT</tt> environment variable to the
top-level directory of the cross-compiler tools. For example:</p>
<pre class="literal-block">
export DOS_TOOLS_ROOT=/usr/local/dostools
</pre>
<div class="section" id="parameters">
<h4><a class="toc-backref" href="#toc-entry-19">Parameters</a></h4>
<p>The script requires only one parameter - the path to the top-level directory of
BRLTTY's source tree. If, for example, you're in the <tt class="docutils literal">DOS/</tt> subdirectory of
BRLTTY's source tree (where the script resides), then invoke it like this:</p>
<pre class="literal-block">
./mkdosarc ..
</pre>
<p>If you're in the top-level directory of BRLTTY's source tree then invoke it
like this:</p>
<pre class="literal-block">
DOS/mkdosarc .
</pre>
</div>
<div class="section" id="options">
<h4><a class="toc-backref" href="#toc-entry-20">Options</a></h4>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">-a</span></tt> (archive)</dt>
<dd>Specify the name of the archive (<tt class="docutils literal">.zip</tt>) file that will be created. The
default archive name is <tt class="docutils literal"><span class="pre">brltty-dos</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">-o</span></tt> (overwrite)</dt>
<dd>Allow an already-existing archive to be overwritten. The default is that an
already-existing archive won't be overwritten.</dd>
<dt><tt class="docutils literal"><span class="pre">-i</span></tt> (install)</dt>
<dd>Specify the name of the subdirectory on the target DOS system into which the
archive will be unpacked. Its default name is <tt class="docutils literal">BRLTTY</tt>. It will be an
immediate subdirectory of the current working directory when the archive is
being unpacked. It will be created if it doesn't already exist.</dd>
<dt><tt class="docutils literal"><span class="pre">-s</span></tt> (shell)</dt>
<dd>Invoke an interactive shell just before the archive is created so that you
can inspect and/or modify what will be in the archive. The current working
directory is set to the top-level directory of the content.
The shell specified by the <tt class="docutils literal">SHELL</tt> environment variable is used. If it
isn't set then <tt class="docutils literal">/bin/sh</tt> is assumed.</dd>
</dl>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">-v</span></tt> (verbose)</dt>
<dd>Increase output verbosity. This option complements the <tt class="docutils literal"><span class="pre">-q</span></tt> option. It may
be specified multiple times.</dd>
<dt><tt class="docutils literal"><span class="pre">-q</span></tt> (quiet)</dt>
<dd>Decrease output verbosity. This option complements the <tt class="docutils literal"><span class="pre">-v</span></tt> option. It may
be specified multiple times.</dd>
<dt><tt class="docutils literal"><span class="pre">-h</span></tt> (help)</dt>
<dd>Write a brief command line usage summary on standard output, and then exit.</dd>
</dl>
</div>
</div>
</div>
</div>
</body>
</html>
|