ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2006
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
447 discussions
Start a n
N
ew thread
[greatlrd] 23749: reapplay rev 23614, it we have now russain letters and other contrus special letters. The bug I experis before was reletate to ntoslnrl and is complete gone. I have now reboot and boot around 10-20 times and run same program. But we see all unicode -> ansi problem with this change if u select russan in reactos
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Aug 27 20:51:11 2006 New Revision: 23749 URL:
http://svn.reactos.org/svn/reactos?rev=23749&view=rev
Log: reapplay rev 23614, it we have now russain letters and other contrus special letters. The bug I experis before was reletate to ntoslnrl and is complete gone. I have now reboot and boot around 10-20 times and run same program. But we see all unicode -> ansi problem with this change if u select russan in reactos Modified: trunk/reactos/subsystems/win32/win32k/include/intddraw.h trunk/reactos/subsystems/win32/win32k/ntuser/misc.c trunk/reactos/subsystems/win32/win32k/objects/stockobj.c Modified: trunk/reactos/subsystems/win32/win32k/include/intddraw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/intddraw.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/intddraw.h Sun Aug 27 20:51:11 2006 @@ -22,7 +22,9 @@ } DD_SURFACE, *PDD_SURFACE; typedef struct -{ +{ + DD_SURFACE Surface; + DD_DIRECTDRAW_LOCAL Local; DD_DIRECTDRAW_GLOBAL Global; // Drv callbacks Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c Sun Aug 27 20:51:11 2006 @@ -916,7 +916,7 @@ static LOGFONTW DefaultFont = { -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - L"Bitstream Vera Sans" + L"MS Sans Serif" }; RtlZeroMemory(&QueryTable, sizeof(QueryTable)); Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/stockobj.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/stockobj.c Sun Aug 27 20:51:11 2006 @@ -80,11 +80,11 @@ static LOGFONTW OEMFixedFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET, - 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" }; + 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New" }; //Bitstream Vera Sans Mono static LOGFONTW AnsiFixedFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" }; + 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New" }; //Bitstream Vera Sans Mono /*static LOGFONTW AnsiVarFont = *{ 10, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, @@ -92,20 +92,20 @@ static LOGFONTW SystemFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" }; + 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Courier New" }; //Bitstream Vera Sans static LOGFONTW DeviceDefaultFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" }; + 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" }; //Bitstream Vera Sans static LOGFONTW SystemFixedFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" }; - + 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New" }; //Bitstream Vera Sans Mono + /* FIXME: Is this correct? */ static LOGFONTW DefaultGuiFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" }; + 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" }; //Bitstream Vera Sans #define NB_STOCK_OBJECTS (DEFAULT_GUI_FONT + 1)
18 years, 4 months
1
0
0
0
[turner] 23748: Mark as 0.3.0 Release
by turner@svn.reactos.org
Author: turner Date: Sun Aug 27 20:28:01 2006 New Revision: 23748 URL:
http://svn.reactos.org/svn/reactos?rev=23748&view=rev
Log: Mark as 0.3.0 Release Modified: branches/ros-branch-0_3_0/reactos/include/reactos/version.h Modified: branches/ros-branch-0_3_0/reactos/include/reactos/version.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_0/reactos/includ…
============================================================================== --- branches/ros-branch-0_3_0/reactos/include/reactos/version.h (original) +++ branches/ros-branch-0_3_0/reactos/include/reactos/version.h Sun Aug 27 20:28:01 2006 @@ -22,7 +22,7 @@ #define KERNEL_VERSION_PATCH_LEVEL 0 /* KERNEL_VERSION_BUILD_TYPE is L"SVN", L"RC1", L"RC2" or L"RELEASE" */ -#define KERNEL_VERSION_BUILD_TYPE L"RC3" +#define KERNEL_VERSION_BUILD_TYPE L"RELEASE" #endif
18 years, 4 months
1
0
0
0
[hpoussin] 23747: Set user locale at login. User interface may now be (again) in other languages than English
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun Aug 27 19:18:20 2006 New Revision: 23747 URL:
http://svn.reactos.org/svn/reactos?rev=23747&view=rev
Log: Set user locale at login. User interface may now be (again) in other languages than English Modified: trunk/reactos/base/system/winlogon/sas.c Modified: trunk/reactos/base/system/winlogon/sas.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/sas.c…
============================================================================== --- trunk/reactos/base/system/winlogon/sas.c (original) +++ trunk/reactos/base/system/winlogon/sas.c Sun Aug 27 19:18:20 2006 @@ -35,6 +35,113 @@ L"taskmgr.exe"); } +BOOL +SetDefaultLanguage( + IN BOOL UserProfile) +{ + HKEY BaseKey; + LPCWSTR SubKey; + LPCWSTR ValueName; + LONG rc; + HKEY hKey = NULL; + DWORD dwType, dwSize; + LPWSTR Value = NULL; + UNICODE_STRING ValueString; + NTSTATUS Status; + LCID Lcid; + BOOL ret = FALSE; + + if (UserProfile) + { + BaseKey = HKEY_CURRENT_USER; + SubKey = L"Control Panel\\International"; + ValueName = L"Locale"; + } + else + { + BaseKey = HKEY_LOCAL_MACHINE; + SubKey = L"System\\CurrentControlSet\\Control\\Nls\\Language"; + ValueName = L"Default"; + } + + rc = RegOpenKeyExW( + BaseKey, + SubKey, + 0, + KEY_READ, + &hKey); + if (rc != ERROR_SUCCESS) + { + TRACE("RegOpenKeyEx() failed with error %lu\n", rc); + goto cleanup; + } + rc = RegQueryValueExW( + hKey, + ValueName, + NULL, + &dwType, + NULL, + &dwSize); + if (rc != ERROR_SUCCESS) + { + TRACE("RegQueryValueEx() failed with error %lu\n", rc); + goto cleanup; + } + else if (dwType != REG_SZ) + { + TRACE("Wrong type for %S\\%S registry entry (got 0x%lx, expected 0x%lx)\n", + SubKey, ValueName, dwType, REG_SZ); + goto cleanup; + } + + Value = HeapAlloc(GetProcessHeap(), 0, dwSize + sizeof(UNICODE_NULL)); + if (!Value) + { + TRACE("HeapAlloc() failed\n"); + goto cleanup; + } + Value[dwSize / sizeof(WCHAR)] = UNICODE_NULL; + rc = RegQueryValueExW( + hKey, + ValueName, + NULL, + NULL, + (LPBYTE)Value, + &dwSize); + if (rc != ERROR_SUCCESS) + { + TRACE("RegQueryValueEx() failed with error %lu\n", rc); + goto cleanup; + } + + /* Convert Value to a Lcid */ + RtlInitUnicodeString(&ValueString, Value); + Status = RtlUnicodeStringToInteger(&ValueString, 16, &Lcid); + if (!NT_SUCCESS(Status)) + { + TRACE("RtlUnicodeStringToInteger() failed with status 0x%08lx\n", Status); + goto cleanup; + } + + TRACE("%s language is 0x%08lx\n", + UserProfile ? "User" : "System", Lcid); + Status = NtSetDefaultLocale(UserProfile, Lcid); + if (!NT_SUCCESS(Status)) + { + TRACE("NtSetDefaultLocale() failed with status 0x%08lx\n", Status); + goto cleanup; + } + + ret = TRUE; + +cleanup: + if (hKey) + RegCloseKey(hKey); + if (Value) + HeapFree(GetProcessHeap(), 0, Value); + return ret; +} + static BOOL HandleLogon( IN OUT PWLSESSION Session) @@ -85,6 +192,10 @@ //DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_LOADINGYOURPERSONALSETTINGS); //DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_APPLYINGYOURPERSONALSETTINGS); + /* Set default language */ + if (!SetDefaultLanguage(TRUE)) + return FALSE; + if (!Session->Gina.Functions.WlxActivateUserShell( Session->Gina.Context, L"Default", @@ -329,6 +440,8 @@ SwitchDesktop(Session->ApplicationDesktop); Session->LogonStatus = WKSTA_IS_LOGGED_ON; } + else + Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context); break; case WLX_SAS_ACTION_NONE: /* 0x02 */ break; @@ -682,6 +795,9 @@ goto cleanup; } + if (!SetDefaultLanguage(FALSE)) + return FALSE; + ret = TRUE; cleanup:
18 years, 4 months
1
0
0
0
[greatlrd] 23746: sorry wrong version
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Aug 27 18:55:31 2006 New Revision: 23746 URL:
http://svn.reactos.org/svn/reactos?rev=23746&view=rev
Log: sorry wrong version Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddr…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Sun Aug 27 18:55:31 2006 @@ -753,7 +753,7 @@ LPDDSURFACEDESC2 pDDSD, LPVOID context, LPDDENUMMODESCALLBACK2 callback) { - DX_STUB_DD_OK(); + DX_STUB_DD_OK; IDirectDrawImpl* This = (IDirectDrawImpl*)iface; DDSURFACEDESC2 desc_callback;
18 years, 4 months
1
0
0
0
[greatlrd] 23745: fix a crash in quake
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Aug 27 18:53:32 2006 New Revision: 23745 URL:
http://svn.reactos.org/svn/reactos?rev=23745&view=rev
Log: fix a crash in quake Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddr…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Sun Aug 27 18:53:32 2006 @@ -753,6 +753,8 @@ LPDDSURFACEDESC2 pDDSD, LPVOID context, LPDDENUMMODESCALLBACK2 callback) { + DX_STUB_DD_OK(); + IDirectDrawImpl* This = (IDirectDrawImpl*)iface; DDSURFACEDESC2 desc_callback; DEVMODE DevMode;
18 years, 4 months
1
0
0
0
[cwittich] 23744: forgot to commit these files
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Aug 27 18:20:17 2006 New Revision: 23744 URL:
http://svn.reactos.org/svn/reactos?rev=23744&view=rev
Log: forgot to commit these files Added: trunk/reactos/boot/bootdata/bootcdregtest/ trunk/reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild trunk/reactos/boot/bootdata/livecdregtest/ trunk/reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild Modified: trunk/reactos/boot/bootdata/bootdata.rbuild Added: trunk/reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/bootcdregtes…
============================================================================== --- trunk/reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild (added) +++ trunk/reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild Sun Aug 27 18:20:17 2006 @@ -1,0 +1,2 @@ +<module name="bootcdregtest" type="isoregtest"> +</module> Modified: trunk/reactos/boot/bootdata/bootdata.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/bootdata.rbu…
============================================================================== --- trunk/reactos/boot/bootdata/bootdata.rbuild (original) +++ trunk/reactos/boot/bootdata/bootdata.rbuild Sun Aug 27 18:20:17 2006 @@ -14,4 +14,10 @@ <directory name="livecd"> <xi:include href="livecd/livecd.rbuild" /> </directory> +<directory name="bootcdregtest"> + <xi:include href="bootcdregtest/bootcdregtest.rbuild" /> +</directory> +<directory name="livecdregtest"> + <xi:include href="livecdregtest/livecdregtest.rbuild" /> +</directory> </group> Added: trunk/reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/livecdregtes…
============================================================================== --- trunk/reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild (added) +++ trunk/reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild Sun Aug 27 18:20:17 2006 @@ -1,0 +1,2 @@ +<module name="livecdregtest" type="liveisoregtest"> +</module>
18 years, 4 months
1
0
0
0
[cwittich] 23743: added LiveCDRegTest and BootCDRegTest targets
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Aug 27 17:28:23 2006 New Revision: 23743 URL:
http://svn.reactos.org/svn/reactos?rev=23743&view=rev
Log: added LiveCDRegTest and BootCDRegTest targets Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp trunk/reactos/tools/rbuild/bootstrap.cpp trunk/reactos/tools/rbuild/module.cpp trunk/reactos/tools/rbuild/rbuild.h Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp Sun Aug 27 17:28:23 2006 @@ -437,6 +437,10 @@ if ( module.type == Iso ) return false; if ( module.type == LiveIso ) + return false; + if ( module.type == IsoRegTest ) + return false; + if ( module.type == LiveIsoRegTest ) return false; if ( module.type == Test ) return false; Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Sun Aug 27 17:28:23 2006 @@ -241,6 +241,12 @@ case LiveIso: handler = new MingwLiveIsoModuleHandler ( module ); break; + case IsoRegTest: + handler = new MingwIsoModuleHandler ( module ); + break; + case LiveIsoRegTest: + handler = new MingwLiveIsoModuleHandler ( module ); + break; case Test: handler = new MingwTestModuleHandler ( module ); break; @@ -3006,9 +3012,25 @@ string bootcd = PassThruCacheDirectory ( NormalizeFilename ( bootcdDirectory + sSep ), backend->outputDirectory ); + + string bootloader; + string IsoName; + + if (module.name == "bootcdregtest") + { + bootloader = "isobtrt.o"; + IsoName = "ReactOS-RegTest.iso"; + } + else + { + bootloader = "isoboot.o"; + IsoName = "ReactOS.iso"; + } + string isoboot = PassThruCacheDirectory ( - NormalizeFilename ( "boot" + sSep + "freeldr" + sSep + "bootsect" + sSep + "isoboot.o" ), + NormalizeFilename ( "boot" + sSep + "freeldr" + sSep + "bootsect" + sSep + bootloader.c_str() ), backend->outputDirectory ); + string bootcdReactosNoFixup = bootcdDirectory + sSep + "reactos"; string bootcdReactos = PassThruCacheDirectory ( NormalizeFilename ( bootcdReactosNoFixup + sSep ), @@ -3049,9 +3071,10 @@ OutputCdfileCopyCommands ( bootcdDirectory ); fprintf ( fMakefile, "\t$(ECHO_CDMAKE)\n" ); fprintf ( fMakefile, - "\t$(Q)$(CDMAKE_TARGET) -v -m -b %s %s REACTOS ReactOS.iso\n", + "\t$(Q)$(CDMAKE_TARGET) -v -m -b %s %s REACTOS %s\n", isoboot.c_str (), - bootcd.c_str () ); + bootcd.c_str (), + IsoName.c_str() ); fprintf ( fMakefile, "\n" ); } @@ -3175,13 +3198,29 @@ void MingwLiveIsoModuleHandler::GenerateLiveIsoModuleTarget () { - string livecdDirectory = "livecd"; + string livecdDirectory = module.name; string livecd = PassThruCacheDirectory ( NormalizeFilename ( livecdDirectory + sSep ), backend->outputDirectory ); + + string bootloader; + string IsoName; + + if (module.name == "livecdregtest") + { + bootloader = "isobtrt.o"; + IsoName = "ReactOS-LiveCD-RegTest.iso"; + } + else + { + bootloader = "isoboot.o"; + IsoName = "ReactOS-LiveCD.iso"; + } + string isoboot = PassThruCacheDirectory ( - NormalizeFilename ( "boot" + sSep + "freeldr" + sSep + "bootsect" + sSep + "isoboot.o" ), + NormalizeFilename ( "boot" + sSep + "freeldr" + sSep + "bootsect" + sSep + bootloader.c_str() ), backend->outputDirectory ); + string reactosDirectory = "reactos"; string livecdReactosNoFixup = livecdDirectory + sSep + reactosDirectory; string livecdReactos = NormalizeFilename ( PassThruCacheDirectory ( @@ -3205,9 +3244,10 @@ OutputRegistryCommands ( livecdDirectory ); fprintf ( fMakefile, "\t$(ECHO_CDMAKE)\n" ); fprintf ( fMakefile, - "\t$(Q)$(CDMAKE_TARGET) -v -m -j -b %s %s REACTOS ReactOS-LiveCD.iso\n", + "\t$(Q)$(CDMAKE_TARGET) -v -m -j -b %s %s REACTOS %s\n", isoboot.c_str (), - livecd.c_str () ); + livecd.c_str (), + IsoName.c_str() ); fprintf ( fMakefile, "\n" ); } Modified: trunk/reactos/tools/rbuild/bootstrap.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/bootstrap.cpp…
============================================================================== --- trunk/reactos/tools/rbuild/bootstrap.cpp (original) +++ trunk/reactos/tools/rbuild/bootstrap.cpp Sun Aug 27 17:28:23 2006 @@ -60,6 +60,8 @@ case ObjectLibrary: case Iso: case LiveIso: + case IsoRegTest: + case LiveIsoRegTest: case Test: case RpcServer: case RpcClient: Modified: trunk/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/module.cpp (original) +++ trunk/reactos/tools/rbuild/module.cpp Sun Aug 27 17:28:23 2006 @@ -757,6 +757,10 @@ return Iso; if ( attribute.value == "liveiso" ) return LiveIso; + if ( attribute.value == "isoregtest" ) + return IsoRegTest; + if ( attribute.value == "liveisoregtest" ) + return LiveIsoRegTest; if ( attribute.value == "test" ) return Test; if ( attribute.value == "rpcserver" ) @@ -803,6 +807,8 @@ return ".o"; case Iso: case LiveIso: + case IsoRegTest: + case LiveIsoRegTest: return ".iso"; case Test: return ".exe"; @@ -855,6 +861,8 @@ case BootSector: case Iso: case LiveIso: + case IsoRegTest: + case LiveIsoRegTest: case RpcServer: case RpcClient: case Alias: @@ -894,6 +902,8 @@ case BootSector: case Iso: case LiveIso: + case IsoRegTest: + case LiveIsoRegTest: case RpcServer: case RpcClient: case Alias: @@ -936,6 +946,8 @@ case BootProgram: case Iso: case LiveIso: + case IsoRegTest: + case LiveIsoRegTest: case RpcServer: case RpcClient: case Alias: @@ -968,6 +980,8 @@ case BootProgram: case Iso: case LiveIso: + case IsoRegTest: + case LiveIsoRegTest: return true; case StaticLibrary: case ObjectLibrary: @@ -1435,6 +1449,8 @@ case ObjectLibrary: case Iso: case LiveIso: + case IsoRegTest: + case LiveIsoRegTest: case Test: case RpcServer: case RpcClient: Modified: trunk/reactos/tools/rbuild/rbuild.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=…
============================================================================== --- trunk/reactos/tools/rbuild/rbuild.h (original) +++ trunk/reactos/tools/rbuild/rbuild.h Sun Aug 27 17:28:23 2006 @@ -268,7 +268,9 @@ BootProgram = 19, Win32SCR = 20, ExportDriver = 21, - IdlHeader = 22 + IdlHeader = 22, + IsoRegTest = 23, + LiveIsoRegTest = 24 }; enum HostType
18 years, 4 months
1
0
0
0
[cwittich] 23742: renamed isoboot_regtest.asm to isobtrt.asm to comply with ISO-9660 standard
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Aug 27 17:26:43 2006 New Revision: 23742 URL:
http://svn.reactos.org/svn/reactos?rev=23742&view=rev
Log: renamed isoboot_regtest.asm to isobtrt.asm to comply with ISO-9660 standard Added: trunk/reactos/boot/freeldr/bootsect/isobtrt.asm - copied unchanged from r23740, trunk/reactos/boot/freeldr/bootsect/isoboot_regtest.asm Removed: trunk/reactos/boot/freeldr/bootsect/isoboot_regtest.asm Modified: trunk/reactos/boot/freeldr/bootsect/bootsect.rbuild Modified: trunk/reactos/boot/freeldr/bootsect/bootsect.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/boot…
============================================================================== --- trunk/reactos/boot/freeldr/bootsect/bootsect.rbuild (original) +++ trunk/reactos/boot/freeldr/bootsect/bootsect.rbuild Sun Aug 27 17:26:43 2006 @@ -18,9 +18,9 @@ <bootstrap base="loader" nameoncd="isoboot.bin" /> <file>isoboot.asm</file> </module> -<module name="isoboot_regtest" type="bootsector"> - <bootstrap base="loader" nameoncd="isoboot_regtest.bin" /> - <file>isoboot_regtest.asm</file> +<module name="isobtrt" type="bootsector"> + <bootstrap base="loader" nameoncd="isobtrt.bin" /> + <file>isobtrt.asm</file> </module> <if property="ARCH" value="powerpc"> <module name="ofwldr" type="bootprogram" payload="freeldr"> Removed: trunk/reactos/boot/freeldr/bootsect/isoboot_regtest.asm URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/isob…
============================================================================== --- trunk/reactos/boot/freeldr/bootsect/isoboot_regtest.asm (original) +++ trunk/reactos/boot/freeldr/bootsect/isoboot_regtest.asm (removed) @@ -1,1023 +1,0 @@ -; **************************************************************************** -; -; isolinux.asm -; -; A program to boot Linux kernels off a CD-ROM using the El Torito -; boot standard in "no emulation" mode, making the entire filesystem -; available. It is based on the SYSLINUX boot loader for MS-DOS -; floppies. -; -; Copyright (C) 1994-2001 H. Peter Anvin -; -; This program is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, -; USA; either version 2 of the License, or (at your option) any later -; version; incorporated herein by reference. -; -; **************************************************************************** -; -; THIS FILE IS A MODIFIED VERSION OF ISOLINUX.ASM -; MODIFICATION DONE BY MICHAEL K TER LOUW -; LAST UPDATED 3-9-2002 -; SEE "COPYING" FOR INFORMATION ABOUT THE LICENSE THAT APPLIES TO THIS RELEASE -; -; **************************************************************************** -; -; This file is a modified version of ISOLINUX.ASM. -; Modification done by Eric Kohl -; Last update 04-25-2002 -; -; **************************************************************************** -; -; This file is a modified version of ISOLINUX.ASM. -; (for ReactOS regression testing) -; Modification done by Christoph von Wittich -; Last update 08-27-2006 -; -; **************************************************************************** - - -; Note: The Makefile builds one version with DEBUG_MESSAGES automatically. -;%define DEBUG_MESSAGES ; Uncomment to get debugging messages - -%define WAIT_FOR_KEY - - -; --------------------------------------------------------------------------- -; BEGIN THE BIOS/CODE/DATA SEGMENT -; --------------------------------------------------------------------------- - - absolute 0400h -serial_base resw 4 ; Base addresses for 4 serial ports - absolute 0413h -BIOS_fbm resw 1 ; Free Base Memory (kilobytes) - absolute 046Ch -BIOS_timer resw 1 ; Timer ticks - absolute 0472h -BIOS_magic resw 1 ; BIOS reset magic - absolute 0484h -BIOS_vidrows resb 1 ; Number of screen rows - -; -; Memory below this point is reserved for the BIOS and the MBR -; - absolute 1000h -trackbuf resb 8192 ; Track buffer goes here -trackbufsize equ $-trackbuf -; trackbuf ends at 3000h - - struc open_file_t -file_sector resd 1 ; Sector pointer (0 = structure free) -file_left resd 1 ; Number of sectors left - endstruc - - struc dir_t -dir_lba resd 1 ; Directory start (LBA) -dir_len resd 1 ; Length in bytes -dir_clust resd 1 ; Length in clusters - endstruc - - -MAX_OPEN_LG2 equ 2 ; log2(Max number of open files) -MAX_OPEN equ (1 << MAX_OPEN_LG2) -SECTORSIZE_LG2 equ 11 ; 2048 bytes/sector (El Torito requirement) -SECTORSIZE equ (1 << SECTORSIZE_LG2) -CR equ 13 ; Carriage Return -LF equ 10 ; Line Feed -retry_count equ 6 ; How patient are we with the BIOS? - - - - absolute 5000h ; Here we keep our BSS stuff - -DriveNo resb 1 ; CD-ROM BIOS drive number -DiskError resb 1 ; Error code for disk I/O -RetryCount resb 1 ; Used for disk access retries -TimeoutCount resb 1 ; Timeout counter -ISOFlags resb 1 ; Flags for ISO directory search -RootDir resb dir_t_size ; Root directory -CurDir resb dir_t_size ; Current directory -ISOFileName resb 64 ; ISO filename canonicalization buffer -ISOFileNameEnd equ $ - - - alignb open_file_t_size -Files resb MAX_OPEN*open_file_t_size - - - - section .text - org 7000h - -start: - cli ; Disable interrupts - xor ax, ax ; ax = segment zero - mov ss, ax ; Initialize stack segment - mov sp, start ; Set up stack - mov ds, ax ; Initialize other segment registers - mov es, ax - mov fs, ax - mov gs, ax - sti ; Enable interrupts - cld ; Increment pointers - - mov cx, 2048 >> 2 ; Copy the bootsector - mov si, 0x7C00 ; from 0000:7C00 - mov di, 0x7000 ; to 0000:7000 - rep movsd ; copy the program - jmp 0:relocate ; jump into relocated code - -relocate: - ; Display the banner and copyright -%ifdef DEBUG_MESSAGES - mov si, isolinux_banner ; si points to hello message - call writestr ; display the message - mov si,copyright_str - call writestr -%endif - - - ; Make sure the keyboard buffer is empty -%ifdef WAIT_FOR_KEY -.kbd_buffer_test: - call pollchar - jz .kbd_buffer_empty - call getchar - jmp .kbd_buffer_test -.kbd_buffer_empty: - - ; Check if there is harddisk - pusha - mov ax, 0800h - mov dx, 0080h - int 13h - popa - jmp .boot_cdrom - - ; Display the 'Press key' message and wait for a maximum of 5 seconds - call crlf - mov si, presskey_msg ; si points to 'Press key' message - call writestr ; display the message - - mov byte [TimeoutCount], 5 -.next_second: - mov eax, [BIOS_timer] ; load current tick counter - add eax, 19 ; - -.poll_again: - call pollchar - jnz .boot_cdrom - - mov ebx, [BIOS_timer] - cmp eax, ebx - jnz .poll_again - - mov si, dot_msg ; print '.' - call writestr - dec byte [TimeoutCount] ; decrement timeout counter - jz .boot_harddisk - jmp .next_second - -.boot_harddisk: - call crlf - - ; Boot first harddisk (drive 0x80) - mov ax, 0201h - mov dx, 0080h - mov cx, 0001h - mov bx, 7C00h - int 13h - jnc .go_hd - jmp kaboom -.go_hd: - mov ax, cs - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov dx, 0080h - - jmp 0:0x7C00 -%endif - -.boot_cdrom: -%ifdef WAIT_FOR_KEY - call crlf - call crlf -%endif - - ; Save and display the boot drive number - mov [DriveNo], dl -%ifdef DEBUG_MESSAGES - mov si, startup_msg - call writemsg - mov al, dl - call writehex2 - call crlf -%endif - - ; Now figure out what we're actually doing - ; Note: use passed-in DL value rather than 7Fh because - ; at least some BIOSes will get the wrong value otherwise - mov ax, 4B01h ; Get disk emulation status - mov dl, [DriveNo] - mov si, spec_packet - int 13h - jc near spec_query_failed ; Shouldn't happen (BIOS bug) - mov dl, [DriveNo] - cmp [sp_drive], dl ; Should contain the drive number - jne near spec_query_failed - -%ifdef DEBUG_MESSAGES - mov si, spec_ok_msg - call writemsg - mov al, byte [sp_drive] - call writehex2 - call crlf -%endif - -found_drive: - ; Get drive information - mov ah, 48h - mov dl, [DriveNo] - mov si, drive_params - int 13h - jnc params_ok - - ; mov si, nosecsize_msg No use in reporting this - ; call writemsg - -params_ok: - ; Check for the sector size (should be 2048, but - ; some BIOSes apparently think we're 512-byte media) - ; - ; FIX: We need to check what the proper behaviour - ; is for getlinsec when the BIOS thinks the sector - ; size is 512!!! For that, we need such a BIOS, though... -%ifdef DEBUG_MESSAGES - mov si, secsize_msg - call writemsg - mov ax, [dp_secsize] - call writehex4 - call crlf -%endif - - - ; - ; Clear Files structures - ; - mov di, Files - mov cx, (MAX_OPEN*open_file_t_size)/4 - xor eax, eax - rep stosd - - ; - ; Now, we need to sniff out the actual filesystem data structures. - ; mkisofs gave us a pointer to the primary volume descriptor - ; (which will be at 16 only for a single-session disk!); from the PVD - ; we should be able to find the rest of what we need to know. - ; -get_fs_structures: - mov eax, 16 ; Primary Volume Descriptor (sector 16) - mov bx, trackbuf - call getonesec - - mov eax, [trackbuf+156+2] - mov [RootDir+dir_lba],eax - mov [CurDir+dir_lba],eax -%ifdef DEBUG_MESSAGES - mov si, rootloc_msg - call writemsg - call writehex8 - call crlf -%endif - - mov eax,[trackbuf+156+10] - mov [RootDir+dir_len],eax - mov [CurDir+dir_len],eax -%ifdef DEBUG_MESSAGES - mov si, rootlen_msg - call writemsg - call writehex8 - call crlf -%endif - add eax,SECTORSIZE-1 - shr eax,SECTORSIZE_LG2 - mov [RootDir+dir_clust],eax - mov [CurDir+dir_clust],eax -%ifdef DEBUG_MESSAGES - mov si, rootsect_msg - call writemsg - call writehex8 - call crlf -%endif - - ; Look for the "REACTOS" directory, and if found, - ; make it the current directory instead of the root - ; directory. - mov di,isolinux_dir - mov al,02h ; Search for a directory - call searchdir_iso - jnz .dir_found - mov si,no_dir_msg - call writemsg - jmp kaboom - -.dir_found: - mov [CurDir+dir_len],eax - mov eax,[si+file_left] - mov [CurDir+dir_clust],eax - xor eax,eax ; Free this file pointer entry - xchg eax,[si+file_sector] - mov [CurDir+dir_lba],eax - - - mov di, isolinux_bin ; di points to Isolinux filename - call searchdir ; look for the file - jnz .isolinux_opened ; got the file - mov si, no_isolinux_msg ; si points to error message - call writemsg ; display the message - jmp kaboom ; fail boot - -.isolinux_opened: - mov di, si ; save file pointer - -%ifdef DEBUG_MESSAGES - mov si, filelen_msg - call writemsg - call writehex8 - call crlf -%endif - - mov ecx, eax ; calculate sector count - shr ecx, 11 - test eax, 0x7FF - jz .full_sector - inc ecx -.full_sector: - -%ifdef DEBUG_MESSAGES - mov eax, ecx - mov si, filesect_msg - call writemsg - call writehex8 - call crlf -%endif - - mov bx, 0x8000 ; bx = load address - mov si, di ; restore file pointer - mov cx, 0xFFFF ; load the whole file - call getfssec ; get the whole file - -%ifdef DEBUG_MESSAGES - mov si, startldr_msg - call writemsg - call crlf -%endif - - mov dl, [DriveNo] ; dl = boot drive - mov dh, 0 ; dh = boot partition - jmp 0:0x8000 ; jump into OSLoader - - - -; -; searchdir: -; -; Open a file -; -; On entry: -; DS:DI = filename -; If successful: -; ZF clear -; SI = file pointer -; DX:AX or EAX = file length in bytes -; If unsuccessful -; ZF set -; - -; -; searchdir_iso is a special entry point for ISOLINUX only. In addition -; to the above, searchdir_iso passes a file flag mask in AL. This is useful -; for searching for directories. -; -alloc_failure: - xor ax,ax ; ZF <- 1 - ret - -searchdir: - xor al,al -searchdir_iso: - mov [ISOFlags],al - call allocate_file ; Temporary file structure for directory - jnz alloc_failure - push es - push ds - pop es ; ES = DS - mov si,CurDir - cmp byte [di],'\' ; If filename begins with slash - jne .not_rooted - inc di ; Skip leading slash - mov si,RootDir ; Reference root directory instead -.not_rooted: - mov eax,[si+dir_clust] - mov [bx+file_left],eax - mov eax,[si+dir_lba] - mov [bx+file_sector],eax - mov edx,[si+dir_len] - -.look_for_slash: - mov ax,di -.scan: - mov cl,[di] - inc di - and cl,cl - jz .isfile - cmp cl,'\' - jne .scan - mov [di-1],byte 0 ; Terminate at directory name - mov cl,02h ; Search for directory - xchg cl,[ISOFlags] - push di - push cx - push word .resume ; Where to "return" to - push es -.isfile: - xchg ax,di - -.getsome: - ; Get a chunk of the directory - mov si,trackbuf - pushad - xchg bx,si - mov cx,1 ; load one sector - call getfssec - popad - -.compare: - movzx eax, byte [si] ; Length of directory entry - cmp al, 33 - jb .next_sector - mov cl, [si+25] - xor cl, [ISOFlags] - test cl, byte 8Eh ; Unwanted file attributes! - jnz .not_file - pusha - movzx cx, byte [si+32] ; File identifier length - add si, byte 33 ; File identifier offset - call iso_compare_names - popa - je .success -.not_file: - sub edx, eax ; Decrease bytes left - jbe .failure - add si, ax ; Advance pointer - -.check_overrun: - ; Did we finish the buffer? - cmp si, trackbuf+trackbufsize - jb .compare ; No, keep going - - jmp short .getsome ; Get some more directory - -.next_sector: - ; Advance to the beginning of next sector - lea ax, [si+SECTORSIZE-1] - and ax, ~(SECTORSIZE-1) - sub ax, si - jmp short .not_file ; We still need to do length checks - -.failure: -%ifdef DEBUG_MESSAGES - mov si, findfail_msg - call writemsg - call crlf -%endif - xor eax, eax ; ZF = 1 - mov [bx+file_sector], eax - pop es - ret - -.success: - mov eax, [si+2] ; Location of extent - mov [bx+file_sector], eax - mov eax, [si+10] ; Data length - push eax - add eax, SECTORSIZE-1 - shr eax, SECTORSIZE_LG2 - mov [bx+file_left], eax - pop eax - mov edx, eax - shr edx, 16 - and bx, bx ; ZF = 0 - mov si, bx - pop es - ret - -.resume: - ; We get here if we were only doing part of a lookup - ; This relies on the fact that .success returns bx == si - xchg edx, eax ; Directory length in edx - pop cx ; Old ISOFlags - pop di ; Next filename pointer - - mov byte [di-1], '\' ; restore the backslash in the filename - - mov [ISOFlags], cl ; Restore the flags - jz .failure ; Did we fail? If so fail for real! - jmp .look_for_slash ; Otherwise, next level - -; -; allocate_file: Allocate a file structure -; -; If successful: -; ZF set -; BX = file pointer -; In unsuccessful: -; ZF clear -; -allocate_file: - push cx - mov bx, Files - mov cx, MAX_OPEN -.check: - cmp dword [bx], byte 0 - je .found - add bx, open_file_t_size ; ZF = 0 - loop .check - ; ZF = 0 if we fell out of the loop -.found: - pop cx - ret - -; -; iso_compare_names: -; Compare the names DS:SI and DS:DI and report if they are -; equal from an ISO 9660 perspective. SI is the name from -; the filesystem; CX indicates its length, and ';' terminates. -; DI is expected to end with a null. -; -; Note: clobbers AX, CX, SI, DI; assumes DS == ES == base segment -; -iso_compare_names: - ; First, terminate and canonicalize input filename - push di - mov di, ISOFileName -.canon_loop: - jcxz .canon_end - lodsb - dec cx - cmp al, ';' - je .canon_end - and al, al - je .canon_end - stosb - cmp di, ISOFileNameEnd-1 ; Guard against buffer overrun - jb .canon_loop -.canon_end: - cmp di, ISOFileName - jbe .canon_done - cmp byte [di-1], '.' ; Remove terminal dots - jne .canon_done - dec di - jmp short .canon_end -.canon_done: - mov [di], byte 0 ; Null-terminate string - pop di - mov si, ISOFileName -.compare: - lodsb - mov ah, [di] - inc di - and ax, ax - jz .success ; End of string for both - and al, al ; Is either one end of string? - jz .failure ; If so, failure - and ah, ah - jz .failure - or ax, 2020h ; Convert to lower case - cmp al, ah - je .compare -.failure: - and ax, ax ; ZF = 0 (at least one will be nonzero) -.success: - ret - - - - - - - -; -; getfssec: Get multiple clusters from a file, given the file pointer. -; -; On entry: -; ES:BX -> Buffer -; SI -> File pointer -; CX -> Cluster count; 0FFFFh = until end of file -; On exit: -; SI -> File pointer (or 0 on EOF) -; CF = 1 -> Hit EOF -; -getfssec: - cmp cx, [si+file_left] - jna .ok_size - mov cx, [si+file_left] - -.ok_size: - mov bp, cx - push cx - push si - mov eax, [si+file_sector] - call getlinsec - xor ecx, ecx - pop si - pop cx - - add [si+file_sector], ecx - sub [si+file_left], ecx - ja .not_eof ; CF = 0 - - xor ecx, ecx - mov [si+file_sector], ecx ; Mark as unused - xor si,si - stc - -.not_eof: - ret - - - -; INT 13h, AX=4B01h, DL=<passed in value> failed. -; Try to scan the entire 80h-FFh from the end. -spec_query_failed: - mov si,spec_err_msg - call writemsg - - mov dl, 0FFh -.test_loop: - pusha - mov ax, 4B01h - mov si, spec_packet - mov byte [si], 13 ; Size of buffer - int 13h - popa - jc .still_broken - - mov si, maybe_msg - call writemsg - mov al, dl - call writehex2 - call crlf - - cmp byte [sp_drive], dl - jne .maybe_broken - - ; Okay, good enough... - mov si, alright_msg - call writemsg - mov [DriveNo], dl -.found_drive: - jmp found_drive - - ; Award BIOS 4.51 apparently passes garbage in sp_drive, - ; but if this was the drive number originally passed in - ; DL then consider it "good enough" -.maybe_broken: - cmp byte [DriveNo], dl - je .found_drive - -.still_broken: - dec dx - cmp dl, 80h - jnb .test_loop - -fatal_error: - mov si, nothing_msg - call writemsg - -.norge: - jmp short .norge - - - - ; Information message (DS:SI) output - ; Prefix with "isolinux: " - ; -writemsg: - push ax - push si - mov si, isolinux_str - call writestr - pop si - call writestr - pop ax - ret - -; -; crlf: Print a newline -; -crlf: - mov si, crlf_msg - ; Fall through - -; -; writestr: write a null-terminated string to the console, saving -; registers on entry. -; -writestr: - pushfd - pushad -.top: - lodsb - and al, al - jz .end - call writechr - jmp short .top -.end: - popad - popfd - ret - - -; -; writehex[248]: Write a hex number in (AL, AX, EAX) to the console -; -writehex2: - pushfd - pushad - shl eax, 24 - mov cx, 2 - jmp short writehex_common -writehex4: - pushfd - pushad - shl eax, 16 - mov cx, 4 - jmp short writehex_common -writehex8: - pushfd - pushad - mov cx, 8 -writehex_common: -.loop: - rol eax, 4 - push eax - and al, 0Fh - cmp al, 10 - jae .high -.low: - add al, '0' - jmp short .ischar -.high: - add al, 'A'-10 -.ischar: - call writechr - pop eax - loop .loop - popad - popfd - ret - -; -; Write a character to the screen. There is a more "sophisticated" -; version of this in the subsequent code, so we patch the pointer -; when appropriate. -; - -writechr: - pushfd - pushad - mov ah, 0Eh - xor bx, bx - int 10h - popad - popfd - ret - -; -; Get one sector. Convenience entry point. -; -getonesec: - mov bp, 1 - ; Fall through to getlinsec - -; -; Get linear sectors - EBIOS LBA addressing, 2048-byte sectors. -; -; Note that we can't always do this as a single request, because at least -; Phoenix BIOSes has a 127-sector limit. To be on the safe side, stick -; to 32 sectors (64K) per request. -; -; Input: -; EAX - Linear sector number -; ES:BX - Target buffer -; BP - Sector count -; -getlinsec: - mov si,dapa ; Load up the DAPA - mov [si+4],bx - mov bx,es - mov [si+6],bx - mov [si+8],eax -.loop2: - push bp ; Sectors left - cmp bp,[MaxTransfer] - jbe .bp_ok - mov bp,[MaxTransfer] -.bp_ok: - mov [si+2],bp - push si - mov dl,[DriveNo] - mov ah,42h ; Extended Read - call xint13 - pop si - pop bp - movzx eax,word [si+2] ; Sectors we read - add [si+8],eax ; Advance sector pointer - sub bp,ax ; Sectors left - shl ax,SECTORSIZE_LG2-4 ; 2048-byte sectors -> segment - add [si+6],ax ; Advance buffer pointer - and bp,bp - jnz .loop2 - mov eax,[si+8] ; Next sector - ret - - ; INT 13h with retry -xint13: - mov byte [RetryCount], retry_count -.try: - pushad - int 13h - jc .error - add sp, byte 8*4 ; Clean up stack - ret -.error: - mov [DiskError], ah ; Save error code - popad - dec byte [RetryCount] - jz .real_error - push ax - mov al,[RetryCount] - mov ah,[dapa+2] ; Sector transfer count - cmp al,2 ; Only 2 attempts left - ja .nodanger - mov ah,1 ; Drop transfer size to 1 - jmp short .setsize -.nodanger: - cmp al,retry_count-2 - ja .again ; First time, just try again - shr ah,1 ; Otherwise, try to reduce - adc ah,0 ; the max transfer size, but not to 0 -.setsize: - mov [MaxTransfer],ah - mov [dapa+2],ah -.again: - pop ax - jmp .try - -.real_error: - mov si, diskerr_msg - call writemsg - mov al, [DiskError] - call writehex2 - mov si, ondrive_str - call writestr - mov al, dl - call writehex2 - call crlf - ; Fall through to kaboom - -; -; kaboom: write a message and bail out. Wait for a user keypress, -; then do a hard reboot. -; -kaboom: - mov ax, cs - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - sti - mov si, err_bootfailed - call writestr - call getchar - cli - mov word [BIOS_magic], 0 ; Cold reboot - jmp 0F000h:0FFF0h ; Reset vector address - -getchar: -.again: - mov ah, 1 ; Poll keyboard - int 16h - jz .again -.kbd: - xor ax, ax ; Get keyboard input - int 16h -.func_key: - ret - - -; -; pollchar: check if we have an input character pending (ZF = 0) -; -pollchar: - pushad - mov ah,1 ; Poll keyboard - int 16h - popad - ret - - - -isolinux_banner db CR, LF, 'Loading IsoBoot...', CR, LF, 0 -copyright_str db ' Copyright (C) 1994-2002 H. Peter Anvin', CR, LF, 0 -presskey_msg db 'Press any key to boot from CD', 0 -dot_msg db '.',0 - -%ifdef DEBUG_MESSAGES -startup_msg: db 'Starting up, DL = ', 0 -spec_ok_msg: db 'Loaded spec packet OK, drive = ', 0 -secsize_msg: db 'Sector size appears to be ', 0 -rootloc_msg: db 'Root directory location: ', 0 -rootlen_msg: db 'Root directory length: ', 0 -rootsect_msg: db 'Root directory length(sectors): ', 0 -fileloc_msg: db 'SETUPLDR.SYS location: ', 0 -filelen_msg: db 'SETUPLDR.SYS length: ', 0 -filesect_msg: db 'SETUPLDR.SYS length(sectors): ', 0 -findfail_msg: db 'Failed to find file!', 0 -startldr_msg: db 'Starting SETUPLDR.SYS', 0 -%endif - -nosecsize_msg: db 'Failed to get sector size, assuming 0800', CR, LF, 0 -spec_err_msg: db 'Loading spec packet failed, trying to wing it...', CR, LF, 0 -maybe_msg: db 'Found something at drive = ', 0 -alright_msg: db 'Looks like it might be right, continuing...', CR, LF, 0 -nothing_msg: db 'Failed to locate CD-ROM device; boot failed.', CR, LF, 0 -isolinux_str db 'IsoBoot: ', 0 -crlf_msg db CR, LF, 0 -diskerr_msg: db 'Disk error ', 0 -ondrive_str: db ', drive ', 0 -err_bootfailed db CR, LF, 'Boot failed: press a key to retry...' -isolinux_dir db '\LOADER', 0 -no_dir_msg db 'Could not find the LOADER directory.', CR, LF, 0 -isolinux_bin db 'SETUPLDR.SYS', 0 -no_isolinux_msg db 'Could not find SETUPLDR.SYS.', CR, LF, 0 - -; -; El Torito spec packet -; - align 8, db 0 -spec_packet: db 13h ; Size of packet -sp_media: db 0 ; Media type -sp_drive: db 0 ; Drive number -sp_controller: db 0 ; Controller index -sp_lba: dd 0 ; LBA for emulated disk image -sp_devspec: dw 0 ; IDE/SCSI information -sp_buffer: dw 0 ; User-provided buffer -sp_loadseg: dw 0 ; Load segment -sp_sectors: dw 0 ; Sector count -sp_chs: db 0,0,0 ; Simulated CHS geometry -sp_dummy: db 0 ; Scratch, safe to overwrite - -; -; EBIOS drive parameter packet -; - align 8, db 0 -drive_params: dw 30 ; Buffer size -dp_flags: dw 0 ; Information flags -dp_cyl: dd 0 ; Physical cylinders -dp_head: dd 0 ; Physical heads -dp_sec: dd 0 ; Physical sectors/track -dp_totalsec: dd 0,0 ; Total sectors -dp_secsize: dw 0 ; Bytes per sector -dp_dpte: dd 0 ; Device Parameter Table -dp_dpi_key: dw 0 ; 0BEDDh if rest valid -dp_dpi_len: db 0 ; DPI len - db 0 - dw 0 -dp_bus: times 4 db 0 ; Host bus type -dp_interface: times 8 db 0 ; Interface type -db_i_path: dd 0,0 ; Interface path -db_d_path: dd 0,0 ; Device path - db 0 -db_dpi_csum: db 0 ; Checksum for DPI info - -; -; EBIOS disk address packet -; - align 8, db 0 -dapa: dw 16 ; Packet size -.count: dw 0 ; Block count -.off: dw 0 ; Offset of buffer -.seg: dw 0 ; Segment of buffer -.lba: dd 0 ; LBA (LSW) - dd 0 ; LBA (MSW) - - alignb 4, db 0 -MaxTransfer dw 2 ;32 ; Max sectors per transfer - - times 2046-($-$$) db 0 ; Pad to file offset 2046 - dw 0aa55h ; BootSector signature
18 years, 4 months
1
0
0
0
[frik85] 23741: samba-tng: update the description
by frik85@svn.reactos.org
Author: frik85 Date: Sun Aug 27 16:28:22 2006 New Revision: 23741 URL:
http://svn.reactos.org/svn/reactos?rev=23741&view=rev
Log: samba-tng: update the description Modified: trunk/rosapps/packmgr/tree/samba-tng.xml Modified: trunk/rosapps/packmgr/tree/samba-tng.xml URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/packmgr/tree/samba-tng.xml…
============================================================================== --- trunk/rosapps/packmgr/tree/samba-tng.xml (original) +++ trunk/rosapps/packmgr/tree/samba-tng.xml Sun Aug 27 16:28:22 2006 @@ -1,7 +1,7 @@ <package> <name>Samba-TNG</name> <version>snapshot</version> - <description>The tiny, fast and portable CIFS-Suite.</description> + <description>Command line clients to access files and print over SMB protocol</description> <scripts inst="samba-tng.inst.rps"/> </package>
18 years, 4 months
1
0
0
0
[cwittich] 23740: * added bootloader which can be used for automated regression tests using buildbot
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Aug 27 15:59:01 2006 New Revision: 23740 URL:
http://svn.reactos.org/svn/reactos?rev=23740&view=rev
Log: * added bootloader which can be used for automated regression tests using buildbot Added: trunk/reactos/boot/freeldr/bootsect/isoboot_regtest.asm Modified: trunk/reactos/boot/freeldr/bootsect/bootsect.rbuild Modified: trunk/reactos/boot/freeldr/bootsect/bootsect.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/boot…
============================================================================== --- trunk/reactos/boot/freeldr/bootsect/bootsect.rbuild (original) +++ trunk/reactos/boot/freeldr/bootsect/bootsect.rbuild Sun Aug 27 15:59:01 2006 @@ -18,6 +18,10 @@ <bootstrap base="loader" nameoncd="isoboot.bin" /> <file>isoboot.asm</file> </module> +<module name="isoboot_regtest" type="bootsector"> + <bootstrap base="loader" nameoncd="isoboot_regtest.bin" /> + <file>isoboot_regtest.asm</file> +</module> <if property="ARCH" value="powerpc"> <module name="ofwldr" type="bootprogram" payload="freeldr"> <bootstrap base="loader" nameoncd="boot/ofwldr" /> Added: trunk/reactos/boot/freeldr/bootsect/isoboot_regtest.asm URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/isob…
============================================================================== --- trunk/reactos/boot/freeldr/bootsect/isoboot_regtest.asm (added) +++ trunk/reactos/boot/freeldr/bootsect/isoboot_regtest.asm Sun Aug 27 15:59:01 2006 @@ -1,0 +1,1023 @@ +; **************************************************************************** +; +; isolinux.asm +; +; A program to boot Linux kernels off a CD-ROM using the El Torito +; boot standard in "no emulation" mode, making the entire filesystem +; available. It is based on the SYSLINUX boot loader for MS-DOS +; floppies. +; +; Copyright (C) 1994-2001 H. Peter Anvin +; +; This program is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, +; USA; either version 2 of the License, or (at your option) any later +; version; incorporated herein by reference. +; +; **************************************************************************** +; +; THIS FILE IS A MODIFIED VERSION OF ISOLINUX.ASM +; MODIFICATION DONE BY MICHAEL K TER LOUW +; LAST UPDATED 3-9-2002 +; SEE "COPYING" FOR INFORMATION ABOUT THE LICENSE THAT APPLIES TO THIS RELEASE +; +; **************************************************************************** +; +; This file is a modified version of ISOLINUX.ASM. +; Modification done by Eric Kohl +; Last update 04-25-2002 +; +; **************************************************************************** +; +; This file is a modified version of ISOLINUX.ASM. +; (for ReactOS regression testing) +; Modification done by Christoph von Wittich +; Last update 08-27-2006 +; +; **************************************************************************** + + +; Note: The Makefile builds one version with DEBUG_MESSAGES automatically. +;%define DEBUG_MESSAGES ; Uncomment to get debugging messages + +%define WAIT_FOR_KEY + + +; --------------------------------------------------------------------------- +; BEGIN THE BIOS/CODE/DATA SEGMENT +; --------------------------------------------------------------------------- + + absolute 0400h +serial_base resw 4 ; Base addresses for 4 serial ports + absolute 0413h +BIOS_fbm resw 1 ; Free Base Memory (kilobytes) + absolute 046Ch +BIOS_timer resw 1 ; Timer ticks + absolute 0472h +BIOS_magic resw 1 ; BIOS reset magic + absolute 0484h +BIOS_vidrows resb 1 ; Number of screen rows + +; +; Memory below this point is reserved for the BIOS and the MBR +; + absolute 1000h +trackbuf resb 8192 ; Track buffer goes here +trackbufsize equ $-trackbuf +; trackbuf ends at 3000h + + struc open_file_t +file_sector resd 1 ; Sector pointer (0 = structure free) +file_left resd 1 ; Number of sectors left + endstruc + + struc dir_t +dir_lba resd 1 ; Directory start (LBA) +dir_len resd 1 ; Length in bytes +dir_clust resd 1 ; Length in clusters + endstruc + + +MAX_OPEN_LG2 equ 2 ; log2(Max number of open files) +MAX_OPEN equ (1 << MAX_OPEN_LG2) +SECTORSIZE_LG2 equ 11 ; 2048 bytes/sector (El Torito requirement) +SECTORSIZE equ (1 << SECTORSIZE_LG2) +CR equ 13 ; Carriage Return +LF equ 10 ; Line Feed +retry_count equ 6 ; How patient are we with the BIOS? + + + + absolute 5000h ; Here we keep our BSS stuff + +DriveNo resb 1 ; CD-ROM BIOS drive number +DiskError resb 1 ; Error code for disk I/O +RetryCount resb 1 ; Used for disk access retries +TimeoutCount resb 1 ; Timeout counter +ISOFlags resb 1 ; Flags for ISO directory search +RootDir resb dir_t_size ; Root directory +CurDir resb dir_t_size ; Current directory +ISOFileName resb 64 ; ISO filename canonicalization buffer +ISOFileNameEnd equ $ + + + alignb open_file_t_size +Files resb MAX_OPEN*open_file_t_size + + + + section .text + org 7000h + +start: + cli ; Disable interrupts + xor ax, ax ; ax = segment zero + mov ss, ax ; Initialize stack segment + mov sp, start ; Set up stack + mov ds, ax ; Initialize other segment registers + mov es, ax + mov fs, ax + mov gs, ax + sti ; Enable interrupts + cld ; Increment pointers + + mov cx, 2048 >> 2 ; Copy the bootsector + mov si, 0x7C00 ; from 0000:7C00 + mov di, 0x7000 ; to 0000:7000 + rep movsd ; copy the program + jmp 0:relocate ; jump into relocated code + +relocate: + ; Display the banner and copyright +%ifdef DEBUG_MESSAGES + mov si, isolinux_banner ; si points to hello message + call writestr ; display the message + mov si,copyright_str + call writestr +%endif + + + ; Make sure the keyboard buffer is empty +%ifdef WAIT_FOR_KEY +.kbd_buffer_test: + call pollchar + jz .kbd_buffer_empty + call getchar + jmp .kbd_buffer_test +.kbd_buffer_empty: + + ; Check if there is harddisk + pusha + mov ax, 0800h + mov dx, 0080h + int 13h + popa + jmp .boot_cdrom + + ; Display the 'Press key' message and wait for a maximum of 5 seconds + call crlf + mov si, presskey_msg ; si points to 'Press key' message + call writestr ; display the message + + mov byte [TimeoutCount], 5 +.next_second: + mov eax, [BIOS_timer] ; load current tick counter + add eax, 19 ; + +.poll_again: + call pollchar + jnz .boot_cdrom + + mov ebx, [BIOS_timer] + cmp eax, ebx + jnz .poll_again + + mov si, dot_msg ; print '.' + call writestr + dec byte [TimeoutCount] ; decrement timeout counter + jz .boot_harddisk + jmp .next_second + +.boot_harddisk: + call crlf + + ; Boot first harddisk (drive 0x80) + mov ax, 0201h + mov dx, 0080h + mov cx, 0001h + mov bx, 7C00h + int 13h + jnc .go_hd + jmp kaboom +.go_hd: + mov ax, cs + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov dx, 0080h + + jmp 0:0x7C00 +%endif + +.boot_cdrom: +%ifdef WAIT_FOR_KEY + call crlf + call crlf +%endif + + ; Save and display the boot drive number + mov [DriveNo], dl +%ifdef DEBUG_MESSAGES + mov si, startup_msg + call writemsg + mov al, dl + call writehex2 + call crlf +%endif + + ; Now figure out what we're actually doing + ; Note: use passed-in DL value rather than 7Fh because + ; at least some BIOSes will get the wrong value otherwise + mov ax, 4B01h ; Get disk emulation status + mov dl, [DriveNo] + mov si, spec_packet + int 13h + jc near spec_query_failed ; Shouldn't happen (BIOS bug) + mov dl, [DriveNo] + cmp [sp_drive], dl ; Should contain the drive number + jne near spec_query_failed + +%ifdef DEBUG_MESSAGES + mov si, spec_ok_msg + call writemsg + mov al, byte [sp_drive] + call writehex2 + call crlf +%endif + +found_drive: + ; Get drive information + mov ah, 48h + mov dl, [DriveNo] + mov si, drive_params + int 13h + jnc params_ok + + ; mov si, nosecsize_msg No use in reporting this + ; call writemsg + +params_ok: + ; Check for the sector size (should be 2048, but + ; some BIOSes apparently think we're 512-byte media) + ; + ; FIX: We need to check what the proper behaviour + ; is for getlinsec when the BIOS thinks the sector + ; size is 512!!! For that, we need such a BIOS, though... +%ifdef DEBUG_MESSAGES + mov si, secsize_msg + call writemsg + mov ax, [dp_secsize] + call writehex4 + call crlf +%endif + + + ; + ; Clear Files structures + ; + mov di, Files + mov cx, (MAX_OPEN*open_file_t_size)/4 + xor eax, eax + rep stosd + + ; + ; Now, we need to sniff out the actual filesystem data structures. + ; mkisofs gave us a pointer to the primary volume descriptor + ; (which will be at 16 only for a single-session disk!); from the PVD + ; we should be able to find the rest of what we need to know. + ; +get_fs_structures: + mov eax, 16 ; Primary Volume Descriptor (sector 16) + mov bx, trackbuf + call getonesec + + mov eax, [trackbuf+156+2] + mov [RootDir+dir_lba],eax + mov [CurDir+dir_lba],eax +%ifdef DEBUG_MESSAGES + mov si, rootloc_msg + call writemsg + call writehex8 + call crlf +%endif + + mov eax,[trackbuf+156+10] + mov [RootDir+dir_len],eax + mov [CurDir+dir_len],eax +%ifdef DEBUG_MESSAGES + mov si, rootlen_msg + call writemsg + call writehex8 + call crlf +%endif + add eax,SECTORSIZE-1 + shr eax,SECTORSIZE_LG2 + mov [RootDir+dir_clust],eax + mov [CurDir+dir_clust],eax +%ifdef DEBUG_MESSAGES + mov si, rootsect_msg + call writemsg + call writehex8 + call crlf +%endif + + ; Look for the "REACTOS" directory, and if found, + ; make it the current directory instead of the root + ; directory. + mov di,isolinux_dir + mov al,02h ; Search for a directory + call searchdir_iso + jnz .dir_found + mov si,no_dir_msg + call writemsg + jmp kaboom + +.dir_found: + mov [CurDir+dir_len],eax + mov eax,[si+file_left] + mov [CurDir+dir_clust],eax + xor eax,eax ; Free this file pointer entry + xchg eax,[si+file_sector] + mov [CurDir+dir_lba],eax + + + mov di, isolinux_bin ; di points to Isolinux filename + call searchdir ; look for the file + jnz .isolinux_opened ; got the file + mov si, no_isolinux_msg ; si points to error message + call writemsg ; display the message + jmp kaboom ; fail boot + +.isolinux_opened: + mov di, si ; save file pointer + +%ifdef DEBUG_MESSAGES + mov si, filelen_msg + call writemsg + call writehex8 + call crlf +%endif + + mov ecx, eax ; calculate sector count + shr ecx, 11 + test eax, 0x7FF + jz .full_sector + inc ecx +.full_sector: + +%ifdef DEBUG_MESSAGES + mov eax, ecx + mov si, filesect_msg + call writemsg + call writehex8 + call crlf +%endif + + mov bx, 0x8000 ; bx = load address + mov si, di ; restore file pointer + mov cx, 0xFFFF ; load the whole file + call getfssec ; get the whole file + +%ifdef DEBUG_MESSAGES + mov si, startldr_msg + call writemsg + call crlf +%endif + + mov dl, [DriveNo] ; dl = boot drive + mov dh, 0 ; dh = boot partition + jmp 0:0x8000 ; jump into OSLoader + + + +; +; searchdir: +; +; Open a file +; +; On entry: +; DS:DI = filename +; If successful: +; ZF clear +; SI = file pointer +; DX:AX or EAX = file length in bytes +; If unsuccessful +; ZF set +; + +; +; searchdir_iso is a special entry point for ISOLINUX only. In addition +; to the above, searchdir_iso passes a file flag mask in AL. This is useful +; for searching for directories. +; +alloc_failure: + xor ax,ax ; ZF <- 1 + ret + +searchdir: + xor al,al +searchdir_iso: + mov [ISOFlags],al + call allocate_file ; Temporary file structure for directory + jnz alloc_failure + push es + push ds + pop es ; ES = DS + mov si,CurDir + cmp byte [di],'\' ; If filename begins with slash + jne .not_rooted + inc di ; Skip leading slash + mov si,RootDir ; Reference root directory instead +.not_rooted: + mov eax,[si+dir_clust] + mov [bx+file_left],eax + mov eax,[si+dir_lba] + mov [bx+file_sector],eax + mov edx,[si+dir_len] + +.look_for_slash: + mov ax,di +.scan: + mov cl,[di] + inc di + and cl,cl + jz .isfile + cmp cl,'\' + jne .scan + mov [di-1],byte 0 ; Terminate at directory name + mov cl,02h ; Search for directory + xchg cl,[ISOFlags] + push di + push cx + push word .resume ; Where to "return" to + push es +.isfile: + xchg ax,di + +.getsome: + ; Get a chunk of the directory + mov si,trackbuf + pushad + xchg bx,si + mov cx,1 ; load one sector + call getfssec + popad + +.compare: + movzx eax, byte [si] ; Length of directory entry + cmp al, 33 + jb .next_sector + mov cl, [si+25] + xor cl, [ISOFlags] + test cl, byte 8Eh ; Unwanted file attributes! + jnz .not_file + pusha + movzx cx, byte [si+32] ; File identifier length + add si, byte 33 ; File identifier offset + call iso_compare_names + popa + je .success +.not_file: + sub edx, eax ; Decrease bytes left + jbe .failure + add si, ax ; Advance pointer + +.check_overrun: + ; Did we finish the buffer? + cmp si, trackbuf+trackbufsize + jb .compare ; No, keep going + + jmp short .getsome ; Get some more directory + +.next_sector: + ; Advance to the beginning of next sector + lea ax, [si+SECTORSIZE-1] + and ax, ~(SECTORSIZE-1) + sub ax, si + jmp short .not_file ; We still need to do length checks + +.failure: +%ifdef DEBUG_MESSAGES + mov si, findfail_msg + call writemsg + call crlf +%endif + xor eax, eax ; ZF = 1 + mov [bx+file_sector], eax + pop es + ret + +.success: + mov eax, [si+2] ; Location of extent + mov [bx+file_sector], eax + mov eax, [si+10] ; Data length + push eax + add eax, SECTORSIZE-1 + shr eax, SECTORSIZE_LG2 + mov [bx+file_left], eax + pop eax + mov edx, eax + shr edx, 16 + and bx, bx ; ZF = 0 + mov si, bx + pop es + ret + +.resume: + ; We get here if we were only doing part of a lookup + ; This relies on the fact that .success returns bx == si + xchg edx, eax ; Directory length in edx + pop cx ; Old ISOFlags + pop di ; Next filename pointer + + mov byte [di-1], '\' ; restore the backslash in the filename + + mov [ISOFlags], cl ; Restore the flags + jz .failure ; Did we fail? If so fail for real! + jmp .look_for_slash ; Otherwise, next level + +; +; allocate_file: Allocate a file structure +; +; If successful: +; ZF set +; BX = file pointer +; In unsuccessful: +; ZF clear +; +allocate_file: + push cx + mov bx, Files + mov cx, MAX_OPEN +.check: + cmp dword [bx], byte 0 + je .found + add bx, open_file_t_size ; ZF = 0 + loop .check + ; ZF = 0 if we fell out of the loop +.found: + pop cx + ret + +; +; iso_compare_names: +; Compare the names DS:SI and DS:DI and report if they are +; equal from an ISO 9660 perspective. SI is the name from +; the filesystem; CX indicates its length, and ';' terminates. +; DI is expected to end with a null. +; +; Note: clobbers AX, CX, SI, DI; assumes DS == ES == base segment +; +iso_compare_names: + ; First, terminate and canonicalize input filename + push di + mov di, ISOFileName +.canon_loop: + jcxz .canon_end + lodsb + dec cx + cmp al, ';' + je .canon_end + and al, al + je .canon_end + stosb + cmp di, ISOFileNameEnd-1 ; Guard against buffer overrun + jb .canon_loop +.canon_end: + cmp di, ISOFileName + jbe .canon_done + cmp byte [di-1], '.' ; Remove terminal dots + jne .canon_done + dec di + jmp short .canon_end +.canon_done: + mov [di], byte 0 ; Null-terminate string + pop di + mov si, ISOFileName +.compare: + lodsb + mov ah, [di] + inc di + and ax, ax + jz .success ; End of string for both + and al, al ; Is either one end of string? + jz .failure ; If so, failure + and ah, ah + jz .failure + or ax, 2020h ; Convert to lower case + cmp al, ah + je .compare +.failure: + and ax, ax ; ZF = 0 (at least one will be nonzero) +.success: + ret + + + + + + + +; +; getfssec: Get multiple clusters from a file, given the file pointer. +; +; On entry: +; ES:BX -> Buffer +; SI -> File pointer +; CX -> Cluster count; 0FFFFh = until end of file +; On exit: +; SI -> File pointer (or 0 on EOF) +; CF = 1 -> Hit EOF +; +getfssec: + cmp cx, [si+file_left] + jna .ok_size + mov cx, [si+file_left] + +.ok_size: + mov bp, cx + push cx + push si + mov eax, [si+file_sector] + call getlinsec + xor ecx, ecx + pop si + pop cx + + add [si+file_sector], ecx + sub [si+file_left], ecx + ja .not_eof ; CF = 0 + + xor ecx, ecx + mov [si+file_sector], ecx ; Mark as unused + xor si,si + stc + +.not_eof: + ret + + + +; INT 13h, AX=4B01h, DL=<passed in value> failed. +; Try to scan the entire 80h-FFh from the end. +spec_query_failed: + mov si,spec_err_msg + call writemsg + + mov dl, 0FFh +.test_loop: + pusha + mov ax, 4B01h + mov si, spec_packet + mov byte [si], 13 ; Size of buffer + int 13h + popa + jc .still_broken + + mov si, maybe_msg + call writemsg + mov al, dl + call writehex2 + call crlf + + cmp byte [sp_drive], dl + jne .maybe_broken + + ; Okay, good enough... + mov si, alright_msg + call writemsg + mov [DriveNo], dl +.found_drive: + jmp found_drive + + ; Award BIOS 4.51 apparently passes garbage in sp_drive, + ; but if this was the drive number originally passed in + ; DL then consider it "good enough" +.maybe_broken: + cmp byte [DriveNo], dl + je .found_drive + +.still_broken: + dec dx + cmp dl, 80h + jnb .test_loop + +fatal_error: + mov si, nothing_msg + call writemsg + +.norge: + jmp short .norge + + + + ; Information message (DS:SI) output + ; Prefix with "isolinux: " + ; +writemsg: + push ax + push si + mov si, isolinux_str + call writestr + pop si + call writestr + pop ax + ret + +; +; crlf: Print a newline +; +crlf: + mov si, crlf_msg + ; Fall through + +; +; writestr: write a null-terminated string to the console, saving +; registers on entry. +; +writestr: + pushfd + pushad +.top: + lodsb + and al, al + jz .end + call writechr + jmp short .top +.end: + popad + popfd + ret + + +; +; writehex[248]: Write a hex number in (AL, AX, EAX) to the console +; +writehex2: + pushfd + pushad + shl eax, 24 + mov cx, 2 + jmp short writehex_common +writehex4: + pushfd + pushad + shl eax, 16 + mov cx, 4 + jmp short writehex_common +writehex8: + pushfd + pushad + mov cx, 8 +writehex_common: +.loop: + rol eax, 4 + push eax + and al, 0Fh + cmp al, 10 + jae .high +.low: + add al, '0' + jmp short .ischar +.high: + add al, 'A'-10 +.ischar: + call writechr + pop eax + loop .loop + popad + popfd + ret + +; +; Write a character to the screen. There is a more "sophisticated" +; version of this in the subsequent code, so we patch the pointer +; when appropriate. +; + +writechr: + pushfd + pushad + mov ah, 0Eh + xor bx, bx + int 10h + popad + popfd + ret + +; +; Get one sector. Convenience entry point. +; +getonesec: + mov bp, 1 + ; Fall through to getlinsec + +; +; Get linear sectors - EBIOS LBA addressing, 2048-byte sectors. +; +; Note that we can't always do this as a single request, because at least +; Phoenix BIOSes has a 127-sector limit. To be on the safe side, stick +; to 32 sectors (64K) per request. +; +; Input: +; EAX - Linear sector number +; ES:BX - Target buffer +; BP - Sector count +; +getlinsec: + mov si,dapa ; Load up the DAPA + mov [si+4],bx + mov bx,es + mov [si+6],bx + mov [si+8],eax +.loop2: + push bp ; Sectors left + cmp bp,[MaxTransfer] + jbe .bp_ok + mov bp,[MaxTransfer] +.bp_ok: + mov [si+2],bp + push si + mov dl,[DriveNo] + mov ah,42h ; Extended Read + call xint13 + pop si + pop bp + movzx eax,word [si+2] ; Sectors we read + add [si+8],eax ; Advance sector pointer + sub bp,ax ; Sectors left + shl ax,SECTORSIZE_LG2-4 ; 2048-byte sectors -> segment + add [si+6],ax ; Advance buffer pointer + and bp,bp + jnz .loop2 + mov eax,[si+8] ; Next sector + ret + + ; INT 13h with retry +xint13: + mov byte [RetryCount], retry_count +.try: + pushad + int 13h + jc .error + add sp, byte 8*4 ; Clean up stack + ret +.error: + mov [DiskError], ah ; Save error code + popad + dec byte [RetryCount] + jz .real_error + push ax + mov al,[RetryCount] + mov ah,[dapa+2] ; Sector transfer count + cmp al,2 ; Only 2 attempts left + ja .nodanger + mov ah,1 ; Drop transfer size to 1 + jmp short .setsize +.nodanger: + cmp al,retry_count-2 + ja .again ; First time, just try again + shr ah,1 ; Otherwise, try to reduce + adc ah,0 ; the max transfer size, but not to 0 +.setsize: + mov [MaxTransfer],ah + mov [dapa+2],ah +.again: + pop ax + jmp .try + +.real_error: + mov si, diskerr_msg + call writemsg + mov al, [DiskError] + call writehex2 + mov si, ondrive_str + call writestr + mov al, dl + call writehex2 + call crlf + ; Fall through to kaboom + +; +; kaboom: write a message and bail out. Wait for a user keypress, +; then do a hard reboot. +; +kaboom: + mov ax, cs + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + sti + mov si, err_bootfailed + call writestr + call getchar + cli + mov word [BIOS_magic], 0 ; Cold reboot + jmp 0F000h:0FFF0h ; Reset vector address + +getchar: +.again: + mov ah, 1 ; Poll keyboard + int 16h + jz .again +.kbd: + xor ax, ax ; Get keyboard input + int 16h +.func_key: + ret + + +; +; pollchar: check if we have an input character pending (ZF = 0) +; +pollchar: + pushad + mov ah,1 ; Poll keyboard + int 16h + popad + ret + + + +isolinux_banner db CR, LF, 'Loading IsoBoot...', CR, LF, 0 +copyright_str db ' Copyright (C) 1994-2002 H. Peter Anvin', CR, LF, 0 +presskey_msg db 'Press any key to boot from CD', 0 +dot_msg db '.',0 + +%ifdef DEBUG_MESSAGES +startup_msg: db 'Starting up, DL = ', 0 +spec_ok_msg: db 'Loaded spec packet OK, drive = ', 0 +secsize_msg: db 'Sector size appears to be ', 0 +rootloc_msg: db 'Root directory location: ', 0 +rootlen_msg: db 'Root directory length: ', 0 +rootsect_msg: db 'Root directory length(sectors): ', 0 +fileloc_msg: db 'SETUPLDR.SYS location: ', 0 +filelen_msg: db 'SETUPLDR.SYS length: ', 0 +filesect_msg: db 'SETUPLDR.SYS length(sectors): ', 0 +findfail_msg: db 'Failed to find file!', 0 +startldr_msg: db 'Starting SETUPLDR.SYS', 0 +%endif + +nosecsize_msg: db 'Failed to get sector size, assuming 0800', CR, LF, 0 +spec_err_msg: db 'Loading spec packet failed, trying to wing it...', CR, LF, 0 +maybe_msg: db 'Found something at drive = ', 0 +alright_msg: db 'Looks like it might be right, continuing...', CR, LF, 0 +nothing_msg: db 'Failed to locate CD-ROM device; boot failed.', CR, LF, 0 +isolinux_str db 'IsoBoot: ', 0 +crlf_msg db CR, LF, 0 +diskerr_msg: db 'Disk error ', 0 +ondrive_str: db ', drive ', 0 +err_bootfailed db CR, LF, 'Boot failed: press a key to retry...' +isolinux_dir db '\LOADER', 0 +no_dir_msg db 'Could not find the LOADER directory.', CR, LF, 0 +isolinux_bin db 'SETUPLDR.SYS', 0 +no_isolinux_msg db 'Could not find SETUPLDR.SYS.', CR, LF, 0 + +; +; El Torito spec packet +; + align 8, db 0 +spec_packet: db 13h ; Size of packet +sp_media: db 0 ; Media type +sp_drive: db 0 ; Drive number +sp_controller: db 0 ; Controller index +sp_lba: dd 0 ; LBA for emulated disk image +sp_devspec: dw 0 ; IDE/SCSI information +sp_buffer: dw 0 ; User-provided buffer +sp_loadseg: dw 0 ; Load segment +sp_sectors: dw 0 ; Sector count +sp_chs: db 0,0,0 ; Simulated CHS geometry +sp_dummy: db 0 ; Scratch, safe to overwrite + +; +; EBIOS drive parameter packet +; + align 8, db 0 +drive_params: dw 30 ; Buffer size +dp_flags: dw 0 ; Information flags +dp_cyl: dd 0 ; Physical cylinders +dp_head: dd 0 ; Physical heads +dp_sec: dd 0 ; Physical sectors/track +dp_totalsec: dd 0,0 ; Total sectors +dp_secsize: dw 0 ; Bytes per sector +dp_dpte: dd 0 ; Device Parameter Table +dp_dpi_key: dw 0 ; 0BEDDh if rest valid +dp_dpi_len: db 0 ; DPI len + db 0 + dw 0 +dp_bus: times 4 db 0 ; Host bus type +dp_interface: times 8 db 0 ; Interface type +db_i_path: dd 0,0 ; Interface path +db_d_path: dd 0,0 ; Device path + db 0 +db_dpi_csum: db 0 ; Checksum for DPI info + +; +; EBIOS disk address packet +; + align 8, db 0 +dapa: dw 16 ; Packet size +.count: dw 0 ; Block count +.off: dw 0 ; Offset of buffer +.seg: dw 0 ; Segment of buffer +.lba: dd 0 ; LBA (LSW) + dd 0 ; LBA (MSW) + + alignb 4, db 0 +MaxTransfer dw 2 ;32 ; Max sectors per transfer + + times 2046-($-$$) db 0 ; Pad to file offset 2046 + dw 0aa55h ; BootSector signature
18 years, 4 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
45
Older →
Jump to page:
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
Results per page:
10
25
50
100
200