-
Notifications
You must be signed in to change notification settings - Fork 108
Developing for ELKS on Windows
You can clone and compile ELKS inside WSL2 (Windows Subsystem for Linux). It works perfectly.
Example: ../cross/bin/ia16-elf-gcc ./vgatest.c -o vgatest -melks-libc -mcmodel=small
You can do the compilation inside WSL2 and access your C files with your favorite Windows editor by using: \\wsl.localhost\
or \\wsl$
.
Using VS Code with WSL2 plugin
Using MS Visual Studio with remote execution plugin through SSH.
You can copy an image to Windows using: cp ./image/fd1440-fat.img /mnt/c/Temp
to c:\temp
Or use:
net use y: \\wsl$\Ubuntu-20.04
copy y:\home\YOUR_USER\elks\image\fd1440-fat.img c:\temp
After compilation you can use the following script that will take a newly created 1440-fat ELKS image, mount it, copy your executable (vgatest), unmount it and store it to c:\Temp
.
rm /mnt/c/Temp/fd1440-fat.img
sudo mount -t vfat ../image/fd1440-fat.img /mnt/elksimage
sudo cp vgatest /mnt/elksimage/
sudo umount /mnt/elksimage
cp ../image/fd1440-fat.img /mnt/c/Temp
Note that you will need to adapt this script. Next you can either use qemu to boot the image or write it to a floppy drive.