Phoenix OS/4: Difference between revisions

From OS2World.Com Wiki
Jump to navigation Jump to search
(46 intermediate revisions by 14 users not shown)
Line 1: Line 1:
'''Phoenix OS/4''' is a project intended to recreate the original kernel for the [http://en.wikipedia.org/wiki/OS/2 IBM Operating System/2]. The main goal of the project is to make the system able to work on the PCs, that it is unable to work on with the original kernel.
'''OS/4''' is a research project intended to recreate the original kernel for the [http://en.wikipedia.org/wiki/OS/2 IBM Operating System/2]. The main goal of the project is to make the system able to work on the PCs, that it is unable to work on with the original kernel.


==Installation instructions==
==Installation==
From now, we assume that you [[#Getting_the_binary_distributions | downloaded the latest OS/4 kernel distribution]] zip file, and it is named like this:<br />
Download [[#Getting_the_binary_distributions | the latest OS/4 kernel distribution]] zip file which is named like this:
<tt>os2krnlSVNxxxx_unoff.zip</tt>, where <tt>xxxx</tt> is the SVN revision of the downloaded release.
<tt>os2krnlSVNxxxx_unoff.zip</tt>, where <tt>xxxx</tt> is the SVN revision of the downloaded release and perform the HowTo from this archive.
To clarify the following installation instruction, it is assumed, that the downloaded distribution file's name is <tt>os4krnl_current.zip</tt>. Please, rename the downloaded file to <tt>os4krnl_current.zip</tt> using your favorite filemanager or the CMD.EXE's <tt>ren</tt> command like this: <tt>ren os2krnlSVNxxxx_unoff.zip os4krnl_current.zip</tt>.
Also, you will need the <tt>unzip</tt> utility, [http://hobbes.nmsu.edu/h-search.php?sh=1&button=Search&key=unzip&stype=all&sort=type_name&dir=%2Fpub%2Fos2%2Futil%2Farchiver which you can find on hobbes]. A more up to date (capable of handling files larger than 2 GB) version can be found at [http://os2ports.smedley.id.au/index.php?page=infozip-zip-unzip Paul Smedley's OS/2 ports site]<br />


Okay, so everything is prepared -- let's begin!<br />
The OS/4 distribution package includes a powerful kernel loader, which features '''loading OS/4 and OS/2 kernels''', '''kernel selection menu''', '''custom CONFIG.SYS files''' for each kernel.


The OS/4 distribution package includes a powerful kernel loader, which features '''loading OS/4 and OS/2 kernels''', '''kernel selection menu''', '''custom CONFIG.SYS files''' for each kernel, '''CONFIG.SYS editor''' which may be invoked right before the kernel loads (available on OS/4 kernels only; although the modified version of the config is not put back on the disk, the feature is fairly useful in crash recovering), '''chainloading another kernel bootloaders''' and '''preloading files in the memory''' (better boot time).<br />
==OS/4 technical notes==
===Video bus bandwidth (VBB)===
VBB is a factor which end users feel like speed of video system output.
Everyone can check the value of VBB using a well known tool - [http://hobbes.nmsu.edu/download/pub/os2/util/benchmark/sysb095d.zip SYSBENCH].


So, the first thing to do, is to install the OS/4 kernel bootloader, because the original one is unable to load the OS/4 kernel.
To have an acceptable VBB, the LFB (linear frame buffer) of video card has to be mapped with WC (write combine) type of caching.
If you use a recent version of ACPI, original kernel, or both (you have eCS), then it is highly recommended to keep the original bootloader:
* unset the hidden attribute of the original kernel bootloader: <tt>attrib -H \OS2LDR</tt>
* rename <tt>OS2LDR</tt> to <tt>OS2LDR.IBM</tt>: <tt>ren \OS2LDR OS2LDR.IBM</tt>
* extract OS2LDR from the OS/4 package to the root of the boot drive: <tt>unzip os4krnl_current.zip OS2LDR -d \</tt>


Then extract the Phoenix OS/4 kernel to the root of the boot drive (the file is named OS4KRNL for the debug version and OS4KRNLR for the retail version):
x86 provides 2 ways of setting WC for memory regions (LFB is actually a memory region):
* we will use the retail version, so do <tt>unzip os4krnl_current.zip OS4KRNLR -d \</tt>.
1) using MTRR registers.
2) using PAT extension.


OS/4 ships also with an updated <tt>DOSCALL1.DLL</tt> library, which works fine with both kernels (highly recommended):
OS/4 is using PAT to set WC for LFB. For this propose OS/4 offers new KEE entry: KernVMAlloc2 - the same as KernVMAlloc  but with a new parameter - type of caching.
* download [http://hobbes.nmsu.edu/h-search.php?key=lxlite&pushbutton=Search the lxlite package] from hobbes (eCS already has this tool, although there is some argument about the way that it works. Any version should do what is necessary).
* extract the unLock.exe utility to your PATH, for example, to the \OS2 directory: <tt>unzip -j lxlt133.zip lxLite\unLock.exe -d \OS2</tt>
* now unlock your current DOSCALL1.DLL file: <tt>unlock \OS2\DLL\DOSCALL1.DLL</tt>
* rename it for a backup: <tt>ren \OS2\DLL\DOSCALL1.DLL DOSCALL1.IBM</tt>
* and then extract the Phoenix version: <tt>unzip os4krnl_current DOSCALL1.DLL -d \OS2\DLL</tt>


Then you need to configure the OS/4 kernel bootloader to be able to load the original, and the Phoenix kernel. The configuration file's name is OS2LDR.INI. An example configuration file is present in the distribution package, and contains a comment for each line. Note that this is a TEXT file, not a binary INI file.<br />
So we need to intercept all the requests for mapping LFB and route them to KernVMAlloc2 with an explicit indication of the type of caching (WC).
Create an empty OS2LDR.INI file in the root of the bootdrive and then put this in it using a text editor (or whatever you want):
[config]
default=1
timeout=15
[kernel]
OS2LDR.IBM = IBM orig. kernel ,RESTART
OS4KRNLR  = Phoenix kernel  ,PRELOAD
The <tt>default</tt> statement in the <tt>config</tt> section sets the default selection in the kernel selection menu, and the <tt>timeout</tt> statement sets the time in seconds before the default kernel will be loaded.<br />
In the kernel section, the statements must comply with the following syntax:<br />
<kernel or loader filename> = <kernel selection menu option text>[,option[=value][,option[=value][,option[=value][...]]]]
The possible options are:
{| class="wikitable"
|RESTART||Indicates, that the file to be loaded is an another kernel bootloader, rather than a kernel file.
|-
|LOGSIZE||Defines the size of the log buffer (which [[#Getting_the_log | you can get]] reading special device files) in KiB (0 < value < All memory - 16MiB).
|-
|PRELOAD||Use the files preload function (a must for OS4APIC to work properly, also speeds up the loading process).
|-
|LOADSYM||Try to load the symbol files (useful for debugging).
|-
|CFGEXT|| Specifies an extension for the <tt>CONFIG.ext</tt> file to be loaded instead of the CONFIG.SYS file, where <tt>ext</tt>
is the extension specified by the CFGEXT statement (must be three characters or less).
|-
|ALTF1||Emulates a user pressing Alt-F1 in the loader menu.
|-
|ALTF2||Emulates a user pressing Alt-F2 in the loader menu.
|-
|ALTF3||Emulates a user pressing Alt-F3 in the loader menu.
|-
|ALTF4||Emulates a user pressing Alt-F4 in the loader menu.
|-
|VALIMIT||Set Virtual Address Limit
|}


Although the original kernel may be loaded by the OS/4 kernel bootloader '''directly''', the most stable configuration is to use original bootloader to load the original kernel.<br />
It appeared that OS/2 uses many different ways to map LFB:
# VMAN.DLL -> PMDD.SYS, SCREEN01.SYS
# DIVE.DLL -> SMMDD.SYS
# SNAP -> SDDHELP.SYS
# XFree86/OS2 - >xf86sup.sys


Notice, that the original bootloader (OS2LDR.IBM) is able to load only the kernel file, named OS2KRNL, and you have to keep the original kernel with that name to have the ability to load it with the original bootloader.<br />
Thus solutions from OS/4 are:
 
# rewritten SCREEN$ and SINGLEQ$ (SCREEN03.SYS and PMDDk.SYS correspondingly).
Also notice, that although you have the ability to chainload kernel bootloaders with custom name using the Phoenix bootloader, the '''first''' loaded kernel bootloader is always named OS2LDR.<br />
# a patch for DIVE.DLL to call SCREEN03.SYS but not SMMDD.SYS.
 
# rewritten SDDHELP.SYS.
There are also some configuration statements you can use in the <tt>config</tt> section in the Phoenix bootloader configuration file, but those are usually only useful for debugging and troubleshooting purposes. See the example OS2LDR.INI file in the OS/4 kernel distribution package.<br />
# not yet done (need rewrite of xf86sup.sys or caller in XFree86/OS2).
 
----
 
This is a basic installation process, but remember, that there is also a new <tt>CLOCK03B.SYS</tt>, which supersedes original <tt>TIMER0.SYS</tt> and <tt>CLOCK01.SYS</tt> drivers. It is recommend to install this driver:
* <tt>unzip os4krnl_current.zip CLOCK03B.SYS -d \OS2\BOOT</tt>
You don't need to modify <tt>CONFIG.SYS</tt><br />
 
'''Attention!''' Since SVN revision '''4166''', it is '''mandatory''' to install the new <tt>SCREEN03.SYS</tt>, otherwise kernel won't boot:
* <tt>unzip os4krnl_current.zip SCREEN03.SYS -d \OS2\BOOT</tt>
You don't need to modify <tt>CONFIG.SYS</tt>, too.<br />
 
----
 
Okay, everything is set up. Now reboot your system!<br />
You should notice the kernel selection menu with two options, where you can select to load either the original IBM kernel, or the Phoenix one. Although you may fail to boot up with the Phoenix kernel due to a bug in it, there is no doubt you will be able to fall back to the original kernel and boot your system with it (if you were able to do this before :) ).


==OS/4 Tested Hardware List==
==OS/4 Tested Hardware List==
 
{| class="wikitable sortable"
{| class="wikitable sortable" border="1"
!Model!!Reporter!!class="unsortable"|Date of Report||class="unsortable"|Remarks
|-
! Model !! Reporter !! Date of Report !! Remarks
|-
|-
|[[Asus P5B-Delux]]||OS4user||04/11/2015||everything works ok.
|[[Asus P5B-Delux]]||OS4user||04/11/2015||everything works ok.
Line 125: Line 70:
|[[Asus M4A87Td/USB3]]||MichelPB||16/05/2015||everything works ok
|[[Asus M4A87Td/USB3]]||MichelPB||16/05/2015||everything works ok
|-
|-
|[[Lenovo Thinkpad X61s (Mainboard 766736U)]]||Barbara||20/05/2015||everything works ok, patched ACPI.PSD ver. 3.22.06 (PSD=ACPI.PSD /VW /ST=0)
|IBM Thinkpad T23||Barbara||20/05/2015||everything works ok
|-
|-
|[[IBM Thinkpad T23]]||Barbara||20/05/2015||everything works ok
|[[VMWare vSphere 5.1 (ESXi)]]||Digi||23/06/2015||everything works ok.
|-
|-
|[[VMWare vSphere 5.1 (ESXi)]]||Digi||23/06/2015||everything works ok.
|Asrock A785GMH/128M||MichelPB||08/07/2015||everything works ok.
|-
|Gigabyte GA-A75M-S2V||MichelPB||27/08/2015||works ok(sound is not tested).
|-
|[[ECS KBN-I/2100]]||fighter4||16/12/2015||works ok(sound is not working).
|-
|[[ThinkPad X220i]]||Oxyd||17/07/2016||everything works ok.
|-
|[[Lenovo Thinkpad X61s (Mainboard 766736U)]]||Barbara||06/09/2016||everything works ok.
|-
|Asrock X370 Professional Gaming with AMD Ryzen 1700X CPU||Yoda||26/06/2017||8 cores 16 threads working. No sound, no USB, no LAN/Wlan
|-
|GigaByte H110M-S2H||David McKenna||09/09/2017||Starting with 4974, everything works ok. Need acpi4.bpd. USB3 only.
|-
|IBM ThinkPad W530||TeLLie||10-04-2018||All works, except power-off doesn't work.
|-
|[[Dell XPS 630i]]||dryeo||25-04-2018||Desktop freezes with no mouse. CAD allows access to cmd prompt which works, including the mouse.
|-
|ThinkPad T420i||Gabriele Gamba||26/04/2018||everything works but /APIC (works fine with acpi4.bpd) and power management (battery widget and power off)
|-
|ThinkPad W500||Bernhard||04/05/2018||everything works except poweroff and some winos2 programs
|-
|-
 
|HP Proliant ML110 G5 (Xeon X3330 quad-core, 8 GB RAM)||Gabriele Gamba||13/05/2018||everything works with acpi4.bpd except power off
|}
|}


==Frequently asked questions==
==Frequently asked questions==
{{netfaq|q=
{{netfaq|q=
I'm getting a <tt>SYS1195: The statement "VIRTUALADDRESSLIMIT" on line *** of the CONFIG.SYS file is not recognized.  Line *** is ignored.
Can I use ACPI.PSD with the OS/4 kernel, and what version?
</tt> error message while booting. What's wrong?
|a=
|a=
Somewhere in SVN3xxx the VIRTUALADDRESSLIMIT tuning feature was broken. Now the VAL is fixed and set to 2048.
Yes, you can. But with some restriction:
 
1) The latest supported version of ACPI.PSD is 3.23.01
There's nothing bad in the error message; you can REM or remove the entire VAL statement in your CONFIG.SYS file -- it will always remain fixed to 2 GiBs.
2) ACPI.PSD has to be patched ([http://gus.biysk.ru/os4/Patches/AcpiPsdPatches.rar the patch] is available for 3.22.03, 3.22.06 and 3.23.01 versions of ACPI.PSD)
 
3) PSD= line has to contain a switch /ST=0 (for ex. PSD=ACPI.PSD /ST=0)
Unfortunately, there is no information whether Phoenix will fix this issue and make the VAL changeable again, or not.
Compatibility with the latest ACPI.PSD can be easily reached if  ACPI.PSD developers wish for it.
}}
}}


{{netfaq|q=
{{netfaq|q=
Can I use ACPI.PSD with the OS/4 kernel, and what version?
How can I prevent the debug version of the kernel from jumping into KDB when some program traps?
|a=
|a=
Yes, you can. The best option is to use the 3.18 version, as that's the latest officially supported version, and it has recommended itself as the most stable ACPI.PSD.
Put this in <tt>KDB.INI</tt> file in the root of your boot drive:
.b 115200t
g
g
g
g
g
ln
k
}}
}}


{{netfaq|q=
{{netfaq|q=
I'm getting a <tt>TIMER0.SYS... initialization failed</tt> error message while booting. What's wrong?
How can I get the kernel log if my test PC does not have a COM port? Can I use a USBCOM device?
|a=
|a=
The 16-bit <tt>TIMER0.SYS</tt> driver fail is okay because its function is now fully substituted by the <tt>CLOCK03B.SYS</tt> system driver written by Phoenix.
No, you cannot get a kernel log using a USBCOM device. For more information on getting the kernel log, please refer to the [[#Getting_the_log | Troubleshooting/Getting the log]] section. (Note that this means that the debugee system should have a physical COM port. A terminal system, though, can work via USB-to-Serial converter. You can use a laptop without a COM port as a terminal. You will only need a USB port with a plugged-in USB-to-Serial converter, and plug a null-modem cable into it. Note that USB-to-Serial converters usually have only three wires, so you should disable HW flow control.)
}}
 
If you encounter some error (trap or hang) during the boot, and you have no COM port, you can try redirecting log messages to screen. Just add dbport=0 to os2ldr.ini, instead of a COM port address, and you will see the log messages on the screen in yellow.


{{netfaq|q=
Also in case the system is successfully booted you can get the log by typing:
What is the purpose of the <tt>CLOCK03B.SYS</tt> driver?
copy kernlog$ my_kernellog [enter]
|a=
The CLOCK03B.SYS was rewritten in 32-bit and now contains two drivers: CLOCK$ and TIMER0$ (having more than one driver per module is allowed in OS/2). That was made for better performance and code cleanup.
}}
}}


{{netfaq|q=
{{netfaq|q=
Does <tt>CLOCK03B.SYS</tt> driver recognize the <tt>CLOCKSCALE</tt> CONFIG.SYS option?
Can I edit config.sys (config.os4) on system boot?
|a=
|a=
'''Yes, it does'''. More information about <tt>CLOCKSCALE</tt> by [http://hobbes.nmsu.edu/h-search.php?key=configtool&pushbutton=Search ConfigTool]:
Yes, you can. Press Alt-E when you see boot menu, after menu selection you will go to config editor. Note that changes will affect the current boot only and will not be saved to the disk.
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
=n (n=1,2,4)
   
New setting, needs clock01.sys delivered with kernel 14.080a
The theory is that CLOCKSCALE=4 will speed up some apps (maybe Netscape and/or Java).
<<=NOTE=>> By Robert Lalla:
Multithreaded GUI applications are required to switch frequently between threads, for quick response to user input and fast screen updates.  For native OS/2 applications there are available plenty of OS/2 kernel functions (semaphores, priorities, etc.) to allow  thread switches at any required speed. Java programs and many software ported from other OS do not make much use of those kernel functions, maybe because they simply expect the cpu time to be shared among threads using very short timeslices.
OS/2 has also timeslices, intended for applications that don't want to share cpu with other applications. The standard timeslice was 32ms (or multiples depending on CONFIG.SYS) since early 6 MHz 80826 days. In more recent versions of OS/2 the scheduler's timer is running at 8ms, but I'm not sure if standard priority applications could profit from.
The purpose of "clockscale" is most likely to shorten minimum timeslices by a given factor, down to 2ms.
</pre>
}}
}}


{{netfaq|q=
{{netfaq|q=
What is the purpose of the <tt>SCREEN03.SYS</tt> driver?
Why ACPI poweroff does not work on my machine with OS/4 kernel?
|a=
|a=
The <tt>SCREEN03.SYS</tt> was written to enable Panorama VESA BIOS Extension Video Driver to set the proper Write-Combine flags for the LFB (the linear frame buffer) '''without''' <tt>ACPI.PSD</tt>.
Probably, the ACPI version acpi4.bpd reports differs from the version acpi32.dll requires. Some older acpi4.bpd versions reported the ACPI version 3.22. Newer ones report 3.23 and should work fine with acpi32.dll from ACPI.PSD v. 3.23.xx. Future acpi4.bpd should provide a way to set reported ACPICA version in an .INI file, or similar way. Also, don't forget to enable the Desktop->XShutdown->Power-off computer checkbox, plus choose here a poweroff via ACPI, instead of APM.
 
Now the Phoenix team provides the full alternative to the OS2KRNL + ACPI.PSD + PANOGRADD stack of technologies:
 
'''OS4KRNL + OS4APIC.PSD + ACPI4.SYS + SCREEN03.SYS + PANOGRADD'''
}}
}}


{{netfaq|q=
{{netfaq|q=
How can I prevent the debug version of the kernel from jumping into KDB when some program traps?
Should an XCenter widget that shows temperature work?
|a=
|a=
Put this in <tt>KDB.INI</tt> file in the root of your boot drive:
Temperature widget should work. Though, there is an alternative temperature widget written by Andrey Vasilkin (aka Digi). It is supplied with [ftp://digi.os2.snc.ru/pub/SystemLoad/SL-bin-20171113.zip System Load], but it supports Intel processors only.
.b 115200t
g
g
g
g
g
ln
k
}}
}}


{{netfaq|q=
{{netfaq|q=
How can I get the kernel log if my test PC does not have a COM port? Can I use a USBCOM device?
Why does the battery widget show the status of the battery "E 3" ?
|a=
|a=
No, you cannot get a kernel log using a USBCOM device. For more information on getting the kernel log, please refer to the [[#Getting_the_log | Troubleshooting/Getting the log]] section.
A battery widget seems to use APM.ADD, which requires some ACPICA features that are missing from acpi4.bpd, so battery widget does not work.
If you need a battery widget use the older ver of ACPI.PSD/APM.ADD which is compatible with OS/4.
}}
}}


==Troubleshooting==
==Troubleshooting==
===Known problems and not-a-problems===
* Tracing (STRACE and TRACE) feature is discontinued. Phoenix team is not going to make it work again.
* The current way to display bootlogo is very outdated, poorly written, and the maximum color depth is only 8-bit (256 colors), so Phoenix decided to rewrite this part. The new way to show bootlogo is not ready yet, and the old one is broken. Await the new bootlogo in future releases.
===I think there is a bug in the kernel...===
===Getting the log===
===Getting the log===
The traditional way of getting the kernel log (and the only way now to remotely debug it), is to connect a terminal (a PC) to the COM port. You will need a terminal program on the other side (I suggest using [ftp://dbanet.org/dbanet/os2/util/dterm_b10.zip DTerm]) set up to work on the speed of <tt>115200</tt> baud, bits <tt>8n1</tt> and <tt>no flow control</tt>.
The traditional way of getting the kernel log (and the only way now to remotely debug it), is to connect a terminal (a PC) to the COM port. You will need a terminal program on the other side (I suggest using [ftp://dbanet.org/os2/util/dterm_b10.zip DTerm]) set up to work on the speed of <tt>115200</tt> baud, bits <tt>8n1</tt> and <tt>no flow control</tt>.


If your debug PC (the one which kernel's log you want to get) doesn't have a COM port, then there's a note at the end of this section for you.
If your debug PC (the one which kernel's log you want to get) doesn't have a COM port, then there's a note at the end of this section for you.
If your debug PC has one COM port, it is likely to be the COM port number one and have the <tt>0x3F8</tt> address, so put this setting in the <tt>config</tt> section of <tt>\OS2LDR.INI</tt>:
If your debug PC has one COM port, it is likely to be the COM port number one and have the <tt>0x3F8</tt> address, so put this setting in the <tt>config</tt> section of <tt>\OS2LDR.INI</tt>:
  dbport=0x3f8
  dbport=0x3f8
If your PC has more than one COM port, ensure you're using the first one for debugging, or, if  not, fix this, or set the proper address for the COM port you use, like <tt>0xEC00</tt> for second COM port (you can see the addresses in your BIOS, or you can use the OS/2 Hardware Manager for that).
If your PC has more than one COM port, ensure you're using the first one for debugging, or, if  not, fix this, or set the proper address for the COM port you use, like <tt>0xEC00</tt> for second COM port (you can see the addresses in your BIOS, or you can use the OS/2 Hardware Manager for that).


To turn on debugging over COM port, set the following setting in the <tt>config</tt> section of <tt>\OS2LDR.INI</tt>:
Important thing: you '''should''' use the '''debug''' kernel to get the log.
 
dbflags=0x11
 
Important thing: you '''should''' use the '''debug''' kernel to get the log, so extract the debug kernel file to the root of the boot drive:
 
unzip os2krnl_current.zip OS2KRNL -d \
and modify the <tt>kernel</tt> section of <tt>\OS2LDR.INI</tt> to be able to load it.
 
Anyway you would like to try the debug one, because the retail kernel may have some bugs already fixed in the debug one, so if you encounter any problems, '''please''' try the debug one.


This is already enough to get the kernel log, so you may just fire up the terminal program and load the debug kernel when you're all set up. Please note, that the log is big enough to not fit in the console window, so you would like to turn on the logging feature in your terminal program (Control-L in DTerm).
This is already enough to get the kernel log, so you may just fire up the terminal program and load the debug kernel when you're all set up. Please note, that the log is big enough to not fit in the console window, so you would like to turn on the logging feature in your terminal program (Control-L in DTerm).
Line 251: Line 175:
Additionally, if you have a full COM cable, you may try putting <tt>fullcable=1</tt> in the <tt>config</tt> section of <tt>\OS2LDR.INI</tt>, and turning on the hardware flow control in the terminal program (Control-F in DTerm) -- it helps if you notice missing characters in the log.
Additionally, if you have a full COM cable, you may try putting <tt>fullcable=1</tt> in the <tt>config</tt> section of <tt>\OS2LDR.INI</tt>, and turning on the hardware flow control in the terminal program (Control-F in DTerm) -- it helps if you notice missing characters in the log.


Now, if your system traps, the trapscreen will be sent over the COM port, and the '''Kernel Debugger''' command promt will appear:
Also, if you reported a bug, you may be asked to trap the system and enter some commands for the KDB into the terminal, and show your output to the kernel developer. For some KDB commands to work properly, you need the symbol files (at least of the kernel) to be loaded. The symbol files must be in the root of the boot drive, or in the same directory of the program the symbol file is generated for.
 
##
You can try entering the question mark in terminal -- the Kernel Debugger (aka KDB) will show you the help screen.
The most useful command for a user is <tt>.reboot</tt> ;)
 
Also, if you reported a bug, you may be asked to trap the system and enter some commands for the KDB into the terminal, and show your output to the kernel developer. For some KDB commands to work properly, you need the symbol files (at least of the kernel) to be loaded. The symbol files must be in the root of the boot drive, or in the same directory of the program the symbol file is generated for. So, for OS4KRNL, put OS4KRNL.SYM in the root of the boot drive:
 
unzip os4krnl_current OS4KRNL.SYM -d \
If the name of the debug kernel you load differs from OS4KRNL, rename the symbol file to correspond to its name:
 
ren OS4KRNL.SYM KERNNAME.SYM
where KERNNAME is your current custom name for the kernel.
 
Now, to make the kernel to try to load the symbol files, add the <tt>LOADSYM</tt> option to the kernel setup string in the <tt>kernel</tt> section of <tt>\OS2LDR.INI</tt>.
 
----
 
So, if you don't have at least one COM port, there are still some possibilities: ...
 
TODO: Write this section. [[User:Dbanet|Dbanet]] ([[User talk:Dbanet|talk]]) 19:44, 3 April 2014 (CEST)
 
===Submitting the bugreport===


====Getting the Log from Command line====
If you are able to boot OS/2 with the OS/4 kernel you can also generate the log to a file with this command:
  copy kernlog$ my.log
It will create the my.log file with the information.


===Participating in testing===
===Participating in testing===
Line 282: Line 188:


==Getting the binary distributions==
==Getting the binary distributions==
Currently, the [http://ru2.halfos.ru/core/downloads/ download section on the RU/2's Core/2] is outdated (will be fixed ASAP).
The latest kernel distribution should reside on [http://www.gus.biysk.ru/os4/ the gus.biysk.ru server in the /os4 directory].


The latest kernel distribution should reside on [http://www.gus.biysk.ru/os4/ the gus.biysk.ru server in the /os4 directory].<br />
You should find there a '''ZIP''' file in the root, starting with '''os2krnlSVN'''.
You should find there a '''ZIP''' file in the root, starting with '''os2krnlSVN'''.
Also [http://www.os2world.com/forum/index.php/topic,324.msg2674.html#msg2674 the first post on the OS2World thread about OS/4] should contain the direct link to the release.


==Resources on the WWW==
==Resources on the WWW==
[http://www.gus.biysk.ru/os4/] is an official HTTP server, where you can get the latest OS/4 kernel releases and some useful utilities.<br />
[http://www.gus.biysk.ru/os4/] is an official HTTP server, where you can get the latest OS/4 kernel releases and some useful utilities.
[http://ru2.halfos.ru/core/] is a section on the Russian Underground/2, fully devoted to the Phoenix project (Russian only).<br />
[irc://efnet/os2russian] is an IRC channel where you can get support.<br />
[http://www.os2world.com/forum/index.php/topic,324.0.html] is a thread on the OS2World forum about OS/4.<br />


==Contacting developers==
[https://www.os2world.com/forum/index.php/topic,1735.0.html] is a thread on the OS2World forum for technical support.
The most easy way to contact Phoenix is to join the [irc://efnet/os2russian #os2russian] IRC channel on the original EFNet network.


There is no collaborative e-mail mailbox, but you may consider writing to the SU.OS2 Fidonet area... Hrm. Well, the IRC channel is the best option.
[irc://efnet/os2russian] is an IRC channel where you can get support.
 
Also there is a [http://ru2.halfos.ru/forum/index.html technical forum] at the [http://ru2.halfos.ru/ Russian Underground/2], where you can try writing to, too.
 
Most of the dialogs in the IRC channel, RU/2 forum, or the echo conference are performed in Russian, but if you jump there in English, you will get a conversation.
 
----
 
Also there is a [http://www.os2world.com/forum/index.php/topic,324.0.html thread in the OS2World forum] (which is in English), where you can get support, too.


[http://www.os2world.com/forum/index.php/topic,324.0.html] is a thread on the OS2World forum about OS/4.


==Contacting developers==
The most easy way to contact OS/4 Team is to join the [irc://efnet/os2russian #os2russian] IRC channel on the original EFNet network.


Most of the dialogues in the IRC channel, RU/2 forum are performed in Russian, but if you jump there in English, you will get a conversation.


----
Also there is a [https://www.os2world.com/forum/index.php/topic,1735.0.html thread in the OS2World forum] (which is in English), where you can get support, too.
[[Category:Software]]

Revision as of 21:14, 18 June 2018

OS/4 is a research project intended to recreate the original kernel for the IBM Operating System/2. The main goal of the project is to make the system able to work on the PCs, that it is unable to work on with the original kernel.

Installation

Download the latest OS/4 kernel distribution zip file which is named like this: os2krnlSVNxxxx_unoff.zip, where xxxx is the SVN revision of the downloaded release and perform the HowTo from this archive.

The OS/4 distribution package includes a powerful kernel loader, which features loading OS/4 and OS/2 kernels, kernel selection menu, custom CONFIG.SYS files for each kernel.

OS/4 technical notes

Video bus bandwidth (VBB)

VBB is a factor which end users feel like speed of video system output. Everyone can check the value of VBB using a well known tool - SYSBENCH.

To have an acceptable VBB, the LFB (linear frame buffer) of video card has to be mapped with WC (write combine) type of caching.

x86 provides 2 ways of setting WC for memory regions (LFB is actually a memory region):

1) using MTRR registers.
2) using PAT extension.

OS/4 is using PAT to set WC for LFB. For this propose OS/4 offers new KEE entry: KernVMAlloc2 - the same as KernVMAlloc but with a new parameter - type of caching.

So we need to intercept all the requests for mapping LFB and route them to KernVMAlloc2 with an explicit indication of the type of caching (WC).

It appeared that OS/2 uses many different ways to map LFB:

  1. VMAN.DLL -> PMDD.SYS, SCREEN01.SYS
  2. DIVE.DLL -> SMMDD.SYS
  3. SNAP -> SDDHELP.SYS
  4. XFree86/OS2 - >xf86sup.sys

Thus solutions from OS/4 are:

  1. rewritten SCREEN$ and SINGLEQ$ (SCREEN03.SYS and PMDDk.SYS correspondingly).
  2. a patch for DIVE.DLL to call SCREEN03.SYS but not SMMDD.SYS.
  3. rewritten SDDHELP.SYS.
  4. not yet done (need rewrite of xf86sup.sys or caller in XFree86/OS2).

OS/4 Tested Hardware List

Model Reporter Date of Report Remarks
Asus P5B-Delux OS4user 04/11/2015 everything works ok.
Tyan Toledo i3210W OS4user 21/03/2015 everything works ok.
Gigabyte GA-B75M-D3V Joseph 13/04/2015 sound card does not work ok
Asus P8Z77-MPRO Joseph 13/04/2015 sound card does not work ok
Gigabyte GA-H61M-S2PV Joseph 13/04/2015 sound card does not work ok
Gigabyte GA-EG41MF-US2H Digi 14/04/2015 power button does not work, Shutdown from XCenter causes reboot.
Gigabyte GA-H61M-S2PV 1 Digi 14/04/2015 everything works ok
ThinkPad T410 Sergey Posokhov 14/04/2105 everything works ok
ThinkPad T61 Codex 14/04/2015 everything but /APIC
Gigabyte GA-F2A88X-D3H ff4 27/06/2014 sddhelp.sys from os/4 needed
Asus P5E3 WS PRO Igor Vaskov 15/04/2015 everything works ok
Asrock Q1900B-ITX Igor Vaskov 15/04/2015 everything works ok
Gigabyte GA-B85M-D3V Joseph 28/04/2015 sound card does not work ok
Asus F2 A55-M MichelPB 20/04/2015 everything works ok
Asus M5A-99x EVO MichelPB 03/12/2014 tested only
Asus M4A87Td/USB3 MichelPB 16/05/2015 everything works ok
IBM Thinkpad T23 Barbara 20/05/2015 everything works ok
VMWare vSphere 5.1 (ESXi) Digi 23/06/2015 everything works ok.
Asrock A785GMH/128M MichelPB 08/07/2015 everything works ok.
Gigabyte GA-A75M-S2V MichelPB 27/08/2015 works ok(sound is not tested).
ECS KBN-I/2100 fighter4 16/12/2015 works ok(sound is not working).
ThinkPad X220i Oxyd 17/07/2016 everything works ok.
Lenovo Thinkpad X61s (Mainboard 766736U) Barbara 06/09/2016 everything works ok.
Asrock X370 Professional Gaming with AMD Ryzen 1700X CPU Yoda 26/06/2017 8 cores 16 threads working. No sound, no USB, no LAN/Wlan
GigaByte H110M-S2H David McKenna 09/09/2017 Starting with 4974, everything works ok. Need acpi4.bpd. USB3 only.
IBM ThinkPad W530 TeLLie 10-04-2018 All works, except power-off doesn't work.
Dell XPS 630i dryeo 25-04-2018 Desktop freezes with no mouse. CAD allows access to cmd prompt which works, including the mouse.
ThinkPad T420i Gabriele Gamba 26/04/2018 everything works but /APIC (works fine with acpi4.bpd) and power management (battery widget and power off)
ThinkPad W500 Bernhard 04/05/2018 everything works except poweroff and some winos2 programs
HP Proliant ML110 G5 (Xeon X3330 quad-core, 8 GB RAM) Gabriele Gamba 13/05/2018 everything works with acpi4.bpd except power off

Frequently asked questions

Q: Can I use ACPI.PSD with the OS/4 kernel, and what version?
A: Yes, you can. But with some restriction:
1) The latest supported version of ACPI.PSD is 3.23.01
2) ACPI.PSD has to be patched (the patch is available for 3.22.03, 3.22.06 and 3.23.01 versions of ACPI.PSD)
3) PSD= line has to contain a switch /ST=0 (for ex. PSD=ACPI.PSD /ST=0)

Compatibility with the latest ACPI.PSD can be easily reached if ACPI.PSD developers wish for it.


Q: How can I prevent the debug version of the kernel from jumping into KDB when some program traps?
A: Put this in KDB.INI file in the root of your boot drive:
.b 115200t
g
g
g
g
g
ln
k


Q: How can I get the kernel log if my test PC does not have a COM port? Can I use a USBCOM device?
A: No, you cannot get a kernel log using a USBCOM device. For more information on getting the kernel log, please refer to the Troubleshooting/Getting the log section. (Note that this means that the debugee system should have a physical COM port. A terminal system, though, can work via USB-to-Serial converter. You can use a laptop without a COM port as a terminal. You will only need a USB port with a plugged-in USB-to-Serial converter, and plug a null-modem cable into it. Note that USB-to-Serial converters usually have only three wires, so you should disable HW flow control.)

If you encounter some error (trap or hang) during the boot, and you have no COM port, you can try redirecting log messages to screen. Just add dbport=0 to os2ldr.ini, instead of a COM port address, and you will see the log messages on the screen in yellow.

Also in case the system is successfully booted you can get the log by typing:

copy kernlog$ my_kernellog [enter]


Q: Can I edit config.sys (config.os4) on system boot?
A: Yes, you can. Press Alt-E when you see boot menu, after menu selection you will go to config editor. Note that changes will affect the current boot only and will not be saved to the disk.


Q: Why ACPI poweroff does not work on my machine with OS/4 kernel?
A: Probably, the ACPI version acpi4.bpd reports differs from the version acpi32.dll requires. Some older acpi4.bpd versions reported the ACPI version 3.22. Newer ones report 3.23 and should work fine with acpi32.dll from ACPI.PSD v. 3.23.xx. Future acpi4.bpd should provide a way to set reported ACPICA version in an .INI file, or similar way. Also, don't forget to enable the Desktop->XShutdown->Power-off computer checkbox, plus choose here a poweroff via ACPI, instead of APM.


Q: Should an XCenter widget that shows temperature work?
A: Temperature widget should work. Though, there is an alternative temperature widget written by Andrey Vasilkin (aka Digi). It is supplied with System Load, but it supports Intel processors only.


Q: Why does the battery widget show the status of the battery "E 3" ?
A: A battery widget seems to use APM.ADD, which requires some ACPICA features that are missing from acpi4.bpd, so battery widget does not work.

If you need a battery widget use the older ver of ACPI.PSD/APM.ADD which is compatible with OS/4.


Troubleshooting

Getting the log

The traditional way of getting the kernel log (and the only way now to remotely debug it), is to connect a terminal (a PC) to the COM port. You will need a terminal program on the other side (I suggest using DTerm) set up to work on the speed of 115200 baud, bits 8n1 and no flow control.

If your debug PC (the one which kernel's log you want to get) doesn't have a COM port, then there's a note at the end of this section for you. If your debug PC has one COM port, it is likely to be the COM port number one and have the 0x3F8 address, so put this setting in the config section of \OS2LDR.INI:

dbport=0x3f8

If your PC has more than one COM port, ensure you're using the first one for debugging, or, if not, fix this, or set the proper address for the COM port you use, like 0xEC00 for second COM port (you can see the addresses in your BIOS, or you can use the OS/2 Hardware Manager for that).

Important thing: you should use the debug kernel to get the log.

This is already enough to get the kernel log, so you may just fire up the terminal program and load the debug kernel when you're all set up. Please note, that the log is big enough to not fit in the console window, so you would like to turn on the logging feature in your terminal program (Control-L in DTerm).

Additionally, if you have a full COM cable, you may try putting fullcable=1 in the config section of \OS2LDR.INI, and turning on the hardware flow control in the terminal program (Control-F in DTerm) -- it helps if you notice missing characters in the log.

Also, if you reported a bug, you may be asked to trap the system and enter some commands for the KDB into the terminal, and show your output to the kernel developer. For some KDB commands to work properly, you need the symbol files (at least of the kernel) to be loaded. The symbol files must be in the root of the boot drive, or in the same directory of the program the symbol file is generated for.

Getting the Log from Command line

If you are able to boot OS/2 with the OS/4 kernel you can also generate the log to a file with this command:

 copy kernlog$ my.log

It will create the my.log file with the information.

Participating in testing

Testers are highly appreciated. By testing our kernel, you are helping the whole OS/2 community to make OS/2 runnable on every PC in the world. To begin testing, just take the latest debug kernel and try to run it on every PC you can see.

If you didn't run into problems, -- hooray! -- but if you did, that's why there is the #Troubleshooting section...

Getting the binary distributions

The latest kernel distribution should reside on the gus.biysk.ru server in the /os4 directory.

You should find there a ZIP file in the root, starting with os2krnlSVN.

Resources on the WWW

[1] is an official HTTP server, where you can get the latest OS/4 kernel releases and some useful utilities.

[2] is a thread on the OS2World forum for technical support.

[3] is an IRC channel where you can get support.

[4] is a thread on the OS2World forum about OS/4.

Contacting developers

The most easy way to contact OS/4 Team is to join the #os2russian IRC channel on the original EFNet network.

Most of the dialogues in the IRC channel, RU/2 forum are performed in Russian, but if you jump there in English, you will get a conversation.

Also there is a thread in the OS2World forum (which is in English), where you can get support, too.