Files
mars_nwe_pcab/CROSS-BUILD.md

5.3 KiB
Raw Permalink Blame History

MARS_NWE-PCAP 0.7 – Linux cross-build preview

This extends the 0.6 preview without changing the Linux server protocol or creating any additional service. This is a build-enablement release, not a complete or certified Windows network driver release.

From the project directory, preferably as a normal user with sudo:

./build-windows.sh

The script installs Clang/LLVM/LLD, i686 MinGW-w64 (including the free DDK-compatible headers and import libraries), and supporting tools via apt. Then it automatically obtains the official Open Watcom snapshot from GitHub and extracts it to .toolchains/watcom. No downloaded installer is executed. make windows-all does the same. To install dependencies only: make windows-tools.

Open Watcom release URL: https://github.com/open-watcom/open-watcom-v2/releases . The release API selects either owsnapshot.tar.xz or ow-snapshot.tar.xz. GitHub's published asset SHA-256 is checked if supplied; otherwise the observed digest is recorded, not independently authenticated. Set WATCOM_SHA256 to enforce a known digest. WATCOM_TAG can select a dated official release rather than the mutable Current-build. WATCOM_URL may select a custom HTTPS mirror, but requires WATCOM_SHA256. The URL, tag and digest are recorded in .toolchains/watcom/ORIGIN.txt; the cache is reused until manually moved aside. For reproducible builds record the apt package versions and use a pinned Watcom tag and digest. The scripts never download proprietary Microsoft DDK packages or vendor driver binaries. MARS_TOOLCHAIN_DIR overrides the cache location. WATCOM can reference a preinstalled compiler. On other Linux distributions install equivalent dependencies manually.

Build again without network access

./build-windows.sh --no-install
make windows95
make windows98
make windowsme
make windowsnt4
make windows2000
make windowsxp

Individual targets assume tools have already been installed. make windows-diag builds only the freestanding x86 diagnostic. make windows-watcom compiles the existing shared IPXPKT C sources into Win32 objects. make windows-nt5 attempts the native and TAP user-mode bridges and NDIS5 miniport via MinGW-w64. The MinGW DDK include path defaults to /usr/i686-w64-mingw32/include/ddk; override via MINGW_DDK_INCLUDE. The compiler commands can be overridden via MINGW_CC, MINGW_CXX, MINGW_OBJDUMP.

Results

build/cross/STATUS.txt and build/cross/*.log show the outcome of each build. Failed builds are not exported as complete driver packages. build/cross/packages/WIN95, WIN98, WINME, WINNT40, WIN2000, WINXP contain the available binaries. IPXDIAG.EXE queries the local Winsock IPX provider; no CRT is used. This executable was cross-compiled and checked for PE32/x86 and imports from KERNEL32/WSOCK32 only. It has not been executed on actual Windows. It does not provide Internet access. Run IPXDIAG.EXE in a command prompt after installing IPX/SPX and the appropriate Winsock provider. On NT5 the script attempts MARSNDIS.SYS, MARSNDIS.INF, MARSIPX.EXE and MARSTAP.EXE. TAP requires an external compatible TAP driver. The native driver source is unchanged except for the kernel include order. MinGW compile/link has not been verified here, and successful linking would not certify old-Windows API compatibility. Review *.imports.txt in build/cross/nt5 and compare against the actual target OS exports; use a VM snapshot before any installation. The modern MinGW CRT may import newer functions than Windows 2000/XP provide. The original VC6/DDK path remains available (see WINDOWS.md).

Win95/98/ME/NT4: only diagnostic and common protocol code, no own miniport or VxD yet. The older external-filter bridge source remains in clients/windows/marsnet.cpp and the original VC6 build script, requiring separately obtained version-matched external SDK/driver. No third-party driver redistribution or unverified SDK download. The source of the NT5 driver is not portable as-is to Win9x/NT4. No automated driver installation or publication takes place by default.

Publish

After verifying the client build and configuring a running MARS gateway, use the existing publisher. For the diagnostic alone:

sudo ./publish-winclient.sh build/cross/diag

This publishes IPXDIAG.EXE for all six systems and generates GATEWAY.INI. For a complete tested on your target NT5 candidate, prepare a clean staging folder containing MARSNDIS.SYS, MARSNDIS.INF, MARSIPX.EXE and optionally IPXDIAG.EXE; then pass that directory to the publisher. Existing CLIENTS directories are never overwritten automatically. Verify the NetWare read-only trustees. See WINDOWS.md. Do not publish the untested kernel driver to production users.

Linux server

The previous ./build.sh and installation workflow remain separate. To build the Linux server from scratch on Debian/Ubuntu:

sudo apt install build-essential cmake git pkg-config libpcap-dev libgdbm-dev libcrypt-dev libssl-dev libcivetweb-dev libjson-c-dev cups-client libcups2-dev iproute2 nftables
./build.sh

The original MARS sources are still fetched and patched by build.sh. For an existing 0.6 installation, no server reinstall is needed solely for cross-building Windows clients. The package keeps the existing mars_vme.service architecture.