REM BrlSpeak Configer (CFG.BAT) REM by Osvaldo La Rosa REM for the BRAILLESPEAK UMSDOS GNU/LINUX distribution REM Contact: brlspeak@linux-fan.com REM Website: http://brlspeak.linux-fan.com/ REM 31-10-2001 REM (Previous revisions: 16-11-2001, 28-11-2001, 29-11-2001, REM 30-11-2001, 22-11-2001, last revision: 05-04-2002) REM Public rem ------------------------------- ChangeLog ------------------------------- rem Added 28-11-2001: this changelog rem Added 28-11-2001: autodetection+sync menu with ZipSlack/ZipSpeak/BrlSpeak rem Added/implemented 28-11-2001: "leave unchanged" + "quit" function rem Added/implemented 28-11-2001: URL ref. rem Added 28-11-2001: force DOS-path rem Added/implemented 28-11-2001: some menu/text/layout modifications rem Added 28-11-2001: IDE harddisk boot help information for newbies rem Added 28-11-2001: view changelog rem Added 28-11-2001: read-only arg for CFG.BAT to prevent accidental editing rem Added 28-11-2001: RUN.BAT check to prevent accidental booting rem Added 29-11-2001: "begin again" option rem Added 29-11-2001: recall original BrlTty Makefile rem Added 29-11-2001: "back" option for the IDE HD sublist rem Added 30-11-2001: boot wizard to diagnose the correct /dev/hda? rem Added/modified 30-11-2001: text/layout rem CFG bug fix 22-12-2001: autodetection+sync menu for ZipSlack rem Added 01-02-2002: "make bootdisk"-function rem Added 01-02-2002: edit kbd selection file by hand rem Modified 05-04-2002: minor layout + contact-info rem --------------------------- End of ChangeLog ---------------------------- REM ----- Do not modify, except for developments, and at your own riscs ----- @echo off rem If you are missing the C:\DOS/WINDOWS path because you are booting from a rem floppy, this will force the DOS/WIN path to prevent problems with rem choice.com or other external DOS commands used by CFG.BAT. rem In case of conflicts, just REMark the following 2 lines: path %path%;C:\DOS path %path%;C:\WINDOWS\COMMAND :bagain rem This will check which distrib is running, since this CFG.BAT can be used rem for the ZipSlack distrib. if not exist \linux\brlspeak\nul goto szslk goto sbrlspk :sbrlspk rem BrlSpeak intro-screen. cls echo BrlSpeak Configer (CFG.BAT) echo. echo by Osvaldo La Rosa echo. echo for the BRAILLESPEAK UMSDOS LINUX distribution echo. echo. echo Contact: brlspeak@linux-fan.com echo Homepage: http://brlspeak.linux-fan.com/ echo. echo Copyright (C) 31-10-2001 echo. echo Public echo. echo Last modified: 05-04-2002 pause > nul: cls echo BRAILLESPEAK UMSDOS LINUX PRECONFIGER echo. echo With this easy configer you no longer need to edit any file by hand, just echo follow all instructions carefully and you.re ready to run BrlSpeak in a echo few minutes. echo Select: echo - the wanted keyboard (qwerty or azerty) echo - the appropriate braille device (BrlTty Makefile) echo - and the correct 'root=/dev/XXXX' echo (to refer to the partition where you've unzipped the BrlSpeak Linux dist). echo Next time, simply type RUN to boot Linux; type CFG to recall this config echo menu. echo If you put Linux on a Zip disk, it'll probably be on the fourth partition, echo (sda4, hdb4) since that's how Iomega likes to format them. echo If you're using a parallel port Zip drive (the ZipPlus is not Linux echo compatible in parallel mode, by the way, but works fine if you use SCSI echo mode) then see the README.ppa for more info about configuring the drive echo with some kernel parameters at the end of the Loadlin command. echo IMPORTANT: no-scroll is active to provide compatibility with old hardware echo braille devices, but you may change this later by editing RUN.BAT. echo Press SPACEBAR to continue... pause > nul: :clv rem View ChangeLog file + make a bootdisk. cls echo ChangeLog / Make a boot disk: echo. choice /c:1230 "1)view changelog 2)make a bootdisk 3)continue 0)quit " /n if errorlevel 4 goto stop if errorlevel 3 goto brlkbd if errorlevel 2 goto mkbtd if errorlevel 1 goto vchl :vchl edit \linux\cfg.bat goto clv :mkbtd if not exist \linux\run.bat nobt cls echo Place a 1.44MB disk in drive A: then press a key... format a:/s echo c: > a:autoexec.bat echo c:\linux\run.bat >> a:\autoexec.bat echo d: >> a:autoexec.bat echo d:\linux\run.bat >> a:\autoexec.bat echo e: >> a:autoexec.bat echo e:\linux\run.bat >> a:\autoexec.bat echo f: >> a:autoexec.bat echo f:\linux\run.bat >> a:\autoexec.bat echo g: >> a:autoexec.bat echo g:\linux\run.bat >> a:\autoexec.bat echo h: >> a:autoexec.bat echo h:\linux\run.bat >> a:\autoexec.bat echo i: >> a:autoexec.bat echo i:\linux\run.bat >> a:\autoexec.bat echo j: >> a:autoexec.bat echo j:\linux\run.bat >> a:\autoexec.bat echo Ready! pause > nul: goto clv :nobt cls echo Warning: you shall have a running RUN.BAT before using this function to build echo a bootdisk. This is a security option: the bootdisk will only work if echo \LINUX\RUN.BAT exist. Press a key to go back to the preconfig-routine... pause > nul: goto clv :brlkbd rem Load keys. cls echo Select a keyboard: echo. choice /c:12340 "1)qwerty (standard) 2)azerty (BE-Latin1) 3)edit by hand 4)continue 0)quit " /n if errorlevel 5 goto stop if errorlevel 4 goto akbd if errorlevel 3 goto edys if errorlevel 2 goto bel1 if errorlevel 1 goto qw :qw copy \linux\brlspeak\rc_files\original\rc_keyma.* \linux\etc\rc.d\*.{_f goto akbd :bel1 copy \linux\brlspeak\rc_files\rc_keyma.* \linux\etc\rc.d\*.{_f goto akbd :edys copy \linux\brlspeak\rc_files\original\rc_keyma.* \linux\brlspeak\rc_files\*.{_3 edit \linux\brlspeak\rc_files\rc_keyma.{_3 \linux\brlspeak\lf -f \linux\brlspeak\rc_files\rc_keyma.{_3 copy \linux\brlspeak\rc_files\rc_keyma.{_3 \linux\etc\rc.d\*.{_f del \linux\brlspeak\rc_files\rc_keyma.{_3 goto akbd :akbd rem BrlTty Makefile preconfiger. cls echo Preconfiguring BrlTty: echo. echo You will now be able to prepare(/modify) the config file for your specific echo braille display, before starting BrlSpeak and (auto)compiling the driver. echo Attention: you MUST perform this preconfig operation BEFORE running BrlSpeak echo for the 1st time, or when changing your braille device type, port, etc. echo. choice /c:1230 "1)edit BrlTty Makefile 2)recall original Makefile 3)leave unchanged 0)quit " /n if errorlevel 4 goto stop if errorlevel 3 goto abrl if errorlevel 2 goto rec if errorlevel 1 goto ebrl :ebrl cls edit \linux\brlspeak\set_brl\makefile.{_1 cls \linux\brlspeak\lf -f \linux\brlspeak\set_brl\makefile.{_1 copy \linux\brlspeak\set_brl\makefile.* \linux\root\brltty-2.98\*.{_8 copy \linux\brlspeak\rc_files\rc_local.* \linux\etc\rc.d\*.{_b md \linux\tmp\brlspk cls goto abrl :rec cls copy \linux\brlspeak\set_brl\original\makefile.{__ \linux\brlspeak\set_brl\*.{_1 goto akbd :szslk rem The ZipSlack/ZipSpeak-compatible part. cls echo BrlSpeak preConFiGer - built by Osvaldo La Rosa - brlspeak@linux-fan.com echo. echo It seems that you are using a ZipSlack or ZipSpeak Mini-Distribution... echo No problem: echo this BrlSpeak CFG.BATch may be used for ZipSlack/ZipSpeak as well; echo you will not be prompted for editing the BrlTty Makefile, that's all. echo Press SPACEBAR to continue... pause > nul: :abrl rem Booting. cls echo Boot from: echo. echo 1 = SCSI ZIP device echo 2 = IDE Zip device echo 3 = IDE hard drive echo 0 = quit echo. choice /c:1230 1-2-3-0 /n if errorlevel 4 goto stop if errorlevel 3 goto hardd if errorlevel 2 goto iz if errorlevel 1 goto sz :sz cls echo SCSI Zip device: echo A = \linux\loadlin \linux\vmlinuz root=/dev/sda4 rw echo B = \linux\loadlin \linux\vmlinuz root=/dev/sdb4 rw echo. choice /c:ab A-B /n if errorlevel 2 goto sb4 if errorlevel 1 goto sa4 :sa4 echo \linux\loadlin \linux\vmlinuz root=/dev/sda4 rw no-scroll > run.bat goto run :sb4 echo \linux\loadlin \linux\vmlinuz root=/dev/sdb4 rw no-scroll > run.bat goto run :iz cls echo IDE Zip device: echo A = \linux\loadlin \linux\vmlinuz root=/dev/hda4 rw echo B = \linux\loadlin \linux\vmlinuz root=/dev/hdb4 rw echo C = \linux\loadlin \linux\vmlinuz root=/dev/hdc4 rw echo D = \linux\loadlin \linux\vmlinuz root=/dev/hdd4 rw echo. choice /c:abcd A-D /n if errorlevel 4 goto id4 if errorlevel 3 goto ic4 if errorlevel 2 goto ib4 if errorlevel 1 goto ia4 :ia4 echo \linux\loadlin \linux\vmlinuz root=/dev/hda4 rw no-scroll > run.bat goto run :ib4 echo \linux\loadlin \linux\vmlinuz root=/dev/hdb4 rw no-scroll > run.bat goto run :ic4 echo \linux\loadlin \linux\vmlinuz root=/dev/hdc4 rw no-scroll > run.bat goto run :id4 echo \linux\loadlin \linux\vmlinuz root=/dev/hdd4 rw no-scroll > run.bat goto run :hardd if not exist \linux\brlspeak\nul goto nohlpfn cls echo IDE hard drive help for newbies: echo note that if your configuration is something like this: echo - an IDE harddisk connected to the pri master-boot echo - with WIN or DOS on C: echo - + a D: E: F: ... (FAT, extended) partition echo then you may try to boot BrlSpeak from: echo hda1 if installed on C:\linux echo hda5 if installed on D:\linux echo hda6 if installed on E:\linux echo hda7 if installed on F:\linux echo ... pause > nul: rem Boot Wizard. cls echo Boot Wizard: echo. echo If the previous configuration example doesn't match with your HD config, then echo please DO NOT use the Wizard: he will not be able to diagnose the correct hda. echo Also don't use the wizard if you have a previous Brlspeak Linux already echo installed on another disk (for example D:\Linux and E:\Linux): the wizard echo will always point to the first version (D:\Linux). choice /c:120 "1)use the wizard 2)ignore/continue 0)quit " /n if errorlevel 3 goto stop if errorlevel 2 goto back if errorlevel 1 goto doscheck rem If this conflicts with your configuration, you may REMark all lines rem below until you meet the :back marker. :doscheck if exist c:\windows\command\nul goto wiz if not exist c:\dos\nul goto nodos goto wiz :nodos cls echo Can't start the wizard: no DOS found on disk C... Press a key to continue... pause > nul: goto back :wiz if exist c:\linux\brlspeak\nul goto pdskc goto dskdt :pdskc echo \linux\loadlin \linux\vmlinuz root=/dev/hda1 rw no-scroll > run.bat goto diagnose :dskdt if exist d:\linux\brlspeak\nul goto pdskd goto dsket :pdskd echo \linux\loadlin \linux\vmlinuz root=/dev/hda5 rw no-scroll > run.bat goto diagnose :dsket if exist e:\linux\brlspeak\nul goto pdske goto dskft :pdske echo \linux\loadlin \linux\vmlinuz root=/dev/hda6 rw no-scroll > run.bat goto diagnose :dskft if exist f:\linux\brlspeak\nul goto pdskf goto dskgt :pdskf echo \linux\loadlin \linux\vmlinuz root=/dev/hda7 rw no-scroll > run.bat goto diagnose :dskgt if exist g:\linux\brlspeak\nul goto pdskg goto dskht :pdskg echo \linux\loadlin \linux\vmlinuz root=/dev/hda8 rw no-scroll > run.bat goto diagnose :dskht if exist h:\linux\brlspeak\nul goto pdskh goto dskit :pdskh echo \linux\loadlin \linux\vmlinuz root=/dev/hda9 rw no-scroll > run.bat goto diagnose :dskit if exist i:\linux\brlspeak\nul goto pdski goto dskjt :pdski echo \linux\loadlin \linux\vmlinuz root=/dev/hda10 rw no-scroll > run.bat goto diagnose :dskjt if exist j:\linux\brlspeak\nul goto pdskj goto dsknots :pdskj echo \linux\loadlin \linux\vmlinuz root=/dev/hda11 rw no-scroll > run.bat goto diagnose :diagnose cls echo You are now ready to start! echo. echo The boot wizard have selected the next path for you: goto ready :dsknots cls echo Disk actually not supported... Press a key to continue... pause > nul: goto back :back :nohlpfn cls echo IDE hard drive: echo A = \linux\loadlin \linux\vmlinuz root=/dev/hda1 rw echo B = \linux\loadlin \linux\vmlinuz root=/dev/hda2 rw echo C = \linux\loadlin \linux\vmlinuz root=/dev/hda3 rw echo D = \linux\loadlin \linux\vmlinuz root=/dev/hda4 rw echo E = \linux\loadlin \linux\vmlinuz root=/dev/hda5 rw echo F = \linux\loadlin \linux\vmlinuz root=/dev/hda6 rw echo G = \linux\loadlin \linux\vmlinuz root=/dev/hda7 rw echo H = \linux\loadlin \linux\vmlinuz root=/dev/hda8 rw echo I = \linux\loadlin \linux\vmlinuz root=/dev/hda9 rw echo J = \linux\loadlin \linux\vmlinuz root=/dev/hda10 rw echo K = \linux\loadlin \linux\vmlinuz root=/dev/hda11 rw echo L = \linux\loadlin \linux\vmlinuz root=/dev/hda12 rw echo M = \linux\loadlin \linux\vmlinuz root=/dev/hda13 rw echo N = \linux\loadlin \linux\vmlinuz root=/dev/hda14 rw echo O = \linux\loadlin \linux\vmlinuz root=/dev/hda15 rw echo P = more echo. choice /c:abcdefghijklmnop A-P /n if errorlevel 16 goto more if errorlevel 15 goto ho if errorlevel 14 goto hn if errorlevel 13 goto hm if errorlevel 12 goto hl if errorlevel 11 goto hk if errorlevel 10 goto hj if errorlevel 9 goto hi if errorlevel 8 goto hh if errorlevel 7 goto hg if errorlevel 6 goto hf if errorlevel 5 goto he if errorlevel 4 goto hd if errorlevel 3 goto hc if errorlevel 2 goto hb if errorlevel 1 goto ha :ha echo \linux\loadlin \linux\vmlinuz root=/dev/hda1 rw no-scroll > run.bat goto run :hb echo \linux\loadlin \linux\vmlinuz root=/dev/hda2 rw no-scroll > run.bat goto run :hc echo \linux\loadlin \linux\vmlinuz root=/dev/hda3 rw no-scroll > run.bat goto run :hd echo \linux\loadlin \linux\vmlinuz root=/dev/hda4 rw no-scroll > run.bat goto run :he echo \linux\loadlin \linux\vmlinuz root=/dev/hda5 rw no-scroll > run.bat goto run :hf echo \linux\loadlin \linux\vmlinuz root=/dev/hda6 rw no-scroll > run.bat goto run :hg echo \linux\loadlin \linux\vmlinuz root=/dev/hda7 rw no-scroll > run.bat goto run :hh echo \linux\loadlin \linux\vmlinuz root=/dev/hda8 rw no-scroll > run.bat goto run :hi echo \linux\loadlin \linux\vmlinuz root=/dev/hda9 rw no-scroll > run.bat goto run :hj echo \linux\loadlin \linux\vmlinuz root=/dev/hda10 rw no-scroll > run.bat goto run :hk echo \linux\loadlin \linux\vmlinuz root=/dev/hda11 rw no-scroll > run.bat goto run :hl echo \linux\loadlin \linux\vmlinuz root=/dev/hda12 rw no-scroll > run.bat goto run :hm echo \linux\loadlin \linux\vmlinuz root=/dev/hda13 rw no-scroll > run.bat goto run :hn echo \linux\loadlin \linux\vmlinuz root=/dev/hda14 rw no-scroll > run.bat goto run :ho echo \linux\loadlin \linux\vmlinuz root=/dev/hda15 rw no-scroll > run.bat goto run :more cls echo Q = \linux\loadlin \linux\vmlinuz root=/dev/hdb1 rw echo R = \linux\loadlin \linux\vmlinuz root=/dev/hdb2 rw echo S = \linux\loadlin \linux\vmlinuz root=/dev/hdb3 rw echo T = \linux\loadlin \linux\vmlinuz root=/dev/hdb4 rw echo U = \linux\loadlin \linux\vmlinuz root=/dev/hdb5 rw echo V = \linux\loadlin \linux\vmlinuz root=/dev/hdb6 rw echo W = back echo. choice /c:qrstuvw Q-W /n if errorlevel 7 goto back if errorlevel 6 goto hv if errorlevel 5 goto hu if errorlevel 4 goto ht if errorlevel 3 goto hs if errorlevel 2 goto hr if errorlevel 1 goto hq :hq echo \linux\loadlin \linux\vmlinuz root=/dev/hdb1 rw no-scroll > run.bat goto run :hr echo \linux\loadlin \linux\vmlinuz root=/dev/hdb2 rw no-scroll > run.bat goto run :hs echo \linux\loadlin \linux\vmlinuz root=/dev/hdb3 rw no-scroll > run.bat goto run :ht echo \linux\loadlin \linux\vmlinuz root=/dev/hdb4 rw no-scroll > run.bat goto run :hu echo \linux\loadlin \linux\vmlinuz root=/dev/hdb5 rw no-scroll > run.bat goto run :hv echo \linux\loadlin \linux\vmlinuz root=/dev/hdb6 rw no-scroll > run.bat goto run rem Just your last chance ... before running. :run cls echo You are now ready to start! echo. echo This is the path you have selected for booting Linux: :ready type \linux\run.bat choice /c:1230 "1)OK go! 2)edit RUN.BAT 3)begin again 0)quit " /n if errorlevel 4 goto stop if errorlevel 3 goto bagain if errorlevel 2 goto erun if errorlevel 1 goto bootnow :erun edit \linux\run.bat goto run rem Booting! :bootnow cls \linux\run.bat rem Aborting executin... :stop cls echo BrlSpeak Configer (CFG.BAT) echo by Osvaldo La Rosa echo for the BRAILLESPEAK UMSDOS LINUX distribution echo. echo. echo Contact: brlspeak@linux-fan.com See also: http://brlspeak.linux-fan.com echo. echo Copyright (C) 31-10-2001 echo Public