GithubHelp home page GithubHelp logo

doslinux's Introduction

DOS Subsystem for Linux

A WSL alternative for users who prefer an MS-DOS environment. DOS Subsystem for Linux integrates a real Linux environment into MS-DOS systems, allowing users to make use of both DOS and Linux applications from the DOS command prompt.

Building

  • You will need a cross toolchain targeting i386-linux-musl on PATH.

    https://github.com/richfelker/musl-cross-make is a tool that can build one for you with minimal hassle. Set TARGET to i386-linux-musl.

  • Build the prequisites (Linux and Busybox) by running J=xxx script/build-prereq, replacing xxx with the desired build parallelism.

  • You will need a hard drive image hdd.base.img with an installed copy of MS-DOS on the first partition.

  • Run make

    This will produce a new hard drive image hdd.img with DOS Subsystem for Linux installed. Invoke C:\doslinux\dsl <command> to run Linux commands. C:\doslinux can also be placed on your DOS PATH for greater convenience.

doslinux's People

Contributors

haileys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doslinux's Issues

Failed to load bzImage

I've tried both one I compiled and a pre-compiled one I found. A side note: both don't work without the memory manager being disabled, I'm surprised nobody mentioned this but it would be very nice to have HIMEM support. But it doesn't matter as of now because both of those versions report that the bzImage could not be found. I've tried on both DOSBOX-X and my real 98 machine, it works on neither. I've admittedly never built a Linux distro before so if there's any files that I should provide please let me know. Otherwise, I have nothing to provide.

Add support for Linux 2.4

Linux 2.4.37.11 was the last version of a kernel to (reliably) support UMSDOS, which adds Linux permissions to FAT partitions. There's also a site to add UVFAT (UMSDOS combined with VFAT == LFN) support to the 2.4.19, which patches successfully on 2.4.24 and requires some renaming on 2.4.25-2.4.37.11.

Considering DOS == FAT, this can make implementing rootfs much easier.

Please add a license to this repo

First, thank you for sharing this project with us!

Could you please add an explicit LICENSE file to the repo so that it's clear
under what terms the content is provided, and under what terms user
contributions are licensed?

Per GitHub docs on licensing:

[...] without a license, the default copyright laws apply, meaning that you
retain all rights to your source code and no one may reproduce, distribute,
or create derivative works from your work. If you're creating an open source
project, we strongly encourage you to include an open source license.

Thanks!

'About' is wrong

Surely this is about running DOS programs on Linux, not the other way around?

Build scripts do not use cross compiler for linux!

A major oversight (even on my part!), the linux build script (https://github.com/haileys/doslinux/blob/master/script/build-linux) doesn't actually use the arguments to call the cross-compiler! I discovered this when porting doslinux to Fedora 38.

Currently, it seems like F38's gcc 13 is too new to build Linux kernel 5.8.9. Ubuntu 22.04's gcc 11 is fine. I think F36 might work OOTB but I'd have to build a VM to verify that. May do that even though it's gone EOL in May 2023.

One way to cross-compile the Linux 5.8.9 kernel (based on https://gts3.org/2017/cross-kernel.html) is to do the following

## DL Linux
# https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.9.tar.gz
## Extract Linux Kernel source
# tar zxvf linux-5.8.9.tar.gz
## Copy in the config
# cp -v linux-config-doslinux linux-5.8.9/
## Build
# cd linux-5.8.9 && make -j4 ARCH=x86 CROSS_COMPILE=i386-linux-musl

This is building for me w/F38, a gcc 9.4.0 cross-compiler in /usr/local/. I'm off to verify this in Ubuntu 22.04 now.

doskey is supported?

doskey is supported? Could the README mention this briefly?

I ask because I autogenerate a valid doskey file which I use on my win10 laptop

  • cmd.exe. Would be nice if this works on doslinux-DOS too (I am mostly
    caring about my custom cd-aliases for faster file navigation.)

Graphical application support

Might sound ridiculous, but why not? It's possible to mimic the new WSL approach and launch RDP client on DOS and Wayland server on Linux. Should be a lot of work, but I can't see why this wouldn't work.

Cannot initialize 'C:'

Tried this with a qcow image i generated via http://gunkies.org/wiki/Installing_MS-DOS_on_Qemu - which resulted in:

โžœ make
nasm -o doslinux.com -f bin doslinux.asm
i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/init.o -c init/init.c
i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/vm86.o -c init/vm86.c
i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/panic.o -c init/panic.c
i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/kbd.o -c init/kbd.c
i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/term.o -c init/term.c
i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/init init/init.o init/vm86.o init/panic.o init/kbd.o init/term.o
cp hdd.base.img hdd.img
MTOOLSRC=mtoolsrc mmd C:/doslinux
init C: non DOS media
Cannot initialize 'C:'
make: *** [Makefile:19: hdd.img] Error 1

Add support for using a FreeDOS image

FreeDOS is pretty much a drop in replacement in most cases and has a lot more recent development and less licensing concerns. Plus FOSS is great.

I'm bit confused by what this is ?

Can some more information be added to the README ?

Is the name a pun, or does this run in WIndows, a bit like WSL ?

The screenshot shows it running in QEMU, I'm confused...

Docker support?

It would be great if docker was supported. Is it possible? ๐Ÿ˜Š

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.