Tags
Language
Tags
October 2025
Su Mo Tu We Th Fr Sa
28 29 30 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 1
    Attention❗ To save your time, in order to download anything on this site, you must be registered 👉 HERE. If you do not have a registration yet, it is better to do it right away. ✌

    ( • )( • ) ( ͡⚆ ͜ʖ ͡⚆ ) (‿ˠ‿)
    SpicyMags.xyz

    How to build and run Unix-xv6 with Command Prompt on Windows

    Posted By: Free butterfly
    How to build and run Unix-xv6 with Command Prompt on Windows

    How to build and run Unix-xv6 with Command Prompt on Windows by Hiroshi Uno
    English | 2022 | ISBN: N/A | ASIN: B09VYC5KKG | 215 pages | EPUB | 0.22 Mb

    In 1975, Bell Labs released Unix Version 6 (also known as Sixth Edition Unix). Unix-xv6 to be built this time is Unix Version 6 ported to multiprocessor x86 by ANSI C, and is still used as an educational tool at universities such as Massachusetts Institute of Technology.
    "I have built and run xv6 with Command Prompt (cmd.exe) on Windows 10". That's what I've done. Not on Linux, nor Windows10 + WSL environment, nor Windwos10 + Cygwin or MSYS environment, I built it on Windows10 using Command Prompt.
    Why did I dare to choose more difficult way? Looking back now, I feel as follows. Building on Linux is like flying from Osaka to Tokyo. I arrive at my destination in an hour. The build is completed, the goal is achieved, and that's it. There is no room to know about the famous and attractive places between Osaka and Tokyo. Building on Windows was like traveling on foot along the 53 Stations of the Tokaido. It took about 2 weeks. I touched various tools, encountered problems one after another, gained a little knowledge each time, felt like I was improving my skills, and was happy when the problems were solved. And finally when xv6 showed me its prompt, I was really impressed. And I was also attached to xv6, which eventually worked. For the past two weeks, I enjoyed like I was excited to read detective novels, and I was absorbed in adventure games. By taking a detour and building on Windows, I feel like I've successfully completed my great adventure.
    Let me introduce a little about what kind of trip it was. On Linux, "Download the xv6 source file and run the make command." this is all we need to do to build xv6. Then, "Install QEMU and enter the command make qemu." This start xv6. On the other hand, when I ran the make command on Windows 10, I got a lot of errors. I had to investigate the cause of the errors and resolve them altogether. I solved the make command errors, C compile errors, and other command errors one by one. I'm not an expert in the program, so I didn't know much about it, and the progress was as slow as a turtle. For make command, I started from understanding what was written in Makefile. Specifically, in addition to how to write Makefile, I investigated the operation of tools such as gcc, ld, objcopy, dd, qemu, and gdb used in Makefile and the meaning of their options. As a matter of course, I also searched for and obtained the Windows 10 version of these tools. I actually entered the command described in Makefile into the command prompt, and while confirming that my understanding was correct from the output result, I went forward step by step.
    One of the big problems was that "the specifications and behavior of the tools are different between the Linux version and the Windows version". Especially the difference of gcc (ld) was fatal. In UNIX and Linux, the ELF format (Executable and Linking Format) is used for object files and executable files. Since xv6 is UNIX, it is necessary to have the compiler output programs such as kernel and init in ELF format when building xv6. The Linux version of gcc (ld) outputs in ELF format by default. On the other hand, Windows uses the PE format (Potable Executable). Naturally, the Windows version of gcc (ld) outputs the program in PE format. The problem is that the Windows version of gcc couldn't output in ELF format no matter what options were specified. Now, I will explain in detail in the text how to solve this problem.
    How the trip went is like this. By the process so far, it seems that I could come to Hamamatsu on the Tokaido. It was such a trip, but I'm glad I tried it. I'm really glad I walked to the end without giving up. If anyone wants to take on the challenge, I would like to support them with all my might. The record of my trip may be useful to someone. This book was born from this thought.

    Feel Free to contact me for book requests, informations or feedbacks.
    Without You And Your Support We Can’t Continue
    Thanks For Buying Premium From My Links For Support