1

I am trying to follow this osdev book from github https://littleosbook.github.io/. I am currently using windows on my computer. When I tried to follow the book's linking process, it converts it to an elf file. But windows threw an error that elf is not supported runtimes.

Thus I shifted to WSL( Windows Subsystem on Linux ), and it all went smooth until I ran the bochs simulator. It is throwing an error of Cannot connect to X display if I use X, or sdl library could not be found when I use sdl.

Here is the bochs configuration file:

megs:            32
display_library: sdl
romimage:        file=/usr/share/bochs/BIOS-bochs-latest
vgaromimage:     file=/usr/share/bochs/VGABIOS-lgpl-latest
ata0-master:     type=cdrom, path=os.iso, status=inserted
boot:            cdrom
log:             bochslog.txt
clock:           sync=realtime, time0=local
cpu:             count=1, ips=1000000

How should I run this?

1 Answers1

0

WSL is not a complete GNU/Linux as far as i know, (I have NOT checked details!).

I'd guess you would be far better off using e.g. a VM with Ubuntu in Virtualbox.

Ref: https://littleosbook.github.io/
All the code examples assumes that the code is being compiled on a UNIX like operating system. All code examples have been successfully compiled using Ubuntu [6] versions 11.04 and 11.10.

... the most recent Ubuntu is 20.04, so 11.04 is maybe ten years old... there has been a lot happening since then. The examples on how to do it might not work due to a single one of those changes.

Hannu
  • 8,740
  • 3
  • 21
  • 39